ZHANGYUXUAN-zR commited on
Commit
815bc45
·
verified ·
1 Parent(s): 1430f5f

Add files using upload-large-folder tool

Browse files
md/train/GlEWs-V9boR/GlEWs-V9boR.md ADDED
@@ -0,0 +1,307 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Volume Rendering of Neural Implicit Surfaces
2
+
3
+ Lior Yariv1 Jiatao Gu2 Yoni Kasten1 Yaron Lipman1,2 1Weizmann Institute of Science 2Facebook AI Research
4
+
5
+ # Abstract
6
+
7
+ Neural volume rendering became increasingly popular recently due to its success in synthesizing novel views of a scene from a sparse set of input images. So far, the geometry learned by neural volume rendering techniques was modeled using a generic density function. Furthermore, the geometry itself was extracted using an arbitrary level set of the density function leading to a noisy, often low fidelity reconstruction. The goal of this paper is to improve geometry representation and reconstruction in neural volume rendering. We achieve that by modeling the volume density as a function of the geometry. This is in contrast to previous work modeling the geometry as a function of the volume density. In more detail, we define the volume density function as Laplace’s cumulative distribution function (CDF) applied to a signed distance function (SDF) representation. This simple density representation has three benefits: (i) it provides a useful inductive bias to the geometry learned in the neural volume rendering process; (ii) it facilitates a bound on the opacity approximation error, leading to an accurate sampling of the viewing ray. Accurate sampling is important to provide a precise coupling of geometry and radiance; and (iii) it allows efficient unsupervised disentanglement of shape and appearance in volume rendering. Applying this new density representation to challenging scene multiview datasets produced high quality geometry reconstructions, outperforming relevant baselines. Furthermore, switching shape and appearance between scenes is possible due to the disentanglement of the two.
8
+
9
+ # 1 Introduction
10
+
11
+ Volume rendering [18] is a set of techniques that renders volume density in radiance fields by the so called volume rendering integral. It has recently been shown that representing both the density and radiance fields as neural networks can lead to excellent prediction of novel views by learning only from a sparse set of input images. This neural volume rendering approach, presented in [21] and developed by its follow-ups [34, 2] approximates the integral as alpha-composition in a differentiable way, allowing to learn simultaneously both from input images. Although this coupling indeed leads to good generalization of novel viewing directions, the density part is not as successful in faithfully predicting the scene’s actual geometry, often producing noisy, low fidelity geometry approximation.
12
+
13
+ We propose VolSDF to devise a different model for the density in neural volume rendering, leading to better approximation of the scene’s geometry while maintaining the quality of view synthesis. The key idea is to represent the density as a function of the signed distance to the scene’s surface, see Figure 1. Such density function enjoys several benefits. First, it guarantees the existence of a well-defined surface that generates the density. This provides a useful inductive bias for disentangling density and radiance fields, which in turn provides a more accurate geometry approximation. Second, we show this density formulation allows bounding the approximation error of the opacity along rays. This bound is used to sample the viewing ray so to provide a faithful coupling of density and radiance field in the volume rendering integral. E.g., without such a bound the computed radiance along a ray (pixel color) can potentially miss or extend surface parts leading to incorrect radiance approximation.
14
+
15
+ ![](images/755aa32d36536ca2dbae3dc8843e1bcb086effd252230c842d44bbe299f7378c.jpg)
16
+ Figure 1: VolSDF: given a set of input images (left) we learn a volumetric density (center-left, sliced) defined by a signed distance function (center-right, sliced) to produce a neural rendering (right). This definition of density facilitates high quality geometry reconstruction (gray surfaces, middle).
17
+
18
+ A closely related line of research, often referred to as neural implicit surfaces [22, 38, 14], have been focusing on representing the scene’s geometry implicitly using a neural network, making the surface rendering process differentiable. The main drawback of these methods is their requirement of masks that separate objects from the background. Also, learning to render surfaces directly tends to grow extraneous parts due to optimization problems, which are avoided by volume rendering. In a sense, our work combines the best of both worlds: volume rendering with neural implicit surfaces.
19
+
20
+ We demonstrate the efficacy of VolSDF by reconstructing surfaces from the DTU [12] and BlendedMVS [37] datasets. VolSDF produces more accurate surface reconstructions compared to NeRF [21] and $_ \mathrm { N e R F + + }$ [39], and comparable reconstruction compared to IDR [38], while avoiding the use of object masks. Furthermore, we show disentanglement results with our method, i.e., switching the density and radiance fields of different scenes, which is shown to fail in NeRF-based models.
21
+
22
+ # 2 Related work
23
+
24
+ Neural Scene Representation & Rendering Implicit functions are traditionally adopted in modeling 3D scenes [24, 11, 4]. Recent studies have been focusing on model implicit functions with multi-layer perceptron (MLP) due to its expressive representation power and low memory foot-print, including scene (geometry & appearance) representation [9, 20, 19, 23, 25, 29, 36, 28, 35] and free-view rendering [33, 16, 30, 26, 17, 21, 15, 39, 34, 2]. In particular, NeRF [21] has opened up a line of research (see [6] for an overview) combining neural implicit functions together with volume rendering to achieve photo-realistic rendering results. However, it is non-trivial to find a proper threshold to extract surfaces from the predicted density, and the recovered geometry is far from satisfactory. Furthermore, sampling of points along a ray for rendering a pixel is done using an opacity function that is approximated from another network without any guarantee for correct approximation.
25
+
26
+ Multi-view 3D Reconstruction Image-based 3D surface reconstruction (multi-view stereo) has been a longstanding problem in the past decades. Classical multi-view stereo approaches are generally either depth-based [1, 31, 8, 7] or voxel-based [5, 3, 32]. For instance, in COLMAP [31] (a typical depth-based method) image features are extracted and matched across different views to estimate depth. Then the predicted depth maps are fused to obtain dense point clouds. To obtain the surface, an additional meshing step e.g. Poisson surface reconstruction [13] is applied. However, these methods with complex pipelines may accumulate errors at each stage and usually result in incomplete 3D models, especially for non-Lambertian surfaces as they can not handle view dependent colors. On the contrary, although it produces complete models by directly modeling objects in a volume, voxel-based approaches are limited to low resolution due to high memory consumption. Recently, neural-based approaches such as DVR [22], IDR [38], NLR [14] have also been proposed to reconstruct scene geometry from multi-view images. However, these methods require accurate object masks and appropriate weight initialization due to the difficulty of propagating gradients.
27
+
28
+ Independently from and concurrently with our work here, [27] also use implicit surface representation incorporated into volume rendering. In particular, they replace the local transparency function with an occupancy network [19]. This allows adding surface smoothing term to the loss, improving the quality of the resulting surfaces. Differently from their approach, we use signed distance representation, regularized with an Eikonal loss [38, 10] without any explicit smoothing term. Furthermore, we show that the choice of using signed distance allows bounding the opacity approximation error, facilitating the approximation of the volume rendering integral for the suggested family of densities.
29
+
30
+ # 3 Method
31
+
32
+ In this section we introduce a novel parameterization for volume density, defined as transformed signed distance function. Then we show how this definition facilitates the volume rendering process. In particular, we derive a bound of the error in the opacity approximation and consequently devise a sampling procedure for approximating the volume rendering integral.
33
+
34
+ # 3.1 Density as transformed SDF
35
+
36
+ Let the set $\Omega \subset \mathbb { R } ^ { 3 }$ represent the space occupied by some object in $\mathbb { R } ^ { 3 }$ , and $\mathcal { M } = \partial \Omega$ its boundary surface. We denote by $\mathbf { 1 } _ { \Omega }$ the $\Omega$ indicator function, and by $d _ { \Omega }$ the Signed Distance Function (SDF) to its boundary $\mathcal { M }$ ,
37
+
38
+ $$
39
+ \mathbf { 1 } _ { \Omega } ( { \pmb x } ) = \{ \begin{array} { l l } { 1 } & { \mathrm { i f } { \pmb x } \in \Omega } \\ { 0 } & { \mathrm { i f } { \pmb x } \notin \Omega } \end{array} , \quad \mathrm { a n d } \ d _ { \Omega } ( { \pmb x } ) = ( - 1 ) ^ { \mathbf { 1 } _ { \Omega } ( { \pmb x } ) } \operatorname* { m i n } _ { y \in \mathcal { M } } \| { \pmb x } - { \pmb y } \| ,
40
+ $$
41
+
42
+ where $\lVert \cdot \rVert$ is the standard Euclidean 2-norm. In neural volume rendering the volume density $\sigma :$ $\mathbb { R } ^ { 3 } \to \ddot { \mathbb { R } } _ { + }$ is a scalar volumetric function, where $\sigma ( { \pmb x } )$ is the rate that light is occluded at point $_ { \textbf { \em x } }$ ; $\sigma$ is called density since it is proportional to the particle count per unit volume at $_ { \textbf { \em x } }$ [18]. In previous neural volumetric rendering approaches [21, 15, 39], the density function, $\sigma$ , was modeled with a general-purpose Multi-Layer Perceptron (MLP). In this work we suggest to model the density using a certain transformation of a learnable Signed Distance Function (SDF) $d _ { \Omega }$ , namely
43
+
44
+ $$
45
+ \begin{array} { r } { \sigma ( \pmb { x } ) = \alpha \Psi _ { \beta } \left( - d _ { \Omega } ( \pmb { x } ) \right) , } \end{array}
46
+ $$
47
+
48
+ where $\alpha , \beta > 0$ are learnable parameters, and $\Psi _ { \beta }$ is the Cumulative Distribution Function (CDF) of the Laplace distribution with zero mean and $\beta$ scale (i.e., mean absolute deviation, which is intuitively the $L _ { 1 }$ version of the standard deviation),
49
+
50
+ $$
51
+ \Psi _ { \beta } ( s ) = { \left\{ \begin{array} { l l } { { \frac { 1 } { 2 } } \exp \left( { \frac { s } { \beta } } \right) } & { { \mathrm { i f ~ } } s \leq 0 } \\ { 1 - { \frac { 1 } { 2 } } \exp \left( - { \frac { s } { \beta } } \right) } & { { \mathrm { i f ~ } } s > 0 } \end{array} \right. }
52
+ $$
53
+
54
+ Figure 1 (center left and right) depicts an example of such a density and SDF. As can be readily checked from this definition, as $\beta$ approach zero, the density $\sigma$ converges to a scaled indicator function of $\Omega$ , that is $\sigma \to \alpha \mathbf { 1 } _ { \Omega }$ for all points $\pmb { x } \in \Omega \setminus \mathcal { M }$ .
55
+
56
+ Intuitively, the density $\sigma$ models a homogeneous object with a constant density $\alpha$ that smoothly decreases near the object’s boundary, where the smoothing amount is controlled by $\beta$ . The benefit in defining the density as in equation 2 is two-fold: First, it provides a useful inductive bias for the surface geometry $\mathcal { M }$ , and provides a principled way to reconstruct the surface, i.e., as the zero level-set of $d _ { \Omega }$ . This is in contrast to previous work where the reconstruction was chosen as an arbitrary level set of the learned density. Second, the particular form of the density as defined in equation 2 facilitates a bound on the error of the opacity (or, equivalently the transparency) of the rendered volume, a crucial component in the volumetric rendering pipeline. In contrast, such a bound will be hard to devise for a generic MLP densities.
57
+
58
+ # 3.2 Volume rendering of $\sigma$
59
+
60
+ In this section we review the volume rendering integral and the numerical integration commonly used to approximate it, requiring a set $s$ of sample points per ray. In the following section (Section 3.3), we explore the properties of the density $\sigma$ and derive a bound on the opacity approximation error along viewing rays. Finally, in Section 3.4 we derive an algorithm for producing a sample $s$ to be used in the volume rendering numerical integration.
61
+
62
+ In volume rendering we consider a ray $_ { \textbf { \em x } }$ emanating from a camera position $c \in \mathbb { R } ^ { 3 }$ in direction $\boldsymbol { v } \in \mathbb { R } ^ { 3 }$ , $\lVert \boldsymbol { v } \rVert = 1$ , defined by $\pmb { x } ( t ) = \pmb { c } + t \pmb { v } , t \geq 0$ . In essence, volume rendering is all about approximating the integrated (i.e., summed) light radiance along this ray reaching the camera. There are two important quantities that participate in this computation: the volume’s opacity $O$ , or equivalently, its transperancy $T$ , and the radiance field $L$ .
63
+
64
+ The transparency function of the volume along a ray $_ { \textbf { \em x } }$ , denoted $T$ , indicates, for each $t \geq 0$ , the probability a light particle succeeds traversing the segment $[ { \pmb c } , { \pmb x } ( t ) ]$ without bouncing off,
65
+
66
+ $$
67
+ T ( t ) = \exp \left( - \int _ { 0 } ^ { t } \sigma ( \pmb { x } ( s ) ) d s \right) ,
68
+ $$
69
+
70
+ and the opacity $O$ is the complement probability,
71
+
72
+ $$
73
+ O ( t ) = 1 - T ( t ) .
74
+ $$
75
+
76
+ Note that $O$ is a monotonic increasing function where $O ( 0 ) = 0$ , and assuming that every ray is eventually occluded $O ( \infty ) = 1$ . In that sense we can think of $O$ as a CDF, and
77
+
78
+ $$
79
+ { \boldsymbol { \tau } } ( t ) = { \frac { d O } { d t } } ( t ) = \sigma ( \mathbf { x } ( t ) ) T ( t )
80
+ $$
81
+
82
+ is its Probability Density Function (PDF). The volume rendering equation is the expected light along the ray,
83
+
84
+ $$
85
+ I ( c , \pmb { v } ) = \int _ { 0 } ^ { \infty } L ( \pmb { x } ( t ) , \pmb { n } ( t ) , \pmb { v } ) \tau ( t ) d t ,
86
+ $$
87
+
88
+ ![](images/d111657a37e6779d4593df14a61b9e3cb7f4f5c1310853579dfa3edaa9d1d7a1.jpg)
89
+ Figure 2: Qualitative comparison to NeRF. VolSDF shows less artifacts.
90
+
91
+ where $L ( x , n , v )$ is the radiance field, namely the amount of light emanating from point $_ { \textbf { \em x } }$ in direction $\textbf { { v } }$ ; in our formulation we also allow $L$ to depend on the level-set’s normal, i.e., ${ \pmb n } ( t ) = \nabla _ { { \pmb x } } d _ { \Omega } ( { \pmb x } ( t ) )$ . Adding this dependency is motivated by the fact that BRDFs of common materials are often encoded with respect to the surface normal, facilitating disentanglement as done in surface rendering [38]. We will get back to disentanglement in the experiments section. The integral in equation 7 is approximated using a numerical quadrature, namely the rectangle rule, at some discrete samples $\boldsymbol { S } = \bar { \{ \boldsymbol { s } _ { i } \} } _ { i = 1 } ^ { m }$ , $0 = s _ { 1 } < s _ { 2 } < . . . < s _ { m } = M$ , where $M$ is some large constant:
92
+
93
+ $$
94
+ I ( \pmb { c } , \pmb { v } ) \approx \hat { I } _ { S } ( \pmb { c } , \pmb { v } ) = \sum _ { i = 1 } ^ { m - 1 } \hat { \tau } _ { i } L _ { i } ,
95
+ $$
96
+
97
+ where we use the subscript $s$ in $\hat { I } _ { \mathcal { S } }$ to highlight the dependence of the approximation on the sample set $s$ ${ \sf S } , \hat { \tau } _ { i } \approx \tau ( s _ { i } ) \bar { \Delta } s$ is the approximated PDF multiplied by the interval length, and ${ \cal L } _ { i } \stackrel { - } { = } { \cal L } ( { \pmb x } ( s _ { i } ) , { \pmb n } ( s _ { i } ) , { \pmb v } )$ is the sampled radiance field. We provide full derivation and detail of $\hat { \tau } _ { i }$ in the supplementary.
98
+
99
+ Sampling. Since the PDF $\tau$ is typically extremely concentrated near the object’s boundary (see e.g., Figure 3, right) the choice of the sample points $s$ has a crucial effect on the approximation quality of equation 8. One solution is to use an adaptive sample, e.g., $s$ computed with the inverse CDF, i.e., $\hat { O } ^ { - 1 }$ . However, $O$ depends on the density model $\sigma$ and is not given explicitly. In [21] a second, coarse network was trained specifically for the approximation of the opacity $O$ , and was used for inverse sampling. However, the second network’s density does not necessarily faithfully represents the first network’s density, for which we wish to compute the volume integral. Furthermore, as we show later, one level of sampling could be insufficient to produce an accurate sample $s$ . Using a naive or crude approximation of $O$ would lead to a sub-optimal sample set $s$ that misses, or over extends non-negligible $\tau$ values. Consequently, incorrect radiance approximations can occur (i.e., pixel color), potentially harming the learned density-radiance field decomposition. Our solution works with a single density $\sigma$ , and the sampling $s$ is computed by a sampling algorithm based on an error bound for the opacity approximation. Figure 2 compares the NeRF and VolSDF renderings for the same scene. Note the salt and pepper artifacts in the NeRF rendering caused by the random samples; using fixed (uniformly spaced) sampling in NeRF leads to a different type of artifacts shown in the supplementary.
100
+
101
+ # 3.3 Bound on the opacity approximation error
102
+
103
+ In this section we develop a bound on the opacity approximation error using the rectangle rule. For a set of samples $\boldsymbol { \mathcal { T } } = \left\{ \boldsymbol { t } _ { i } \right\} _ { i = 1 } ^ { \bar { n } }$ $= \left\{ t _ { i } \right\} _ { i = 1 } ^ { n } , 0 = t _ { 1 } < t _ { 2 } < \cdots < t _ { n } = M$ , we let $\delta _ { i } = t _ { i + 1 } - t _ { i }$ , and $\bar { \sigma } _ { i } = \sigma ( \pmb { x } ( t _ { i } ) )$ . Given some $t \in ( 0 , M ]$ , assume $t \in [ t _ { k } , t _ { k + 1 } ]$ , and apply the rectangle rule (i.e., left Riemann sum) to get the approximation:
104
+
105
+ $$
106
+ \int _ { 0 } ^ { t } \sigma ( { x ( s ) } ) d s = \widehat { R } ( t ) + E ( t ) , \quad \mathrm { w h e r e ~ } \widehat { R } ( t ) = \sum _ { i = 1 } ^ { k - 1 } \delta _ { i } \sigma _ { i } + ( t - t _ { k } ) \sigma _ { k }
107
+ $$
108
+
109
+ is the rectangle rule approximation, and $E ( t )$ denotes the error in this approximation. The corresponding approximation of the opacity function (equation 5) is
110
+
111
+ $$
112
+ \widehat { O } ( t ) = 1 - \exp \Big ( { - } \widehat { R } ( t ) \Big ) .
113
+ $$
114
+
115
+ Our goal in this section is to derive a uniform bound over $[ 0 , M ]$ to the approximation $\widehat { O } \approx O$ . The key is the following bound on the derivative1 of the density $\sigma$ inside an interval along the ray ${ \mathbf { } } { \mathbf { } } { \mathbf { } } { \mathbf { } } { \mathbf { } } { \mathbf { } } { \mathbf { } } { \mathbf { } } { \mathbf { } } { \mathbf { } } { \mathbf { } } { \mathbf { } } { \mathbf { } } { \mathbf { } } { \mathbf { } } { \mathbf { } } { \mathbf { } } { \mathbf { } } { \mathbf { } } { \mathbf { } } { \mathbf { } } { \mathbf { } } { \mathbf { } } { \mathbf { } } { \mathbf { } } { \mathbf { } } { \mathbf { } } { \mathbf { } } { \mathbf { } } { \mathbf { } } { \mathbf { } } { \mathbf { } } { \mathbf { } } { \mathbf { } } { \mathbf { } } { \mathbf { } } { \mathbf { } } { \mathbf { } } { \mathbf { } } { \mathbf { } } { \mathbf { } } { \mathbf { } } { \mathbf { } } { \mathbf { } } { \mathbf { } } { \mathbf { } } { \mathbf { } } { \mathbf { } } { \mathbf { } } { \mathbf { } } { \mathbf { } } { \mathbf { } } { \mathbf { } } { \mathbf { } } { \mathbf { } } { \mathbf { } } { \mathbf { } } { \mathbf { } } { \mathbf { } } { \mathbf { } } { \mathbf { } } { \mathbf { } } { \mathbf { } } { \mathbf { } } { \mathbf { } } { \mathbf { } } { \mathbf { } } { \mathbf { } } { \mathbf { } } { \mathbf { } } { \mathbf { } } { \mathbf } { \mathbf { } } { \mathbf { } } { \mathbf } { } \mathbf { } { \mathbf { } \mathbf { } } { \mathbf { } \mathbf { } } { \mathbf { } \mathbf { } } { \mathbf } { \mathbf { } } { \mathbf } { \mathbf } { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } { \mathbf } { \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } } { \mathbf } { \mathbf } { \mathbf } { \mathbf } { \mathbf } { \mathbf } { \mathbf } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf \mathbf { } \mathbf { } \mathbf { } \mathbf \mathbf { } \mathbf { } \mathbf \mathbf { } \mathbf { } \mathbf \mathbf { } \mathbf \mathbf { } \mathbf { \mathbf \mathbf { } \mathbf \mathbf { } \mathbf \mathbf { } \mathbf \mathbf { } \mathbf \mathbf { } \mathbf \mathbf } { \mathbf \mathbf } \mathbf { \mathbf } \mathbf \mathbf { \mathbf } \mathbf \mathbf { \mathbf } \mathbf { \mathbf \mathbf } \mathbf \mathbf { \mathbf } \mathbf \mathbf { \mathbf \mathbf } \mathbf \mathbf { \mathbf \mathbf } \mathbf \mathbf { \mathbf \mathbf } $ :
116
+
117
+ Theorem 1. The derivative of the density $\sigma$ within a segment $[ t _ { i } , t _ { i + 1 } ]$ satisfies
118
+
119
+ $$
120
+ \left| \frac { d } { d s } \sigma ( \pmb { x } ( s ) ) \right| \leq \frac { \alpha } { 2 \beta } \exp \left( - \frac { d _ { i } ^ { \star } } { \beta } \right) , w h e r e d _ { i } ^ { \star } = \operatorname* { m i n } _ { s \in [ t _ { i } , t _ { i + 1 } ] \atop y \notin B _ { i } \cup B _ { i + 1 } } \| \pmb { x } ( s ) - \pmb { y } \| ,
121
+ $$
122
+
123
+ The proof of this theorem, which is provided in the supplementary, makes a principled use of the signed distance function’s unique properties; the explicit formula for $d _ { i } ^ { * }$ is a bit cumbersome and therefore is deferred to the supplementary as-well. The inset depicts the boundary of the open balls union $B _ { i } \cup B _ { i + 1 }$ , the interval $[ \mathbf { \bar { x } } ( t _ { i } ) , \mathbf { \bar { x } } ( t _ { i + 1 } ) ]$ and the bound is defined in terms of the minimal distance between these two sets, i.e., $d _ { i } ^ { * }$ .
124
+
125
+ ![](images/970c8a3fe5c63e87775685f30ddcd0292997b9f46e7a4725c1ca3b34558c05ef.jpg)
126
+
127
+ The benefit in Theorem 1 is that it allows to bound the density’s derivative in each interval $[ t _ { i } , t _ { i - 1 } ]$ based only on the unsigned distance at the interval’s end points, $| d _ { i } | , | d _ { i + 1 } |$ , and the density parameters $\alpha , \beta$ . This bound can be used to derive an error bound for the rectangle rule’s approximation of the opacity,
128
+
129
+ $$
130
+ | E ( t ) | \leq \widehat { E } ( t ) = \frac { \alpha } { 4 \beta } \left( \sum _ { i = 1 } ^ { k - 1 } \delta _ { i } ^ { 2 } e ^ { - \frac { d _ { i } ^ { \star } } { \beta } } + ( t - t _ { k } ) ^ { 2 } e ^ { - \frac { d _ { k } ^ { \star } } { \beta } } \right) .
131
+ $$
132
+
133
+ Details are in the supplementary. Equation 12 leads to the following opacity error bound, also proved in the supplementary:
134
+
135
+ Theorem 2. For $t \in [ 0 , M ]$ , the error of the approximated opacity $\hat { O }$ can be bounded as follows:
136
+
137
+ $$
138
+ \begin{array} { r } { \left| O ( t ) - \widehat { O } ( t ) \right| \le \exp \left( - \widehat { R } ( t ) \right) \left( \exp \left( \widehat { E } ( t ) \right) - 1 \right) } \end{array}
139
+ $$
140
+
141
+ Finally, we can bound the opacity error for $t \in [ t _ { k } , t _ { k + 1 } ]$ by noting that $\widehat { E } ( t )$ , and consequently also $\exp ( \widehat { E } ( t ) )$ are monotonically increasing in $t$ , while $\exp ( - \widehat { R } ( t ) )$ is monotonically decreasing in $t$ , and therefore
142
+
143
+ $$
144
+ \operatorname* { m a x } _ { t \in \left[ t _ { k } , t _ { k + 1 } \right] } \left| O ( t ) - \widehat { O } ( t ) \right| \leq \exp \left( - \widehat { R } ( t _ { k } ) \right) \left( \exp ( \widehat { E } ( t _ { k + 1 } ) ) - 1 \right) .
145
+ $$
146
+
147
+ Taking the maximum over all intervals furnishes a bound $B _ { T , \beta }$ as a function of $\tau$ and $\beta$ ,
148
+
149
+ $$
150
+ \operatorname* { m a x } _ { t \in \left[ 0 , M \right] } \left| O ( t ) - \widehat { O } ( t ) \right| \leq B _ { \mathcal { T } , \beta } = \operatorname* { m a x } _ { k \in \left[ n - 1 \right] } \left\{ \exp \left( - \widehat { R } ( t _ { k } ) \right) \left( \exp ( \widehat { E } ( t _ { k + 1 } ) ) - 1 \right) \right\} ,
151
+ $$
152
+
153
+ where by convention $\widehat { R } ( t _ { 0 } ) = 0$ , and $[ \ell ] = \{ 1 , 2 , \dots , \ell \}$ . See Figure 3, where this bound is visualized in faint-red.
154
+
155
+ To conclude this section we derive two useful properties, proved in the supplementary. The first, is that sufficiently dense sampling is guaranteed to reduce the error bound $B _ { T , \epsilon }$ :
156
+
157
+ Lemma 1. Fix $\beta > 0$ . For any $\epsilon > 0$ a sufficient dense sampling $\tau$ will provide $B _ { T , \beta } < \epsilon$
158
+
159
+ Second, with a fixed number of samples we can set $\beta$ such that the error bound is below $\epsilon$ :
160
+
161
+ Lemma 2. Fix $n > 0$ . For any $\epsilon > 0$ a sufficiently large $\beta$ that satisfies
162
+
163
+ $$
164
+ \beta \ge { \frac { \alpha M ^ { 2 } } { 4 ( n - 1 ) \log ( 1 + \epsilon ) } }
165
+ $$
166
+
167
+ will provide $B \tau , \beta \leq \epsilon .$
168
+
169
+ ![](images/7bf61ad44265d7cc7e56764ac6cc7670a058bfd80a9bfb085e4c1bdf563563a9.jpg)
170
+ Figure 3: Qualitative evaluation of Algorithm 1 after 1, 2 and 5 iterations. Left-bottom: per-pixel $\beta _ { + }$ heatmap; Left-top: rendering of areas marked with black squares. Right-top: for a single ray indicated by white pixel we show the approximated (orange), true opacity (blue), the SDF (black), and $\widehat { O } ^ { - 1 }$ sample example (yellow dots). Right-bottom: for the same ray we now show the true opacity error (red), and error bound (faint red). After 5 iterations most of the rays converged, as can be inspected by the blue colors in the heatmap, providing a guaranteed $\epsilon$ approximation to the opacity, resulting in a crisp and more accurate rendering (center-left, top).
171
+
172
+ # 3.4 Sampling algorithm
173
+
174
+ In this section we develop an algorithm for computing the sampling $s$ to be used in equation 8. This is done by first utilizing the bound in equation 15 to find samples $\tau$ so that $\widehat { O }$ (via equation 10) provides an $\epsilon$ approximation to the true opacity $O$ , where $\epsilon$ is a hyper-parameter, that is $B \tau , \beta < \epsilon$ . Second, we perform inverse CDF sampling with $\hat { O }$ , as described in Section 3.2.
175
+
176
+ Note that from Lemma 1 it follows that we can simply choose large enough $n$ to ensure $B \tau , \beta < \epsilon$ . However, this would lead to prohibitively large number of samples. Instead, we suggest a simple algorithm to reduce the number of required samples in practice and allows working with a limited budget of sample points. In a nutshell, we start with a uniform sampling $\mathcal { T } = \mathcal { T } _ { 0 }$ , and use Lemma 2 to initially set a $\beta _ { + } > \beta$ that satisfies $B _ { T , \beta _ { + } } \leq \epsilon$ . Then, we repeatedly upsample $\tau$ to reduce $\beta _ { + }$ while maintaining $B \tau , \beta _ { + } \le \epsilon$ . Even though this simple strategy is not guaranteed to converge, we find that $\beta _ { + }$ usually converges to $\beta$ (typically $8 5 \%$ , see also Figure 3), and even in cases it does not, the algorithm provides $\beta _ { + }$ for which the opacity approximation still maintains an $\epsilon$ error. The algorithm is presented below (Algorithm 1).
177
+
178
+ We initialize $\tau$ (Line 1 in Algorithm 1) with uniform sampling $\mathcal { T } _ { 0 } = \left\{ t _ { i } \right\} _ { i = 1 } ^ { n }$ , where $\begin{array} { r } { t _ { k } = ( k - 1 ) \frac { M } { n - 1 } } \end{array}$ $k \in [ n ]$ (we use $n = 1 2 8$ in our implementation). Given this sampling we next pick $\beta _ { + } > \beta$ according to Lemma 2 so that the error bound satisfies the required $\epsilon$ bound (Line 2 in Algorithm 1).
179
+
180
+ In order to reduce $\beta _ { + }$ while keep $B _ { T , \beta _ { + } } \leq \epsilon .$ , $n$ samples are added to $\tau$ (Line 4 in Algorithm 1), where the number of points sampled from each interval is proportional to its current error bound, equation 14. Assuming $\tau$ was sufficiently upsampled and satisfy $B _ { T , \beta _ { + } } < \epsilon$ , we decrease $\beta _ { + }$ towards $\beta$ . Since the algorithm did not stop we have that $B \tau , \beta > \epsilon$ . Therefore the Mean Value Theorem implies the existence of $\beta _ { \star } \in ( \beta , \beta _ { + } )$ such that $B _ { T , \beta _ { \star } } = \epsilon$ . We use the bisection method (with maximum of 10 iterations) to efficiently search for $\beta _ { \star }$ and update $\beta _ { + }$ accordingly (Lines 6 and 7 in Algorithm 1). The algorithm runs iteratively until $B \tau , \beta \leq \epsilon$ or a maximal number of 5 iterations is reached. Either way, we use the final $\tau$ and $\beta _ { + }$ (guaranteed to provide $B _ { T , \beta _ { + } } \leq \epsilon )$ to estimate the current opacity $\widehat { O }$ , Line 10 in Algorithm 1). Finally we return a fresh set of $m = 6 4$ samples $\hat { O }$ using inverse transform sampling (Line 11 in Algorithm 1). Figure 3 shows qualitative illustration of Algorithm 1, for $\beta = 0 . 0 0 1$ and $\epsilon = 0 . 1$ (typical values).
181
+
182
+ # Algorithm 1: Sampling algorithm.
183
+
184
+ Input: error threshold $\epsilon > 0$ ; $\beta$
185
+
186
+ 1 Initialize $\mathcal { T } = \mathcal { T } _ { 0 }$
187
+ 2 Initialize $\beta _ { + }$ such that $B \tau , \beta _ { + } \leq \epsilon$
188
+ 3 while $B \tau , \beta > \epsilon$ and not max_iter do
189
+ 4 upsample $\tau$
190
+ 5 if $B \tau _ { \cdot , \beta _ { + } } < \epsilon$ then
191
+ 6 Find $\beta _ { \star } \in \left( \beta , \beta _ { + } \right)$ so that
192
+ $B _ { T , \beta _ { \star } } = \epsilon$
193
+ 7 Update $\beta _ { + } \beta _ { \star }$
194
+ 8 end
195
+ 9 end
196
+ 10 Estimate $\widehat { O }$ using $\tau$ and $\beta _ { + }$
197
+ 11 $S \gets \mathrm { g e t }$ fresh $m$ samples using $\hat { O } ^ { - 1 }$
198
+ 12 return $s$
199
+
200
+ ![](images/f94b0eb5c22d9610e96a5703e40a66cf26e23f71159661fc6ba5c9894fda5f75.jpg)
201
+ Figure 4: Qualitative results for reconstructed geometries of objects from the DTU dataset.
202
+
203
+ # 3.5 Training
204
+
205
+ Our system consists of two Multi-Layer Perceptrons (MLP): (i) $f _ { \varphi }$ approximating the SDF of the learned geometry, as well as global geometry feature $_ z$ of dimension 256, i.e., ${ \pmb f } _ { \varphi } ( { \pmb x } ) =$ $( d ( \pmb { x } ) , z ( \pmb { x } ) ) \in \mathbb { R } ^ { 1 + 2 5 6 }$ , where $\varphi$ denotes its learnable parameters; (ii) $L _ { \psi } ( \pmb { x } , \pmb { n } , \pmb { v } , z ) \in \mathbb { R } ^ { 3 }$ representing the scene’s radiance field with learnable parameters $\psi$ . In addition we have two scalar learnable parameters $\alpha , \beta \in \mathbb { R }$ . In fact, in our implementation we make the choice $\alpha = \beta ^ { - 1 }$ . We denote by $\theta \in \mathbb { R } ^ { p }$ the collection of all learnable parameters of the model, $\theta = ( \varphi , \psi , \beta )$ . To facilitate the learning of high frequency details of the geometry and radiance field, we exploit positional encoding [21] for the position $_ { \textbf { \em x } }$ and view direction $\pmb { v }$ in the geometry and radiance field. The influence of different positional encoding choices are presented in the supplementary.
206
+
207
+ Our data consists of a collection of images with camera parameters. From this data we extract pixel level data: for each pixel $p$ we have a triplet $( I _ { p } , c _ { p } , v _ { p } )$ , where $I _ { p } \in \mathbb { R } ^ { 3 }$ is its intensity (RGB color), $c _ { p } \in \mathbb { R } ^ { 3 }$ is its camera location, and $\boldsymbol { v } _ { p } \in \mathbb { R } ^ { 3 }$ is the viewing direction (camera to pixel). Our training loss consists of two terms:
208
+
209
+ $$
210
+ \begin{array} { r } { \mathcal { L } ( \theta ) = \mathcal { L } _ { \mathrm { R G B } } ( \theta ) + \lambda \mathcal { L } _ { \mathrm { S D F } } ( \varphi ) , \quad \mathrm { w h e r e } } \end{array}
211
+ $$
212
+
213
+ $$
214
+ \begin{array} { r } { \mathcal { L } _ { \mathrm { R G B } } ( \theta ) = \mathbb { E } _ { p } \left\| I _ { p } - \hat { I } _ { S } ( \boldsymbol { c } _ { p } , \boldsymbol { v } _ { p } ) \right\| _ { 1 } , \quad \mathrm { a n d } \mathcal { L } _ { \mathrm { S D F } } ( \varphi ) = \mathbb { E } _ { z } \left( \left\| \nabla d ( z ) \right\| - 1 \right) ^ { 2 } , } \end{array}
215
+ $$
216
+
217
+ where $\mathcal { L } _ { \mathrm { { R G B } } }$ is the color loss; $\left\| \cdot \right\| _ { 1 }$ denotes the 1-norm, $s$ is computed with Algorithm 1, and $\hat { I } _ { S }$ is the numerical approximation to the volume rendering integral in equation 8; here we also incorporate the global feature in the radiance field, i.e., $L _ { i } = L _ { \psi } ( \pmb { x } ( s _ { i } ) , \pmb { n } ( s _ { i } ) , \pmb { v } _ { p } , z ( \pmb { x } ( s _ { i } ) ) )$ . $\mathcal { L } _ { \mathrm { S D F } }$ is the Eikonal loss encouraging $d$ to approximate a signed distance function [10]; the samples $_ z$ are taken to combine a single random uniform space point and a single point from $s$ for each pixel $p$ . We train with batches of size 1024 pixels $p$ . $\lambda$ is a hyper-parameter set to 0.1 throughout the the experiments. Further implementation details are provided in the supplementary.
218
+
219
+ # 4 Experiments
220
+
221
+ We evaluate our method on the challenging task of multiview 3D surface reconstruction. We use two datasets: DTU [12] and BlendedMVS [37], both containing real objects with different materials that are captured from multiple views. In Section 4.1 we show qualitative and quantitative 3D surface reconstruction results of VolSDF, comparing favorably to relevant baselines. In Section 4.2 we demonstrate that, in contrast to NeRF [21], our model is able to successfully disentangle the geometry and appearance of the captured objects.
222
+
223
+ <table><tr><td>Scan</td><td></td><td>24</td><td>37</td><td>40</td><td>55</td><td>63</td><td>65</td><td>69</td><td>83</td><td>97</td><td>105</td><td>106</td><td>110</td><td>114</td><td>118</td><td>122</td><td>Mean</td></tr><tr><td></td><td>IDR</td><td>1.63</td><td>1.87</td><td>0.63</td><td>0.48</td><td>1.04</td><td>0.79</td><td>0.77</td><td>1.33</td><td>1.16</td><td>0.76</td><td>0.67</td><td>0.90</td><td>0.42</td><td>0.51</td><td>0.53</td><td>0.90</td></tr><tr><td>erreistteatettec</td><td>colmap7</td><td>0.45</td><td>0.91</td><td>0.37</td><td>0.37</td><td>0.90</td><td>1.00</td><td>0.54</td><td>1.22</td><td>1.08</td><td>0.64</td><td>0.48</td><td>0.59</td><td>0.32</td><td>0.45</td><td>0.43</td><td>0.65</td></tr><tr><td></td><td>colmapo</td><td>0.81</td><td>2.05</td><td>0.73</td><td>1.22</td><td>1.79</td><td>1.58</td><td>1.02</td><td>3.05</td><td>1.40</td><td>2.05</td><td>1.00</td><td>1.32</td><td>0.49</td><td>0.78</td><td>1.17</td><td>1.36</td></tr><tr><td></td><td>NeRF</td><td>1.92</td><td>1.73</td><td>1.92</td><td>0.80</td><td>3.41</td><td>1.39</td><td>1.51</td><td>5.44</td><td>2.04</td><td>1.10</td><td>1.01</td><td>2.88</td><td>0.91</td><td>1.00</td><td>0.79</td><td>1.89</td></tr><tr><td></td><td>VolSDF</td><td>1.14</td><td>1.26</td><td>0.81</td><td>0.49</td><td>1.25</td><td>0.70</td><td>0.72</td><td>1.29</td><td>1.18</td><td>0.70</td><td>0.66</td><td>1.08</td><td>0.42</td><td>0.61</td><td>0.55</td><td>0.86</td></tr><tr><td>JPSH</td><td>NeRF</td><td>26.24 25.74 26.79 27.57 31.96 31.50 29.58 32.78 28.35 32.08 33.49 31.54 31.0</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td>35.59 35.51</td><td>30.65</td></tr><tr><td></td><td>VolSDF</td><td></td><td></td><td>26.2825.61 26.55 26.76 31.57</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td>31.529.38 33.23 28.03 32.13 33.16 31.49 30.33</td><td></td><td></td><td></td><td>34.934.7530.38</td></tr></table>
224
+
225
+ ![](images/e528190f4300fd324fefcf6500404eaeb02953cb1a480d883c7e39df6201f3ec.jpg)
226
+ Table 1: Quantitative results for the DTU dataset.
227
+ Figure 5: Qualitative results sampled from the BlendedMVS dataset. For each scan we present a visualization of a rendered image and the reconstructed 3D geometry.
228
+
229
+ # 4.1 Multi-view 3D reconstruction
230
+
231
+ DTU The DTU [12] dataset contains multi-view image (49 or 64) of different objects with fixed camera and lighting parameters. We evaluate our method on the 15 scans that were selected by [38]. We compare our surface accuracy using the Chamfer $l _ { 1 }$ loss (measured in mm) to $\mathrm { C O L M A P _ { 0 } }$ (which is watertight reconstruction; $\mathrm { C O L M A P _ { 7 } }$ is not watertight and provided only for reference) [31], NeRF [21] and IDR [38], where for fair comparison with IDR we only evaluate the reconstruction inside the visual hull of the objects (defined by the segmentation masks of [38]). We further evaluate the PSNR of our rendering compared to [21]. Quantitative results are presented in Table 1. It can be observed that our method is on par with IDR (that uses object masks for all images) and outperforms NeRF and COLMAP in terms of reconstruction accuracy. Our rendering quality is comparable to NeRF’s.
232
+
233
+ BlendedMVS The BlendedMVS dataset [37] contains a large collection of 113 scenes captured from multiple views. It supplies high quality ground truth 3D models for evaluation, various camera configurations, and a variety of indoor/outdoor real environments. We selected 9 different scenes and used our method to reconstruct the surface of each object. In contrast to the DTU dataset, BlendedMVS scenes have complex backgrounds. Therefore we use $_ \mathrm { N e R F + + }$ [39] as a baseline for this dataset. In Table 2 we present our results compared to $_ \mathrm { N e R F + + }$ . Qualitative comparisons are presented in Fig. 5; since the units are unknown in this case we present relative improvement of
234
+
235
+ Chamfer distance (in $\%$ ) compared to NeRF. Also in this case, we improve NeRF reconstructions considerably, while being on-par in terms of the rendering quality (PSNR).
236
+
237
+ Comparison to [38] IDR [38] is the state of the art 3D surface
238
+ reconstruction method using implicit representation. However, it
239
+ suffers from two drawbacks: first, it requires object masks for
240
+ training, which is a strong supervision signal. Second, since it sets
241
+ the pixel color based only on the single point of intersection of the
242
+ corresponding viewing ray, it is more pruned to local minima that
243
+ sometimes appear in the form of extraneous surface parts. Figure 6 compares the same scene trained
244
+
245
+ ![](images/7a379328c684569053c7deb4e4d2d6406c854f69f9484dc18659971bc90ca4df.jpg)
246
+ Figure 6: IDR extraneous parts.
247
+
248
+ Table 2: Quantitative results for the BlendedMVS dataset.
249
+
250
+ <table><tr><td></td><td>Scene</td><td>Doll</td><td>Egg</td><td>Head</td><td>Angel</td><td>Bull</td><td>Robot</td><td>Dog</td><td>Bread</td><td>Camera</td><td>Mean</td></tr><tr><td>Chamfer l1</td><td>Our Improvement (%)</td><td>54.0</td><td>91.2</td><td>24.3</td><td>75.1</td><td>60.7</td><td>27.2</td><td>47.7</td><td>34.6</td><td>51.8</td><td>51.8</td></tr><tr><td rowspan="2">PSNR</td><td>NeRF++</td><td>26.95</td><td>27.34</td><td>27.23</td><td>30.06</td><td>26.65</td><td>26.73</td><td>27.90</td><td>31.68</td><td>23.44</td><td>27.55</td></tr><tr><td>VolSDF</td><td>25.49</td><td>27.18</td><td>26.36</td><td>29.79</td><td>26.01</td><td>26.03</td><td>28.65</td><td>31.24</td><td>22.97</td><td>27.08</td></tr></table>
251
+
252
+ with IDR with the addition of ground truth masks, and VolSDF trained without masks. Note that IDR introduces some extraneous surface parts (e.g., in marked red), while VolSDF provides a more faithful result in this case.
253
+
254
+ # 4.2 Disentanglement of geometry and appearance
255
+
256
+ We have tested the disentanglement of scenes to geometry (density) and appearance (radiance field) by switching the radiance fields of two trained scenes. For VolSDF we switched $L _ { \psi }$ . For NeRF [21] we note that the radiance field is computed as $L _ { \psi } ( z , v )$ , where $L _ { \psi }$ is a fully connected network with one hidden layer (of width 128 and ReLU activation) and $_ z$ is a feature vector. We tested two versions of NeRF disentanglement: First, by switching the original radiance fields $L _ { \psi }$ of trained NeRF networks. Second, by switching the radiance fields of trained NeRF models with an identical radiance field model to ours, namely $L _ { \psi } ( { \pmb x } , { \pmb n } , { \pmb v } , z )$ . As shown in Figure 7 both versions of NeRF fail to produce a correct disentanglement in these scenes, while VolSDF successfully switches the materials of the two objects. We attribute this to the specific inductive bias injected with the use of the density in equation 2.
257
+
258
+ ![](images/928ceb27070b8ce43e615aa3bdce1ddf4e35f88506240345ba2acec696b6409c.jpg)
259
+ Figure 7: Geometry and radiance disentanglement is physically plausible with VolSDF.
260
+
261
+ # 5 Conclusions
262
+
263
+ We introduce VolSDF, a volume rendering framework for implicit neural surfaces. We represent the volume density as a transformed version of the signed distance function to the learned surface geometry. This seemingly simple definition provides a useful inductive bias, allowing disentanglement of geometry (i.e., density) and radiance field, and improves the geometry approximation over previous neural volume rendering techniques. Furthermore, it allows to bound the opacity approximation error leading to high fidelity sampling of the volume rendering integral.
264
+
265
+ Some limitations of our method present interesting future research opportunities. First, although working well in practice, we do not have a proof of correctness for the sampling algorithm. We believe providing such a proof, or finding a version of this algorithm that has a proof would be a useful contribution. In general, we believe working with bounds in volume rendering could improve learning and disentanglement and push the field forward. Second, representing non-watertight manifolds and/or manifolds with boundaries, such as zero thickness surfaces, is not possible with an SDF. Generalizations such as multiple implicits and unsigned fields could be proven valuable. Third, our current formulation assumes homogeneous density; extending it to more general density models would allow representing a broader class of geometries. Fourth, now that high quality geometries can be learned in an unsupervised manner it will be interesting to learn dynamic geometries and shape spaces directly from collections of images. Lastly, although we don’t see immediate negative societal impact of our work, we do note that accurate geometry reconstruction from images can be used for malice purposes.
266
+
267
+ # Acknowledgments
268
+
269
+ LY is supported by the European Research Council (ERC Consolidator Grant, "LiftMatch" 771136), the Israel Science Foundation (Grant No. 1830/17), and Carolito Stiftung (WAIC). YK is supported by the U.S.- Israel Binational Science Foundation, grant number 2018680, Carolito Stiftung (WAIC), and by the Kahn foundation.
270
+
271
+ # References
272
+
273
+ [1] C. Barnes, E. Shechtman, A. Finkelstein, and D. B. Goldman. PatchMatch: A randomized correspondence algorithm for structural image editing. ACM Transactions on Graphics (Proc. SIGGRAPH), 28(3), Aug. 2009. [2] M. Boss, R. Braun, V. Jampani, J. T. Barron, C. Liu, and H. P. Lensch. Nerd: Neural reflectance decomposition from image collections, 2020. [3] A. Broadhurst, T. Drummond, and R. Cipolla. A probabilistic framework for space carving. In Proceedings Eighth IEEE International Conference on Computer Vision. ICCV 2001, volume 1, pages 388–393 vol.1, 2001.
274
+ [4] A. Dai, M. Nießner, M. Zollhöfer, S. Izadi, and C. Theobalt. Bundlefusion: Real-time globally consistent 3d reconstruction using on-the-fly surface reintegration. ACM Transactions on Graphics (ToG), 36(4):1, 2017. [5] J. S. De Bonet and P. Viola. Poxels: Probabilistic voxelized volume reconstruction. In Proceedings of the IEEE International Conference on Computer Vision. ICCV 1999, 1999.
275
+ [6] F. Dellaert and L. Yen-Chen. Neural volume rendering: Nerf and beyond. arXiv preprint arXiv:2101.05204, 2020.
276
+ [7] Y. Furukawa and J. Ponce. Accurate, dense, and robust multiview stereopsis. IEEE Transactions on Pattern Analysis and Machine Intelligence, 32(8):1362–1376, 2010.
277
+ [8] S. Galliani, K. Lasinger, and K. Schindler. Massively parallel multiview stereopsis by surface normal diffusion. In Proceedings of the IEEE International Conference on Computer Vision, pages 873–881, 2015. [9] K. Genova, F. Cole, D. Vlasic, A. Sarna, W. T. Freeman, and T. Funkhouser. Learning shape templates with structured implicit functions. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 7154–7164, 2019.
278
+ [10] A. Gropp, L. Yariv, N. Haim, M. Atzmon, and Y. Lipman. Implicit geometric regularization for learning shapes. arXiv preprint arXiv:2002.10099, 2020.
279
+ [11] S. Izadi, D. Kim, O. Hilliges, D. Molyneaux, R. Newcombe, P. Kohli, J. Shotton, S. Hodges, D. Freeman, A. Davison, et al. Kinectfusion: real-time 3d reconstruction and interaction using a moving depth camera. In Proceedings of the 24th annual ACM symposium on User interface software and technology, pages 559–568, 2011.
280
+ [12] R. Jensen, A. Dahl, G. Vogiatzis, E. Tola, and H. Aanæs. Large scale multi-view stereopsis evaluation. In 2014 IEEE Conference on Computer Vision and Pattern Recognition, pages 406–413. IEEE, 2014.
281
+ [13] M. Kazhdan, M. Bolitho, and H. Hoppe. Poisson Surface Reconstruction. In A. Sheffer and K. Polthier, editors, Symposium on Geometry Processing. The Eurographics Association, 2006.
282
+ [14] P. Kellnhofer, L. Jebe, A. Jones, R. Spicer, K. Pulli, and G. Wetzstein. Neural lumigraph rendering. In CVPR, 2021.
283
+ [15] L. Liu, J. Gu, K. Zaw Lin, T.-S. Chua, and C. Theobalt. Neural sparse voxel fields. Advances in Neural Information Processing Systems, 33, 2020.
284
+ [16] S. Liu, Y. Zhang, S. Peng, B. Shi, M. Pollefeys, and Z. Cui. Dist: Rendering deep implicit signed distance function with differentiable sphere tracing. arXiv preprint arXiv:1911.13225, 2019.
285
+ [17] S. Lombardi, T. Simon, J. Saragih, G. Schwartz, A. Lehrmann, and Y. Sheikh. Neural volumes: Learning dynamic renderable volumes from images. arXiv preprint arXiv:1906.07751, 2019.
286
+ [18] N. Max. Optical models for direct volume rendering. IEEE Transactions on Visualization and Computer Graphics, 1(2):99–108, 1995.
287
+ [19] L. Mescheder, M. Oechsle, M. Niemeyer, S. Nowozin, and A. Geiger. Occupancy networks: Learning 3d reconstruction in function space. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 4460–4470, 2019.
288
+ [20] M. Michalkiewicz, J. K. Pontes, D. Jack, M. Baktashmotlagh, and A. Eriksson. Implicit surface representations as layers in neural networks. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 4743–4752, 2019.
289
+ [21] B. Mildenhall, P. P. Srinivasan, M. Tancik, J. T. Barron, R. Ramamoorthi, and R. Ng. Nerf: Representing scenes as neural radiance fields for view synthesis. In ECCV, 2020.
290
+ [22] M. Niemeyer, L. Mescheder, M. Oechsle, and A. Geiger. Differentiable volumetric rendering: Learning implicit 3d representations without 3d supervision. arXiv preprint arXiv:1912.07372, 2019.
291
+ [23] M. Niemeyer, L. Mescheder, M. Oechsle, and A. Geiger. Occupancy flow: 4d reconstruction by learning particle dynamics. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 5379–5389, 2019.
292
+ [24] M. Nießner, M. Zollhöfer, S. Izadi, and M. Stamminger. Real-time 3d reconstruction at scale using voxel hashing. ACM Trans. Graph., 32(6), Nov. 2013.
293
+ [25] M. Oechsle, L. Mescheder, M. Niemeyer, T. Strauss, and A. Geiger. Texture fields: Learning texture representations in function space. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 4531–4540, 2019.
294
+ [26] M. Oechsle, M. Niemeyer, L. Mescheder, T. Strauss, and A. Geiger. Learning implicit surface light fields. arXiv preprint arXiv:2003.12406, 2020.
295
+ [27] M. Oechsle, S. Peng, and A. Geiger. Unisurf: Unifying neural implicit surfaces and radiance fields for multi-view reconstruction. arXiv preprint arXiv:2104.10078, 2021.
296
+ [28] J. J. Park, P. Florence, J. Straub, R. Newcombe, and S. Lovegrove. Deepsdf: Learning continuous signed distance functions for shape representation. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 165–174, 2019.
297
+ [29] S. Peng, M. Niemeyer, L. Mescheder, M. Pollefeys, and A. Geiger. Convolutional occupancy networks. In A. Vedaldi, H. Bischof, T. Brox, and J.-M. Frahm, editors, Computer Vision – ECCV 2020, pages 523–540, Cham, 2020. Springer International Publishing.
298
+ [30] S. Saito, Z. Huang, R. Natsume, S. Morishima, A. Kanazawa, and H. Li. Pifu: Pixel-aligned implicit function for high-resolution clothed human digitization. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 2304–2314, 2019.
299
+ [31] J. L. Schönberger, E. Zheng, M. Pollefeys, and J.-M. Frahm. Pixelwise view selection for unstructured multi-view stereo. In European Conference on Computer Vision (ECCV), 2016.
300
+ [32] S. M. Seitz and C. R. Dyer. Photorealistic scene reconstruction by voxel coloring. International Journal of Computer Vision, 35(2):151–173, 1999.
301
+ [33] V. Sitzmann, M. Zollhöfer, and G. Wetzstein. Scene representation networks: Continuous 3d-structureaware neural scene representations. In Advances in Neural Information Processing Systems, pages 1119–1130, 2019.
302
+ [34] P. P. Srinivasan, B. Deng, X. Zhang, M. Tancik, B. Mildenhall, and J. T. Barron. Nerv: Neural reflectance and visibility fields for relighting and view synthesis. In CVPR, 2021.
303
+ [35] T. Takikawa, J. Litalien, K. Yin, K. Kreis, C. Loop, D. Nowrouzezahrai, A. Jacobson, M. McGuire, and S. Fidler. Neural geometric level of detail: Real-time rendering with implicit 3d shapes. arXiv preprint arXiv:2101.10994, 2021.
304
+ [36] Q. Xu, W. Wang, D. Ceylan, R. Mech, and U. Neumann. Disn: Deep implicit surface network for high-quality single-view 3d reconstruction. arXiv preprint arXiv:1905.10711, 2019.
305
+ [37] Y. Yao, Z. Luo, S. Li, J. Zhang, Y. Ren, L. Zhou, T. Fang, and L. Quan. Blendedmvs: A large-scale dataset for generalized multi-view stereo networks. Computer Vision and Pattern Recognition (CVPR), 2020.
306
+ [38] L. Yariv, Y. Kasten, D. Moran, M. Galun, M. Atzmon, B. Ronen, and Y. Lipman. Multiview neural surface reconstruction by disentangling geometry and appearance. Advances in Neural Information Processing Systems, 33, 2020.
307
+ [39] K. Zhang, G. Riegler, N. Snavely, and V. Koltun. Nerf++: Analyzing and improving neural radiance fields. arXiv:2010.07492, 2020.
md/train/HkldyTNYwH/HkldyTNYwH.md CHANGED
Binary files a/md/train/HkldyTNYwH/HkldyTNYwH.md and b/md/train/HkldyTNYwH/HkldyTNYwH.md differ
 
md/train/IrM64DGB21/IrM64DGB21.md CHANGED
@@ -397,7 +397,7 @@ Another way to test the impact of search on learning and the data distribution w
397
 
398
  # B.3 REGULARIZED POLICY UPDATES (MPO) WITH MCTS
399
 
400
- Past work has demonstrated that MuZero’s policy targets suffer from degeneracies at low visit counts [27, 20]. To account for this, we modified the policy targets to use an MPO-style update [1] rather than the visit count distribution, similar to [20]: πMPOt+k ∝ πkθ,t · exp qMCTS/τ . Here, qMCTS are the Q-values at the root node of the search tree; $\tau = 0 . 1$ is a temperature parameter; and we use $\pi _ { t + k } ^ { \mathrm { M P O } }$ in place of $\pi _ { t + k } ^ { \mathrm { M C T S } }$ in Equation 8. Note that the Q-values for unvisited actions are set to zero; while it is in general a poor estimate for the true Q-function, we found this choice to outperform setting the Q-function for unvisited actions to the value function. This is likely because unvisited actions are unlikely under the prior and perhaps ought not be reinforced unless good estimates are obtained through exploration. However, this choice leads to a biased MPO update; how to unbias it will be a topic of further research. Similarly, we chose the MPO update for its ease of implementation, but it is likely other forms of regularized policy gradient (e.g. TRPO [59], or more generally natural or mirror policy optimization [72, 2]) would result in quantitively similar findings. We also did not tune $\tau$ for different environments; it is likely that properly tuning it could further improve performance of the agent at small search budgets.
401
 
402
  # B.4 BREADTH-FIRST SEARCH
403
 
 
397
 
398
  # B.3 REGULARIZED POLICY UPDATES (MPO) WITH MCTS
399
 
400
+ Past work has demonstrated that MuZero’s policy targets suffer from degeneracies at low visit counts [27, 20]. To account for this, we modified the policy targets to use an MPO-style update [1] rather than the visit count distribution, similar to [20]: πMPOt+k ∝ πkθ,t · exp qMCTS/τ . Here, qMCTS are the Q-values at the root node of the search tree; $\tau = 0 . 1$ is a temperature parameter; and we use $\pi _ { t + k } ^ { \mathrm { M P O } }$ in place of $\pi _ { t + k } ^ { \mathrm { M C T S } }$ in Equation 8. Note that the Q-values for unvisited actions are set to zero; while it is in general a poor estimate for the true Q-function, we found this choice to outperform setting the Q-function for unvisited actions to the value function. This is likely because unvisited actions are unlikely under the prior and perhaps ought not be reinforced unless good estimates are obtained through exploration. However, this choice leads to a biased MPO update; how to unbias it will be a topic of further research. Similarly, we chose the MPO update for its ease of implementation, but it is likely other forms of regularized policy gradient (e.g. TRPO [59], or more generally natural or mirror policy optimization [72, 2]) would result in quantitively similar findings. We also did not tune $\tau$ for different environments; it is likely that properly tuning it could further improve performance of the agent at small search budgets.
401
 
402
  # B.4 BREADTH-FIRST SEARCH
403
 
md/train/SJ6yPD5xg/SJ6yPD5xg.md ADDED
@@ -0,0 +1,281 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # REINFORCEMENT LEARNING WITH UNSUPERVISED AUXILIARY TASKS
2
+
3
+ Max Jaderberg∗, Volodymyr Mnih\*, Wojciech Marian Czarnecki\*
4
+ Tom Schaul, Joel Z Leibo, David Silver & Koray Kavukcuoglu
5
+ DeepMind
6
+ London, UK
7
+ {jaderberg,vmnih,lejlot,schaul,jzl,davidsilver,
8
+
9
+ # ABSTRACT
10
+
11
+ Deep reinforcement learning agents have achieved state-of-the-art results by directly maximising cumulative reward. However, environments contain a much wider variety of possible training signals. In this paper, we introduce an agent that also learns separate policies for maximising many other pseudo-reward functions simultaneously by reinforcement learning. All of these tasks share a common representation that, like unsupervised learning, continues to develop in the absence of extrinsic rewards. We also introduce a novel mechanism for focusing this representation upon extrinsic rewards, so that learning can rapidly adapt to the most relevant aspects of the actual task. Our agent significantly outperforms the previous state-of-the-art on Atari, averaging $880 \%$ expert human performance, and a challenging suite of first-person, three-dimensional Labyrinth tasks leading to a mean speedup in learning of $1 0 \times$ and averaging $87 \%$ expert human performance on Labyrinth.
12
+
13
+ Natural and artificial agents live in a stream of sensorimotor data. At each time step $t$ , the agent receives observations $o _ { t }$ and executes actions $a _ { t }$ . These actions influence the future course of the sensorimotor stream. In this paper we develop agents that learn to predict and control this stream, by solving a host of reinforcement learning problems, each focusing on a distinct feature of the sensorimotor stream. Our hypothesis is that an agent that can flexibly control its future experiences will also be able to achieve any goal with which it is presented, such as maximising its future rewards.
14
+
15
+ The classic reinforcement learning paradigm focuses on the maximisation of extrinsic reward. However, in many interesting domains, extrinsic rewards are only rarely observed. This raises questions of what and how to learn in their absence. Even if extrinsic rewards are frequent, the sensorimotor stream contains an abundance of other possible learning targets. Traditionally, unsupervised learning attempts to reconstruct these targets, such as the pixels in the current or subsequent frame. It is typically used to accelerate the acquisition of a useful representation. In contrast, our learning objective is to predict and control features of the sensorimotor stream, by treating them as pseudorewards for reinforcement learning. Intuitively, this set of tasks is more closely matched with the agent’s long-term goals, potentially leading to more useful representations.
16
+
17
+ Consider a baby that learns to maximise the cumulative amount of red that it observes. To correctly predict the optimal value, the baby must understand how to increase “redness” by various means, including manipulation (bringing a red object closer to the eyes); locomotion (moving in front of a red object); and communication (crying until the parents bring a red object). These behaviours are likely to recur for many other goals that the baby may subsequently encounter. No understanding of these behaviours is required to simply reconstruct the redness of current or subsequent images.
18
+
19
+ Our architecture uses reinforcement learning to approximate both the optimal policy and optimal value function for many different pseudo-rewards. It also makes other auxiliary predictions that serve to focus the agent on important aspects of the task. These include the long-term goal of predicting cumulative extrinsic reward as well as short-term predictions of extrinsic reward. To learn more efficiently, our agents use an experience replay mechanism to provide additional updates to the critics. Just as animals dream about positively or negatively rewarding events more frequently (Olafsdottir et al., 2015; Schacter et al., 2012), our agents preferentially replay sequences containing rewarding events.
20
+
21
+ ![](images/aead18b15b5dd08676ae009c1257cf16f4773194f523ae7b41eb184dddd87214.jpg)
22
+ Figure 1: Overview of the UNREAL agent. (a) The base agent is a CNN-LSTM agent trained on-policy with the A3C loss (Mnih et al., 2016). Observations, rewards, and actions are stored in a small replay buffer which encapsulates a short history of agent experience. This experience is used by auxiliary learning tasks. (b) Pixel Control – auxiliary policies $Q ^ { \mathrm { a u x } }$ are trained to maximise change in pixel intensity of different regions of the input. The agent CNN and LSTM are used for this task along with an auxiliary deconvolution network. This auxiliary control task requires the agent to learn how to control the environment. (c) Reward Prediction – given three recent frames, the network must predict the reward that will be obtained in the next unobserved timestep. This task network uses instances of the agent CNN, and is trained on reward biased sequences to remove the perceptual sparsity of rewards. (d) Value Function Replay – further training of the value function using the agent network is performed to promote faster value iteration. Further visualisation of the agent can be found in https://youtu.be/Uz-zGYrYEjA
23
+
24
+ Importantly, both the auxiliary control and auxiliary prediction tasks share the convolutional neural network and LSTM that the base agent uses to act. By using this jointly learned representation, the base agent learns to optimise extrinsic reward much faster and, in many cases, achieves better policies at the end of training.
25
+
26
+ This paper brings together the state-of-the-art Asynchronous Advantage Actor-Critic (A3C) framework (Mnih et al., 2016), outlined in Section 2, with auxiliary control tasks and auxiliary reward tasks, defined in sections Section 3.1 and Section 3.2 respectively. These auxiliary tasks do not require any extra supervision or signals from the environment than the vanilla A3C agent. The result is our UNsupervised REinforcement and Auxiliary Learning (UNREAL) agent (Section 3.4)
27
+
28
+ In Section 4 we apply our UNREAL agent to a challenging set of 3D-vision based domains known as the Labyrinth (Mnih et al., 2016), learning solely from the raw RGB pixels of a first-person view. Our agent significantly outperforms the baseline agent using vanilla A3C, even when the baseline was augmented with an unsupervised reconstruction loss, in terms of speed of learning, robustness to hyperparameters, and final performance. The result is an agent which on average achieves $87 \%$ of expert human-normalised score, compared to $54 \%$ with A3C, and on average $1 0 \times$ faster than A3C. Our UNREAL agent also significantly outperforms the previous state-of-the-art in the Atari domain.
29
+
30
+ # 1 RELATED WORK
31
+
32
+ A variety of reinforcement learning architectures have focused on learning temporal abstractions, such as options (Sutton et al., 1999b), with policies that may maximise pseudo-rewards (Konidaris & Barreto, 2009; Silver & Ciosek, 2012). The emphasis here has typically been on the development of temporal abstractions that facilitate high-level learning and planning. In contrast, our agents do not make any direct use of the pseudo-reward maximising policies that they learn (although this is an interesting direction for future research). Instead, they are used solely as auxiliary objectives for developing a more effective representation.
33
+
34
+ The Horde architecture (Sutton et al., 2011) also applied reinforcement learning to identify value functions for a multitude of distinct pseudo-rewards. However, this architecture was not used for representation learning; instead each value function was trained separately using distinct weights.
35
+
36
+ The UVFA architecture (Schaul et al., 2015a) is a factored representation of a continuous set of optimal value functions, combining features of the state with an embedding of the pseudo-reward function. Initial work on UVFAs focused primarily on architectural choices and learning rules for these continuous embeddings. A pre-trained UVFA representation was successfully transferred to novel pseudo-rewards in a simple task.
37
+
38
+ Similarly, the successor representation (Dayan, 1993; Barreto et al., 2016; Kulkarni et al., 2016) factors a continuous set of expected value functions for a fixed policy, by combining an expectation over features of the state with an embedding of the pseudo-reward function. Successor representations have been used to transfer representations from one pseudo-reward to another (Barreto et al., 2016) or to different scales of reward (Kulkarni et al., 2016).
39
+
40
+ Another, related line of work involves learning models of the environment (Schmidhuber, 2010; Xie et al., 2015; Oh et al., 2015). Although learning environment models as auxiliary tasks could improve RL agents (e.g. Lin & Mitchell (1992); Li et al. (2015)), this has not yet been shown to work in rich visual environments.
41
+
42
+ More recently, auxiliary predictions tasks have been studied in 3D reinforcement learning environments. Lample & Chaplot (2016) showed that predicting internal features of the emulator, such as the presence of an enemy on the screen, is beneficial. Mirowski et al. (2016) study auxiliary prediction of depth in the context of navigation.
43
+
44
+ # 2 BACKGROUND
45
+
46
+ We assume the standard reinforcement learning setting where an agent interacts with an environment over a number of discrete time steps. At time $t$ the agent receives an observation $o _ { t }$ along with a reward $r _ { t }$ and produces an action $a _ { t }$ . The agent’s state $s _ { t }$ is a function of its experience up until t sum of rewards, time , $s _ { t } = f ( o _ { 1 } , r _ { 1 } , a _ { 1 } , . . . , o _ { t } , r _ { t } ) ,$ $\begin{array} { r } { R _ { t : t + n } = \sum _ { i = 1 } ^ { n } \gamma ^ { i - 1 } r _ { t + i } } \end{array}$ . The $n$ -step return t:t+n . The value function is the expected return from state $R _ { t : t + n }$ at time is defined as the discounted $s$ , $V ^ { \pi } ( s ) = \mathbb { E } \left[ R _ { t : \infty } | s _ { t } = s , \overline { { \pi } } \right]$ , when actions are selected accorded to a policy $\pi ( a | s )$ . The actionvalue function $Q ^ { \pi } ( s , a ) = \mathbb { E } \left[ \bar { R } _ { t : \infty } | s _ { t } = s , a _ { t } = a , \pi \right]$ is the expected return following action $a$ from state $s$ .
47
+
48
+ Value-based reinforcement learning algorithms, such as Q-learning (Watkins, 1989), or its deep learning instantiations DQN (Mnih et al., 2015) and asynchronous Q-learning (Mnih et al., 2016), approximate the action-value function $Q ( s , a ; \theta )$ using parameters $\theta$ , and then update parameters to minimise the mean-squared error, for example by optimising an $n$ -step lookahead loss (Peng & Williams, 1996), $\begin{array} { r } { \dot { \mathcal { L } _ { Q } } = \mathbb { E } \left[ \left( R _ { t : t + n } + \gamma ^ { n } \operatorname* { m a x } _ { a ^ { \prime } } Q ( s ^ { \prime } , a ^ { \prime } ; \theta ^ { - } ) - Q ( s , a ; \theta ) \right) ^ { 2 } \right] } \end{array}$ ; where $\theta ^ { - }$ are previous parameters and the optimisation is with respect to $\theta$ .
49
+
50
+ Policy gradient algorithms adjust the policy to maximise the expected reward, $\mathbb { E } _ { s \sim \pi } \left[ R _ { 1 : \infty } \right]$ , using the gradient $\begin{array} { r } { \frac { \partial \mathbb { E } _ { s \sim \pi } \left[ R _ { 1 : \infty } \right] } { \partial \theta } = \mathbb { E } \left[ \frac { \partial } { \partial \theta } \log \pi ( \boldsymbol { a } | s ) ( Q ^ { \pi } ( \underline { { s } } , \boldsymbol { a } ) - V ^ { \pi } ( s ) ) \right] } \end{array}$ ∼ ∞(Watkins, 1989; Sutton et al., 1999a); in practice the true value functions $Q ^ { \pi }$ and $V ^ { \pi }$ are substituted with approximations. The Asynchronous Advantage Actor-Critic (A3C) algorithm (Mnih et al., 2016) constructs an approximation to both the policy $\pi ( a | s , \theta )$ and the value function $V ( s , \theta )$ using parameters $\theta$ . Both policy and value are adjusted towards an $n$ -step lookahead value, $R _ { t : t + n } + \gamma ^ { n } V ( s _ { t + n + 1 } , \theta )$ , using an entropy regularisation penalty, ${ \mathcal L } _ { \mathrm { A 3 C } } \approx { \mathcal L } _ { \mathrm { V R } } + { \mathcal L } _ { \pi } - { \mathbb E } _ { s \sim \pi } [ \alpha H ( \pi ( s , \cdot , \theta ) ]$ , where $\mathcal { L } _ { \mathrm { V R } } ~ =$ $\mathbb { E } _ { s \sim \pi } \left[ ( \stackrel { \sim } { R } _ { t : t + n } + \gamma ^ { n } V ( s _ { t + n + 1 } , \stackrel { \sim } { \theta ^ { - } } ) - V ( s _ { t } , \theta ) ) ^ { 2 } \right]$ .
51
+
52
+ In A3C many instances of the agent interact in parallel with many instances of the environment, which both accelerates and stabilises learning. The A3C agent architecture we build on uses an LSTM to jointly approximate both policy $\pi$ and value function $V$ , given the entire history of experience as inputs (see Figure 1 (a)).
53
+
54
+ # 3 AUXILIARY TASKS FOR REINFORCEMENT LEARNING
55
+
56
+ In this section we incorporate auxiliary tasks into the reinforcement learning framework in order to promote faster training, more robust learning, and ultimately higher performance for our agents. Section 3.1 introduces the use of auxiliary control tasks, Section 3.2 describes the addition of reward focussed auxiliary tasks, and Section 3.4 describes the complete UNREAL agent combining these auxiliary tasks.
57
+
58
+ # 3.1 AUXILIARY CONTROL TASKS
59
+
60
+ The auxiliary control tasks we consider are defined as additional pseudo-reward functions in the environment the agent is interacting with. We formally define an auxiliary control task $c$ by a reward function $r ^ { ( c ) } : \mathcal { S } \times \mathcal { A } \mathbb { R }$ , where $s$ is the space of possible states and $\mathcal { A }$ is the space of available actions. The underlying state space $s$ includes both the history of observations and rewards as well as the state of the agent itself, i.e. the activations of the hidden units of the network.
61
+
62
+ Given a set of auxiliary control tasks $\mathcal { C }$ , let $\pi ^ { ( c ) }$ be the agent’s policy for each auxiliary task $c \in { \mathcal { C } }$ and let $\pi$ be the agent’s policy on the base task. The overall objective is to maximise total performance across all these auxiliary tasks,
63
+
64
+ $$
65
+ \underset { \theta } { \arg \operatorname* { m a x } } \mathbb { E } _ { \pi } [ R _ { 1 : \infty } ] + \lambda _ { C } \sum _ { c \in \mathcal { C } } \mathbb { E } _ { \pi _ { c } } [ R _ { 1 : \infty } ^ { ( c ) } ] ,
66
+ $$
67
+
68
+ where, $\begin{array} { r } { R _ { t : t + n } ^ { ( c ) } = \sum _ { k = 1 } ^ { n } \gamma ^ { k - 1 } r _ { t + k } ^ { ( c ) } } \end{array}$ is the discounted return for auxiliary reward $r ^ { ( c ) }$ , and $\theta$ is the set of parameters of $\pi$ and all $\pi ^ { ( c ) }$ ’s. By sharing some of the parameters of $\pi$ and all $\pi ^ { ( c ) }$ the agent must balance improving its performance with respect to the global reward $r _ { t }$ with improving performance on the auxiliary tasks.
69
+
70
+ In principle, any reinforcement learning method could be applied to maximise these objectives. However, to efficiently learn to maximise many different pseudo-rewards simultaneously in parallel from a single stream of experience, it is necessary to use off-policy reinforcement learning. We focus on value-based RL methods that approximate the optimal action-values by Qlearning. Specifically, for each control task $c$ we optimise an $n$ -step Q-learning loss $\mathcal { L } _ { Q } ^ { ( c ) } \ =$ $\begin{array} { r } { \mathbb { E } \left[ \left( R _ { t : t + n } + \gamma ^ { n } \operatorname* { m a x } _ { a ^ { \prime } } Q ^ { ( c ) } ( s ^ { \prime } , a ^ { \prime } , \theta ^ { - } ) - Q ^ { ( c ) } ( s , a , \theta ) \right) ^ { 2 } \right] } \end{array}$ , as described in Mnih et al. (2016).
71
+
72
+ While many types of auxiliary reward functions can be defined from these quantities we focus on two specific types:
73
+
74
+ • Pixel changes - Changes in the perceptual stream often correspond to important events in an environment. We train agents that learn a separate policy for maximally changing the pixels in each cell of an $n \times n$ non-overlapping grid placed over the input image. We refer to these auxiliary tasks as pixel control. See Section 4 for a complete description. • Network features - Since the policy or value networks of an agent learn to extract taskrelevant high-level features of the environment (Mnih et al., 2015; Zahavy et al., 2016; Silver et al., 2016) they can be useful quantities for the agent to learn to control. Hence, the activation of any hidden unit of the agent’s neural network can itself be an auxiliary reward. We train agents that learn a separate policy for maximally activating each of the units in a specific hidden layer. We refer to these tasks as feature control.
75
+
76
+ The Figure 1 (b) shows an A3C agent architecture augmented with a set of auxiliary pixel control tasks. In this case, the base policy $\pi$ shares both the convolutional visual stream and the LSTM with the auxiliary policies. The output of the auxiliary network head is an $N _ { \mathrm { a c t } } \times n \times n$ tensor $Q ^ { \mathrm { a u x } }$ where $Q ^ { \mathrm { a u x } } ( a , i , j )$ represents the network’s current estimate of the optimal discounted expected change in cell $( i , j )$ of the input after taking action $a$ . We exploit the spatial nature of the auxiliary tasks by using a deconvolutional neural network to produce the auxiliary values $Q ^ { \mathrm { a u x } }$ .
77
+
78
+ # 3.2 AUXILIARY REWARD TASKS
79
+
80
+ In addition to learning generally about the dynamics of the environment, an agent must learn to maximise the global reward stream. To learn a policy to maximise rewards, an agent requires features that recognise states that lead to high reward and value. An agent with a good representation of rewarding states, will allow the learning of good value functions, and in turn should allow the easy learning of a policy.
81
+
82
+ ![](images/f2e602856d63f45e1956a683bbe09a0d9cc79d8a665045e4e430984e405da66f.jpg)
83
+ Figure 2: The raw RGB frame from the environment is the observation that is given as input to the agent, along with the last action and reward. This observation is shown for a sample of a maze from the nav maze all random 02 level in Labyrinth. The agent must navigate this unseen maze and pick up apples giving $+ 1$ reward and reach the goal giving $+ 1 0$ reward, after which it will respawn. Top down views of samples from this maze generator show the variety of mazes procedurally created. A video showing the agent playing Labyrinth levels can be viewed at https://youtu.be/Uz-zGYrYEjA
84
+
85
+ However, in many interesting environments reward is encountered very sparsely, meaning that it can take a long time to train feature extractors adept at recognising states which signify the onset of reward. We want to remove the perceptual sparsity of rewards and rewarding states to aid the training of an agent, but to do so in a way which does not introduce bias to the agent’s policy.
86
+
87
+ To do this, we introduce the auxiliary task of reward prediction – that of predicting the onset of immediate reward given some historical context. This task consists of processing a sequence of consecutive observations, and requiring the agent to predict the reward picked up in the subsequent unseen frame. This is similar to value learning focused on immediate reward $( \gamma = 0$ ).
88
+
89
+ Unlike learning a value function, which is used to estimate returns and as a baseline while learning a policy, the reward predictor is not used for anything other than shaping the features of the agent. This keeps us free to bias the data distribution, therefore biasing the reward predictor and feature shaping, without biasing the value function or policy.
90
+
91
+ We train the reward prediction task on sequences ${ \cal S } _ { \tau } = ( s _ { \tau - k } , s _ { \tau - k + 1 } , . . . , s _ { \tau - 1 } )$ to predict the reward $r _ { \tau }$ , and sample $S _ { \tau }$ from the experience of our policy $\pi$ in a skewed manner so as to overrepresent rewarding events (presuming rewards are sparse within the environment). Specifically, we sample such that zero rewards and non-zero rewards are equally represented, i.e. the predicted probability of a non-zero reward is $P ( r _ { \tau } \neq 0 ) = 0 . 5$ . The reward prediction is trained to minimise a loss $\mathcal { L } _ { \mathrm { R P } }$ . In our experiments we use a multiclass cross-entropy classification loss across three classes (zero, positive, or negative reward), although a mean-squared error loss is also feasible.
92
+
93
+ The auxiliary reward predictions may use a different architecture to the agent’s main policy. Rather than simply “hanging” the auxiliary predictions off the LSTM, we use a simpler feedforward network that concatenates a stack of states $S _ { \tau }$ after being encoded by the agent’s CNN, see Figure 1 (c). The idea is to simplify the temporal aspects of the prediction task in both the future direction (focusing only on immediate reward prediction rather than long-term returns) and past direction (focusing only on immediate predecessor states rather than the complete history); the features discovered in this manner are shared with the primary LSTM (via shared weights in the convolutional encoder) to enable the policy to be learned more efficiently.
94
+
95
+ # 3.3 EXPERIENCE REPLAY
96
+
97
+ Experience replay has proven to be an effective mechanism for improving both the data efficiency and stability of deep reinforcement learning algorithms (Mnih et al., 2015). The main idea is to store transitions in a replay buffer, and then apply learning updates to sampled transitions from this buffer.
98
+
99
+ Experience replay provides a natural mechanism for skewing the distribution of reward prediction samples towards rewarding events: we simply split the replay buffer into rewarding and nonrewarding subsets, and replay equally from both subsets. The skewed sampling of transitions from a replay buffer means that rare rewarding states will be oversampled, and learnt from far more frequently than if we sampled sequences directly from the behaviour policy. This approach can be viewed as a simple form of prioritised replay (Schaul et al., 2015b).
100
+
101
+ In addition to reward prediction, we also use the replay buffer to perform value function replay (see Figure 1). This amounts to resampling recent historical sequences from the behaviour policy distribution and performing extra value function regression in addition to the on-policy value function regression in A3C. By resampling previous experience, and randomly varying the temporal position of the truncation window over which the n-step return is computed, value function replay performs value iteration and exploits newly discovered features shaped by reward prediction. We do not skew the distribution for this case.
102
+
103
+ Experience replay is also used to increase the efficiency and stability of the auxiliary control tasks. Q-learning updates are applied to sampled experiences that are drawn from the replay buffer, allowing features to be developed extremely efficiently.
104
+
105
+ # 3.4 UNREAL AGENT
106
+
107
+ The UNREAL algorithm combines the benefits of two separate, state-of-the-art approaches to deep reinforcement learning. The primary policy is trained with A3C (Mnih et al., 2016): it learns from parallel streams of experience to gain efficiency and stability; it is updated online using policy gradient methods; and it uses a recurrent neural network to encode the complete history of experience. This allows the agent to learn effectively in partially observed environments.
108
+
109
+ The auxiliary tasks are trained on very recent sequences of experience that are stored and randomly sampled; these sequences may be prioritised (in our case according to immediate rewards) (Schaul et al., 2015b); these targets are trained off-policy by Q-learning; and they may use simpler feedforward architectures. This allows the representation to be trained with maximum efficiency.
110
+
111
+ The UNREAL algorithm optimises a single combined loss function with respect to the joint parameters of the agent, $\begin{array} { r } { \mathcal { L } _ { \mathrm { P C } } = \sum _ { c } \mathcal { L } _ { Q } ^ { ( c ) } } \end{array}$ , auxiliary reward prediction loss $\theta$ , that combines the A3C loss $\mathcal { L } _ { \mathrm { R P } }$ $\mathcal { L } _ { \mathrm { A 3 C } }$ and replayed value loss together with an auxiliary control loss $\mathcal { L } _ { \mathrm { V R } }$ ,
112
+
113
+ $$
114
+ \mathcal { L } _ { U N R E A L } ( \theta ) = \mathcal { L } _ { \mathrm { A 3 C } } + \lambda _ { \mathrm { V R } } \mathcal { L } _ { \mathrm { V R } } + \lambda _ { \mathrm { P C } } \sum _ { c } \mathcal { L } _ { Q } ^ { ( c ) } + \lambda _ { \mathrm { R P } } \mathcal { L } _ { \mathrm { R P } }
115
+ $$
116
+
117
+ where $\lambda _ { \mathrm { V R } } , \lambda _ { \mathrm { P C } } , \lambda _ { \mathrm { R P } }$ are weighting terms on the individual loss components.
118
+
119
+ In practice, the loss is broken down into separate components that are computed either on-policy, directly from experience; or off-policy, on replayed transitions. Specifically, the A3C loss $\mathcal { L } _ { \mathrm { { A 3 C } } }$ is minimised on-policy; while the value function loss $\mathcal { L } _ { \mathrm { V R } }$ is optimised from replayed data, in addition to the A3C loss (of which it is one component, see Section 2). The auxiliary control loss $\mathcal { L } _ { \mathrm { P C } }$ is optimised off-policy from replayed data, by $n$ -step Q-learning. Finally, the reward loss $\mathcal { L } _ { \mathrm { R P } }$ is optimised from rebalanced replay data.
120
+
121
+ # 4 EXPERIMENTS
122
+
123
+ In this section we give the results of experiments performed on the 3D environment Labyrinth in Section 4.1 and Atari in Section 4.2.
124
+
125
+ In all our experiments we used an A3C CNN-LSTM agent as our baseline and the UNREAL agent along with its ablated variants added auxiliary outputs and losses to this base agent. The agent is trained on-policy with 20-step returns and the auxiliary tasks are performed every 20 environment steps, corresponding to every update of the base A3C agent. The replay buffer stores the most recent $2 \mathrm { k }$ observations, actions, and rewards taken by the base agent. In Labyrinth we use the same set of 17 discrete actions for all games and on Atari the action set is game dependent (between 3 and 18 discrete actions). The full implementation details can be found in Section B.
126
+
127
+ # 4.1 LABYRINTH RESULTS
128
+
129
+ Labyrinth (see Figure 2) is a first-person 3D game platform extended from OpenArena (contributors, 2005), which is itself based on Quake3 (id software, 1999). Labyrinth is comparable to other firstperson 3D game platforms for AI research like VizDoom (Kempka et al., 2016) or Minecraft (Tessler et al., 2016). However, in comparison, Labyrinth has considerably richer visuals and more realistic physics. Textures in Labyrinth are often dynamic (animated) so as to convey a game world where walls and floors shimmer and pulse, adding significant complexity to the perceptual task. The action space allows for fine-grained pointing in a fully 3D world. Labyrinth also supports continuous motion unlike the Minecraft platform of (Oh et al., 2016), which is a 3D grid world.
130
+
131
+ ![](images/6f6ad55f716b5b0dd7cb6551583a335ab7b8c6318795317705a062a21feacd06.jpg)
132
+ Figure 3: An overview of performance averaged across all levels on Labyrinth (Top) and Atari (Bottom). In the ablated versions RP is reward prediction, VR is value function replay, and PC is pixel control, with the UNREAL agent being the combination of all. Left: The mean human-normalised performance over last 100 episodes of the top-3 jobs at every point in training. In Labyrinth, we achieve an average of $87 \%$ humannormalised score, with every element of the agent improving upon the $54 \%$ human-normalised score of vanilla A3C. Prior. Duel Clip and Duel Clip are Dueling Networks with gradient clipped to 10 as reported in Wang et al. (2016) Right: The final human-normalised score of every job in our hyperparameter sweep, sorted by score. On both Labyrinth and Atari, the UNREAL agent increases the robustness to the hyperparameters (namely learning rate and entropy cost).
133
+
134
+ We evaluated agent performance on 13 Labyrinth levels that tested a range of different agent abilities. A top-down visualization showing the layout of each level can be found in Figure 9 of the Appendix. A gallery of example images from the first-person perspective of the agent are in Figure 10 of the Appendix. The levels can be divided into four categories:
135
+
136
+ 1. Simple fruit gathering levels with a static map (seekavoid arena 01 and stairway to melon 01). The goal of these levels is to collect apples (small positive reward) and melons (large positive reward) while avoiding lemons (small negative reward). 2. Navigation levels with a static map layout (nav maze static $. 0 \{ 1 , 2 , 3 \}$ and nav maze random goal ${ \bf \mathrm { - 0 \{ 1 , 2 , 3 \} } }$ ). These levels test the agent’s ability to find their way to a goal in a fixed maze that remains the same across episodes. The starting location is random. In this case, agents could encode the structure of the maze in network weights. In the random goal variant, the location of the goal changes in every episode. The optimal policy is to find the goal’s location at the start of each episode and then use long-term knowledge of the maze layout to return to it as quickly as possible from any location. The static variant is simpler in that the goal location is always fixed for all episodes and only the agent’s starting location changes so the optimal policy does not require the first step of exploring to find the current goal location. 3. Procedurally-generated navigation levels requiring effective exploration of a new maze generated on-the-fly at the start of each episode (nav maze all random $. 0 \{ 1 , 2 , 3 \} )$ ). These levels test the agent’s ability to effectively explore a totally new environment. The optimal policy would begin by exploring the maze to rapidly learn its layout and then exploit that knowledge to repeatedly return to the goal as many times as possible before the end of the episode (between 60 and 300 seconds).
137
+
138
+ 4. Laser-tag levels requiring agents to wield laser-like science fiction gadgets to tag bots controlled by the game’s in-built AI (lt horse shoe color and lt hallway slope). A reward of 1 is delivered whenever the agent tags a bot by reducing its shield to 0. These levels approximate the default OpenArena/Quake3 gameplay mode. In lt hallway slope there is a sloped arena, requiring the agent to look up and down. In lt horse shoe color, the colors and textures of the bots are randomly generated at the start of each episode. This prevents agents from relying on color for bot detection. These levels test aspects of fine-control (for aiming), planning (to anticipate where bots are likely to move), strategy (to control key areas of the map such as gadget spawn points), and robustness to the substantial visual complexity arising from the large numbers of independently moving objects (gadget projectiles and bots).
139
+
140
+ # 4.1.1 RESULTS
141
+
142
+ We compared the full UNREAL agent to a basic A3C LSTM agent along with several ablated versions of UNREAL with different components turned off. A video of the final agent performance, as well as visualisations of the activations and auxiliary task outputs can be viewed at https://youtu.be/Uz-zGYrYEjA.
143
+
144
+ Figure 3 (top left) shows curves of mean human-normalised scores over the 13 Labyrinth levels. Adding each of our proposed auxiliary tasks to an A3C agent substantially improves the performance. Combining different auxiliary tasks leads to further improvements over the individual auxiliary tasks. The UNREAL agent, which combines all three auxiliary tasks, achieves more than twice the final human-normalised mean performance of A3C, increasing from $54 \%$ to $87 \%$ ( $45 \%$ to $92 \%$ for median performance). This includes a human-normalised score of $116 \%$ on lt hallway slope and $100 \%$ on nav maze random goal 02.
145
+
146
+ Perhaps of equal importance, aside from final performance on the games, UNREAL is significantly faster at learning and therefore more data efficient, achieving a mean speedup of the number of steps to reach A3C best performance of $1 0 \times$ (median $1 1 \times$ ) across all levels and up to $1 8 \times$ on nav maze random goal 02. This translates in a drastic improvement in the data efficiency of UNREAL over A3C, requiring less than $10 \%$ of the data to reach the final performance of A3C. We can also measure the robustness of our learning algorithms to hyperparameters by measuring the performance over all hyperparameters (namely learning rate and entropy cost). This is shown in Figure 3 Top Right: every auxiliary task in our agent improves robustness. A breakdown of the performance of A3C, UNREAL and UNREAL without pixel control on the individual Labyrinth levels is shown in Figure 4.
147
+
148
+ Unsupervised Reinforcement Learning In order to better understand the benefits of auxiliary control tasks we compared it to two simple baselines on three Labyrinth levels. The first baseline was A3C augmented with a pixel reconstruction loss, which has been shown to improve performance on 3D environments (Kulkarni et al., 2016). The second baseline was A3C augmented with an input change prediction loss, which can be seen as simply predicting the immediate auxiliary reward instead of learning to control. Finally, we include preliminary results for A3C augmented with the feature control auxiliary task on one of the levels. We retuned the hyperparameters of all methods (including learning rate and the weight placed on the auxiliary loss) for each of the three Labyrinth levels. Figure 5 shows the learning curves for the top 5 hyperparameter settings on three Labyrinth navigation levels. The results show that learning to control pixel changes is indeed better than simply predicting immediate pixel changes, which in turn is better than simply learning to reconstruct the input. In fact, learning to reconstruct only led to faster initial learning and actually made the final scores worse when compared to vanilla A3C. Our hypothesis is that input reconstruction hurts final performance because it puts too much focus on reconstructing irrelevant parts of the visual input instead of visual cues for rewards, which rewarding objects are rarely visible. We saw a substantial improvement from including the feature control auxiliary task, which was only slightly worse than for pixel control. Combining feature control with other auxiliary tasks is a promising future direction.
149
+
150
+ ![](images/0cf8e451251429aa2f3c5407f44381d81b1760354f6d60b8a9515be10349b945.jpg)
151
+ Figure 4: A breakdown of the improvement over A3C due to our auxiliary tasks for each level on Labyrinth. The values for $_ { \mathrm { A 3 C + R P + V R } }$ (reward prediction and value function replay) and UNREAL (reward prediction, value function replay and pixel control) are normalised by the A3C value. AUC Performance gives the robustness to hyperparameters (area under the robustness curve Figure 3 Right). Data Efficiency is area under the mean learning curve for the top-5 jobs, and Top5 Speedup is the speedup for the mean of the top-5 jobs to reach the maximum top-5 mean score set by A3C. Speedup is not defined for stairway to melon as A3C did not learn throughout training.
152
+
153
+ ![](images/0b7c880bcb10e1c2e61dd8c91d48b339c4be42b819d7b6e4a5dc1ff7cf0964a1.jpg)
154
+ Figure 5: Comparison of various forms of self-supervised learning on random maze navigation. Adding an input reconstruction loss to the objective leads to faster learning compared to an A3C baseline. Predicting changes in the inputs works better than simple image reconstruction. Learning to control changes leads to the best results.
155
+
156
+ # 4.2 ATARI
157
+
158
+ We applied the UNREAL agent as well as UNREAL without pixel control to 57 Atari games from the Arcade Learning Environment (Bellemare et al., 2012) domain. We use the same evaluation protocol as for our Labyrinth experiments where we evaluate 50 different random hyper parameter settings (learning rate and entropy cost) on each game. The results are shown in the bottom row of Figure 3. The left side shows the average performance curves of the top 3 agents for all three methods the right half shows sorted average human-normalised scores for each hyperparameter setting. More detailed learning curves for individual levels can be found in Figure 6. We see that UNREAL surpasses the current state-of-the-art agents, i.e. A3C and Prioritized Dueling DQN (Wang et al., 2016), across all levels attaining $8 8 0 \%$ mean and $2 5 0 \%$ median performance. Notably, UNREAL is also substantially more robust to hyper parameter settings than A3C.
159
+
160
+ # 5 CONCLUSION
161
+
162
+ We have shown how augmenting a deep reinforcement learning agent with auxiliary control and reward prediction tasks can drastically improve both data efficiency and robustness to hyperparameter settings. Most notably, our proposed UNREAL architecture more than doubled the previous stateof-the-art results on the challenging set of 3D Labyrinth levels, bringing the average scores to over $8 7 \%$ of human scores. The same UNREAL architecture also significantly improved both the learning speed and the robustness of A3C over 57 Atari games.
163
+
164
+ # ACKNOWLEDGEMENTS
165
+
166
+ We thank Charles Beattie, Julian Schrittwieser, Marcus Wainwright, and Stig Petersen for environment design and development, and Amir Sadik and Sarah York for expert human game testing. We also thank Joseph Modayil, Andrea Banino, Hubert Soyer, Razvan Pascanu, and Raia Hadsell for many helpful discussions.
167
+
168
+ # REFERENCES
169
+
170
+ Andre Barreto, R ´ emi Munos, Tom Schaul, and David Silver. Successor features for transfer in ´ reinforcement learning. arXiv preprint arXiv:1606.05312, 2016.
171
+
172
+ Marc G Bellemare, Yavar Naddaf, Joel Veness, and Michael Bowling. The arcade learning environment: An evaluation platform for general agents. Journal of Artificial Intelligence Research, 2012.
173
+
174
+ OpenArena contributors. The openarena manual. 2005. URL http://openarena.wikia. com/wiki/Manual.
175
+
176
+ Peter Dayan. Improving generalization for temporal difference learning: The successor representation. Neural Computation, 5(4):613–624, 1993.
177
+
178
+ Felix A Gers, Jurgen Schmidhuber, and Fred Cummins. Learning to forget: Continual prediction¨ with lstm. Neural computation, 12(10):2451–2471, 2000.
179
+
180
+ id software. Quake3. 1999. URL https://github.com/id-Software/ Quake-III-Arena.
181
+
182
+ Michał Kempka, Marek Wydmuch, Grzegorz Runc, Jakub Toczek, and Wojciech Jaskowski. Viz- ´ doom: A doom-based ai research platform for visual reinforcement learning. arXiv preprint arXiv:1605.02097, 2016.
183
+
184
+ George Konidaris and Andre S Barreto. Skill discovery in continuous reinforcement learning domains using skill chaining. In Advances in Neural Information Processing Systems, pp. 1015– 1023, 2009.
185
+
186
+ Tejas D Kulkarni, Ardavan Saeedi, Simanta Gautam, and Samuel J Gershman. Deep successor reinforcement learning. arXiv preprint arXiv:1606.02396, 2016.
187
+
188
+ Guillaume Lample and Devendra Singh Chaplot. Playing FPS games with deep reinforcement learning. CoRR, abs/1609.05521, 2016.
189
+
190
+ Xiujun Li, Lihong Li, Jianfeng Gao, Xiaodong He, Jianshu Chen, Li Deng, and Ji He. Recurrent reinforcement learning: A hybrid approach. arXiv preprint arXiv:1509.03044, 2015.
191
+
192
+ Long-Ji Lin and Tom M Mitchell. Memory approaches to reinforcement learning in non-markovian domains. Technical report, Carnegie Mellon University, School of Computer Science, 1992.
193
+
194
+ Piotr Mirowski, Razvan Pascanu, Fabio Viola, Andrea Banino, Hubert Soyer, Andy Ballard, Misha Denil, Ross Goroshin, Laurent Sifre, Koray Kavukcuoglu, Dharshan Kumaran, and Raia Hadsell. Learning to navigate in complex environments. 2016.
195
+
196
+ Volodymyr Mnih, Koray Kavukcuoglu, David Silver, Alex Graves, Ioannis Antonoglou, Daan Wierstra, and Martin Riedmiller. Playing atari with deep reinforcement learning. In NIPS Deep Learning Workshop. 2013.
197
+
198
+ Volodymyr Mnih, Koray Kavukcuoglu, David Silver, Andrei A. Rusu, Joel Veness, Marc G. Bellemare, Alex Graves, Martin Riedmiller, Andreas K. Fidjeland, Georg Ostrovski, Stig Petersen, Charles Beattie, Amir Sadik, Ioannis Antonoglou, Helen King, Dharshan Kumaran, Daan Wierstra, Shane Legg, and Demis Hassabis. Human-level control through deep reinforcement learning. Nature, 518(7540):529–533, 02 2015. URL http://dx.doi.org/10.1038/ nature14236.
199
+
200
+ Volodymyr Mnih, Adria Puigdom \` enech Badia, Mehdi Mirza, Alex Graves, Timothy P. Lillicrap, Tim \` Harley, David Silver, and Koray Kavukcuoglu. Asynchronous methods for deep reinforcement learning. In Proceedings of the 33rd International Conference on Machine Learning (ICML), pp. 1928–1937, 2016.
201
+
202
+ Junhyuk Oh, Xiaoxiao Guo, Honglak Lee, Richard L Lewis, and Satinder Singh. Action-conditional video prediction using deep networks in atari games. In Advances in Neural Information Processing Systems, pp. 2863–2871, 2015.
203
+
204
+ Junhyuk Oh, Valliappa Chockalingam, Satinder Singh, and Honglak Lee. Control of memory, active perception, and action in minecraft. arXiv preprint arXiv:1605.09128, 2016.
205
+
206
+ H Freyja Olafsdottir, Caswell Barry, Aman B Saleem, Demis Hassabis, and Hugo J Spiers. Hippocampal place cells construct reward related sequences through unexplored space. Elife, 4: e06063, 2015.
207
+
208
+ Jing Peng and Ronald J Williams. Incremental multi-step q-learning. Machine Learning, 22(1-3): 283–290, 1996.
209
+
210
+ Daniel L Schacter, Donna Rose Addis, Demis Hassabis, Victoria C Martin, R Nathan Spreng, and Karl K Szpunar. The future of memory: remembering, imagining, and the brain. Neuron, 76(4): 677–694, 2012.
211
+
212
+ Tom Schaul, Daniel Horgan, Karol Gregor, and David Silver. Universal value function approximators. In Proceedings of the 32nd International Conference on Machine Learning (ICML-15), pp. 1312–1320, 2015a.
213
+
214
+ Tom Schaul, John Quan, Ioannis Antonoglou, and David Silver. Prioritized experience replay. arXiv preprint arXiv:1511.05952, 2015b.
215
+
216
+ Jurgen Schmidhuber. Formal theory of creativity, fun, and intrinsic motivation (1990–2010). ¨ IEEE Transactions on Autonomous Mental Development, 2(3):230–247, 2010.
217
+
218
+ David Silver and Kamil Ciosek. Compositional planning using optimal option models. arXiv preprint arXiv:1206.6473, 2012.
219
+
220
+ 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.
221
+
222
+ Richard S Sutton, David A McAllester, Satinder P Singh, Yishay Mansour, et al. Policy gradient methods for reinforcement learning with function approximation. In NIPS, volume 99, pp. 1057– 1063, 1999a.
223
+
224
+ Richard S Sutton, Doina Precup, and Satinder Singh. Between mdps and semi-mdps: A framework for temporal abstraction in reinforcement learning. Artificial intelligence, 1999b.
225
+
226
+ Richard S Sutton, Joseph Modayil, Michael Delp, Thomas Degris, Patrick M Pilarski, Adam White, and Doina Precup. Horde: A scalable real-time architecture for learning knowledge from unsupervised sensorimotor interaction. In The 10th International Conference on Autonomous Agents and Multiagent Systems-Volume 2, pp. 761–768. International Foundation for Autonomous Agents and Multiagent Systems, 2011.
227
+
228
+ Chen Tessler, Shahar Givony, Tom Zahavy, Daniel J Mankowitz, and Shie Mannor. A deep hierarchical approach to lifelong learning in minecraft. arXiv preprint arXiv:1604.07255, 2016.
229
+
230
+ Z. Wang, N. de Freitas, and M. Lanctot. Dueling Network Architectures for Deep Reinforcement Learning. In Proceedings of the 33rd International Conference on Machine Learning (ICML), 2016.
231
+
232
+ Christopher John Cornish Hellaby Watkins. Learning from delayed rewards. PhD thesis, University of Cambridge England, 1989.
233
+
234
+ Christopher Xie, Sachin Patil, Teodor Mihai Moldovan, Sergey Levine, and Pieter Abbeel. Modelbased reinforcement learning with parametrized physical models and optimism-driven exploration. CoRR, abs/1509.06824, 2015.
235
+
236
+ Tom Zahavy, Nir Ben Zrihem, and Shie Mannor. Graying the black box: Understanding dqns. In Proceedings of the 33rd International Conference on Machine Learning, 2016.
237
+
238
+ ![](images/39195cf9194c529ae26862da0a7a539cab4fab714a907851d7ccd374c9c7dc93.jpg)
239
+ Figure 6: Learning curves for three example Atari games. Semi-transparent lines are agents with different seeds and hyperparameters, the bold line is a mean over population and dotted line is the best agent (in terms of final performance).
240
+
241
+ # B IMPLEMENTATION DETAILS
242
+
243
+ The input to the agent at each timestep was an $8 4 \times 8 4$ RGB image. All agents processed the input with the convolutional neural network (CNN) originally used for Atari by Mnih et al. (2013). The network consists of two convolutional layers. The first one has $1 6 8 \times 8$ filters applied with stride 4, while the second one has $3 2 4 \times 4$ filters with stride 2. This is followed by a fully connected layer with 256 units. All three layers are followed by a ReLU non-linearity. All agents used an LSTM with forget gates (Gers et al., 2000) with 256 cells which take in the CNN-encoded observation concatenated with the previous action taken and current reward. The policy and value function are linear projections of the LSTM output. The agent is trained with 20-step unrolls. The action space of the agent in the environment is game dependent for Atari (between 3 and 18 discrete actions), and 17 discrete actions for Labyrinth. Labyrinth runs at 60 frames-per-second. We use an action repeat of four, meaning that each action is repeated four times, with the agent receiving the final fourth frame as input to the next processing step.
244
+
245
+ For the pixel control auxiliary tasks we trained policies to control the central $8 0 \times 8 0$ crop of the inputs. The cropped region was subdivided into a $2 0 \times 2 0$ grid of non-overlapping $4 \times 4$ cells. The instantaneous reward in each cell was defined as the average absolute difference from the previous frame, where the average is taken over both pixels and channels in the cell. The output tensor of auxiliary values, $Q ^ { \mathrm { a u x } }$ , is produced from the LSTM outputs by a deconvolutional network. The LSTM outputs are first mapped to a $3 2 \times 7 \times 7$ spatial feature map with a linear layer followed by a ReLU. This is followed by a doconvolutional layer of $3 2 3 \times 3$ filters and a ReLU, resulting in a $3 2 \times 9 \times 9$ feature map. Deconvolution layers with 1 and $N _ { \mathrm { a c t } }$ filters of size $4 \times 4$ and stride 2 map the $3 2 \times 9 \times 9$ into a value tensor and an advantage tensor respectively. The spatial map is then decoded into Q-values using the dueling parametrization (Wang et al., 2016) producing the $N _ { \mathrm { a c t } } \times 2 0 \times 2 0$ output $Q ^ { \mathrm { a u x } }$ . There is a final ReLU nonlinearity on the $Q ^ { \mathrm { a u x } }$ output.
246
+
247
+ The architecture for feature control was similar. We learned to control the second hidden layer, which is a spatial feature map with size $3 2 \times 9 \times 9$ . Similarly to pixel control, we exploit the spatial structure in the data and used a deconvolutional network to produce $Q ^ { \mathrm { a u x } }$ from the LSTM outputs.
248
+
249
+ The reward prediction task is performed on a sequence of three observations, which are fed through three instances of the agent’s CNN. The three encoded CNN outputs are concatenated and fed through a fully connected layer of 128 units with ReLU activations, followed by a final linear threeclass classifier and softmax. The reward is predicted as one of three classes: positive, negative, or zero and trained with a task weight $\lambda _ { \mathrm { R P } } = 1$ . The value function replay is performed on a sequence of length 20 with a task weight $\lambda _ { \mathrm { V R } } = 1$ .
250
+
251
+ The auxiliary tasks are performed every 20 environment steps, corresponding to every update of the base A3C agent, once the replay buffer has filled with agent experience. The replay buffer stores the most recent 2k observations, actions, and rewards taken by the base agent.
252
+
253
+ The agents are optimised over 32 asynchronous threads with shared RMSprop (Mnih et al., 2016). The learning rates are sampled from a log-uniform distribution between 0.0001 and 0.005. The entropy costs are sampled from the log-uniform distribution between 0.0005 and 0.01. Task weight $\lambda _ { \mathrm { P C } }$ is sampled from log-uniform distribution between 0.01 and 0.1 for Labyrinth and 0.0001 and 0.01 for Atari (since Atari games are not homogeneous in terms of pixel intensities changes, thus we need to fit this normalization factor).
254
+
255
+ # C RANDOMNESS ROBUSTNESS
256
+
257
+ Each agent was trained with 45 randomly sampled values of hyperparameters. Each of them also starts with a different random seed (however, due to asynchronous nature of A3C this does not determinise the learning procedure).
258
+
259
+ Previous sections showed that the UNREAL agent is more robust to the choice of hyperparameters than A3C. To present an even clearer picture of this effect, we show learning curves averaged over all hyperparamters/seeds used in the experiments in Figure 7. It is worth noting, that standard error for such curves is not increased despite adding our auxiliary tasks.
260
+
261
+ ![](images/b19703264cc1e05ee8b692b916f91e90ee4fc8e8188a972b403499c6f563a7d0.jpg)
262
+ Figure 7: Learning curves averaged across all hyperparameters (left), and the same curves for three types of agent plotted with standard error (right).
263
+
264
+ We also include scatter plots of averaged final human normalised performance with respect to the two main hyperparameters (learning rate and entropy cost) in Figure 8. The final performance across all levels varies rather smoothly across similar hyperparameters, showing that learning is not significantly affected by random seeds. The only significant inconsistency, which can be spotted around $( - 3 , - 3 )$ point in UNREAL plot is an effect of the third hyperparamer - $\lambda _ { \mathrm { P C } }$ , which differs a lot between these runs.
265
+
266
+ ![](images/92506848462b33e63ba73227fb4b773a11e30f2bdbf8d3d54d8fe4f97ec8546e.jpg)
267
+ Figure 8: Human normalised performance for each hyperparameter setting with respect to the main hyperparameters of A3C - learning rate and entropy cost.
268
+
269
+ # D RAW ATARI SCORES
270
+
271
+ Table 1: Raw scores of the best UNREAL agent (selected according to the learning curve) for all Atari games considered. Scores are averaged over 200 runs with random starts. Normalised score of $s$ is $( s - s _ { \mathrm { r a n d o m } } ) / ( s _ { \mathrm { h u m a n } } - s _ { \mathrm { r a n d o m } } )$ .
272
+
273
+ <table><tr><td rowspan="2"></td><td rowspan="2">Random Raw</td><td colspan="2">UNREAL (random starts)</td><td rowspan="2">Human Raw</td></tr><tr><td>Raw</td><td>Normalised</td></tr><tr><td>alien</td><td>228</td><td>2087</td><td>30%</td><td>6371</td></tr><tr><td>amidar</td><td>6</td><td>4463</td><td>290%</td><td>1540</td></tr><tr><td>assault</td><td>222</td><td>16853</td><td>4091%</td><td>629</td></tr><tr><td>asterix</td><td>210</td><td>154818</td><td>2110%</td><td>7536</td></tr><tr><td>asteroids</td><td>719</td><td>248289</td><td>692%</td><td>36517</td></tr><tr><td>atlantis</td><td>12850</td><td>990904</td><td>7126%</td><td>26575</td></tr><tr><td>bank_heist</td><td>14</td><td>1353</td><td>212%</td><td>644</td></tr><tr><td>battle_zone</td><td>2360</td><td>147700</td><td>474%</td><td>33030</td></tr><tr><td>beam_rider</td><td>364</td><td>39250</td><td>266%</td><td>14961</td></tr><tr><td>berzerk</td><td>124</td><td>41489</td><td>1957%</td><td>2238</td></tr><tr><td>bowling</td><td>23</td><td>58</td><td>29%</td><td>146</td></tr><tr><td>boxing</td><td>0</td><td>94</td><td>980%</td><td>10</td></tr><tr><td>breakout</td><td>2</td><td>751</td><td>2861%</td><td>28</td></tr><tr><td>centipede</td><td>2091</td><td>4612</td><td>31%</td><td>10322</td></tr><tr><td>chopper_command</td><td>811</td><td>75028</td><td>914%</td><td>8930</td></tr><tr><td>crazy_climber</td><td>10780</td><td>129674</td><td>543%</td><td>32667</td></tr><tr><td>defender</td><td>2874</td><td>417812</td><td>3633%</td><td>14296</td></tr><tr><td>demon_attack</td><td>152</td><td>106937</td><td>3245%</td><td>3443</td></tr><tr><td>double_dunk</td><td>-19</td><td>21</td><td>943%</td><td>-14</td></tr><tr><td>enduro</td><td>0</td><td>0</td><td>0%</td><td>740</td></tr><tr><td>fishing_derby</td><td>-92 0</td><td>42</td><td>138%</td><td>5</td></tr><tr><td>freeway</td><td>65</td><td>34</td><td>133%</td><td>26</td></tr><tr><td>frostbite</td><td></td><td>3795</td><td>90%</td><td>4203</td></tr><tr><td>gopher</td><td>258</td><td>54007</td><td>2618%</td><td>2311</td></tr><tr><td>gravitar</td><td>173</td><td>6310</td><td>209%</td><td>3116</td></tr><tr><td>hero</td><td>1027</td><td>37291</td><td>146%</td><td>25839</td></tr><tr><td>ice_hockey</td><td>-11</td><td>16</td><td>233%</td><td>0</td></tr><tr><td>jamesbond</td><td>29</td><td>69872</td><td>20572%</td><td>368</td></tr><tr><td>kangaroo</td><td>52</td><td>14838</td><td>550%</td><td>2739</td></tr><tr><td>krull</td><td>1598</td><td>10587</td><td>1759%</td><td>2109</td></tr><tr><td>kung_fu_master</td><td>258</td><td>76676</td><td>372%</td><td>20787</td></tr><tr><td>montezuma_revenge</td><td>0</td><td>2902</td><td>69%</td><td>4182</td></tr><tr><td>ms_pacman</td><td>307 2292</td><td>5423</td><td>34%</td><td>15375</td></tr><tr><td>name_this-game</td><td></td><td>12602</td><td>229%</td><td>6796</td></tr><tr><td>phoenix</td><td>761 -229</td><td>404280</td><td>6811%</td><td>6686</td></tr><tr><td>pitfall</td><td>-21</td><td>0</td><td>4%</td><td>5999</td></tr><tr><td>pong</td><td>25</td><td>8</td><td>79%</td><td>16</td></tr><tr><td>private_eye</td><td>164</td><td>546</td><td>1%</td><td>64169</td></tr><tr><td>qbert riverraid</td><td>1338</td><td>26437</td><td>220%</td><td>12085</td></tr><tr><td></td><td>12</td><td>19077</td><td>136%</td><td>14382</td></tr><tr><td>road_runner</td><td></td><td>52596</td><td>766%</td><td>6878</td></tr><tr><td>robotank</td><td>2</td><td>79</td><td>1136%</td><td>9</td></tr><tr><td>seaquest</td><td>68</td><td>5305</td><td>13%</td><td>40426</td></tr><tr><td>skiing</td><td>-17098</td><td>-8988</td><td>60%</td><td>-3687</td></tr><tr><td>solaris</td><td>1236</td><td>2895</td><td>17%</td><td>11033</td></tr><tr><td>space_invaders</td><td>148</td><td>25851</td><td>1952%</td><td>1465</td></tr><tr><td>star_gunner</td><td>664</td><td>72864</td><td>815%</td><td>9528</td></tr><tr><td>surround</td><td>-10</td><td>10</td><td>128%</td><td>5</td></tr><tr><td>tennis</td><td>-24</td><td>-0</td><td>136%</td><td>-7</td></tr><tr><td>time_pilot</td><td>3568</td><td>89559</td><td>4130%</td><td>5650</td></tr><tr><td>tutankham</td><td>11</td><td>294</td><td>222%</td><td>138</td></tr><tr><td>up_n_down</td><td>533</td><td>339119</td><td>3616%</td><td>9896</td></tr><tr><td>venture</td><td>0</td><td>0</td><td>0%</td><td>1039</td></tr><tr><td>video_pinball</td><td>0</td><td>518567</td><td>3315%</td><td>15641</td></tr><tr><td>wizard_of_wor</td><td>564</td><td>35344</td><td>871%</td><td>4556</td></tr><tr><td>yars_revenge</td><td>3093</td><td>42889</td><td>90%</td><td>47135</td></tr><tr><td>zaxxon</td><td>32</td><td>60044</td><td>714%</td><td>8443</td></tr><tr><td>Mean Median</td><td>■</td><td>= =</td><td>1453% 331%</td><td>■ ■</td></tr></table>
274
+
275
+ #
276
+
277
+ ![](images/5870747e077392dbb2898d5e4ab9f2d540e2beaf09711b1026124bbc6daa8d78.jpg)
278
+ Figure 9: Top-down renderings of each Labyrinth level. The nav $\mathrm { . m a z e * . 0 \{ 1 , 2 , 3 \} }$ levels show one example maze layout. In the all random case, a new maze was randomly generated at the start of each episode.
279
+
280
+ ![](images/4bc0fc184fd7539e5d4337ccbbfa868b0141ecebc45d1bd8a40fa142b4363f3e.jpg)
281
+ Figure 10: Example images from the agent’s egocentric viewpoint for each Labyrinth level.
md/train/e68IYJNOYau/e68IYJNOYau.md ADDED
@@ -0,0 +1,419 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # POINT CLOUD INSTANCE SEGMENTATION USING PROBABILISTIC EMBEDDINGS
2
+
3
+ Anonymous authors Paper under double-blind review
4
+
5
+ # ABSTRACT
6
+
7
+ In this paper we propose a new framework for point cloud instance segmentation. Our framework has two steps: an embedding step and a clustering step. In the embedding step, our main contribution is to propose a probabilistic embedding space for point cloud embedding. Specifically, each point is represented as a tri-variate normal distribution. In the clustering step, we propose a novel loss function, which benefits both the semantic segmentation and the clustering. Our experimental results show important improvements to the SOTA, i.e., $3 . 1 \%$ increased average per-category mAP on the PartNet dataset.
8
+
9
+ # 1 INTRODUCTION
10
+
11
+ In this paper we tackle the problem of instance segmentation of point clouds. In instance segmentation we would like to assign two labels to each point in a point cloud. The first label is the class label (e.g., leg, back, seat, ... for a chair data set) and the second label is the instance ID (a unique number, e.g., to distinguish the different legs of a chair). While instance segmentation had many recent successes in the image domain (He et al. (2017); Liu et al. (2018); Fathi et al. (2017); Novotny et al. (2018); De Brabandere et al. (2017); Neven et al. (2019)), we believe that the problem of instance segmentation for point clouds is not sufficiently explored.
12
+
13
+ We build our work on the idea of embedding-based instance segmentation, that is very popular in the image and volume domain (Fathi et al. (2017); Novotny et al. (2018); De Brabandere et al. (2017); Neven et al. (2019); Lahoud et al. (2019)) and has also been successfully applied in the point clouds domain (Wang et al. (2018; 2019b)). In this approach typically two steps are employed. In the first step, each point (or pixel) is embedded in a feature space such that points belonging to the same instance should be close and points belonging to different instances should be further apart from each other. In the second step points are grouped using a clustering algorithm, such as mean-shift or greedy clustering. We remark that the current state of the art methods (Neven et al. (2019); Wang et al. (2018)) follow this approach.
14
+
15
+ One important design choice in embedding-based methods is the dimensionality of the feature space. Some methods propose to use a high dimensional feature space (De Brabandere et al. (2017); Kong & Fowlkes (2018)), while others use a low dimensional features space that has the same dimensionality as the input data (Novotny et al. (2018); Kendall et al. (2018); Neven et al. (2019)), e.g., 2D for images, and 3D for point clouds. Methods with a low dimensional embedding space not only have lower computational complexity, but they also lead to better interpretability, e.g., embeddings are encoded as offset vectors towards instance centers.
16
+
17
+ Therefore, the main goal of our work is to extend the expressiveness of the embedding space in a way that leads to improved segmentation performance. Our proposed solution is to employ probabilistic embeddings, such that each point in the embedding space is encoded by a distribution. While assessing uncertainty is a popular tool in recent computer vision research (Kendall & Gal (2017); Khan et al. (2019); Liu et al. (2019); Dorta et al. (2018)) and we introduce this idea to the task of instance segmentation. Incorporating uncertainty leads to an important improvement in segmentation performance. For example, on the PartNet (Mo et al. (2019)) fine-grained instance segmentation dataset we can improve the SOTA by $3 . 1 \%$ average per-category mAP.
18
+
19
+ In the remainder of the paper, we will give more details on the probabilistic embedding algorithm (Sec. 3), explain the embedding step (Sec. 3.1) and the clustering step (Sec. 3.4) in more detail.
20
+
21
+ ![](images/b0ccf815269fb3c636a18d8d80e69d24682e56f469ddded46e527000542043c6.jpg)
22
+ Figure 1: Our method takes a point cloud as input, encodes the points as random variables, and outputs semantic class labels and instance labels.
23
+
24
+ ![](images/f7a5344ff8128579bc2584f1a98c8eccfa2aaac82850a899ca405cb6b743c5a2.jpg)
25
+ Figure 2: Examples of (dis)similarity measures
26
+
27
+ Contribution. Our main contributions are as follows
28
+
29
+ 1. We propose to use probabilistic embeddings for instance segmentation and present a complete framework in the context of point cloud instance segmentation based on probabilistic embeddings.
30
+ 2. We develop a new loss function for the clustering step that is especially suited for highgranularity data sets.
31
+ 3. We show that the proposed probabilistic embeddings can be incorporated into existing embedding-based methods.
32
+
33
+ # 2 RELATED WORK
34
+
35
+ # 2.1 2D IMAGE INSTANCE SEGMENTATION
36
+
37
+ The dominant approaches for image instance segmentation are proposal-based methods (He et al. (2017); Liu et al. (2018)), which are built upon object detection methods (Girshick (2015); Ren et al. (2015)). Typically, they have higher quality, but a slower computation time compared to proposal free methods. The mainstream proposal free approaches are based on metric learning. The basic idea is to learn an embedding space, in which pixels belonging to the same object instance are close to each other and distant to pixels belonging to other object instances (Fathi et al. (2017); De Brabandere et al. (2017)). All above works are based on high-dimensional embedding, while more recent works (Liang et al. (2017); Kendall et al. (2018); Novotny et al. (2018); Neven et al. (2019)) show that 2D spatial embedding is sufficient to achieve the same or even higher performance.
38
+
39
+ # 2.2 3D POINT CLOUD INSTANCE SEGMENTATION
40
+
41
+ SGPN (Wang et al. (2018)) uses PointNet+ $^ +$ (Qi et al. (2017)) as backbone network and designs a double-hinge loss function to learn a pairwise similarity matrix of points. GSPN (Yi et al. (2019)) produces object proposals with high objectness for point cloud instance segmentation. ASIS (Wang et al. (2019b)) is a module capable of making semantic segmentation and instance segmentation take advantage of each other. Mo et al. (2019) release a large scale point cloud dataset for part instance segmentation and benchmark their method and SGPN on this dataset.
42
+
43
+ # 2.3 UNCERTAINTY IN COMPUTER VISION
44
+
45
+ Kendall & Gal (2017) present a unified framework combining model uncertainty with data uncertainty and can estimate uncertainty in classification and regression tasks. We introduce uncertainty estimation to the literature of instance embedding, by modeling points as random variables. Our method is related to recent works in deep generative networks (Kingma & Welling (2013); Rezende et al. (2014)). They use a stochastic encoder to encode a data sample as a set of random variables, while focusing on solving the problem of backpropagation through random variables in deep neural networks. We deal with this problem by using a probabilistic product kernel (Jebara et al. (2004)).
46
+
47
+ # 3 METHOD
48
+
49
+ A training sample is a labeled 3D point cloud. It consists of point coordinates $\left\{ { \bf x } _ { i } \right\} _ { i = 1 } ^ { N }$ , class labels $\{ y _ { i } \} _ { i = 1 } ^ { N }$ and instance IDs $\left\{ z _ { i } \right\} _ { i = 1 } ^ { N }$ . We want to train a neural network to infer per point class labels and per point instance IDs at the same time.
50
+
51
+ # 3.1 PROBABILISTIC SPATIAL EMBEDDING
52
+
53
+ A common approach in the literature of instance segmentation is to learn a function to embed pixels/points into a space where pair-wise similarity can be measured. Usually, this function is a deep neural network $f$ which transforms an unordered point set $\{ { \mathbf { x } } _ { i } \} _ { i = 1 } ^ { N }$ to embeddings $\left\{ { \bf e } _ { i } \right\} _ { i = 1 } ^ { N }$ . Instead of deterministic embeddings used in previous work, here we consider a probabilistic embedding, by modeling $\mathbf { e } _ { i }$ as a random variable, $\mathbf { e } _ { i } \sim p _ { i } ( \mathbf { e } )$ , where $p _ { i }$ is a probability density function. In Section 3.3 we will need to calculate the sum of random variables. In the ideal case, the distribution of a single random variable and the sum of multiple random variables has the same type of distribution that can be described with a few parameters. Thus we propose to model the embedding with a (symmetric) stable distribution. This leaves us two options, Gaussian and Cauchy. For the Cauchy distribution, it is challenging to get a closed-form expression in our calculation in Section 3.2. Therefore, we choose to work with the tri-variate Gaussian distribution1 $p _ { i } ( \mathbf { e } ) = \mathcal { N } ( \mathbf { e } ; \mu _ { i } , \pmb { \Sigma } _ { i } )$ with mean vector $\pmb { \mu _ { i } } \in \mathbb { R } ^ { 3 }$ and covariance matrix $\pmb { \Sigma } _ { i } \in \mathbb { R } ^ { 3 \times 3 }$ . For simplicity, let $\Sigma _ { i }$ be a diagonal matrix, $\Sigma _ { i } = \mathrm { d i a g } ( \sigma _ { i } ^ { ( 1 ) 2 } , \sigma _ { i } ^ { ( 2 ) 2 } , \sigma _ { i } ^ { ( 3 ) 2 } )$ , where $\sigma _ { i } ^ { ( d ) 2 }$ is the square of $\sigma _ { i } ^ { ( \bar { d } ) }$ and $d = 1 , 2 , 3$ .
54
+
55
+ The network $f ( \cdot )$ takes as input a (unordered) point set $\left\{ { \bf x } _ { i } \right\} _ { i = 1 } ^ { N }$ , and outputs $\{ \mu _ { i } , \pmb { \sigma } _ { i } , \mathbf { p } _ { i } \} _ { i = 1 } ^ { N }$ $f ( \{ \mathbf { x } _ { i } \} _ { i = 1 } ^ { N } ) = \{ \mu _ { i } , \pmb { \sigma } _ { i } , \mathbf { p } _ { i } \} _ { i = 1 } ^ { N }$ , where $\pmb { \sigma } _ { i } = \left[ \sigma _ { i } ^ { ( 1 ) } , \sigma _ { i } ^ { ( 2 ) } , \sigma _ { i } ^ { ( 3 ) } \right] ^ { \mathsf { T } } \in \mathbb { R } ^ { 3 }$ and $\mathbf { p } _ { i }$ is a probability vector which can be used to infer class label of $\mathbf { x } _ { i }$ and will be explained in Sec. 3.4.
56
+
57
+ # 3.2 SIMILARITY MEASURE
58
+
59
+ In deterministic embeddings, the (dis)similarity between points is usually measured by Euclidean distance $\| \mathbf { e } _ { i } - \mathbf { e } _ { j } \|$ , or cosine similarity $\frac { \mathbf { e } _ { i } ^ { \mathsf { T } } \mathbf { e } _ { j } ^ { \mathsf { - } } } { \| \mathbf { e } _ { i } \| \| \mathbf { e } _ { j } \| }$ (See Figure 2). Since now we are using probabilistic embeddings, a similarity kernel for random variables needs to be selected. Here we describe the Bhattacharyya kernel (Jebara et al. (2004)).
60
+
61
+ Definition. Let $\mathcal { P }$ be the set of distributions over $\Omega$ . The Bhattacharyya kernel on $\mathcal { P }$ is the function $\mathcal { K } : \mathcal { P } \times \mathcal { P } \mapsto \mathbb { R }$ such that, for all $p , q \in \mathcal { P }$ ,
62
+
63
+ $$
64
+ \begin{array} { r } { \mathcal { K } ( p , q ) = \displaystyle \int _ { \Omega } \sqrt { p ( \mathbf { x } ) } \sqrt { q ( \mathbf { x } ) } \mathrm { d } \mathbf { x } . } \end{array}
65
+ $$
66
+
67
+ We choose this kernel as our similarity measure for two reasons, 1) the Bhattacharyya kernel is symmetric, i.e. $\begin{array} { r } { K ( p , q ) = K ( q , p ) ; 2 } \end{array}$ ) the Bhattacharyya kernel has values between 0 (no similarity) and 1 (maximal similarity). And $\ K ( p , q ) = 1$ if and only if $p = q$ .
68
+
69
+ Then the similarity $\kappa ( \cdot , \cdot )$ between random variables can be represented by the Bhattacharyya kernel of their probability density functions,
70
+
71
+ $$
72
+ \kappa ( \mathbf { e } _ { i } , \mathbf { e } _ { j } ) = \int \sqrt { \mathcal { N } ( \mathbf { e } ; \mu _ { i } , \Sigma _ { i } ) } \sqrt { \mathcal { N } ( \mathbf { e } ; \mu _ { j } , \Sigma _ { j } ) } \mathrm { d } \mathbf { e } = \beta _ { i , j } \exp \left( - \left\| \mu _ { i } - \mu _ { j } \right\| _ { \Sigma _ { i , j } ^ { - 1 } } ^ { 2 } \right) 2 ,
73
+ $$
74
+
75
+ ![](images/c5dcbf3f20cc5b32cfdf95c04be5d2ea894b875d6be1c2d16258f4e8b65a6f1a.jpg)
76
+ Figure 3: Contour plot. Left: 1-D uncertainty similarity $\beta _ { i , j } = \left( \left( \sigma _ { i } / \sigma _ { j } + \sigma _ { j } / \sigma _ { i } \right) / 2 \right) ^ { - 1 / 2 }$ . The highest value 1 is achieved when $\sigma _ { i } = \sigma _ { j }$ . The value goes to 0 when one of the uncertainties is small and the other is large. Right (4 figures): the similarity for different values of $\Delta \mu$ (from left to right, $\Delta \mu = 1 , 5 , 1 0 , 2 5 )$ in the case of 1-D probabilistic embedding. The similarity becomes $\beta _ { i , j } \exp { \left( - \frac { 1 } { 2 } \frac { \Delta \mu } { \alpha _ { i , j } } \right) }$ , where $\Delta \mu = \left( \mu _ { i } - \mu _ { j } \right) ^ { 2 }$ , $\alpha _ { i , j } = 4 \left( \sigma _ { i } ^ { 2 } + \sigma _ { j } ^ { 2 } \right)$ .
77
+
78
+ where
79
+
80
+ $$
81
+ \begin{array} { c } { \displaystyle \alpha _ { i , j } ^ { ( d ) } = 4 ( \sigma _ { i } ^ { ( d ) 2 } + \sigma _ { j } ^ { ( d ) 2 } ) , \quad \displaystyle \beta _ { i , j } = \left( \prod _ { d = 1 } ^ { 3 } \frac { 1 } { 2 } \left( \frac { \sigma _ { i } ^ { ( d ) } } { \sigma _ { j } ^ { ( d ) } } + \frac { \sigma _ { j } ^ { ( d ) } } { \sigma _ { i } ^ { ( d ) } } \right) \right) ^ { - \frac { 1 } { 2 } } , } \\ { \displaystyle \Sigma _ { i , j } = \mathrm { d i a g } ( \alpha _ { i , j } ^ { ( 1 ) } , \alpha _ { i , j } ^ { ( 2 ) } , \alpha _ { i , j } ^ { ( 3 ) } ) , } \\ { \displaystyle \| \mu _ { i } - \mu _ { j } \| _ { \Sigma _ { i , j } ^ { - 1 } } ^ { 2 } = ( \mu _ { i } - \mu _ { j } ) ^ { \mathsf T } \Sigma _ { i , j } ^ { - 1 } ( \mu _ { i } - \mu _ { j } ) = \sum _ { d = 1 } ^ { 3 } \frac { \mu _ { i } ^ { ( d ) } - \mu _ { j } ^ { ( d ) } } { \alpha _ { i , j } ^ { ( d ) } } . } \end{array}
82
+ $$
83
+
84
+ • If the uncertainties $\sigma _ { i }$ and $\pmb { \sigma } _ { j }$ have a large difference, $\beta _ { i , j }$ will be small, so will be $\kappa ( \mathbf { e } _ { i } , \mathbf { e } _ { j } )$ . See Fig. 3.
85
+
86
+ • If the centers $\pmb { \mu _ { i } }$ and $\mu _ { j }$ have a large difference, the exponential term will be small, so will be $\kappa ( \mathbf { e } _ { i } , \mathbf { e } _ { j } )$ . See Fig. 3.
87
+
88
+ • The scale term $\beta _ { i , j } = 1$ if and only if the uncertainties $\sigma _ { i }$ and $\pmb { \sigma } _ { j }$ are element-wise equal. In this case, $\kappa ( \mathbf { e } _ { i } , \mathbf { e } _ { j } )$ becomes an anisotropic Gaussian kernel,
89
+
90
+ $$
91
+ \kappa _ { R B F } ( \pmb { \mu } _ { i } , \pmb { \mu } _ { j } ) = \exp \left( - \left\| \pmb { \mu } _ { i } - \pmb { \mu } _ { j } \right\| _ { \pmb { \Sigma } _ { i , j } ^ { - 1 } } ^ { 2 } \right) .
92
+ $$
93
+
94
+ • The exponential term equals 1 if and only if the centers $\pmb { \mu _ { i } }$ and $\pmb { \mu } _ { j }$ are element-wise equal. In this case, $\kappa ( \mathbf { e } _ { i } , \mathbf { e } _ { j } )$ becomes $\beta _ { i , j }$ , i.e., the similarity between uncertainties. This property allows two points that have the same embedding centers to have a low similarity, as long as $\beta _ { i , j }$ is small.
95
+
96
+ Compared to deterministic embedding, $\kappa ( \mathbf { e } _ { i } , \mathbf { e } _ { j } ) = \exp \left( - \left\| \mathbf { e } _ { i } - \mathbf { e } _ { j } \right\| ^ { 2 } \right) ^ { 3 }$ , our similarity measure consists not merely of the similarity of spatial distances, but also the similarity of uncertainties.
97
+
98
+ In the following, we discuss multiple choices of embedding distributions that we will evaluate in Sec 4.2.
99
+
100
+ Homoscedasticity vs. Heteroscedasticity. The embeddings $\{ { \mathbf { e } } _ { i } \} _ { i = 1 } ^ { N }$ are homoscedastic if they have the same variance instead of point-depende $\pmb { \Sigma }$ . In this variances a point cloud . And the sim $\mathbf { X }$ we learn to predicrity kernel becomes $\pmb { \Sigma }$ $\left\{ \pmb { \Sigma } _ { i } \right\} _ { i = 1 } ^ { N }$ $\kappa ( \mathbf { e } _ { i } , \mathbf { e } _ { j } ) \ =$ $\exp \left( - \left. \pmb { \mu } _ { i } - \pmb { \mu } _ { j } \right. _ { \pmb { \Sigma } _ { i , j } ^ { - 1 } } ^ { 2 } \right)$ , which is also the form of the RBF kernel in Eq. 2.
101
+
102
+ Isotropy vs. Anisotropy. The variance $\Sigma _ { i }$ is isotropic if its diagonal elements (variances of dimensions) are the same. Then we can write $\Sigma _ { i } = \sigma _ { i } ^ { 2 } \mathbf { I }$ , where $\mathbf { I }$ is a $3 \times 3$ identity matrix. The similarity can be written as $\begin{array} { r } { \kappa ( \mathbf { e } _ { i } , \mathbf { e } _ { j } ) = \beta _ { i , j } \exp \left( - \frac { \vert \vert \mu _ { i } - \mu _ { j } \vert \vert ^ { 2 } } { \alpha _ { i , j } } \right) } \end{array}$ , where $\beta _ { i , j } = \left( \left( \sigma _ { i } / \sigma _ { j } + \sigma _ { j } / \sigma _ { i } \right) / 2 \right) ^ { - \frac { 3 } { 2 } }$ and $\alpha _ { i , j } = 4 ( \sigma _ { i } ^ { 2 } + \sigma _ { j } ^ { 2 } )$ .
103
+
104
+ # 3.3 INSTANCE GROUPING
105
+
106
+ Let $\{ i : z _ { i } = k \}$ be the index set of points having instance $\textrm { I D } k$ . We take an average of these embeddings to get the embedding $\mathbf { c } _ { k }$ of instance $k$ , $\begin{array} { r } { \mathbf { c } _ { k } = \frac { 1 } { | \{ i : z _ { i } = k \} | } \sum _ { \{ i : z _ { i } = k \} } \mathbf { e } _ { i } } \end{array}$ . Since the sum of Gaussian random variables is still a Gaussian random variable, we can derive the following:
107
+
108
+ $$
109
+ p ( \mathbf { c } _ { k } ) = { \mathcal { N } } ( \mathbf { c } _ { k } ; { \hat { \mu } } _ { k } , { \hat { \Sigma } } _ { k } ) , \quad { \hat { \mu } } _ { k } = { \frac { 1 } { | \left\{ i : z _ { i } = k \right\} | } } \sum _ { \left\{ i : z _ { i } = k \right\} } \mu _ { i } , \quad { \hat { \Sigma } } _ { k } = { \frac { 1 } { | \left\{ i : z _ { i } = k \right\} | } } \sum _ { \left\{ i : z _ { i } = k \right\} } \Sigma _ { i } .
110
+ $$
111
+
112
+ Now we can measure the similarity between a point and an instance by using $\kappa ( \mathbf { e } _ { i } , \mathbf { c } _ { k } )$ .
113
+
114
+ If $z _ { i } = k$ , we want $\kappa ( \mathbf { e } _ { i } , \mathbf { c } _ { k } )$ to be close to 1, otherwise 0. We can optimize a binary cross entropy loss function,
115
+
116
+ $$
117
+ \mathcal { L } _ { I n s C E } = \frac { 1 } { N K } \sum _ { k = 0 } ^ { K - 1 } \sum _ { i = 1 } ^ { N } \left\{ \begin{array} { l l } { - \ln \kappa ( \mathbf { e } _ { i } , \mathbf { c } _ { k } ) , } & { \mathrm { i f ~ } z _ { i } = k , } \\ { - \ln ( 1 - \kappa ( \mathbf { e } _ { i } , \mathbf { c } _ { k } ) ) , } & { \mathrm { o t h e r w i s e } . } \end{array} \right.
118
+ $$
119
+
120
+ However, in practice, this suffers from a serious foreground-background imbalance problem. To remedy this drawback we propose to use the combined log-Dice loss function (Wong et al. (2018)) instead:
121
+
122
+ $$
123
+ \mathcal { L } _ { I n s } = \mathcal { L } _ { I n s C E } - \ln \frac { 2 \sum _ { k = 0 } ^ { K - 1 } \sum _ { i = 1 } ^ { N } \kappa ( \mathbf { e } _ { i } , \mathbf { c } _ { k } ) \mathbb { 1 } _ { z _ { i } = k } } { \sum _ { k = 0 } ^ { K - 1 } \sum _ { i = 1 } ^ { N } \left( \kappa ( \mathbf { e } _ { i } , \mathbf { c } _ { k } ) + \mathbb { 1 } _ { z _ { i } = k } \right) } ,
124
+ $$
125
+
126
+ where $\mathbb { 1 } _ { z _ { i } = k }$ is an indicator function which equals 1 when $z _ { i } = k$ , 0 otherwise.
127
+
128
+ Entropy Regularization. As we can see in Figure 3, when $\boldsymbol { \sigma } _ { i } ^ { ( l ) }$ and $\sigma _ { j } ^ { ( l ) }$ goes to infinity while keeping σ(li $\sigma _ { i } ^ { ( l ) } = \sigma _ { j } ^ { ( l ) }$ , $\beta _ { i , j } = 1$ and the similarity equals to 1 no matter what the value $\mu _ { i } - \mu _ { j }$ is. Formally speaking,
129
+
130
+ $$
131
+ \operatorname* { l i m } _ { \substack { \sigma _ { i } ^ { ( l ) } \infty , \sigma _ { j } ^ { ( l ) } \infty , \sigma _ { i } ^ { ( l ) } = \sigma _ { j } ^ { ( l ) } , l = 1 , 2 , 3 } } \kappa ( \mathbf { e } _ { i } , \mathbf { e } _ { j } ) = 1 .
132
+ $$
133
+
134
+ Consequently, the similarity degenerates to constant 1 for every pair of embeddings. To address this issue, we propose an entropy regularizer,
135
+
136
+ $$
137
+ \mathcal { L } _ { R e g } = \sum _ { i = 1 } ^ { N } \mathbb { H } ( \mathbf { e } _ { i } ) = \sum _ { i = 1 } ^ { N } \left[ \frac { 3 } { 2 } \ln ( 2 \pi e ) + \frac { 1 } { 2 } \ln \left( \sigma _ { i } ^ { ( 1 ) } \sigma _ { i } ^ { ( 2 ) } \sigma _ { i } ^ { ( 3 ) } \right) ^ { 2 } \right] ,
138
+ $$
139
+
140
+ where $\mathbb { H } ( \mathbf { e } _ { i } )$ is the entropy of multivariate Gaussian variable $\mathbf { e } _ { i }$ . This regularizer is not only able to prevent the similarity degeneration by minimizing the variances along all dimensions, but can also penalize large uncertainties, thus increasing the confidence of the network output as in Grandvalet & Bengio (2005) and Wang et al. (2019a).
141
+
142
+ # 3.4 SEMANTIC CLASSIFICATION
143
+
144
+ Neven et al. (2019) introduces a way to use score maps to find cluster centers. Our main novelty is the new loss function, so our description focuses on this part. We still describe the greedy clustering steps from Neven et al. (2019) for completeness. In Section 4.2, we compare our new center-aware loss Eq 10 to the previously used minimum squared error (MSE) loss by Neven et al. (2019).
145
+
146
+ After defining the similarity measure, we can easily find out all points similar to an instance center. However, during the inference phase, we don’t have the information of ground-truth instance IDs, thus, it is impossible to use Eq. 3 to get instance centers. Therefore, along with distribution parameters $\{ \mu _ { i } \} _ { i = 1 } ^ { N }$ and $\{ \pmb { \sigma } _ { i } \} _ { i = 1 } ^ { N }$ , we also predict a score map $\{ { \bf p } _ { i } \} _ { i = 1 } ^ { N }$ , where $\mathbf { p } _ { i } \in \mathbb { R } ^ { L }$ and its $l$ -th entry p(l) indicates the probability of $\mathbf { x } _ { i }$ being an instance center with class label $l$ . Consider $\tilde { \mathbf { Q } } \in \mathbb { R } ^ { N \times K }$ ,
147
+
148
+ $$
149
+ \begin{array} { r } { \tilde { \mathbf { Q } } [ i , k ] = \kappa ( \mathbf { e } _ { i } , \mathbf { c } _ { k } ) \mathbb { 1 } _ { z _ { i } = k } = \left\{ { \begin{array} { l l } { \kappa ( \mathbf { e } _ { i } , \mathbf { c } _ { k } ) } & { z _ { i } = k , } \\ { 0 } & { \mathrm { o t h e r w i s e } , } \end{array} } \right. } \end{array}
150
+ $$
151
+
152
+ where each entry $\tilde { \bf Q } [ i , k ]$ can be interpreted as the probability of $\mathbf { x } _ { i }$ being the center of instance $k$ . Upon this we calculate $\mathbf { Q } \in \mathbb { R } ^ { N \times \dot { L } }$ , where $\mathbf { Q } [ i , l ]$ gives the probability of $\mathbf { x } _ { i }$ being an instance center with class label $l$ ,
153
+
154
+ $$
155
+ \mathbf { Q } [ i , l ] = \operatorname* { m a x } _ { \{ k : y ( k ) = l \} } \tilde { \mathbf { Q } } [ i , k ] ,
156
+ $$
157
+
158
+ where $y ( k )$ is the class label of instance $k$ , due to the fact that $\{ { \bf x } _ { i } : z _ { i } = k \}$ must have the same class label. (See an illustration in Appendix Figure 7.)
159
+
160
+ We design a new loss function,
161
+
162
+ $$
163
+ \mathcal { L } _ { S c o r e } = \frac { 1 } { N L } \sum _ { i = 1 } ^ { N } \sum _ { l = 1 } ^ { L } - \mathbf { Q } [ i , l ] \log \mathbf { P } [ i , l ] .
164
+ $$
165
+
166
+ Here $\mathbf { Q }$ is fixed as a target when training. See appendix for a detailed explanation of the loss function.
167
+
168
+ The inference process is done with a greedy approach (Neven et al. (2019)). From foreground score maps $\{ \mathbf { P } [ : , 1 ] , \mathbf { \bar { P } } [ : , 2 ] , \ldots , \mathbf { P } [ : , L ] \}$ , we sample a point $\mathbf { x } _ { i _ { 0 } }$ with highest score $\mathbf { P } [ i _ { 0 } , l _ { 0 } ]$ , where $i _ { 0 }$ is the point index and $l _ { 0 }$ is its class label,
169
+
170
+ $$
171
+ \operatorname * { a r g m a x } _ { l _ { 0 } , l _ { 0 } \in \{ 1 , 2 , . . . , L \} } { \bf P } [ : , l _ { 0 } ] ( i _ { 0 } , l _ { 0 } ) = \operatorname * { a r g m a x } _ { i \in \{ 1 , 2 , . . . , N \} , l \in \{ 1 , 2 , . . . , L \} } { \bf P } [ i , l ] .
172
+ $$
173
+
174
+ The point $\mathbf { x } _ { i _ { 0 } }$ is an anchor and we want to find all similar points. Specifically we find all points $\mathbf { x } _ { i }$ with $\kappa ( \mathbf { e } _ { i } , \mathbf { e } _ { i _ { 0 } } ) \geq \tau$ . As a result, the instance $\mathrm { I D }$ of $\mathbf { x } _ { i }$ is 0. After that, all points satisfying the inequality are all masked out. Similarly, we sample $\mathbf { x } _ { i _ { 1 } }$ and mask out points with instance ID 1, sample $\mathbf { x } _ { i _ { 2 } }$ and mask out points with instance $\mathrm { I D 2 }$ , and so on. We stop this loop if there is no point left. We use the validation set to fit hyperparameter $\tau$ , which is 0.35 in our experiments.
175
+
176
+ # 4 RESULTS
177
+
178
+ We describe the implementation details in the appendix. PartNet (Mo et al. (2019)) provides coarse-, middle- and fine-grained part instance-level annotations for 3D point clouds from ShapeNet (Chang et al. (2015)). It contains 24 object categories, but the number of training samples varies greatly from 92 to 5707 for different categories. In contrast to indoor scene point cloud datasets (e.g., ScanNet by Dai et al. (2017)), instances (object parts) of PartNet require more context to be classified and are connected. Many visually alike parts have different semantic labels, e.g., ping-pong table’s legs and pool table’s legs in the category of table. Also, instance masks should have no overlaps. All these make it a very challenging dataset for instance segmentation. While our main experiments are on PartNet, we provide results on ScanNet in the appendix.
179
+
180
+ # 4.1 QUANTITATIVE AND QUALITATIVE RESULTS
181
+
182
+ We report per-category mean Average Precision (mAP) scores for the PartNet dataset in Table 1.
183
+ The IoU threshold is 0.5. We compare our probabilistic embedding algorithm to GSPN (Yi et al.
184
+ (2019)), PartNet (Mo et al. (2019)) and SGPN (Wang et al. (2018)). The results are averaged over three levels of granularity (fine(3), middle(2), and coarse(1)). It should be noted that GSPN (Yi et al.
185
+ (2019)) only reports fine-grained results of 4 categories.
186
+
187
+ On the complete dataset, our method outperforms the best competitor PartNet by $3 . 1 \%$ average per-category mAP. We can observe that our method has a slightly bigger advantage in fine-grained instance segmentation compared to coarse-grained instance segmentation ( $3 . 2 \%$ vs. $2 . 5 \%$ ). We can also observe consistent improvements in categories with little as well as many training samples. While we beat SOTA in all categories with many training samples (Chair, Table, StorageFurniture, and Lamp), PartNet has better results in some of the categories with fewer training samples.
188
+
189
+ We also show visualization examples in Figure 8. Compared to PartNet (Mo et al. (2019)), our method shows great improvement especially when there are many instances in a point cloud.
190
+
191
+ # 4.2 ABLATION STUDY AND ANALYSIS
192
+
193
+ We conduct the ablation study on all categories of PartNet (Mo et al. (2019)), but we only list detailed values for the four largest categories in Table 2.
194
+
195
+ Effect of probabilistic embedding. We compare four different versions of probabilistic embedding. The Gaussian distribution used in the model can either be isotropic or anisotropic, homoscedastic or heteroscedastic. Thus we have isotropic homoscedastic, anisotropic homoscedastic, isotropic heteroscedastic, and anisotropic heteroscedastic.
196
+
197
+ Table 1: Instance segmentation results on PartNet (part-category $\mathbf { m A P \% }$ , IoU threshold 0.5, fine(3), middle(2), and coarse(1)-grained).
198
+
199
+ <table><tr><td></td><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1>Avg</td><td rowspan=1 colspan=1>3 Bog Gaet Coe o 00 Jaeee aiue duer donder L.ITITe p3品M3 s30A</td></tr><tr><td></td><td rowspan=1 colspan=1>SPSS</td><td rowspan=1 colspan=2>123[55.7|29.729.5</td><td rowspan=1 colspan=1>38.8 29.8 61.956.972.420.372.289.349.057.8 63.2 68.720.0 63.232.710.050.682.250.671.732.949.2 56.846.6115.41 125.4- 58.1-25.4 121.7-49.4-22.1-30.5 18.9111.8 45.1-19.4 18.2 38.3 78.8 15.4 35.9 37.8- 38.3 14.4-32.7- 18.2 - 21.5 14.6 24.9 36.5</td></tr><tr><td></td><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1>Avg</td><td rowspan=1 colspan=1>46.8</td><td rowspan=1 colspan=1>Avg46.8|38819.053.556939.119.356.284.129.946950.568.720.050.822.910044.282.230.371.728.327.640.941.6</td></tr><tr><td></td><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1>1</td><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1>1</td></tr><tr><td></td><td rowspan=1 colspan=1>SSSD</td><td rowspan=1 colspan=1>2</td><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1>- = -- 26.8 18.3 26.7 21.9</td></tr><tr><td></td><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1>|Avg|-</td><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1>1 = - - - - 1 - - - - - = = - = - - - - - - - 1</td></tr><tr><td></td><td rowspan=1 colspan=1>Pree</td><td rowspan=1 colspan=1>12</td><td rowspan=1 colspan=1>37.436.6</td><td rowspan=1 colspan=1>62.664.748463.659.774.442.876.393.352.957769.670.943.958437.2100050.06050080.945.254.271749.823.0 35.5,62.839.7= -26.9·47.8 35.235.031.0115.0 48.6129.0 32.3 53.3 80.1 17.2 39.4 44.7 45.8 18.7 ·34.8:26.5127.5 23.9 33.7 52.0</td></tr><tr><td></td><td rowspan=1 colspan=1></td><td rowspan=1 colspan=2>Avg|54.4</td><td rowspan=1 colspan=1>Avg54.464.728.856.159.746.3376 64.186.736.648.657.2 70.943.952.127.6100044.286.037.280.935.936.452.750.9</td></tr><tr><td rowspan=2 colspan=2>s.Ino</td><td rowspan=1 colspan=1>s.Ino</td><td rowspan=1 colspan=1>12</td><td rowspan=1 colspan=1>40.439.8</td></tr><tr><td rowspan=1 colspan=2>Avg57.5</td><td rowspan=1 colspan=1>Avg57.564.6362 569 7.050.135.6 6.788.741.3 54.9 64.4 71.8 48.660.529.51000462 90.9 39.688.641.232.453.448.</td></tr></table>
200
+
201
+ ![](images/9aae9c1ad1dec43cab2d498fdaed4865cd7b8934af5bf3b533bd2c2c4268646f.jpg)
202
+ Figure 4: Top row: ground-truth. Middle row: PartNet. Bottom row: Probabilistic Embedding. We show true positives (IoU threshold 0.5) with the same color as ground truth. False detections are shown in transparent red.
203
+
204
+ The isotropic homoscedastic probabilistic embedding, learns to predict a single scalar representing the uncertainty of a point cloud. We do not see improvements over its determinisitc counterpart, but there is a large gap between them in large categories which have much more part instances and classes than others.
205
+
206
+ Similar cases happen in anisotropic homoscedastic and isotropic homoscedastic embedding. The former learns a 3D uncertainty vector for a single point cloud, while the latter learns point-dependent uncertainty scalars. They all show significant improvements over determinisitc embedding on finegrained categories.
207
+
208
+ Finally, our full model uses anisotropic heteroscedastic probabilistic embedding, which outputs not only point-dependent but also axis-dependent uncertainties. See Figure 5 for an illustration of learned uncertainties. The points at boundary regions have significantly larger uncertainties compared to others. In summary, the full model achieves the best results among all variations.
209
+
210
+ Table 2: Ablation study. Center, ExtDim, Prob refer to our proposed center-aware loss for the clustering step, the 6D deterministic embedding, and our proposed probabilistic embedding. Aniso and Hetero refer to the choice of Gaussian: anisotropic and heteroscedastic. AllAvg means taking all levels of granularity and categories into consideration. Large means fine-grained level of four largest categories. Others means fine-grained level of all the other categories. Here we also list the results on four largest categories of fine-grained level. The top two results are marked bold.
211
+
212
+ <table><tr><td>Ablation</td><td>Model</td><td>ceeer</td><td>aig </td><td>1STUo</td><td>aH</td><td>BAAIA</td><td>△</td><td>e</td><td>△</td><td>sPett</td><td>△</td><td>Gart</td><td>△</td><td>due</td><td>△</td><td>2</td><td>△</td><td>Jqee</td><td>△</td></tr><tr><td>Loss</td><td></td><td></td><td></td><td>&lt;</td><td></td><td>|54.3</td><td>-0.7</td><td>16.2</td><td>-7.3</td><td>43.1</td><td>3.1</td><td>19.0</td><td>-8.4</td><td>8.8</td><td>-9.6</td><td>29.7</td><td>6.2</td><td>7.1</td><td>-17.4</td></tr><tr><td rowspan="2">Deterministic</td><td rowspan="2">Reference</td><td>M</td><td></td><td></td><td></td><td>55.0</td><td>0.0</td><td>23.4</td><td>0.0</td><td>40.0</td><td>0.0</td><td>27.4</td><td>0.0</td><td>18.5</td><td>0.0</td><td>23.5</td><td>0.0</td><td>24.4</td><td>0.0</td></tr><tr><td></td><td>√</td><td></td><td></td><td>56.2</td><td>1.2</td><td>27.2</td><td>3.7</td><td>41.2</td><td>1.2</td><td>32.8</td><td>5.4</td><td>20.2</td><td>1.7</td><td>29.8</td><td>6.4</td><td>25.8</td><td>1.4</td></tr><tr><td rowspan="4">Probabilistic</td><td></td><td></td><td></td><td></td><td></td><td>54.7</td><td>-0.3</td><td>26.4</td><td>3.0</td><td>39.9</td><td>-0.1</td><td>33.7</td><td>6.3</td><td>17.8</td><td>-0.7</td><td>30.0</td><td>6.5</td><td>24.3</td><td>-0.2</td></tr><tr><td></td><td>区</td><td></td><td></td><td>√</td><td>53.1</td><td>-1.9</td><td>27.4</td><td>3.9</td><td>38.1</td><td>-1.8</td><td>33.6</td><td>6.2</td><td>20.0</td><td>1.5</td><td>30.9</td><td>7.5</td><td>25.0</td><td>0.6</td></tr><tr><td></td><td></td><td>√</td><td>√</td><td></td><td></td><td>55.60.6</td><td>27.3</td><td>3.9</td><td>41.0</td><td>1.1</td><td>33.9</td><td>6.5</td><td>19.5</td><td>1.0</td><td>31.1</td><td>7.6</td><td>24.8</td><td>0.3</td></tr><tr><td>Full</td><td>公</td><td>√</td><td>√</td><td>√</td><td>57.5</td><td>2.5</td><td>28.7</td><td>5.2</td><td>43.0</td><td>3.0</td><td>34.7</td><td>7.3</td><td>20.3</td><td>1.8</td><td>34.2</td><td>10.7</td><td>25.5</td><td>1.1</td></tr></table>
213
+
214
+ ![](images/061579210f0d0b85ff94609c453a44632715c2777bb1eb4bd9023d829df5d84f.jpg)
215
+ Figure 5: Learned Uncertainties. Top left: uncertainties are represented as ellipsoids, where directional scaling shows the value of uncertainties along 3 axes. The other 3 subfigures: uncertainties along 3 axes. We represent large values with red colors and smaller values with blue colors.
216
+
217
+ ![](images/445c93162d986452a5aab014b737b0b5d64453b744ea7cf75f797abed41d9b72.jpg)
218
+ Figure 6: Comparison of embeddings. Top row: Deterministic embedding. Bottom row: Probabilistic embedding. Left to right: we show a gradual shape transformation between the original point cloud and the embedded point cloud.
219
+
220
+ Effect of spatial embedding. Since our full model outputs a 3D center vector and 3D uncertainty vector, in a way, we can regard it as a 6D embedding method (with a totally different similarity kernel). One may wonder: how does it compare with the performance of 6D deterministic embedding? The results in Table 2 show, increasing the dimension of deterministic embedding from 3 to 6 shows some improvement, but less than using probabilistic embedding. Thus the performance of our method, cannot be achieved by simply increasing the dimension of deterministic embedding, which also shows the superiority of the probabilistic embedding. We illustrate the differences between deterministic and probabilistic embedding in 3D in Figure 6. We can observe, that probabilistic embedding introduces much stronger deformations of the geometry.
221
+
222
+ Effect of center-aware loss. We examine the effect of the center-aware loss in the clustering step. We use the same setup as in our full model except changing the center-aware loss to MSE loss (Neven et al. (2019)). In Table 2, we can see that our proposed loss function is especially stable on large fine-grained datasets $5 . 2 \%$ vs $- 7 . 3 \%$ ).
223
+
224
+ # 5 CONCLUSION
225
+
226
+ We build on embedding-based instance segmentation to present a framework of probabilistic embedding and a new loss function for the clustering step. We evaluate our framework on a large scale point cloud dataset, PartNet, and achieve state-of-the-art performance. Moreover, the qualitative results show the new framework is robust to point clouds with many instances. Additionally, it is able to estimate uncertainties while increasing the accuracy of instance segmentation. In future work, we hope that the probabilistic embedding can be further applied to other kinds of data representation, e.g., 2D images, 3D volumes, and meshes.
227
+
228
+ # REFERENCES
229
+
230
+ Angel X Chang, Thomas Funkhouser, Leonidas Guibas, Pat Hanrahan, Qixing Huang, Zimo Li, Silvio Savarese, Manolis Savva, Shuran Song, Hao Su, et al. Shapenet: An information-rich 3d model repository. arXiv preprint arXiv:1512.03012, 2015. 6
231
+
232
+ Christopher Choy, JunYoung Gwak, and Silvio Savarese. 4d spatio-temporal convnets: Minkowski convolutional neural networks. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 3075–3084, 2019. 15
233
+
234
+ Angela Dai, Angel X Chang, Manolis Savva, Maciej Halber, Thomas Funkhouser, and Matthias Nießner. Scannet: Richly-annotated 3d reconstructions of indoor scenes. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 5828–5839, 2017. 6, 13
235
+
236
+ Bert De Brabandere, Davy Neven, and Luc Van Gool. Semantic instance segmentation with a discriminative loss function. arXiv preprint arXiv:1708.02551, 2017. 1, 2
237
+
238
+ Garoe Dorta, Sara Vicente, Lourdes Agapito, Neill D. F. Campbell, and Ivor Simpson. Structured uncertainty prediction networks. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), June 2018. 1
239
+
240
+ Francis Engelmann, Martin Bokeloh, Alireza Fathi, Bastian Leibe, and Matthias Nießner. 3dmpa: Multi-proposal aggregation for 3d semantic instance segmentation. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 9031–9040, 2020. 15
241
+
242
+ Alireza Fathi, Zbigniew Wojna, Vivek Rathod, Peng Wang, Hyun Oh Song, Sergio Guadarrama, and Kevin P Murphy. Semantic instance segmentation via deep metric learning. arXiv preprint arXiv:1703.10277, 2017. 1, 2
243
+
244
+ Matthias Fey and Jan E. Lenssen. Fast graph representation learning with PyTorch Geometric. In ICLR Workshop on Representation Learning on Graphs and Manifolds, 2019. 13
245
+
246
+ Ross Girshick. Fast r-cnn. In Proceedings of the IEEE international conference on computer vision, pp. 1440–1448, 2015. 2
247
+
248
+ Yves Grandvalet and Yoshua Bengio. Semi-supervised learning by entropy minimization. In Advances in neural information processing systems, pp. 529–536, 2005. 5
249
+
250
+ Lei Han, Tian Zheng, Lan Xu, and Lu Fang. Occuseg: Occupancy-aware 3d instance segmentation. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 2940–2949, 2020. 15
251
+
252
+ Kaiming He, Georgia Gkioxari, Piotr Dollar, and Ross Girshick. Mask r-cnn. In ´ Proceedings of the IEEE international conference on computer vision, pp. 2961–2969, 2017. 1, 2
253
+
254
+ Tong He, Zhi Zhang, Hang Zhang, Zhongyue Zhang, Junyuan Xie, and Mu Li. Bag of tricks for image classification with convolutional neural networks. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 558–567, 2019. 12
255
+
256
+ Tony Jebara, Risi Kondor, and Andrew Howard. Probability product kernels. Journal of Machine Learning Research, 5(Jul):819–844, 2004. 2, 3
257
+
258
+ Li Jiang, Hengshuang Zhao, Shaoshuai Shi, Shu Liu, Chi-Wing Fu, and Jiaya Jia. Pointgroup: Dualset point grouping for 3d instance segmentation. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 4867–4876, 2020. 15
259
+
260
+ Alex Kendall and Yarin Gal. What uncertainties do we need in bayesian deep learning for computer vision? In Advances in neural information processing systems, pp. 5574–5584, 2017. 1, 2
261
+
262
+ Alex Kendall, Yarin Gal, and Roberto Cipolla. Multi-task learning using uncertainty to weigh losses for scene geometry and semantics. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 7482–7491, 2018. 1, 2, 3
263
+
264
+ Salman Khan, Munawar Hayat, Syed Waqas Zamir, Jianbing Shen, and Ling Shao. Striking the right balance with uncertainty. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), June 2019. 1
265
+
266
+ Diederik P Kingma and Jimmy Ba. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980, 2014. 13
267
+
268
+ Diederik P Kingma and Max Welling. Auto-encoding variational bayes. arXiv preprint arXiv:1312.6114, 2013. 2
269
+
270
+ Shu Kong and Charless C Fowlkes. Recurrent pixel embedding for instance grouping. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 9018–9028, 2018. 1
271
+
272
+ Jean Lahoud, Bernard Ghanem, Marc Pollefeys, and Martin R Oswald. 3d instance segmentation via multi-task metric learning. arXiv preprint arXiv:1906.08650, 2019. 1, 15
273
+
274
+ Xiaodan Liang, Liang Lin, Yunchao Wei, Xiaohui Shen, Jianchao Yang, and Shuicheng Yan. Proposal-free network for instance-level object segmentation. IEEE transactions on pattern analysis and machine intelligence, 40(12):2978–2991, 2017. 2, 3
275
+
276
+ Chao Liu, Jinwei Gu, Kihwan Kim, Srinivasa G. Narasimhan, and Jan Kautz. Neural rgb(r)d sensing: Depth and uncertainty from a video camera. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), June 2019. 1
277
+
278
+ Shu Liu, Lu Qi, Haifang Qin, Jianping Shi, and Jiaya Jia. Path aggregation network for instance segmentation. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 8759–8768, 2018. 1, 2
279
+
280
+ Kaichun Mo, Shilin Zhu, Angel X Chang, Li Yi, Subarna Tripathi, Leonidas J Guibas, and Hao Su. Partnet: A large-scale benchmark for fine-grained and hierarchical part-level 3d object understanding. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 909–918, 2019. 1, 2, 6, 12
281
+
282
+ 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 Conference on Computer Vision and Pattern Recognition, pp. 8837–8845, 2019. 1, 2, 3, 5, 6, 8, 15
283
+
284
+ David Novotny, Samuel Albanie, Diane Larlus, and Andrea Vedaldi. Semi-convolutional operators for instance segmentation. In Proceedings of the European Conference on Computer Vision (ECCV), pp. 86–102, 2018. 1, 2, 3
285
+
286
+ Adam Paszke, Sam Gross, Francisco Massa, Adam Lerer, James Bradbury, Gregory Chanan, Trevor Killeen, Zeming Lin, Natalia Gimelshein, Luca Antiga, et al. Pytorch: An imperative style, highperformance deep learning library. In Advances in Neural Information Processing Systems, pp. 8024–8035, 2019. 13
287
+
288
+ Charles Ruizhongtai Qi, Li Yi, Hao Su, and Leonidas J Guibas. Pointnet++: Deep hierarchical feature learning on point sets in a metric space. In Advances in neural information processing systems, pp. 5099–5108, 2017. 2, 12
289
+
290
+ Shaoqing Ren, Kaiming He, Ross Girshick, and Jian Sun. Faster r-cnn: Towards real-time object detection with region proposal networks. In Advances in neural information processing systems, pp. 91–99, 2015. 2
291
+
292
+ Danilo Jimenez Rezende, Shakir Mohamed, and Daan Wierstra. Stochastic backpropagation and approximate inference in deep generative models. arXiv preprint arXiv:1401.4082, 2014. 2
293
+
294
+ Christian Szegedy, Vincent Vanhoucke, Sergey Ioffe, Jon Shlens, and Zbigniew Wojna. Rethinking the inception architecture for computer vision. In Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 2818–2826, 2016. 12
295
+
296
+ Dequan Wang, Evan Shelhamer, Bruno Olshausen, and Trevor Darrell. Dynamic scale inference by entropy minimization. arXiv preprint arXiv:1908.03182, 2019a. 5
297
+
298
+ Weiyue Wang, Ronald Yu, Qiangui Huang, and Ulrich Neumann. Sgpn: Similarity group proposal network for 3d point cloud instance segmentation. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 2569–2578, 2018. 1, 2, 6
299
+
300
+ Xinlong Wang, Shu Liu, Xiaoyong Shen, Chunhua Shen, and Jiaya Jia. Associatively segmenting instances and semantics in point clouds. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 4096–4105, 2019b. 1, 2
301
+
302
+ Ken CL Wong, Mehdi Moradi, Hui Tang, and Tanveer Syeda-Mahmood. 3d segmentation with exponential logarithmic loss for highly unbalanced object sizes. In International Conference on Medical Image Computing and Computer-Assisted Intervention, pp. 612–619. Springer, 2018. 5
303
+
304
+ Li Yi, Wang Zhao, He Wang, Minhyuk Sung, and Leonidas J Guibas. Gspn: Generative shape proposal network for 3d instance segmentation in point cloud. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 3947–3956, 2019. 2, 6
305
+
306
+ # A APPENDIX
307
+
308
+ # A.1 CENTER-AWARE LOSS EXPLANATION
309
+
310
+ We want $\mathbf { P } \in \mathbb { R } ^ { N \times L }$ , the matrix form of $\{ { \bf p } _ { i } \} _ { i = 1 } ^ { N }$ , to satisfy two conditions:
311
+
312
+ 1. $\mathbf { P } [ i , : ]$ is a probability vector and can be used to infer class label $y _ { i }$ of point $\mathbf { x } _ { i }$ , i.e., $y _ { i } =$ arg $\mathrm { m a x } _ { l = 1 } ^ { L } \mathbf { P } [ i , l ]$ .
313
+ 2. For foreground class labels $l \in \{ 1 , 2 , \ldots , L \} , \mathbf { P } [ : , l ]$ is a score map of being an instance center with class label $l$ .
314
+
315
+ The first condition is easy to satisfy with the cross entropy loss. Assuming $\mathbf { P } [ i , : ]$ is the output of a softmax function, we can minimize,
316
+
317
+ $$
318
+ \mathcal { L } _ { C l s C E } = \frac { 1 } { N } \sum _ { i = 1 } ^ { N } \left( \frac { 1 } { L } \sum _ { l = 1 } ^ { L } - \mathbb { 1 } _ { y _ { i } = l } \log \mathbf { P } [ i , l ] \right) ,
319
+ $$
320
+
321
+ where $\mathbb { 1 } _ { y _ { i } = l }$ is an indicator function which equals 1 when $y _ { i } = l , 0$ otherwise.
322
+
323
+ For the second condition, we take into account $\kappa ( \mathbf { e } _ { i } , \mathbf { c } _ { k } )$ , which is the similarity between $\mathbf { x } _ { i }$ and an instance $k$ .
324
+
325
+ We want both $\mathbf { P } [ : , l ]$ and $\mathbf { Q } [ : , l ]$ to achieve local maxima at the same points for all $l \in \{ 1 , 2 , \ldots , L \}$ . When we are doing inference, these local maxima are chosen as instance centers. Therefore, the first condition can be weakened, and only points which are close to instance centers should be classified correctly.
326
+
327
+ We can view $\mathcal { L } _ { S c o r e }$ in two ways,
328
+
329
+ 1. First, we switch the order of summation in Eq. 10,
330
+
331
+ $$
332
+ \mathcal { L } _ { S c o r e } = \frac { 1 } { L } \sum _ { l = 1 } ^ { L } \left( \frac { 1 } { N } \sum _ { i = 1 } ^ { N } - \mathbf { Q } [ i , l ] \log \mathbf { P } [ i , l ] \right) .
333
+ $$
334
+
335
+ The value of this quantity $- \mathbf { Q } [ i , l ] \log \mathbf { P } [ i , l ]$ is high when weight term $\mathbf { Q } [ i , l ]$ is high, and if we minimize it, we are forcing $- \log \mathbf { P } [ i , l ]$ to be small. Consequently, $\mathbf { P } [ i , l ]$ would be large. This guarantees local maxima of $\mathbf { Q } [ : , l ]$ are also local maxima of $\mathbf { P } [ : , l ]$ . And minimizing this loss term is equivalent to minimize the KL-divergence between (unnor$\mathbf { Q } [ : , l ]$ and (unnormalized probability) $\begin{array} { r l } { \mathbf { P } [ : , l ] , \mathbb { K L } ( \mathbf { Q } [ : , l ] | \mathbf { P } [ : , l ] ) } & { { } = } \end{array}$ $\begin{array} { r } { \frac { 1 } { N } \sum _ { i = 1 } ^ { N } \mathbf { Q } [ i , l ] \log \frac { \mathbf { Q } [ i , l ] } { \mathbf { P } [ i , l ] } } \end{array}$
336
+
337
+ Table 3: Activations for different output branches
338
+
339
+ <table><tr><td></td><td>Output</td><td>Activation</td></tr><tr><td>Centers</td><td>Oi∈R</td><td>μ = Xi +tanhOi</td></tr><tr><td>Uncert</td><td>ER</td><td>Oi = expoi</td></tr><tr><td>Scores</td><td>PiER</td><td>Pi = softmax(Pi)</td></tr></table>
340
+
341
+ 2. Second, we look at the inner summation of Eq. 10,
342
+
343
+ $$
344
+ \mathcal { L } _ { S c o r e } = \frac { 1 } { N } \sum _ { i = 1 } ^ { N } \left( \frac { 1 } { L } \sum _ { l = 1 } ^ { L } - \mathbf { Q } [ i , l ] \log \mathbf { P } [ i , l ] \right) .
345
+ $$
346
+
347
+ The inner summation inside the round bracket is the cross entropy between $\mathbf { Q } [ i , : ]$ and $\mathbf { P } [ i , : ]$ . And it is equivalent to replacing the one-hot vector in Equation 12 with $\mathbf { Q } [ i , : ]$ . Also, it is the form of label smoothing, a commonly used training trick in image classification (Szegedy et al. (2016); He et al. (2019)). The closer $\mathbf { Q } [ i , : ]$ is to a one-hot vector, the more confidence we give to the classification loss of point $\mathbf { x } _ { i }$ . By definition of $\mathbf { Q } [ i , l ]$ , it can be easily seen that the resulting classifier only classifies near-centers points correctly. Thus we call our new loss function the center-aware loss.
348
+
349
+ # A.2 IMPLEMENTATION
350
+
351
+ For a fair comparison to our main competitor PartNet (Mo et al. (2019)) we keep as much of their structure as possible (Note that PartNet is the name of a dataset as well as an instance segmentation method). We also use PointNet $^ { + + }$ (Qi et al. (2017)) as the feature extraction backbone, with the same parameters as by Mo et al. (2019). We use 3 output heads for centers, uncertainties, and scores as in $\mathsf { \bar { f } } ( \{ \mathbf { x } _ { i } \} _ { i = 1 } ^ { N } ) = \mathsf { \bar { \{ } } \mu _ { i } , \pmb { \sigma } _ { i } , \mathbf { p } _ { i } \} _ { i = 1 } ^ { N }$ . The output dimensions are 3, 3 and the number of semantic classes, uncertainties and scores, respectively. We list the activation functions for output heads in Table 3.
352
+
353
+ Following the notation of PointNet+ $^ +$ Qi et al. (2017), we give the architecture of the feature network:
354
+
355
+ $$
356
+ \begin{array} { r l } & { S A ( 5 1 2 , 0 . 2 , [ 6 4 , 6 4 , 1 2 8 ] ) , } \\ & { S A ( 1 2 8 , 0 . 4 , [ 1 2 8 , 1 2 8 , 2 5 6 ] ) , } \\ & { S A ( [ 2 5 6 , 5 1 2 , 1 0 2 4 ] ) , } \\ & { F P ( 2 5 6 , 2 5 6 ) , } \\ & { F P ( 2 5 6 , 1 2 8 ) , } \\ & { F P ( 1 2 8 , 1 2 8 ) . } \end{array}
357
+ $$
358
+
359
+ The output head network is:
360
+
361
+ F ullyConnected(128, 256),
362
+ BatchNorm(256),
363
+ ReLU (),
364
+ F ullyConnected(256, 128),
365
+ BatchNorm(128),
366
+ ReLU (),
367
+ F ullyConnected(128, 128),
368
+ BatchNorm(128),
369
+ ReLU (),
370
+ F ullyConnected(128, C),
371
+
372
+ ![](images/5baeeb435abae2f1dd6a5beaea5aa831f9f1138ce902c7095c7ed3866bba6c81.jpg)
373
+ Figure 7: Top row: similarity maps for each part instance $\tilde { \mathbf { Q } } [ : , k ]$ . Bottom row: probability map $\mathbf { Q } [ : , l ]$ . The arrows show that information of instances of the same class is aggregated in Eq. 9. Red means high similarity, while blue means low.
374
+
375
+ Table 4: Instance segmentation results on PartNet. The metric is mAP $( \% )$ with IoU threshold 0.25.
376
+
377
+ <table><tr><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1>Avg</td><td rowspan=1 colspan=1>Bnoget o 0 aenee doider i 383品M3s </td></tr><tr><td rowspan=1 colspan=1>d</td><td rowspan=1 colspan=1>123</td><td rowspan=1 colspan=1>70.2|46.745.6</td><td rowspan=1 colspan=1>89.482.3 65.263.178.148.079.197.164.9 64.677.373.958.959.242.510.0 50.092.950.096.357.759.382.752.6144.5 43.0171.3-49.3 = 32.2 1 51.2 45.2146.7 36.5-29.0 52.6-35.3 39.6 59.9 89.3 27.1 56.9 55.0 -49.0 22.6 1 56.9135.6,36.3 28.6 44.8 57.0</td></tr><tr><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1>Avg|</td><td rowspan=1 colspan=1>62.8|</td><td rowspan=1 colspan=1>389.4 51.9 58.9 63.152.143.8 70.193.247.160.8 66.2 73.958.954.132.4100052.792.943.696.346.941.5 63.8 54.8</td></tr><tr><td rowspan=1 colspan=1>s.no</td><td rowspan=1 colspan=1>1123</td><td rowspan=1 colspan=1>72.751.451.6</td><td rowspan=1 colspan=1>82.8 79.6 65.672.082.8 49.183.8 98.375.574.3 83.279.5 59.97.8 45.2 1.050.595.4 51.696.9 60.944.682.9 51.1,55.41 147.1-78.0-48.1 39.3154.448.853.737.7-44.4 57.2,43.2 45.7 64.8 90.7 34.6 59.3 67.2 53.0 26.0 1 60.0-51.5- 44.4 31.7 50.0 53.9</td></tr><tr><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1>Avg|</td><td rowspan=1 colspan=1>66.5</td><td rowspan=1 colspan=1>66.582.8 59.8 61.472.057.747.475.694.552.7 66.8 75.279.559.9 65.936.8100055.095.4 506 96.953.038.0 66.5 52.5</td></tr></table>
378
+
379
+ where $C$ is 3, 3 and the number of classes for centers, uncertainties and scores, respectively.
380
+
381
+ We implemented our method using PyTorch Paszke et al. (2019) and the geometric deep learning library PyTorch Geometric Fey & Lenssen (2019). The final objective function is
382
+
383
+ $$
384
+ \mathcal { L } = \mathcal { L } _ { I n s } + \mathcal { L } _ { S c o r e } + 0 . 0 0 1 \cdot \mathcal { L } _ { R e g }
385
+ $$
386
+
387
+ We use random jittering, translation (between $- 0 . 0 1$ and 0.01) and rotation (between $- 1 5 ^ { \circ }$ and $1 5 ^ { \circ }$ for each axis) as data augmentation, and use the Adam Kingma & Ba (2014) optimizer. We use a batch-size of 16 and an initial learning rate of 0.001 for 500 epochs with a decay factor of 0.5 at epoch 50 and epoch 150.
388
+
389
+ # A.3 ADDITIONAL RESULTS ON PARTNET
390
+
391
+ Results of different IoU thresholds We report detailed results of IoU threshold at $2 5 \%$ and $7 5 \%$ in Table 4 and Table 5. The metric is mean Average Precision (mAP).
392
+
393
+ Qualitive results We present more qualitive results in Figure 8 which shows the instanceawareness of our method. We also demonstrate the 3D models in the attached video.
394
+
395
+ # A.4 ADDITIONAL RESULTS ON SCANNET
396
+
397
+ ScanNet (Dai et al. (2017)) is a dataset containing 3D reconstructions of indoor scenes. Different from objects in PartNet, instances are more separated, e.g., chairs and tables usually are not connected, while in PartNet, parts are closely connected together and have more intertwined correspondence. Also PartNet provides detailed and high-granularity semantic and instance information, i.e. the number of instances and classes are often larger than ones of ScanNet. This makes PartNet a more suitable dataset for instance segmentation. However, we still validate our method on ScanNet to show the potential of probabilistic embedding. As baseline method we chose a network based on performance and availability of code. Since the best methods, such as OccuSeg, do not release code for ScanNet, we decided to build our own baseline using MinkowskiNet (Choy et al. (2019)) as feature backbone. MinkowskiNet is a sparse tensor network that achieved great results on indoor semantic scene segmentation. In order to adapt the network to instance segmentation, we re-implement the learnable margin method proposed by Neven et al. (2019). The learnable margin method does well on common image instance segmentation datasets and is well-balanced both in speed and accuracy. This combination of two recent papers gives a strong baseline, but not stateof-the-art results in the metrics. We compare to this baseline, also using MinkowskiNet as feature backbone to make the results directly comparable.
398
+
399
+ Table 5: Instance segmentation results on PartNet. The metric is mAP $( \% )$ with IoU threshold 0.75.
400
+
401
+ <table><tr><td></td><td></td><td>Avg</td><td>3</td><td>o o0</td><td>eenee duer doider L.ITe 0 阿 S 品 M</td></tr><tr><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td></td><td></td><td></td><td>22.0 1</td><td>4.2</td><td>47.439.714.6 60.641.458.328.858.384.735.649.148.2 66.310.748.729.698.047.876.150.035.129.943.242.240.5</td></tr><tr><td>ee</td><td>123</td><td>23.5</td><td>-</td><td>21.4 1 = 3.937.9 、</td><td>37.2 1 22.4 19.6 1 32.1 1 16.7 1 22.8 22.0 - 16.6 17.6 29.8 63.2 8.1 27.6 25.8 31.0 13.6 23.9 12.1 18.2 16.4 19.7 34.5</td></tr><tr><td></td><td></td><td></td><td></td><td></td><td>- - - 1 -</td></tr><tr><td></td><td></td><td></td><td></td><td></td><td>Avg|38.939.77.649.241.432.123.241.773.922038437.066.310.739.820.998.3467.126.335.123.627.23037.5</td></tr><tr><td></td><td>1</td><td>23.8</td><td></td><td>7.1 1 22.8</td><td>50.040.313.3 60.2 60.259.328.261.990.639.159.6542 69.37.465.728.598.047.977.150.542.830.134.840.741.1 -22.0- 35.5- 20.6- 26.121.4 1 -</td></tr><tr><td>,</td><td></td><td>23 |25.7</td><td>- 7.3 38.8</td><td>37.4- 21.3 20.5 17.2 30.0 66.8 10.8 28.2 33.2</td><td>31.5 14.1 21.0 17.4 19.4 38.0</td></tr><tr><td>s.no</td><td></td><td></td><td></td><td>-</td><td>, 25.6 , 17.1 -</td></tr><tr><td></td><td></td><td></td><td></td><td></td><td>Avg|41.740.39.249.5 60.234.2.743.178.723.743.9 43.769.37.448.621.5 98.36477.129.4 42.8 25.724.50039.6</td></tr></table>
402
+
403
+ ![](images/ddf38a2b7c8ca8218109b83409407d1b63c79a627cad3c1e1be3de09a03af765.jpg)
404
+ Figure 8: Top row: ground-truth (background points are shown in transparent red). Second and third row: PartNet and Ours (only true positives are shown, and false detections are shown in transparent red). Fourth and fifth row: PartNet and Ours (all detected instances, unclassified points are shown in transparent red). PartNet can group instance points together but fails to give the correct class labels in some cases (e.g., in the first and the third subfigures from left to right, points of table legs are grouped together (fourth row) but they are not true positives (second row). Besides, in the sixth subfigure from left to right, PartNet fails to distinguish different instances of lamp covers (second and fourth row). While our method performs especially better in these cases.
405
+
406
+ Table 6: Results on ScanNet. We list the results on both validation and hidden test sets of ScanNet. Note that due to the unique submission policy of ScanNet, we are unable to provide the results of learnable margin on the test set. On validation set, we improve mAP by $4 . 9 \%$ .
407
+
408
+ <table><tr><td></td><td colspan="3">validation</td><td colspan="3">test</td></tr><tr><td></td><td>mAP</td><td>AP50</td><td>AP25</td><td>mAP</td><td>AP50</td><td>AP25</td></tr><tr><td>MTML (Lahoud et al. (2019))</td><td>20.3</td><td>40.2</td><td>55.4</td><td>28.2</td><td>54.9</td><td>73.1</td></tr><tr><td>3D-MPA (Engelmann et al. (2020))</td><td>35.3</td><td>59.1</td><td>72.4</td><td>35.5</td><td>61.1</td><td>73.7</td></tr><tr><td>PointGroup (Jiang et al. (2020))</td><td>34.8</td><td>56.9</td><td>71.3</td><td>40.7</td><td>63.6</td><td>77.8</td></tr><tr><td>OccuSeg (Han et al. (2020))</td><td>44.2</td><td>60.7</td><td>71.9</td><td>44.3</td><td>63.4</td><td>73.9</td></tr><tr><td>Learnable margin + MinkowskiNet</td><td>28.1</td><td>50.1</td><td>70.1</td><td>-</td><td>1</td><td>-</td></tr><tr><td>Proposed + MinkowskiNet</td><td>33.0</td><td>57.1</td><td>73.8</td><td>32.8</td><td>56.0</td><td>75.2</td></tr></table>
409
+
410
+ We report the average precision (AP) in Table 6 and compare our method with other leading results on ScanNet. Although we do not have the overall state-of-the-art results, the improvement over the baseline Neven et al. (2019) verifies the impact of probabilistic embedding and demonstrates that our method can be integrated with any embedding-based method and any backbone network. We can improve the validation mAP by $4 . { \dot { 9 } } \%$ .
411
+
412
+ # A.5 DIFFERENCES TO LEARNABLE MARGIN
413
+
414
+ Neven et al. (2019) proposed to use a learnable margin for image instance segmentation, which is similar in formulation to our proposed probabilistic embedding. Although we differ in several aspects:
415
+
416
+ 1. The intuition behind learnable margin comes from the hinge loss: give different hinge margin to objects of different sizes. However, our intuition comes from modeling neural network’s output as random variables to estimate uncertainty.
417
+ 2. The parameters have a different meaning in our method compared to Neven et al. (2019). In learnable margin, $\sigma$ is an instance-specific bandwidth (or margin) per cluster. In our work $\sigma$ are uncertainties per point.
418
+ 3. The bandwidth $\sigma$ is influenced by the size of instances (large instances have large $\sigma$ ). In contrast, our uncertainty $\sigma$ encodes per-point uncertainty close to the boundary of instances (see Fig. 5).
419
+ 4. Neven et al. (2019) add a loss term to enforce the bandwidths from the same instance to be close. By contrast, we don’t have this kind of restriction. Also, uncertaintes from the same instance can be different as along as they have similar spatial embeddings.
md/train/iAmZUo0DxC0/iAmZUo0DxC0.md ADDED
@@ -0,0 +1,389 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # UNLEARNABLE EXAMPLES: MAKING PERSONALDATA UNEXPLOITABLE
2
+
3
+ Hanxun Huang1 Xingjun $\mathbf { M } \mathbf { a } ^ { 2 \dagger }$ Sarah Monazam Erfani1 James Bailey1 Yisen Wang3†
4
+
5
+ 1The University of Melbourne, VIC, Australia
6
+ 2Deakin University, Geelong, VIC, Australia
7
+ 3Key Lab. of Machine Perception (MoE), School of EECS, Peking University, Beijing, China
8
+
9
+ # ABSTRACT
10
+
11
+ The volume of “free” data on the internet has been key to the current success of deep learning. However, it also raises privacy concerns about the unauthorized exploitation of personal data for training commercial models. It is thus crucial to develop methods to prevent unauthorized data exploitation. This paper raises the question: can data be made unlearnable for deep learning models? We present a type of error-minimizing noise that can indeed make training examples unlearnable. Error-minimizing noise is intentionally generated to reduce the error of one or more of the training example(s) close to zero, which can trick the model into believing there is “nothing” to learn from these example(s). The noise is restricted to be imperceptible to human eyes, and thus does not affect normal data utility. We empirically verify the effectiveness of error-minimizing noise in both sample-wise and class-wise forms. We also demonstrate its flexibility under extensive experimental settings and practicability in a case study of face recognition. Our work establishes an important first step towards making personal data unexploitable to deep learning models. Code is available at https://github.com/HanxunH/Unlearnable-Examples.
12
+
13
+ # 1 INTRODUCTION
14
+
15
+ In recent years, deep learning has had groundbreaking successes in several fields, such as computer vision (He et al., 2016) and natural language processing (Devlin et al., 2018). This is partly attributed to the availability of large-scale datasets crawled freely from the Internet such as ImageNet (Russakovsky et al., 2015) and ReCoRD (Zhang et al., 2018b). Whilst these datasets provide a playground for developing deep learning models, a concerning fact is that some datasets were collected without mutual consent (Prabhu & Birhane, 2020). Personal data has also been unconsciously collected from the Internet and used for training commercial models (Hill, 2020). This has raised public concerns about the “free” exploration of personal data for unauthorized or even illegal purposes.
16
+
17
+ In this paper, we address this concern by introducing unlearnable examples, which aims at making training examples unusable for Deep Neural Networks (DNNs). In other words, DNNs trained on unlearnable examples will have a performance equivalent to random guessing on normal test examples. Compared with preserving an individual’s privacy by obfuscating information from the dataset, what we aim to achieve here is different but more challenging. First, making an example unlearnable should not affect its quality for normal usage. For instance, an unlearnable “selfie” photo should be free from obvious visual defects so it can be used as a social profile picture. Ideally, this can be achieved by using imperceptible noise. In our setting, the noise can only be added to training examples on a single occasion (when the data is uploaded to the internet) prior to model training. However, DNNs are known to be robust to small noise either random (Fawzi et al., 2016) or adversarial (Szegedy et al., 2013; Goodfellow et al., 2014; Ma et al., 2018). It is still not clear whether small, imperceptible noise can stop the training of high-performance DNNs.
18
+
19
+ The development of unlearnable examples should take full advantage of the unique characteristics, and more importantly, the weaknesses of DNNs. One well-studied characteristic of DNNs is that they tend to capture more of the high-frequency components of the data (Wang et al., 2020a). Surprisingly, by exploiting this characteristic, we find that small random noise when applied in a class-wise manner to the training data can easily fool DNNs to overfit to such noise (shown in Section 4). However, early stopping can effectively counteract this type of noise. DNNs are also known to be vulnerable to adversarial (or error-maximizing) noise, which are small perturbations crafted to maximize the model’s error at the test time (Szegedy et al., 2013; Goodfellow et al., 2014). We find that error-maximizing noise cannot stop DNN learning when applied in a sample-wise manner to the training examples. This motivates us to explore the opposite direction to error-maximizing noise. Specifically, we propose a type of error-minimizing noise that can prevent the model from being penalized by the objective function during training, and thus can trick the model into believing there is “nothing” to learn from the example(s). We refer to an example that contains the errorminimizing noise as an unlearnable example. Error-minimizing noise can be generated in different forms: sample-wise and class-wise. Class-wise error-minimizing noise is superior to random noise and cannot be circumvented by early stopping. Sample-wise error-minimizing noise is the only effective noise that can make training examples unlearnable compared to random (Fawzi et al., 2016) or error-maximizing noise (Munoz-Gonz ˜ alez et al., 2017). Our main contributions are: ´
20
+
21
+ • We present a type of error-minimizing noise that can create unlearnable examples to prevent personal data from being freely exploited by deep learning models. The noise is small, imperceptible to human eyes, thus it does not reduce general data utility. We propose a bi-level optimization process to effectively generate different forms of errorminimizing noise: sample-wise and class-wise. We empirically verify the effectiveness and flexibility of error-minimizing noise for creating unlearnable examples. We also demonstrate the practical application of unlearnable examples in real-world scenarios via a case study on face recognition.
22
+
23
+ # 2 RELATED WORK
24
+
25
+ In this section, we briefly review most relevant works in data privacy, data poisoning, adversarial attacks against deep learning models.
26
+
27
+ Data Privacy. Privacy issues have been extensively studied in the field of privacy-preserving machine learning (Shokri & Shmatikov, 2015; Abadi et al., 2016; Phan et al., 2016; 2017; Shokri et al., 2017). While these works have made significant progress towards protecting data privacy, they are developed based on the assumption that the model can freely explore the training data and turn to protect the model from leaking sensitive information about the training data. In this paper, we consider a more challenging scenario where the goal of the defender is to make personal data completely unusable by unauthorized deep learning models. Fawkes (Shan et al., 2020) has made the first attempt towards this type of strict situation. By leveraging the targeted adversarial attack, Fawkes prevents unauthorized face tracker from tracking a person’s identity. This work is similar to ours as we share a common objective that prevents unauthorized data usage. In contrast to the targeted adversarial attack, we propose a novel error-minimizing noise to produce unlearnable examples which can be used as a generic framework for a wide range of data protection tasks.
28
+
29
+ Data Poisoning. Data poisoning attacks aim to degrade the model’s performance on clean examples by modifying the training examples. Previous work has demonstrated a poisoning attack on SVM (Biggio et al., 2012). Koh & Liang (2017) proposed to poison the most influential training examples using adversarial (error-maximizing) noise against DNNs, which has also been integrated into an endto-end framework (Munoz-Gonz ˜ alez et al., 2017). Although data poisoning attacks can potentially ´ prevent free data exploitation, these approaches are quite limited against DNNs and hard to operate in real-world scenarios. For example, poisoned examples can only slightly decrease DNNs’ performance (Munoz-Gonz ˜ alez et al., 2017), and often appear distinguishable to clean examples (Yang et al., ´ 2017) which will reduce normal data utility. The backdoor attack is another type of attack that poisons training data with a stealthy trigger pattern (Chen et al., 2017; Liu et al., 2020). However, the backdoor attack does not harm the model’s performance on clean data (Chen et al., 2017; Shafahi et al., 2018; Barni et al., 2019; Liu et al., 2020; Zhao et al., 2020). Thus, it is not a valid method for data protection. Different from these works, we generate unlearnable examples with invisible noise to “bypass” the training of DNNs.
30
+
31
+ Adversarial Attack. It has been found that adversarial examples (or attacks) can fool DNNs at the test time (Szegedy et al., 2013; Goodfellow et al., 2014; Kurakin et al., 2016; Carlini & Wagner, 2017; Madry et al., 2018; Jiang et al., 2019; Wu et al., 2020a; Bai et al., 2020; Croce & Hein, 2020; Wang et al., 2020b; Duan et al., 2020; Ma et al., 2020). The adversary finds an error-maximizing noise that maximizes the model’s prediction error, and the noise can be crafted universally for the entire test set (Moosavi-Dezfooli et al., 2017). Adversarial training has been shown to be the most robust training strategy against error-maximizing noise (Madry et al., 2018; Zhang et al., 2019; Wang et al., 2019; Wu et al., 2020b; Wang et al., 2020c). Adversarial training can be formulated as a min-max optimization problem. In this paper, we explore the opposite direction of error-maximizing noise, i.e., finding small noise that minimizes the model’s error via a min-min optimization process.
32
+
33
+ # 3 UNLEARNABLE EXAMPLES AND ERROR-MINIMIZING NOISE
34
+
35
+ # 3.1 PROBLEM STATEMENT
36
+
37
+ Assumptions on Defender’s Capability. We assume the defender has full access to the portion of data which they want to make unlearnable. However, the defender cannot interfere with the training process and does not have access to the full training dataset. In other words, the defender can only transform their portion of data into unlearnable examples. Moreover, the defender cannot further modify their data once the unlearnable examples are created.
38
+
39
+ Objectives. We formulate the problem in the context of image classification with DNNs. Given a typical $K$ -class classification task, we denote the clean training and test datasets as $\mathcal { D } _ { c }$ and $\mathcal { D } _ { t }$ respectively, and the classification DNN trained on $\mathcal { D } _ { c }$ as $f _ { \theta }$ where $\theta$ are the parameters of the network∗. Our goal is to transform the training data $\mathcal { D } _ { c }$ into unlearnable dataset $\mathcal { D } _ { u }$ such that DNNs trained on the $\mathcal { D } _ { u }$ will perform poorly on the test set $\mathcal { D } _ { t }$ .
40
+
41
+ Suppose the clean training dataset consists of $n$ clean examples, that is, $\mathcal { D } _ { c } = \{ ( \boldsymbol { x } _ { i } , y _ { i } ) \} _ { i = 1 } ^ { n }$ with $\pmb { x } \in \mathcal { X } \subset \mathbb { R } ^ { d }$ are the inputs and $y \in \mathcal { Y } = \{ 1 , \cdots , K \}$ are the labels and $K$ is the total number of classes. We denote its unlearnable version by $\mathcal { D } _ { u } \overset { ^ { \prime } } { = } \{ ( \mathbf { { x } } _ { i } ^ { \prime } , y _ { i } ) \} _ { i = 1 } ^ { n }$ , where ${ \pmb x } ^ { \prime } = { \pmb x } + { \pmb \delta }$ is the unlearnable version of training example $\mathbf { \boldsymbol { x } } \in \mathcal { D } _ { c }$ and $\pmb { \delta } \in \Delta \subset \mathbb { R } ^ { d }$ is the “invisible” noise that makes $_ { \textbf { \em x } }$ unlearnable. The noise $\delta$ is bounded by $\| \delta \| _ { p } \leq \epsilon$ with $\| \cdot \| _ { p }$ is the $L _ { p }$ norm, and $\epsilon$ is set to be small such that it does not affect the normal utility of the example.
42
+
43
+ In the typical case, the DNN model will be trained on $\mathcal { D } _ { c }$ to learn the mapping from the input space to the label space: $f : \mathcal { X } \mathcal { Y }$ . Our goal is to trick the model into learning a strong correlation between the noise and the labels: $f : \Delta \to \mathcal { V } , \Delta \neq \mathcal { X }$ , when trained on $\mathcal { D } _ { u }$ :
44
+
45
+ $$
46
+ \underset { \theta } { \arg \operatorname* { m i n } } \mathbb { E } _ { ( \pmb { x } ^ { \prime } , \pmb { y } ) \sim \mathcal { D } _ { \pmb { u } } } \mathcal { L } ( f ( \pmb { x } ^ { \prime } ) , \pmb { y } )
47
+ $$
48
+
49
+ where, $\mathcal { L }$ is the classification loss such as the commonly used cross entropy loss.
50
+
51
+ Noise Form. We propose two forms of noise: sample-wise and class-wise. For sample-wise noise, $\pmb { x } _ { i } ^ { \prime } = \pmb { x } _ { i } + \pmb { \delta } _ { i } , \pmb { \delta } _ { i } \in \bar { \Delta } _ { s } = \{ \pmb { \delta } _ { 1 } , \cdots , \pmb { \delta } _ { n } \}$ , while for class-wise noise, $\pmb { x } _ { i } ^ { \prime } = \pmb { x } _ { i } + \delta _ { y _ { i } } ^ { - } , \delta _ { y _ { i } } \in \Delta _ { c } =$ $\{ \delta _ { 1 } , \cdots , \delta _ { K } \}$ . Sample-wise noise needs to generate noise separately for each example. This may have more limited practicality. In contrast to sample-wise noise, a class of examples can be made unlearnable by the addition of class-wise noise, where all examples in the same class have the same noise added. As such, class-wise noise can be generated more efficiently and more flexibly in practical usage. However, we will see that class-wise noise may get more easily exposed.
52
+
53
+ # 3.2 GENERATING ERROR-MINIMIZING NOISE
54
+
55
+ Ideally, the noise should be generated on an additional dataset that is different from $\mathcal { D } _ { c }$ . This will involve a class-matching process to find the most appropriate class from the additional dataset for each class to protect in $\mathcal { D } _ { c }$ . For simplicity, here we define the noise generation process on $\mathcal { D } _ { c }$ and will verify the effectiveness of using an additional dataset in the experiments. Given a clean example $_ { \textbf { \em x } }$ , we propose to generate the error-minimizing noise $\delta$ for training input $_ { \textbf { \em x } }$ by solving the following bi-level optimization problem:
56
+
57
+ $$
58
+ \arg \operatorname* { m i n } _ { \theta } \ \mathbb { E } _ { ( \pmb { x } , \pmb { y } ) \sim \mathcal { D } _ { c } } \Big [ \operatorname* { m i n } _ { \pmb { \delta } } \mathcal { L } \big ( f ^ { \prime } ( \pmb { x } + \pmb { \delta } ) , \pmb { y } \big ) \Big ] \ \mathrm { ~ s . t . ~ } \ \| \pmb { \delta } \| _ { p } \leq \epsilon
59
+ $$
60
+
61
+ where, $f ^ { \prime }$ denotes the source model used for noise generation. Note that this is a min-min bi-level optimization problem: the inner minimization is a constrained optimization problem that finds the
62
+
63
+ $L _ { p }$ -norm bounded noise $\delta$ that minimizes the model’s classification loss, while the outer minimization problem finds the parameters $\theta$ that also minimize the model’s classification loss.
64
+
65
+ Note that the above bi-level optimization has two components that optimize the same objective. In order to find effective noise $\pmb { \delta }$ and unlearnable examples, the optimization steps for $\theta$ should be limited, compared to standard or adversarial training. Specifically, we optimize $\pmb { \delta }$ over $\mathcal { D } _ { c }$ after every $M$ steps of optimization of $\theta$ . The entire bi-level optimization process is terminated once the error rate is lower than $\lambda$ . The detailed training pipeline is described in Algorithm 1 in the Appendix.
66
+
67
+ Sample-wise Generation. We adopt the first-order optimization method PGD (Madry et al., 2018) to solve the constrained inner minimization problem as follows:
68
+
69
+ $$
70
+ \begin{array} { r } { \pmb { x } _ { t + 1 } ^ { \prime } = \Pi _ { \epsilon } \big ( \pmb { x } _ { t } ^ { \prime } - \alpha \cdot \mathrm { s i g n } ( \nabla _ { \pmb { x } } \mathcal { L } ( f ^ { \prime } ( \pmb { x } _ { t } ^ { \prime } ) , y ) ) \big ) } \end{array}
71
+ $$
72
+
73
+ where, $t$ is the current perturbation step $T$ steps in total), $\nabla _ { \pmb { x } } \mathcal { L } ( f ( \pmb { x } _ { t } ^ { \prime } ) , y )$ is the gradient of the loss with respect to the input, $\Pi$ is a projection function that clips the noise back to the $\epsilon$ -ball around the original example $_ { \textbf { \em x } }$ when it goes beyond, and $\alpha$ is the step size. The perturbation is iteratively applied for $T$ steps after each $M$ step of model training as we explained earlier. The final output is a unlearnable example $\mathbf { x } ^ { \prime }$ and the generated error-minimizing noise is $\delta = \boldsymbol { x } ^ { \prime } - \boldsymbol { x }$ .
74
+
75
+ Class-wise Generation. Class-wise noise $\Delta _ { c }$ can be obtained by a cumulative perturbation on all examples in a given class. For each example in class $k$ at step $t$ , it applies $\delta _ { k }$ to the original example $_ { \textbf { \em x } }$ and follows Equation 3 to produce $\pmb { x } _ { t + 1 } ^ { \prime }$ . The $\delta _ { k }$ accumulates over every example for the corresponding class $k$ in the entire bi-level optimization process.
76
+
77
+ # 4 EXPERIMENTS
78
+
79
+ In this section, we first demonstrate the effectiveness in creating unlearnable examples using random noise, error-maximizing noise and our proposed error-minimizing noise in both sample-wise and class-wise forms. We further empirically verify the effectiveness of error-minimizing noise on 4 benchmark image datasets. We then conduct a set of stability and transferability analyses of the noise. Finally, we show effectiveness in real-world scenarios via a case study on face recognition. More analyses regarding the effectiveness of error-minimizing noise on small patches or a mixture of class-wise noise can be found in Appendix F.
80
+
81
+ According to previous studies in adversarial research, small $L _ { \infty }$ -bounded noise within $\| \delta \| _ { \infty } < \epsilon =$ 8/255 on images are imperceptible to human observers. We consider the same constraint for all types and forms of the noise in our experiments, unless otherwise explicitly stated.
82
+
83
+ Experimental Setting for Error-Minimizing Noise. We apply error-minimizing noise to the training set of 4 commonly used image datasets: SVHN (Netzer et al., 2011), CIFAR-10, CIFAR-100 (Krizhevsky, 2009), and ImageNet subset (the first 100 classes) (Russakovsky et al., 2015). The experiments on the ImageNet subset are to confirm the effectiveness of high-resolution images. For all experiments, the ResNet-18 (RN-18) (He et al., 2016) is used as the source model $f ^ { \prime }$ to generate the noise. We use $20 \%$ of the training dataset to generate the class-wise noise and the entire training dataset for the sample-wise noise except for ImageNet †. We transform the entire training dataset into the unlearnable datasets for experiments in section 4.1 and section 4.2. Different percentages of unlearnable examples are used for experiments in section 4.3. We train four different DNNs on the unlearnable training sets: VGG-11 (Simonyan & Zisserman, 2014), ResNet-18 (RN-18), ResNet-50 (RN-50) and DenseNet-121 (DN-121) (Huang et al., 2017). We also use clean training sets as a comparison. Detailed training configurations settings can be found in Appendix B. We evaluate the effectiveness of unlearnable examples by examining the model’s accuracy on clean test examples, i.e., the lower the clean test accuracy the better the effectiveness.
84
+
85
+ Experimental Setting for Random and Error-Maximizing Noise. For random noise, we randomly sample the noise from $[ - \epsilon , \epsilon ]$ independently for each training example (eg. sample-wise) or each class (eg. class-wise). For error-maximizing (adversarial) noise, we generate the noise using PGD-20 attack (Madry et al., 2018) using a pre-trained ResNet-18 model on the training set. We generate sample-wise error-maximizing noise for each training example, and the class-wise noise based on $20 \%$ of the training set following the universal attack procedure in (Moosavi-Dezfooli et al., 2017).
86
+
87
+ Both the random and error-maximizing noise are applied to the same amount of training examples as our error-minimizing noise.
88
+
89
+ # 4.1 COMPARISONS OF RANDOM, ERROR-MAXIMIZING AND ERROR-MINIMIZING NOISE
90
+
91
+ First, we examine an extreme case that applies different types of noise to the entire training set. Figure 1 illustrates the effectiveness of both sample-wise and class-wise noise. In the sample-wise case, the network is robust to random or error-maximizing noise. This is understandable since DNNs are known to be robust to small random (Fawzi et al., 2016) and error-maximizing noise (Munoz-Gonz ˜ alez et al., ´ 2017; Madry et al., 2018; Wang et al., 2019). Surprisingly, when applied in a class-wise manner, both types of noise can prevent the network from learning useful information from the data, especially after the 15-th epoch. This reveals that DNNs are remarkably vulnerable to class-wise noise. While effective in the middle and later training stages, class-wise random noise can still be circumvented by early stopping (eg. at epoch 15). This is also the case for error-maximizing noise, although not as easy as random noise since the highest clean test accuracy under error-maximizing noise is only $50 \%$ . From the perspective of making data unexploitable, both random and error-maximizing noise are only partially effective. In comparison, our error-minimizing noise is more flexible. As shown in Figure 1, the error-minimizing noise can reduce the model’s clean test accuracy to below $23 \%$ in both settings. Moreover, it remains effective across the entire training process.
92
+
93
+ ![](images/c8773dfab899b3f6cade9665512f2dc8aa5e200f407e61fbd6db9be9ab6a0e96.jpg)
94
+ Figure 1: The unlearnable effectiveness of different types of noise: random, adversarial (errormaximizing) and our proposed error-minimizing noise on CIFAR-10 dataset. The lower the clean test accuracy the more effective of the noise.
95
+
96
+ The class-wise and sample-wise noises work in different ways. Class-wise noise has an explicit correlation with the label. Learning such correlation can effectively reduce the training error. Consequently, when there is class-wise noise, the model is tricked to learn the noise rather than the real content, reducing its generalization performance on clean data. The existence of class-wise noise only in the training data also breaks the i.i.d. assumption between the training and test data distribution. This also indicates that noises that can break the i.i.d. assumption might be effective techniques for data protection. However, in the sample-wise case, every sample has a different noise, and there is no explicit correlation between the noise and the label. In this case, only low-error samples can be ignored by the model, and normal and high-error examples have more positive impact on model learning than low-error examples. This makes error-minimizing noise more generic and effective in making data unlearnable.
97
+
98
+ # 4.2 EFFECTIVENESS OF ERROR-MINIMIZING NOISE ON DIFFERENT DATASETS
99
+
100
+ Table 1: The top-1 clean test accuracies $( \% )$ of DNNs trained on the clean training sets $( \mathcal { D } _ { c } )$ or their unlearnable ones $( \mathcal { D } _ { u } )$ made by sample-wise $( \Delta _ { s } )$ or class-wise $( \Delta _ { c } )$ error-minimizing noise.
101
+
102
+ <table><tr><td rowspan="2">Noise Form</td><td rowspan="2">Model</td><td colspan="2">SVHN</td><td colspan="2">CIFAR-10</td><td colspan="2">CIFAR-100</td><td colspan="2">ImageNet*</td></tr><tr><td>Dc</td><td>Du</td><td>Dc</td><td>Du</td><td>Dc</td><td>Du</td><td>Dc</td><td>Du</td></tr><tr><td rowspan="4">△s</td><td>VGG-11</td><td>95.38</td><td>35.91</td><td>91.27</td><td>29.00</td><td>67.67</td><td>17.71</td><td>48.66</td><td>11.38</td></tr><tr><td>RN-18</td><td>96.02</td><td>8.22</td><td>94.77</td><td>19.93</td><td>70.96</td><td>14.81</td><td>60.42</td><td>12.20</td></tr><tr><td>RN-50</td><td>95.97</td><td>7.66</td><td>94.42</td><td>18.89</td><td>71.32</td><td>12.19</td><td>61.58</td><td>11.12</td></tr><tr><td>DN-121</td><td>96.37</td><td>10.25</td><td>95.04</td><td>20.25</td><td>74.15</td><td>13.71</td><td>63.76</td><td>15.44</td></tr><tr><td rowspan="4">△c</td><td>VGG-11</td><td>95.29</td><td>23.44</td><td>91.57</td><td>16.93</td><td>67.89</td><td>7.13</td><td>71.38</td><td>2.30</td></tr><tr><td>RN-18</td><td>95.98</td><td>9.05</td><td>94.95</td><td>16.42</td><td>70.50</td><td>3.95</td><td>76.52</td><td>2.70</td></tr><tr><td>RN-50</td><td>96.25</td><td>8.94</td><td>94.37</td><td>13.45</td><td>70.48</td><td>3.80</td><td>79.68</td><td>2.70</td></tr><tr><td>DN-121</td><td>96.36</td><td>9.10</td><td>95.12</td><td>14.71</td><td>74.51</td><td>4.75</td><td>80.52</td><td>3.28</td></tr></table>
103
+
104
+ ? ImageNet subset of the first 100 classes.
105
+
106
+ Table 1 reports the effectiveness of both the sample-wise (eg. $\Delta _ { s }$ ) and the class-wise (eg. $\Delta _ { c , \ - }$ ) errorminimizing noise on datasets SVHN, CIFAR-10, CIFAR-100 and ImageNet subset. As shown in the table, our proposed method can reliably create unlearnable examples in both forms on all 4 datasets with images of different resolutions. Moreover, the noise generated on RN-18 works remarkably well to protect the data from other types of models. Compared to sample-wise noise, class-wise noise is particularly more effective, which can reduce the model’s performance to a level that is close to random guessing. These results clearly show that error-minimizing noise is a promising technique for preventing unauthorized data exploration.
107
+
108
+ # 4.3 STABILITY ANALYSIS
109
+
110
+ We run a set of experiments to analyze the stability of error-minimizing noise in creating unlearnable examples, and answer two key questions regarding its practical usage: 1) Is the noise still effective if only applied to a certain proportion or class of the data? and 2) Can the noise be removed by data augmentation or adversarial training? Experiments are conducted on CIFAR-10 with RN-18.
111
+
112
+ Different Unlearnable Percentages. In practical scenarios, it is very likely that not all the training data need to be made unlearnable. For example, only a certain number of web users have decided to use this technique but not all users, or only a specific class of medical data should be kept unexploited. This motivates us to examine the effectiveness of error-minimizing noise when applied only on a proportion of randomly selected training examples. In other words, we make a certain percentage of the training data unlearnable while keeping the rest of the data clean. We train the model on this partially unlearnable and partially clean training set $\mathcal { D } _ { u } + \mathcal { D } _ { c }$ . As a comparison, we also train the model on only the clean proportion, which is denoted by $\mathcal { D } _ { c }$ .
113
+
114
+ A quick glance at the $\mathcal { D } _ { u } + \mathcal { D } _ { c }$ results in Table 2 tells us that the effectiveness drops quickly when the data are not made $100 \%$ unlearnable. This is the case for both sample-wise and class-wise noise. The unlearnable effect is almost negligible even when the noise is applied to $40 \%$ of the data. Such a limitation against DNNs has also been identified in previous work for protecting face images using error-maximizing noise (Shan et al., 2020).
115
+
116
+ To better understand the above limitation, we take $80 \%$ as an example and plot the learning curves of the RN-18 model trained on 1) only the $20 \%$ clean proportion, 2) only the $80 \%$ unlearnable proportion, or 3) both. The results are shown in Figure 2 (a-b). Interestingly, we find that the $80 \%$ data with the error-minimizing noise are still unlearnable to the model, whereas the rest of the $20 \%$ clean data are sufficient for the model to achieve a good performance. In other words, models trained only on $\mathcal { D } _ { c }$ demonstrate a similar performance as models trained on $\mathcal { D } _ { u } + \mathcal { D } _ { c }$ . This phenomenon is consistent across different unlearnable percentages. This indicates that the high performance of the model on $< 1 0 0 \%$ unlearnable dataset may not be a failure of the error-minimizing noise. We further verify this by investigating the scenario where only one class is made unlearnable.
117
+
118
+ Table 2: Effectiveness under different unlearnable percentages on CIFAR-10 with RN-18 model: lower clean accuracy indicates better effectiveness. $\mathcal { D } _ { u } + \mathcal { D } _ { c }$ : a mix of unlearnable and clean data; $\mathcal { D } _ { c }$ : only the clean proportion of data. Percentage of unlearnable examples: $\frac { \mathcal { D } _ { u } } { \mathcal { D } _ { c } + \mathcal { D } _ { u } }$ .
119
+
120
+ <table><tr><td rowspan="2">Noise Type</td><td colspan="10">Percentage of unlearnable examples</td></tr><tr><td>0%</td><td colspan="2">20%</td><td colspan="2">40%</td><td colspan="2">60%</td><td colspan="2">80%</td><td>100%</td></tr><tr><td>△s</td><td></td><td>Du+Dc</td><td>Dc</td><td>Du+Dc</td><td>Dc</td><td>Du+Dc</td><td>Dc</td><td>Du+Dc</td><td>Dc</td><td></td></tr><tr><td>c</td><td>94.95 94.95</td><td>94.38 94.24</td><td>93.75 93.75</td><td>93.10 92.99</td><td>92.56 92.56</td><td>91.90 91.10</td><td>89.77 89.77</td><td>86.85 87.23</td><td>84.30 84.30</td><td>19.93 16.42</td></tr></table>
121
+
122
+ One Single Unlearnable Class. We take the ‘bird’ class of CIFAR-10 as an example, and apply the error-minimizing noise (either sample-wise or class-wise) to all training images in the bird class. We train RN-18 on each of the unlearnable training set, and plot the prediction confusion matrix of the model on the clean test set in Figure 2 (c-d). The ‘bird’ class is indeed unlearnable when either the sample-wise or the class-wise error-minimizing noise is added to the class. Compared to sample-wise noise, class-wise noise is more effective with almost all the test ‘bird’ images being misclassified into other classes. Interestingly, this customized unlearnable class does not seem to influence much of the learning on other classes. Only the images from the unlearnable class are incorrectly predicted into other classes, not the other way around. This not only confirms that the unlearnable group of data is indeed unlearnable to the model and it suggests that our error-minimizing noise can be flexibly applied to suit different protection tasks. A similar result can also be demonstrated on more than one unlearnable class (see Appendix C). In summary, if an individual can only apply the noise to portion of his/her data, these data will not contribute to model training. If an individual can apply the noise to all his/her data, the model will fail to recognize this particular class of data. In other words, our method is effective for the defender to protect his/her own data.
123
+
124
+ ![](images/72eac76deabf416f20433e7e886f2b0800b71a8258e37dab283aff52f02ce0f6.jpg)
125
+ Figure 2: (a-b): For both sample-wise (a) and class-wise (b) noise, learning curves of RN-18 on CIFAR-10 dataset with different types of training data: 1) only $20 \%$ clean data, 2) only $80 \%$ unlearnable data, and 3) both clean and unlearnable data. (c-d): Prediction confusion matrices (on the clean test set) of two RN-18s trained on CIFAR-10 with the ‘Bird’ unlearnable class created by sample-wise (c) or class-wise (d) error-minimizing noise.
126
+
127
+ Under Noise Filtering Techniques. The resistance of our error-minimizing noise to 4 types of data augmentation techniques and adversarial training is analyzed in Appendix D. The noise is fairly robust to all 4 data augmentation techniques, and the highest accuracy that can achieve using data augmentation is $5 8 . 5 1 \%$ on CIFAR-10. Comparing with data augmentation, the error-minimizing noise is less resistant to adversarial training. With slightly increased $\epsilon$ on CIFAR-10, the noise can only compromise the model’s clean test accuracy to $79 \%$ . Since adversarial training forces the model to learn only robust features (Ilyas et al., 2019), we believe our method can be improved by crafting the noise based on the robust features, which can be extracted from an adversarially pre-trained model on the clean data (Ilyas et al., 2019). We leave further explorations of these techniques as future work.
128
+
129
+ # 4.4 TRANSFERABILITY ANALYSIS
130
+
131
+ Another important question we haven’t explored so far is that Can error-minimizing noise be generated on a different dataset? This is also important as a positive answer to the question increases the practicability of using unlearnable examples to protect millions of web users. We examine this capability for both sample-wise noise and class-wise error-minimizing noise.
132
+
133
+ ![](images/73ad53bc84743f728f7193d93598faff5b11474ec00ed0813a1f8decdb8bbaed.jpg)
134
+ Figure 3: (a): Comparison between ‘bus’ (clean) class, ‘ship’ (unlearnable) class and the overall accuracy. (b): Clean test accuracy of RN-18/RN-50/DN-121 on unlearnable CIFAR-10 with errorminimizing noise crafted on ImageNet. (c): Prediction confusion matrix of RN-18 trained on CIFAR10 with only 4 classes (‘airplane’, ‘car’, ‘ship’, ‘truck’) are unlearnable by ImageNet transferred noise, and the confusion matrix is computed on CIFAR-10 clean test set.
135
+
136
+ Sample-wise Noise. For $\Delta _ { s }$ , we generate the noise and create unlearnable ‘ship’ class examples on CIFAR-10 and add the unlearnable ‘ship’ class to CIFAR-100. For testing, we also include the clean test set of ‘ship’ class to the test set of CIFAR-100. Note the main difference of this experiment to the previous singe unlearnable class experiment is the unlearnable examples are generated on a different dataset. The class-wise and the overall accuracy on the clean test set are shown in Figure 3a. We find that the ‘ship’ class is indeed unlearnable to the model at the end, despite a small amount $( 6 0 \%$ clean test accuracy) of information being learned in the early stage. We suspect this is because the ‘ship’ class shares some common features with other classes in CIFAR-100. Overall, the generated unlearnable examples can transfer to a different dataset. Note that this experiment simulates the scenario where a user uses a different dataset (eg. CIFAR-10) to generate the sample-wise noise to make his/her personal images unlearnable before uploading them to the Internet, and these images are then collected into a large CIFAR-100 dataset.
137
+
138
+ Class-wise Noise. For $\Delta _ { c }$ , we use the entire ImageNet as the source dataset to generate the noise using RN-18, then apply the noise to CIFAR-10. All ImageNet images are resized to $3 2 \times 3 2$ . For each CIFAR-10 class, we determine its corresponding class in ImageNet based on the visual similarities between the classes. The detailed class mapping can be found in Table 4 in the Appendix. We train RN-18, RN-50 and DN-121 on the unlearnable CIFAR-10 created with the ImageNet transferred noise, and show their learning curves in Figure 3b. As can be observed, the transferred class-wise noise works reasonably well on CIFAR-10 with the clean test accuracy of all three models being reduced to around $10 \%$ . Compared to the noise directly generated on CIFAR-10 (see Figure 1), here the models can still capture some useful features in the first epoch. We conjecture this is because CIFAR-10 classes are more generic than ImageNet classes, and noise that minimizes the error of fine-grained classes can become less effective on generic classes. We also conduct an experiment on the ImageNet transferred noise to make 4 classes unlearnable of CIFAR-10. We plot the prediction confusion matrix of the RN-18 trained on the 4-class unlearnable CIFAR-10 in Figure 3c. It shows that the 4 classes are indeed unlearnable, and the model’s performance on the other 6 classes is not affected. This confirms that transferred noise can also be used in customized scenarios.
139
+
140
+ ![](images/c926e81a65a819cea75e041294d5a74f763c7773404d209bd5d4b6a5ef3fb3a6.jpg)
141
+ 4.5 REAL-WORLD SCENARIO: A CASE STUDY ON FACE RECOGNITION
142
+ Figure 4: Preventing exploitation of face data using error-minimizing noise.
143
+
144
+ Here, we conduct a case study to apply error-minimizing noise to personal face images, which is arguably one most important real-world scenarios. In this scenario, the defender wants to prevent his/her face images from being exploited to train face recognition or verification systems. The setting is illustrated in Figure 4a. We assume the user has access to a small dataset of facial images and will use this small dataset to generate and apply the error-minimizing noise to his/her own face images before sharing them on online social media platforms. After this, the unlearnable version of face images on social media gets collected to train a DNN based facial recognition or verification system. The system will then be used to recognize one of the user’s clean face image captured somewhere by a camera. The goal is to prevent the DNN from learning the defender’s face images and make it perform poorly on his/her clean face images.
145
+
146
+ We conduct the experiments under two different settings: 1) partially unlearnable where a small subset of identities in the training set are unlearnable; or 2) fully unlearnable where the entire training set is unlearnable. We test our error-minimizing noise against both face recognition and verification models. Face recognition model classifies the identity (class) of a face image, while face verification model verifies whether two face images belong to the same identity. In the face verification problem, two face images are determined to be of the same identity if the cosine similarity between the features (extracted from a recognition model) of the two images is below a certain threshold.
147
+
148
+ Experimental Settings. We randomly split the WebFace dataset (Yi et al., 2014) into $80 \%$ for training and $20 \%$ for testing, according to each identity. In the partially unlearnable setting, we randomly select 50 identities from the training set of WebFace into a subset WebFace-50 as the users who want to hide their identities. We also randomly select 100 identities from CelebA (Liu et al., 2015) into a subset CelebA-100 as the small dataset used to generate the unlearnable images for WebFace-50. The clean WebFace-50 part of the WebFace training data will be replaced by its unlearnable version for model training. This partially unlearnable version of WebFace training set consists of 10,525 clean identities and 50 unlearnable identities. In the fully unlearnable setting, the entire WebFace is made unlearnable. In both settings, the error-minimizing noises are generated using RN-18 and CelebA-100, following the procedure described in Section 4. We train Inception-ResNet models (Szegedy et al., 2016) following a standard training procedure (Taigman et al., 2014; Parkhi et al., 2015).
149
+
150
+ Effectiveness Against Face Recognition. Here, we adopt the partially unlearnable setting. The accuracy of the Inception-ResNet model on the clean WebFace test set is reported in the Figure 4b, separately for the 50 unlearnable identities and the 10,525 clean identities. The result confirms that the 50 identities with the error-minimizing noise are indeed unlearnable and the recognition accuracy of their clean face images is only $16 \%$ , a much lower than the rest of the identities $( 8 6 \% )$ .
151
+
152
+ Effectiveness Against Face Verification. Here, we adopt both the partially and the fully unlearnable settings. In the partially unlearnable setting, we evaluate the model performance on 6000 (3000 positives and 3000 negatives) face image pairs randomly sampled from the clean test set of WebFace. The pair is labeled as positive if the two face images are of the same identity, negative otherwise. In the fully unlearnable setting, we independently train a second Inception-ResNet model on the fully unlearnable WebFace. To further eliminate possible (dis)similarities shared across the images from the same dataset (e.g., WebFace), we follow the standard face verification evaluation protocol (Deng et al., 2019) and use the 6000 face pairs from LFW (Huang et al., 2008) for testing.
153
+
154
+ Figure 7 in Appendix G shows the Receiver Operating Characteristic (ROC) performance of the models trained in both settings. The model trained in the partially unlearnable setting still has a good verification performance on unlearnable identities, although the Area Under the Curve (AUC) is lower than the clean identities. This is because a small subset of unlearnable examples is not powerful enough to stop the learning of a feature extractor. In fact, 2,622 (approximately equal to $2 5 \%$ of WebFace) clean identities are sufficient to train a high-quality facial feature extractor (Parkhi et al., 2015). This indicates that, while it is easy to make data unlearnable to classification models, it is much more challenging to stop the learning of a feature extractor. Nevertheless, the proposed error-minimizing noise is still effective in the fully unlearnable setting, reducing the AUC to 0.5321 (the clean setting AUC is 0.9975). Whilst there are still many unexplored factors, we believe our proposed error-minimization noise introduces a new practical tool for protecting personal data from unauthorized exploitation.
155
+
156
+ # 5 CONCLUSION
157
+
158
+ In this paper, we have explored the possibility of using invisible noise to prevent data from being freely exploited by deep learning. Different from existing works, our method makes data unlearnable to deep learning models. The effectiveness of this approach could have a broad impact for both the public and the deep learning community. We propose a type of error-minimizing noise and empirically demonstrate its effectiveness in creating unlearnable examples. The noise is effective in different forms (eg. sample-wise or class-wise), sizes (eg. full image or small patch), and is resistant to common data filtering methods. It can also be customized for a certain proportion of the data, one single class or for multiple classes. Furthermore, the noise can be easily transferred from existing public datasets to make private datasets unlearnable. Finally, we verify the usefulness for real-world scenarios via a case study on face recognition. Our work opens up a new direction of preventing free exploitation of data. Although there are still many practical obstacles for a large-scale application of the error-minimizing noise, we believe this study establishes an important first step towards preventing personal data being freely exploited by deep learning.
159
+
160
+ # ACKNOWLEDGEMENT
161
+
162
+ Yisen Wang is partially supported by the National Natural Science Foundation of China under Grant 62006153, and CCF-Baidu Open Fund (OF2020002). This research was undertaken using the LIEF HPC-GPGPU Facility hosted at the University of Melbourne, which was established with the assistance of LIEF Grant LE170100200.
163
+
164
+ # REFERENCES
165
+
166
+ Martin Abadi, Andy Chu, Ian Goodfellow, H Brendan McMahan, Ilya Mironov, Kunal Talwar, and Li Zhang. Deep learning with differential privacy. In SIGSAC, 2016.
167
+
168
+ Yang Bai, Yuyuan Zeng, Yong Jiang, Yisen Wang, Shu-Tao Xia, and Weiwei Guo. Improving query efficiency of black-box adversarial attack. In ECCV, 2020.
169
+
170
+ Mauro Barni, Kassem Kallas, and Benedetta Tondi. A new backdoor attack in cnns by training set corruption without label poisoning. In ICIP. IEEE, 2019.
171
+
172
+ Battista Biggio, Blaine Nelson, and Pavel Laskov. Poisoning attacks against support vector machines. arXiv preprint arXiv:1206.6389, 2012.
173
+
174
+ Nicholas Carlini and David Wagner. Towards evaluating the robustness of neural networks. In $S P$ 2017.
175
+
176
+ Xinyun Chen, Chang Liu, Bo Li, Kimberly Lu, and Dawn Song. Targeted backdoor attacks on deep learning systems using data poisoning. arXiv preprint arXiv:1712.05526, 2017.
177
+
178
+ Francesco Croce and Matthias Hein. Reliable evaluation of adversarial robustness with an ensemble of diverse parameter-free attacks. In ICML, 2020.
179
+
180
+ Jiankang Deng, Jia Guo, Niannan Xue, and Stefanos Zafeiriou. Arcface: Additive angular margin loss for deep face recognition. In CVPR, 2019.
181
+
182
+ 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.
183
+
184
+ Terrance DeVries and Graham W Taylor. Improved regularization of convolutional neural networks with cutout. arXiv preprint arXiv:1708.04552, 2017.
185
+
186
+ Ranjie Duan, Xingjun Ma, Yisen Wang, James Bailey, A Kai Qin, and Yun Yang. Adversarial camouflage: Hiding physical-world attacks with natural styles. In CVPR, 2020.
187
+
188
+ Alhussein Fawzi, Seyed-Mohsen Moosavi-Dezfooli, and Pascal Frossard. Robustness of classifiers: from adversarial to random noise. In NeurIPS, 2016.
189
+
190
+ Ian J Goodfellow, Jonathon Shlens, and Christian Szegedy. Explaining and harnessing adversarial examples. arXiv preprint arXiv:1412.6572, 2014.
191
+
192
+ Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In CVPR, 2016.
193
+
194
+ Kashmir Hill. The secretive company that might end privacy as we know it, 2020.
195
+
196
+ Gao Huang, Zhuang Liu, Laurens Van Der Maaten, and Kilian Q Weinberger. Densely connected convolutional networks. In CVPR, 2017.
197
+
198
+ Gary B Huang, Marwan Mattar, Tamara Berg, and Eric Learned-Miller. Labeled faces in the wild: A database forstudying face recognition in unconstrained environments. 2008.
199
+
200
+ Andrew Ilyas, Shibani Santurkar, Dimitris Tsipras, Logan Engstrom, Brandon Tran, and Aleksander Madry. Adversarial examples are not bugs, they are features. In NeurIPS, 2019.
201
+
202
+ Linxi Jiang, Xingjun Ma, Shaoxiang Chen, James Bailey, and Yu-Gang Jiang. Black-box adversarial attacks on video recognition models. In ACMMM, pp. 864–872, 2019.
203
+
204
+ Diederik P Kingma and Jimmy Ba. Adam: A method for stochastic optimization. In ICLR, 2015.
205
+
206
+ Pang Wei Koh and Percy Liang. Understanding black-box predictions via influence functions. In ICML, 2017.
207
+
208
+ Alex Krizhevsky. Learning multiple layers of features from tiny images. 2009.
209
+
210
+ Alexey Kurakin, Ian Goodfellow, and Samy Bengio. Adversarial examples in the physical world. arXiv preprint arXiv:1607.02533, 2016.
211
+
212
+ Yann LeCun, Leon Bottou, Yoshua Bengio, and Patrick Haffner. Gradient-based learning applied to ´ document recognition. Proceedings of the IEEE, 86(11):2278–2324, 1998.
213
+
214
+ Sungbin Lim, Ildoo Kim, Taesup Kim, Chiheon Kim, and Sungwoong Kim. Fast autoaugment. In NeurIPS, 2019.
215
+
216
+ Yunfei Liu, Xingjun Ma, James Bailey, and Feng Lu. Reflection backdoor: A natural backdoor attack on deep neural networks. In ECCV, 2020.
217
+
218
+ Ziwei Liu, Ping Luo, Xiaogang Wang, and Xiaoou Tang. Deep learning face attributes in the wild. In ICCV, 2015.
219
+
220
+ Ilya Loshchilov and Frank Hutter. SGDR: stochastic gradient descent with warm restarts. In ICLR, 2017.
221
+
222
+ Xingjun Ma, Bo Li, Yisen Wang, Sarah M Erfani, Sudanthi Wijewickrema, Grant Schoenebeck, Dawn Song, Michael E Houle, and James Bailey. Characterizing adversarial subspaces using local intrinsic dimensionality. In ICLR, 2018.
223
+
224
+ Xingjun Ma, Yuhao Niu, Lin Gu, Yisen Wang, Yitian Zhao, James Bailey, and Feng Lu. Understanding adversarial attacks on deep learning based medical image analysis systems. Pattern Recognition, pp. 107332, 2020.
225
+
226
+ Aleksander Madry, Aleksandar Makelov, Ludwig Schmidt, Dimitris Tsipras, and Adrian Vladu. Towards deep learning models resistant to adversarial attacks. In ICLR, 2018.
227
+
228
+ Seyed-Mohsen Moosavi-Dezfooli, Alhussein Fawzi, Omar Fawzi, and Pascal Frossard. Universal adversarial perturbations. In CVPR, 2017.
229
+
230
+ Luis Munoz-Gonz ˜ alez, Battista Biggio, Ambra Demontis, Andrea Paudice, Vasin Wongrassamee, ´ Emil C Lupu, and Fabio Roli. Towards poisoning of deep learning algorithms with back-gradient optimization. In AISec, 2017.
231
+
232
+ Yuval Netzer, Tao Wang, Adam Coates, Alessandro Bissacco, Bo Wu, and Andrew Y Ng. Reading digits in natural images with unsupervised feature learning. 2011.
233
+
234
+ Omkar M Parkhi, Andrea Vedaldi, and Andrew Zisserman. Deep face recognition. 2015.
235
+
236
+ NhatHai Phan, Yue Wang, Xintao Wu, and Dejing Dou. Differential privacy preservation for deep auto-encoders: an application of human behavior prediction. In AAAI, 2016.
237
+
238
+ NhatHai Phan, Xintao Wu, Han Hu, and Dejing Dou. Adaptive laplace mechanism: Differential privacy preservation in deep learning. In ICDM, 2017.
239
+
240
+ Vinay Uday Prabhu and Abeba Birhane. Large image datasets: A pyrrhic win for computer vision? arXiv preprint arXiv:2006.16923, 2020.
241
+
242
+ Olga Russakovsky, Jia Deng, Hao Su, Jonathan Krause, Sanjeev Satheesh, Sean Ma, Zhiheng Huang, Andrej Karpathy, Aditya Khosla, Michael Bernstein, Alexander C. Berg, and Li Fei-Fei. ImageNet Large Scale Visual Recognition Challenge. International Journal of Computer Vision, 115(3): 211–252, 2015.
243
+
244
+ Ali Shafahi, W Ronny Huang, Mahyar Najibi, Octavian Suciu, Christoph Studer, Tudor Dumitras, and Tom Goldstein. Poison frogs! targeted clean-label poisoning attacks on neural networks. In NeurIPS, 2018.
245
+
246
+ Shawn Shan, Emily Wenger, Jiayun Zhang, Huiying Li, Haitao Zheng, and Ben Y Zhao. Fawkes: Protecting personal privacy against unauthorized deep learning models. In USENIX-Security, 2020.
247
+
248
+ Reza Shokri and Vitaly Shmatikov. Privacy-preserving deep learning. In SIGSAC, 2015.
249
+
250
+ Reza Shokri, Marco Stronati, Congzheng Song, and Vitaly Shmatikov. Membership inference attacks against machine learning models. In SP, 2017.
251
+
252
+ Karen Simonyan and Andrew Zisserman. Very deep convolutional networks for large-scale image recognition. arXiv preprint arXiv:1409.1556, 2014.
253
+
254
+ 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.
255
+
256
+ Christian Szegedy, Sergey Ioffe, Vincent Vanhoucke, and Alex Alemi. Inception-v4, inception-resnet and the impact of residual connections on learning. arXiv preprint arXiv:1602.07261, 2016.
257
+
258
+ Yaniv Taigman, Ming Yang, Marc’Aurelio Ranzato, and Lior Wolf. Deepface: Closing the gap to human-level performance in face verification. In CVPR, 2014.
259
+
260
+ Alexander Turner, Dimitris Tsipras, and Aleksander Madry. Clean-label backdoor attacks. 2018.
261
+
262
+ Haohan Wang, Xindi Wu, Zeyi Huang, and Eric P Xing. High-frequency component helps explain the generalization of convolutional neural networks. In CVPR, 2020a.
263
+
264
+ Xin Wang, Jie Ren, Shuyun Lin, Xiangming Zhu, Yisen Wang, and Quanshi Zhang. A unified approach to interpreting and boosting adversarial transferability. arXiv preprint arXiv:2010.04055, 2020b.
265
+
266
+ Yisen Wang, Xingjun Ma, James Bailey, Jinfeng Yi, Bowen Zhou, and Quanquan Gu. On the convergence and robustness of adversarial training. In ICML, 2019.
267
+
268
+ Yisen Wang, Difan Zou, Jinfeng Yi, James Bailey, Xingjun Ma, and Quanquan Gu. Improving adversarial robustness requires revisiting misclassified examples. In ICLR, 2020c.
269
+
270
+ Dongxian Wu, Yisen Wang, Shu-Tao Xia, James Bailey, and Xingjun Ma. Skip connections matter: On the transferability of adversarial examples generated with resnets. In ICLR, 2020a.
271
+
272
+ Dongxian Wu, Shu-Tao Xia, and Yisen Wang. Adversarial weight perturbation helps robust generalization. NeurIPS, 33, 2020b.
273
+
274
+ Chaofei Yang, Qing Wu, Hai Li, and Yiran Chen. Generative poisoning attack method against neural networks. arXiv preprint arXiv:1703.01340, 2017.
275
+
276
+ Dong Yi, Zhen Lei, Shengcai Liao, and Stan Z Li. Learning face representation from scratch. arXiv preprint arXiv:1411.7923, 2014.
277
+
278
+ Sangdoo Yun, Dongyoon Han, Seong Joon Oh, Sanghyuk Chun, Junsuk Choe, and Youngjoon Yoo. Cutmix: Regularization strategy to train strong classifiers with localizable features. In ICCV, 2019.
279
+
280
+ Hongyang Zhang, Yaodong Yu, Jiantao Jiao, Eric Xing, Laurent El Ghaoui, and Michael Jordan. Theoretically principled trade-off between robustness and accuracy. In ICML, 2019.
281
+
282
+ Hongyi Zhang, Moustapha Cisse, Yann N Dauphin, and David Lopez-Paz. mixup: Beyond empirical risk minimization. In ICLR, 2018a.
283
+
284
+ Sheng Zhang, Xiaodong Liu, Jingjing Liu, Jianfeng Gao, Kevin Duh, and Benjamin Van Durme. Record: Bridging the gap between human and machine commonsense reading comprehension. arXiv preprint arXiv:1810.12885, 2018b.
285
+
286
+ Shihao Zhao, Xingjun Ma, Xiang Zheng, James Bailey, Jingjing Chen, and Yu-Gang Jiang. Cleanlabel backdoor attacks on video recognition models. In CVPR, 2020.
287
+
288
+ # A ALGORITHM OF ERROR-MINIMIZATION GENERATION
289
+
290
+ # Algorithm 1 Error-minimizing Perturbations
291
+
292
+ 1: Input: Source Model $\theta$ , Perturbations $\delta , L _ { p } \epsilon , ( \pmb { x } , y ) \in D _ { c }$ , Stop Error $\lambda$ , Optimization steps M
293
+ 2: Output: δ
294
+ 3: repeat
295
+ 4: for $m$ in $1 \cdots M$ do
296
+ 5: $i , \pmb { x } _ { i } , y _ { i } = \mathrm { N e x t } ( \pmb { x } , y )$
297
+ 6: if sample-wise then
298
+ 7: $\delta \stackrel { \cdot } { = } \delta _ { i }$
299
+ 8: else if class-wise then
300
+ 9: δ = δyi
301
+ 10: end if
302
+ 11: $\mathrm { O p t i m i z e } ( x _ { i } + \delta , y _ { i } , \theta )$
303
+ 12: end for
304
+ 13: for $\begin{array} { l } { { \pmb x } _ { j } , y _ { j } \ \mathbf { i n } \ x , y \ \mathbf { d o } } \\ { \delta = \mathrm { P e r t u r b a t i o n } ( x _ { i } , y _ { i } , \theta , \delta ) } \\ { \mathrm { C i l p } ( \delta , - \epsilon , \epsilon ) } \end{array}$
305
+ 14: . Follow Equation 3
306
+ 15:
307
+ 16: end for
308
+ 17: $e r r o r = \mathrm { E v a l } ( x , y , \delta , \theta )$
309
+ 18: until error $< \lambda$
310
+
311
+ # B MORE EXPERIMENT SETTING
312
+
313
+ For all experiments, we use $L _ { p }$ -norm with to regularize the imperceptibility, $\epsilon = 8 / 2 5 5$ for CIFAR and SVHN, $\epsilon = 1 6 / 2 5 5$ for ImageNet, different $\epsilon$ is used in Appendix D for additional understandings. The iterative steps $T$ for Equation 3 is set to 20 steps for sample-wise noise and 1 for class-wise, $\alpha$ is set to $\epsilon / 1 0$ . Since the class-wise noise is generated universally for each class, small iterative steps avoid overfitting to the specific example. For the class-wise experiments, we only use $20 \%$ of the training data $\mathcal { D } _ { c }$ to generate the noise $\pmb { \delta }$ and apply to entire training dataset $\mathcal { D } _ { c } \to \mathcal { D } _ { u }$ . The stop condition error rate is $\lambda = 0 . 1$ for $\Delta _ { c }$ and $\lambda = 0 . 0 1$ for $\Delta _ { s }$ . For SVHN and CIFAR-10, we set the $M = 1 0$ for CIFAR-10, $M = 2 0$ for CIFAR-100 and $M = 1 0 0$ for ImageNet in the mini-setting. For all models and experiments, we use the Stochastic Gradient Descent (SGD) (LeCun et al., 1998) optimizer with momentum 0.9, initial learning rate 0.025 and cosine scheduler (Loshchilov & Hutter, 2017) without the restart. We train all DNN models for 30 epochs on SVHN, 60 epochs on CIFAR-10, 100 epochs on CIFAR-100 and ImageNet. To generated fully unlearnable setting CIFAR-10 dataset, the computational cost is roughly $10 \%$ of the standard model training time for class-wise noise and $60 \%$ of standard model training time for sample-wise noise. Overall, the cost of generating unlearnable examples is far less than training a model on the data to be protected.
314
+
315
+ # C STABILITY ANALYSIS
316
+
317
+ ![](images/9339f032ff7082f5b5f2000a73d6a94bb472541eb95b36ec9b54a21c3252774f.jpg)
318
+ Figure 5: Prediction confusion matrix (on the clean test set) of two RN-18s trained on CIFAR-10 with the unlearnable classes in bold by (a) sample-wise or (b) class-wise error-minimizing noise.
319
+
320
+ # D RESISTANCE TO DATA AUGMENTATION AND ADVERSARIAL TRAINING
321
+
322
+ Resistance to Data Augmentation. Another important property of the unlearnable examples created by error-minimizing noise is its resistance to data augmentations. Since standard data augmentation techniques like random shift, crop, flip and rotation have already been applied in previous experiments, here we consider 4 more advanced data augmentation techniques: Cutout (DeVries & Taylor, 2017), Mixup (Zhang et al., 2018a), Cutmix (Yun et al., 2019) and Fast Au
323
+
324
+ Table 3: Clean test accuracy of RN-18 models trained on unlearnable CIFAR-10 with Cutout, Mixup, Cutmix and FA. Test accuracy of RN-18 trained on the clean CIFAR-10 is $9 4 . 9 5 \%$ .
325
+
326
+ <table><tr><td>Noise</td><td>Cutout</td><td>Mixup</td><td>CutMix</td><td>FA</td></tr><tr><td>△s</td><td>19.30</td><td>58.51</td><td>22.40</td><td>42.70</td></tr><tr><td>△c</td><td>14.62</td><td>17.63</td><td>16.19</td><td>22.89</td></tr></table>
327
+
328
+ toaugment (FA) (Lim et al., 2019). For Cutout, we set the cutout length to 16 pixels. For Mixup, we apply linear mixup of random pairs of training examples and their labels during the standard training process. For Cutmix, we apply linear mixup on the cutout region. For FA, we use the fixed augmentation policy, which consists of change contrast, brightness, sharpness, rotations and cutout. It is observed that advanced data augmentation techniques including Cutout, Mixup, Cutmix and FA can indeed remove the sample-wise noise to some extent, but far less effective on class-wise noise.
329
+
330
+ Adversarial Training. We also consider the Adversarial Training (AdvTrain), which is an augmentation based defence method against error-maximizing noise (Goodfellow et al., 2014; Madry et al., 2018). AdvTrain has been shown can effectively remove the non-robust features from the input and force the model to learn only the robust features (Ilyas et al., 2019). Compared to data augmentation techniques, adversarial training as a type of robust training technique is indeed more effective against both sample-wise and class-wise noise. However, adversarial training is known to suffer from a trade-off between robustness and accuracy (Zhang et al., 2019). For example, adversarial training only achieved $85 \%$ accuracy on the unlearnable CIFAR-10, there is still a roughly $10 \%$ $9 4 . 9 5 \%$ vs $8 5 \%$ ) performance drop compared to standard training on the clean CIFAR-10. Moreover, due to the difficulty of min-max optimization, current adversarial training methods are still limited to small error-maximizing noise. To test this, we fix the maximum adversarial perturbation used by adversarial training to $8 / 2 5 5$ , while increasing the perturbation of error-minimizing noise to $\epsilon = 2 4 / 2 5 5$ . Note that adversarial training with perturbation $1 6 / 2 5 5$ or $2 4 / 2 5 5$ still suffers from convergence issues, even on small datasets like CIFAR-10. The results are shown in Figure 6. As can be confirmed, the clean test accuracy will drop to $79 \%$ on $\epsilon = 2 4 / 2 5 5$ error-minimizing noise.
331
+
332
+ The above results indicate that 1) error-minimizing noise is resistant to standard data filtering especially the class-wise noise; 2) although it is less resistant to adversarial training, the model’s performance can still be significantly compromised by our error-minimizing noise noise. In future works, it is possible to develop more advanced unlearnable examples that can further decrease the performance of adversarial training. We believe our method can be improved by crafting the noise based on only the robust features, since adversarial training forces the model to learn only robust features (Ilyas et al., 2019).
333
+
334
+ ![](images/e5ad7003fdeac70441ef3108613b7a96272cfb2970f59f9a2d9fe50f1dda3b17.jpg)
335
+ Figure 6: Clean test accuracy of adversarially trained RN-18 on unlearnable CIFAR-10 by different sizes () of error-minimizing noise, and the dashed line indicates the performance of RN-18 trained on clean CIFAR-10.
336
+
337
+ # E CLASS-WISE NOISE TRANSFER FROM IMAGENET TO CIFAR-10
338
+
339
+ Table 4: Detailed class mapping from ImageNet classes to CIFAR-10 classes. This mapping is used for the second transfer experiment in Section 4.4.
340
+
341
+ <table><tr><td>CIFAR-10 Class</td><td>ImageNet Class</td></tr><tr><td>Airplane</td><td>Airliner</td></tr><tr><td>Car</td><td>Wagon</td></tr><tr><td>Bird</td><td>Humming Bird</td></tr><tr><td>Cat</td><td>Siamese Cat</td></tr><tr><td>Deer</td><td>Ox</td></tr><tr><td>Dog</td><td>Golden Retriever</td></tr><tr><td>Frog</td><td>Tailed Frog</td></tr><tr><td>Horse</td><td>Zebra</td></tr><tr><td></td><td></td></tr><tr><td>Ship Truck</td><td>Container Ship Trailer Truck</td></tr></table>
342
+
343
+ # F FLEXIBILITY ANALYSIS OF ERROR-MINIMIZING NOISE
344
+
345
+ Here, we focus on the class-wise error-minimizing noise and further explore its flexibility from two perspectives: 1) effectiveness when applied to smaller patches rather than the entire image; and 2) effectiveness of two sets of mixed class-wise noise. These experiments are also conducted with RN-18 on the CIFAR-10 dataset. For all the error-minimizing noise, we fix the maximum perturbation to $\epsilon = 8 / 2 5 5$ .
346
+
347
+ Table 5: Clean test accuracy of RN-18 models trained on unlearnable CIFAR-10 by either small patch noise applied at random location or a mixture of two type of noises.
348
+
349
+ <table><tr><td rowspan="2">Methods</td><td colspan="4">Patch Size</td><td colspan="2">Noise Mixture</td></tr><tr><td>8×8</td><td>16 ×16</td><td>24×24</td><td>32×32</td><td>△c1 V△c2</td><td>△c1+△u</td></tr><tr><td>Standard Training</td><td>87.23</td><td>19.19</td><td>26.42</td><td>16.42</td><td>25.41</td><td>14.94</td></tr><tr><td>Fast Autoaugment</td><td>90.66</td><td>36.69</td><td>50.60</td><td>22.89</td><td>56.20</td><td>30.40</td></tr></table>
350
+
351
+ Effectiveness on Smaller Patches. The unlearnable example can be very flexible and hard to be detected if the noise remains effective on smaller patches. To test this, we set the patch size to $3 2 \times 3 2$ , $2 4 \times 2 4$ , $1 6 \times 1 6$ and $8 \times 8$ (CIFAR-10 image size is $3 2 \times 3 2$ ). During the noise generation process when solving equation Equation 2, a random patch is selected and perturbed in each perturbation step and for each training example. Once a class-wise patch noise is generated, it then attached to a randomly selected location of a training example. The effectiveness of small patch noise is reported in Table 5. The effectiveness is still very high for patch size as small as $1 6 \times 1 6$ , although it is indeed decreased on smaller patches. An interesting observation is that the FA augmentation becomes less effective on $1 6 \times 1 6$ noise than $2 4 \times 2 4$ noise. We suspect this is because smaller patch noise can more easily escape the augmentation operations and stays unchanged after the augmentation.
352
+
353
+ Effectiveness of Mixed Noises. We conduct this mix noise to simulate two possible real-world scenarios: 1) different users apply different noise apply to their own data; or 2) one set of noise is exposed and upgraded to a new set of noise. In this experiment, we apply the noise on the full image. We repeat the class-wise noise generation twice and generate two sets of noise: $\Delta _ { c 1 }$ and $\Delta _ { c 2 }$ For each CIFAR-10 training example, we randomly apply one of the above two class-wise noise to create unlearnable example. We note this mixture by $\Delta _ { c 1 } \lor \Delta _ { c 2 }$ . Note that the class-wise mixture will eventually become the sample-wise noise if we keep mixing more class-wise noise sets. We also perform another mixture between $\Delta _ { c 1 }$ and a random noise $\Delta _ { u }$ sampled from $[ - \epsilon , \epsilon ]$ mixed by element-wise addition. We denote this mixture by $\Delta _ { c 1 } + \Delta _ { u }$ . The effectiveness of mixed noise is also reported in Table 5. For both mixtures, the proposed error-minimizing noise remains highly effective, although there is a slight decrease. Surprisingly, the mixture of one class-wise noise with random noise is even more effective than the mixture of two class-wise noise, especially against the FA data augmentation. This makes the error-minimizing noise even more flexible in practical usage.
354
+
355
+ ![](images/b78d5f599a2a5243774f4fa367895301dc3c51d1586b80748d23de3bf0882ce4.jpg)
356
+
357
+ (a) Partially Unlearnable Setting. Evaluated on WebFace test set against different identities.
358
+
359
+ ![](images/a6821f10328fabeefb16c3e392a5f302a7be8973cb6a7f4c9505cad5eea9844f.jpg)
360
+ (b) Fully Unlearnable Setting. Evaluated on LFW using unlearnable and clean training data.
361
+ Figure 7: Results on face verification: the Receiver Operating Characteristic (ROC) of two InceptionResNet models trained on partially unlearnable WebFace (left) and fully unlearnable WebFace (right). The ROC curves in the left plot are computed based on the clean WebFace test set while the ones in the right plot are computed based on LFW. Both Inception-ResNet models are trained as classifiers and tested as feature extractors. Clean: clean identities; Unlearnable: unlearnable identities. Partially Unlearnable Setting: 50 out of 10,575 identities are unlearnable.
362
+
363
+ # H CLASS-WISE NOISE VS. BACKDOOR ATTACK
364
+
365
+ ![](images/cd71f68220d4b55f881ce75d33e321974d6dbbadf91d45a3a186debfcdf6253d.jpg)
366
+ Figure 8: Backdoor attack success rates when 3 types of class-wise noises including random, errormaximizing and error-minimizing noise are applied as the backdoor triggers. The x-axis shows 6 RN-18 models trained on CIFAR-10 training set with different percentages of the data were poisoned by the class-wise noise. The y-axis shows the attack success rate: the percentage of all non-target class test images are predicted to the target class when attached with the target-class class-wise noise.
367
+
368
+ Here, we test if class-wise noise can be used as a trigger for the backdoor attack. Figure 8 shows the backdoor attack success rate when different types of class-wise noises are applied as the backdoor trigger. At the training time, we train RN-18 models on CIFAR-10 with $0 \% { - } 1 0 0 \%$ of the training samples were made unlearnable by three types of class-wise noise: random noise, error-minimizing and our error-maximizing noise. At the test (attack) time, we compute the attack success rate as follows. There are 6 models for each type of class-wise corresponding the 6 unlearnable percentages. For each type of class-wise noise and each RN-18 model, we iteratively take a clean test image from the CIFAR-10 test set, then randomly select a target class (which is different from the true class of the test image). Then, we attach the target class class-wise noise to the clean test image. If the new test image is predicted by the model as the target class, then the attack is successful.
369
+
370
+ As shown in Figure 8, the class-wise error-maximizing (adversarial) noise is a highly effective trigger for backdoor attack, yet neither random nor our error-minimizing noise can be considered to be effective. The error-maximizing can achieve more than $7 5 \%$ attack success rate when only applied to $20 \%$ the training data. To achieve a similar level of attack success rate, both random and our error-minimizing noise should be added to at least $80 \%$ of the training data. This indicates that our method is different from backdoor attacks. The high attack success rate of adversarial noise may due to the fact that adversarial examples are hard (high error) examples, which force the model to pay more attention to the examples and remember more of the adversarial noise. Note that adversarial perturbations have also been used in backdoor research to enhance backdoor triggers (Turner et al., 2018; Zhao et al., 2020).
371
+
372
+ # I DIFFERENT GENERALIZATION METHODS FOR ERROR-MINIMIZATION NOISE
373
+
374
+ The proposed error-minimizing noise is generated using PGD. Specifically, PGD is applied to solve the inner minimization problem in Equation 2. Since it is a typical constrained optimization problem, it can also be solved by other optimization (attack) methods such as FGSM (Goodfellow et al., 2014), L-BFGS (Szegedy et al., 2013) and C&W (Carlini & Wagner, 2017). However, the objective needs to be reformulated to apply some of these attacks. Here, we take L-BFGS (Szegedy et al., 2013) as an example to reformulate and solve the inner minimization problem in Equation 2. In (Szegedy et al., 2013), the adversarial attack problem is formulated as:
375
+
376
+ $$
377
+ \begin{array} { r l } { \mathrm { m i n i m i z e } } & { { } c \left\| \pmb { \delta } \right\| _ { p } + \mathcal { L } ( \pmb { x } + \pmb { \delta } , \pmb { y } ^ { \prime } ) \quad \pmb { y } ^ { \prime } \neq \pmb { y } } \end{array}
378
+ $$
379
+
380
+ where $c$ is a hyperparameter and the $\mathcal { L }$ is the objective function (e.g. the cross entropy adversarial loss). This form has been extended to other objective functions in C&W (Carlini & Wagner, 2017). The main objective of adversarial attack is to find small $L _ { p }$ (i.e. $\| \cdot \| _ { p } )$ bounded noise $\delta$ that can trick the model to output a wrong label $y ^ { \prime } \ne y$ . For unlearnable examples, we want to trick the model to predict the correct label $y$ with the highest confidence (i.e. lowest error). Following Equation 4, the inner minimization problem in Equation 2 can be reformulated as:
381
+
382
+ $$
383
+ \begin{array} { r l } { \operatorname * { m i n i m i z e } } & { { } c \left\| \pmb { \delta } \right\| _ { 2 } ^ { 2 } + \mathcal { L } ( \pmb { x } + \pmb { \delta } , y ) . } \end{array}
384
+ $$
385
+
386
+ We set $c = 1 . 0$ and use the cross entropy loss for $\mathcal { L }$ . We apply $\mathrm { L }$ -BFGS to solve Equation 5 using Adam (Kingma & Ba, 2015) optimizer and generate sample-wise noise $\Delta _ { s }$ on CIFAR-10. The number of optimization steps for Equation 5 is set to $T = 2 0 0$ , while the number of optimization steps for the outer minimization in Equation 2 is set to $M = 1 0 0$ (see more details about $T$ and $M$ in Section 3.2). As shown in Figure 9, error-minimizing noise can also be generated using L-BFGS, and the noise is very effective in making the training examples unlearnable. However, compared to PGD, L-BFGS is slightly less effective.
387
+
388
+ ![](images/d0ba78efd35c9e06a14659ae76aab0f95416bc1586ce53c2fee5a903ca8476cc.jpg)
389
+ Figure 9: The unlearnable effectiveness of different types of noises on CIFAR-10 dataset: random, error-maximizing (adversarial), error-minimizing noise generated using PGD and error-minimizing noise generated using L-BFGS. The lower the clean test accuracy the more effective the noise in making training examples unlearnable. This is tested in the $100 \%$ unlearnable setting with the sample-wise noise.
md/train/o966_Is_nPA/o966_Is_nPA.md ADDED
@@ -0,0 +1,415 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # NEURAL PRUNING VIA GROWING REGULARIZATION
2
+
3
+ Huan Wang, Can Qin, Yulun Zhang∗, Yun Fu Northeastern University, Boston, MA, USA {wang.huan, qin.ca}@northeastern.edu, yulun100@gmail.com, yunfu@ece.neu.edu
4
+
5
+ # ABSTRACT
6
+
7
+ Regularization has long been utilized to learn sparsity in deep neural network pruning. However, its role is mainly explored in the small penalty strength regime. In this work, we extend its application to a new scenario where the regularization grows large gradually to tackle two central problems of pruning: pruning schedule and weight importance scoring. (1) The former topic is newly brought up in this work, which we find critical to the pruning performance while receives little research attention. Specifically, we propose an $L _ { 2 }$ regularization variant with rising penalty factors and show it can bring significant accuracy gains compared with its one-shot counterpart, even when the same weights are removed. (2) The growing penalty scheme also brings us an approach to exploit the Hessian information for more accurate pruning without knowing their specific values, thus not bothered by the common Hessian approximation problems. Empirically, the proposed algorithms are easy to implement and scalable to large datasets and networks in both structured and unstructured pruning. Their effectiveness is demonstrated with modern deep neural networks on the CIFAR and ImageNet datasets, achieving competitive results compared to many state-of-the-art algorithms. Our code and trained models are publicly available at https://github.com/mingsuntse/regularization-pruning.
8
+
9
+ # 1 INTRODUCTION
10
+
11
+ As deep neural networks advance in recent years LeCun et al. (2015); Schmidhuber (2015), their remarkable effectiveness comes at a cost of rising storage, memory footprint, computing resources and energy consumption Cheng et al. (2017); Deng et al. (2020). Neural network pruning Han et al. (2015; 2016); Li et al. (2017); Wen et al. (2016); He et al. (2017); Gale et al. (2019) is deemed as a promising force to alleviate this problem. Since its early debut Mozer & Smolensky (1989); Reed (1993), the central problem of neural network pruning has been (arguably) how to choose weights to discard, i.e., the weight importance scoring problem LeCun et al. (1990); Hassibi & Stork (1993); Molchanov et al. (2017b; 2019); Wang et al. (2019a); He et al. (2020).
12
+
13
+ The approaches to the scoring problem generally fall into two groups: importance-based and regularization-based Reed (1993). The former focuses on directly proposing certain theoretically sound importance criterion so that we can prune the unimportant weights once for all. Thus, the pruning process is typically one-shot. In contrast, regularization-based approaches typically select unimportant weights through training with a penalty term Han et al. (2015); Wen et al. (2016); Liu et al. (2017). However, the penalty strength is usually maintained in a small regime to avoid damaging the model expressivity. Whereas, a large penalty strength can be helpful, specifically in two aspects. (1) A large penalty can push unimportant weights rather close to zero, then the pruning later barely hurts the performance even if the simple weight magnitude is adopted as criterion. (2) It is well-known that different weights of a neural network lie on the regions with different local quadratic structures, i.e., Hessian information. Many methods try to tap into this to build a more accurate scoring LeCun et al. (1990); Hassibi & Stork (1993); Wang et al. (2019a); Singh & Alistarh (2020). However, for deep networks, it is especially hard to estimate Hessian. Sometimes, even the computing itself can be intractable without resorting to proper approximation Wang et al. (2019a). On this problem, we ask: Is it possible to exploit the Hessian information without knowing their specific values? This is the second scenario where a growing regularization can help. We will show under a growing regularization, the weight magnitude will naturally separate because of their different underlying local quadratic structure, therein we can pick the unimportant weights more faithfully even using the simple magnitude-based criterion. Corresponding to these two aspects, we will present two algorithms based on a growing $L _ { 2 }$ regularization paradigm, in which the first highlights a better pruning schedule1 and the second explores a better pruning criterion.
14
+
15
+ Our contributions. (1) We propose a simple yet effective growing regularization scheme, which can help transfer the model expressivity to the remaining part during pruning. The encouraging performance inspires us that the pruning schedule may be as critical as the weight importance criterion and deserve more research attention. (2) We further adopt growing regularization to exploit Hessian implicitly, without knowing their specific values. The method can help choose the unimportant weights more faithfully with a theoretically sound basis. In this regard, our paper is the first to show the connection between magnitude-based pruning and Hessian-based pruning, pointing out that the latter can be turned into the first one through our proposed growing regularization scheme. (3) The proposed two algorithms are easy to implement and scalable to large-scale datasets and networks. We show their effectiveness compared with many state-of-the-arts. Especially, the methods can work seamlessly for both filter pruning and unstructured pruning.
16
+
17
+ # 2 RELATED WORK
18
+
19
+ Regularization-based pruning. The first group of relevant works is those applying regularization to learn sparsity. The most famous probably is to use $L _ { 0 }$ or $L _ { 1 }$ regularization Louizos et al. (2018); Liu et al. (2017); Ye et al. (2018) due to their sparsity-inducing nature. In addition, the common $L _ { 2 }$ regularization is also explored for approximated sparsity Han et al. (2015; 2016). The early papers focus more on unstructured pruning, which is beneficial to model compression yet not to acceleration. For structured pruning in favor of acceleration, Group-wise Brain Damage Lebedev & Lempitsky (2016) and SSL Wen et al. (2016) propose to use Group LASSO Yuan & Lin (2006) to learn regular sparsity, where the penalty strength is still kept in small scale because the penalty is uniformly applied to all the weights. To resolve this, Ding et al. (2018) and Wang et al. (2019c) propose to employ different penalty factors for different weights, enabling large regularization.
20
+
21
+ Importance-based pruning. Importance-based pruning tries to establish certain advanced importance criteria that can reflect the true relative importance among weights as faithfully as possible. The pruned weights are usually decided immediately by some proposed formula instead of by training (although the whole pruning process can involve training, e.g., iterative pruning). The most widely used criterion is the magnitude-based: weight absolute value for unstructured pruningHan et al. (2015; 2016) or $L _ { 1 } / L _ { 2 }$ -norm for structured pruning Li et al. (2017). This heuristic criterion was proposed a long time ago Reed (1993) and has been argued to be inaccurate. In this respect, improvement mainly comes from using Hessian information to obtain a more accurate approximation of the increased loss when a weight is removed LeCun et al. (1990); Hassibi & Stork (1993). Hessian is intractable to compute for large networks, so some methods (e.g., EigenDamage Wang et al. (2019a), WoodFisher Singh & Alistarh (2020)) employ cheap approximation (such as K-FAC Fisher Martens & Grosse (2015)) to make the 2nd-order criteria tractable on deep networks.
22
+
23
+ Note that, there is no a hard boundary between the importance-based and regularization-based. Many papers present their schemes in the combination of the two Ding et al. (2018); Wang et al. (2019c). The difference mainly lies in their emphasis: Regularization-based method focuses more on an advanced penalty scheme so that the subsequent pruning criterion can be simple; while the importance-based one focus more on an advanced importance criterion itself. Meanwhile, regularization paradigm always involves iterative training, while the importance-based can be one-shot LeCun et al. (1990); Hassibi & Stork (1993); Wang et al. (2019a) (no training for picking weights to prune) or involve iterative training Molchanov et al. (2017b; 2019); Ding et al. (2019a;b).
24
+
25
+ Other model compression methods. Apart from pruning, there are also many other model compression approaches, e.g., quantization Courbariaux & Bengio (2016); Courbariaux et al. (2016); Rastegari et al. (2016), knowledge distillation Bucilua et al. ˇ (2006); Hinton et al. (2014), lowrank decomposition Denton et al. (2014); Jaderberg et al. (2014); Lebedev et al. (2014); Zhang et al. (2015), and efficient architecture design or search Howard et al. (2017); Sandler et al. (2018); Howard et al. (2019); Zhang et al. (2018); Tan & Le (2019); Zoph & Le (2017); Elsken et al. (2019). They are orthogonal to network pruning and can work with the proposed methods to compress more.
26
+
27
+ # 3 PROPOSED METHOD
28
+
29
+ # 3.1 PROBLEM FORMULATION
30
+
31
+ Pruning can be formulated as a transformation $T ( * )$ that takes a pretrained big model w as input and output a small model $\mathbf { w } _ { 1 }$ , typically followed by a fine-tuning process $F ( * )$ , which gives us the final output $\mathbf { w } _ { 2 } = F ( \mathbf { w } _ { 1 } )$ . We do not focus on $F ( * )$ since it is simply a standard neural network training process, but focus on the process of $\mathbf { w } _ { 1 } = T ( \mathbf { w } )$ . The effect of pruning can be further specified into two sub-transformations: (1) $M = T _ { 1 } ( \mathbf { w } )$ , which obtains a binary mask vector $M$ that decides which weights will be removed; (2) $T _ { 2 } ( \mathbf { w } )$ , which adjusts the values of remaining weights. That is,
32
+
33
+ $$
34
+ \mathbf { w } _ { 1 } = T ( \mathbf { w } ) = T _ { 1 } ( \mathbf { w } ) \odot T _ { 2 } ( \mathbf { w } ) = M \odot T _ { 2 } ( \mathbf { w } ) .
35
+ $$
36
+
37
+ For one-shot pruning, there is no iterative training at $T _ { 1 }$ . It depends on a specific algorithm to decide whether to adjust the remaining weights. For example, OBD LeCun et al. (1990) and $L _ { 1 }$ - norm pruning Li et al. (2017) do not adjust the kept weights (i.e., $T _ { 2 }$ is the identity function) while OBS Hassibi & Stork (1993) does. For learning-based pruning, both $T _ { 1 }$ and $T _ { 2 }$ involve iterative training and the kept weights will always be adjusted.
38
+
39
+ In the following, we will present our algorithms in the filter pruning scenario since we mainly focus on model acceleration instead of compression in this work. Nevertheless, the methodology can seamlessly translate to the unstructured pruning case. The difference lies in how we define the weight group: For filter pruning, a 4-d tensor convolutional filter (or 2-d tensor for fully-connected layers) is regarded as a weight group, while for unstructured pruning, a single weight makes a group.
40
+
41
+ # 3.2 PRUNING SCHEDULE: GREG-1
42
+
43
+ Our first method (GReg-1) is a variant of $L _ { 1 }$ -norm pruning Li et al. (2017). It obtains the mask $M$ by $L _ { 1 }$ -norm sorting but adjusts the kept weights via regularization. Specifically, given a pre-trained model w and layer pruning ratio $r _ { l }$ , we sort the filters by $L _ { 1 }$ -norm and set the mask to zero for those with the least norms. Then, unlike Li et al. (2017) which removes the unimportant weights immediately (i.e., one-shot fashion), we impose a growing $L _ { 2 }$ penalty to drive them to zero first:
44
+
45
+ $$
46
+ \lambda _ { j } = \lambda _ { j } + \delta \lambda , j \in \{ j \mid M [ j ] = 0 \} ,
47
+ $$
48
+
49
+ where $\lambda _ { j }$ is the penalty factor for $j$ -th weight; $\delta \lambda$ is the granularity in which we add up the penalty. Clearly, a smaller $\delta \lambda$ means this regularization process smoother. Besides, $\lambda _ { j }$ is only updated every $K _ { u }$ iterations, which is a buffer time to let the network adapt to the new regularization. This algorithm is to explore whether the way we remove them (i.e., pruning schedule) leads to a difference given the same weights to prune. Simple as it is, the scheme can bring significant accuracy gains especially under a large pruning ratio (Tab. 1). Note that, we intentionally set $\delta \lambda$ the same for all the unimportant weights to keep the core idea simple. Natural extensions of using different penalty factors for different weights (such as those in Ding et al. (2018); Wang et al. (2019c)) may be worth exploring but out of the scope of this work.
50
+
51
+ When $\lambda _ { j }$ reaches a pre-set ceiling $\tau$ , we terminate the training and prune those with the least $L _ { 1 }$ - norms, then fine-tune. Notably, the pruning will barely hurt the accuracy since the unimportant weights have been compressed to typically less than $\frac { 1 } { 1 0 0 0 }$ the magnitude of remaining weights.
52
+
53
+ # 3.3 IMPORTANCE CRITERION: GREG-2
54
+
55
+ Our second algorithm is to further take advantage of the growing regularization scheme, not for pruning schedule but scoring. The training of neural networks is prone to overfitting, so regularization is normally employed. $L _ { 2 }$ regularization (or referred to as weight decay) is a standard technique for deep network training. Given a dataset $\mathcal { D }$ , model parameters $\mathbf { w }$ , the total loss will typically be
56
+
57
+ $$
58
+ \mathcal { E } ( \mathbf { w } , \mathcal { D } ) = \mathcal { L } ( \mathbf { w } , \mathcal { D } ) + \frac { 1 } { 2 } \lambda \| \mathbf { w } \| _ { 2 } ^ { 2 } ,
59
+ $$
60
+
61
+ where $\mathcal { L }$ is the task loss function. When the training converges, there should be
62
+
63
+ $$
64
+ \lambda w _ { i } ^ { * } + \frac { \partial \mathcal { L } } { \partial w _ { i } } | _ { w _ { i } = w _ { i } ^ { * } } = 0 ,
65
+ $$
66
+
67
+ where $\boldsymbol { w } _ { i } ^ { * }$ indicates the $i$ -th weight at its local minimum. Eq. (4) shows that, for each specific weight element, its equilibrium position is determined by two forces: loss gradient (i.e., guidance from the task) and regularization gradient (i.e., guidance from our prior). Our idea is to slightly increase the $\lambda$ to break the equilibrium and see how it results in a new one. A general impression is: If $\lambda$ goes a little higher, the penalty force will drive the weights further towards origin and it will not stop unless proper loss gradient comes to halt it and then a new equilibrium is reached at $\hat { w } _ { i } ^ { * }$ . Considering different weights have different scales, we define a ratio $r _ { i } = \hat { w } _ { i } ^ { * } / w _ { i } ^ { * }$ to describe how much the weight magnitude changes after increasing the penalty factor. Our interest lies in how the $r _ { i }$ differs from one another and how it relates to the underlying Hessian information.
68
+
69
+ Deep neural networks are well-known over-parameterized and highly non-convex. To obtain a feasible analysis, we adopt a local quadratic approximation of the loss function based on Taylor series expansion Strang (1991) following common practices LeCun et al. (1990); Hassibi & Stork (1993); Wang et al. (2019a). Then when the model is converged, the error $\mathcal { E }$ can be described by the converged weights $\mathbf { w } ^ { * }$ and the underlying Hessian matrix $\mathbf { H }$ (note $\mathbf { H }$ is p.s.d. since the model is converged). After increasing the penalty $\lambda$ by $\delta \lambda$ , the new converged weights can be proved to be
70
+
71
+ $$
72
+ \hat { \mathbf { w } } ^ { * } = ( \mathbf { H } + \delta \lambda \mathbf { I } ) ^ { - 1 } \mathbf { H } \mathbf { w } ^ { * } ,
73
+ $$
74
+
75
+ where $\mathbf { I }$ stands for the identity matrix. Here we meet with the common problem of estimating Hessian and its inverse, which are well-known to be intractable for deep neural networks. We explore two simplified cases to help us move forward.
76
+
77
+ (1) $\mathbf { H }$ is diagonal, which is a common simplification for Hessian LeCun et al. (1990), implying that the weights are independent of each other. For $w _ { i } ^ { * }$ with second derivative $h _ { i i }$ . With $L _ { 2 }$ penalty increased by $\delta \lambda$ $( \delta \lambda > 0 )$ , the new converged weights can be proved to be
78
+
79
+ $$
80
+ \hat { w } _ { i } ^ { * } = \frac { h _ { i i } } { h _ { i i } + \delta \lambda } w _ { i } ^ { * } , \Rightarrow r _ { i } = \frac { \hat { w } _ { i } ^ { * } } { w _ { i } ^ { * } } = \frac { 1 } { \delta \lambda / h _ { i i } + 1 } ,
81
+ $$
82
+
83
+ where $r _ { i } \in [ 0 , 1 )$ since $h _ { i i } \geq 0$ and $\delta \lambda > 0$ . As seen, larger $h _ { i i }$ results in larger $r _ { i }$ (closer to 1), meaning that the weight is relatively less moved towards the origin. Our second algorithm primarily builds upon this finding, which implies when we add a penalty perturbation to the converged network, the way that different weights respond can reflect their underlying Hessian information.
84
+
85
+ (2) In practice, we know $\mathbf { H }$ is rarely diagonal. How the dependency among weights affects the finding abovecase, namely, $\begin{array} { r } { \mathbf { w } ^ { * } = \binom { w _ { 1 } ^ { * } } { w _ { 2 } ^ { * } } , \mathbf { H } = \binom { h _ { 1 1 } h _ { 1 2 } } { h _ { 1 2 } h _ { 2 2 } } , \hat { \mathbf { H } } = \binom { h _ { 1 1 } + \delta \lambda } { h _ { 1 2 } } _ { h _ { 2 2 } + \delta \lambda } } \end{array}$ an in Eq. (5. The new c e explore the 2-derged weights can be analytically solved below, where the approximation equality is because that $\delta \lambda$
86
+
87
+ $$
88
+ \left\{ \hat { w } _ { 1 } ^ { * } \right\} = \frac { 1 } { | \hat { \mathbf { H } } | } \left\{ \begin{array} { l l } { ( h _ { 1 1 } h _ { 2 2 } + h _ { 1 1 } \delta \lambda - h _ { 1 2 } ^ { 2 } ) w _ { 1 } ^ { * } + \delta \lambda h _ { 1 2 } w _ { 2 } ^ { * } } \\ ( h _ { 1 1 } h _ { 2 2 } + h _ { 2 2 } \delta \lambda - h _ { 1 2 } ^ { 2 } ) w _ { 2 } ^ { * } + \delta \lambda h _ { 1 2 } w _ { 1 } ^ { * } \right\} \approx \frac { 1 } { | \hat { \mathbf { H } } | } \left\{ \begin{array} { l l } { ( h _ { 1 1 } h _ { 2 2 } + h _ { 1 1 } \delta \lambda - h _ { 1 2 } ^ { 2 } ) w _ { 1 } ^ { * } } \\ { ( h _ { 1 1 } h _ { 2 2 } + h _ { 2 2 } \delta \lambda - h _ { 1 2 } ^ { 2 } ) w _ { 2 } ^ { * } + \delta \lambda h _ { 1 2 } w _ { 1 } ^ { * } } \end{array} \right\} , \end{array}
89
+ $$
90
+
91
+ $$
92
+ \Rightarrow r _ { 1 } = \frac { 1 } { \left| \hat { \mathbf { H } } \right| } ( h _ { 1 1 } h _ { 2 2 } + h _ { 1 1 } \delta \lambda - h _ { 1 2 } ^ { 2 } ) , r _ { 2 } = \frac { 1 } { \left| \hat { \mathbf { H } } \right| } ( h _ { 1 1 } h _ { 2 2 } + h _ { 2 2 } \delta \lambda - h _ { 1 2 } ^ { 2 } ) .
93
+ $$
94
+
95
+ As seen, $h _ { 1 1 } > h _ { 2 2 }$ also leads to $r _ { 1 } > r _ { 2 }$ , in line with the finding above. The existence of weight dependency (i.e., the $h _ { 1 2 }$ ) actually does not affect the conclusion since it is included in both ratios.
96
+
97
+ These theoretical analyses show us that when the penalty is increased at the same pace, because of different local curvature structures, the weights actually respond differently – weights with larger curvature will be less moved. As such, the magnitude discrepancy among weights will be magnified as $\lambda$ grows. Ultimately, the weights will naturally separate (see Fig. 1 for an empirical validation). When the discrepancy is large enough, even the simple $L _ { 1 }$ -norm can make an accurate criterion. Notably, the whole process happens itself with the uniformly rising $L _ { 2 }$ penalty, no need to know the Hessian values, thus not bothered by any issue arising from Hessian approximation in relevant prior arts LeCun et al. (1990); Hassibi & Stork (1993); Wang et al. (2019a); Singh & Alistarh (2020).
98
+
99
+ In terms of the specific algorithm, all the penalty factor is increased at the same pace,
100
+
101
+ $$
102
+ \lambda _ { j } = \lambda _ { j } + \delta \lambda , { \mathrm { ~ f o r ~ a l l ~ } } j .
103
+ $$
104
+
105
+ # Algorithm 1 GReg-1 and GReg-2 Algorithms
106
+
107
+ 1: Input: Pre-trained model w, pruning ratio for $l$ -th layer $r _ { l } , l = 1 \sim L$ , original weight decay $\gamma$
108
+ 2: Input: Regularization ceiling $\tau$ , ceiling for picking $\cdot$ , interval $K _ { u } , K _ { s }$ , granularity $\delta \lambda$ .
109
+ 3: Init: Iteration $i = 0$ . $\lambda _ { j } = 0$ for all filter $j$ . Set kept filter indexes $S _ { l } ^ { k }$ to $\mathcal { D }$ for each layer $l$ .
110
+ 4: Init: Set pruned filter indexes $S _ { l } ^ { p }$ by $L _ { 1 }$ -norm sorting, set $S _ { l } ^ { p }$ to full set, for each layer $l$ .
111
+ 5: while $\lambda _ { j } \overset { \cdot } { \leq } \tau , j \in S _ { l } ^ { p }$ do
112
+ 6: if i % $K _ { u } = 0$ then
113
+ 7: if $\cdot$ and $\lambda _ { j } > \tau ^ { \prime } , j \in S _ { l } ^ { p }$ then
114
+ 8: Set $S _ { l } ^ { p }$ by $\cdot$ -norm scoring, $S _ { l } ^ { k }$ as the complementary set of $S _ { l } ^ { p }$ , for each layer $\cdot$ .
115
+ 9: end if
116
+ 10: $\lambda _ { j } = \lambda _ { j } + \delta \lambda$ for $j \in S _ { l } ^ { p }$ , $\lambda _ { j } = - \gamma$ for $j \in S _ { l } ^ { k }$ , for each layer $l$
117
+ 11: end if
118
+ 12: Weight update by stochastic gradient descent (where the regularization is enforced).
119
+ 13: $i = i + 1$ .
120
+ 14: end while
121
+ 15: Train for another $K _ { s }$ iterations to stabilize. Then prune by $L _ { 1 }$ -norms and get model $\mathbf { w } _ { 1 }$ .
122
+ 16: Fine-tune $\mathbf { w } _ { 1 }$ to regain accuracy.
123
+ 17: Output: Pruned model $\mathbf { w } _ { 2 }$ .
124
+
125
+ When $\lambda _ { j }$ reaches some ceiling $\tau ^ { \prime }$ , the magnitude gap turns large enough to let $L _ { 1 }$ -norm do scoring faithfully. After this, the procedures are similar to those in GReg-1: $\lambda$ for the unimportant weights are further increased. One extra step is to bring back the kept weights to the normal magnitude. Although they are the “survivors” during the previous competition under a large penalty, their expressivity are also hurt. To be exact, we adopt negative penalty factor for the kept weights to encourage them to recover. When the $\lambda$ for unimportant weights reaches the threshold $\tau$ (akin to that of GReg-1), the training is terminated. $L _ { 1 }$ -pruning is conducted and then fine-tune to regain accuracy. To this end, the proposed two algorithms can be summarized in Algorithm 1.
126
+
127
+ Pruning ratios. We employ pre-specified pruning ratios in this work to keep the core method neat (see Appendix for more discussion). Exploring layer-wise sensitivity is out of the scope of this work, but clearly any method that finds more proper pruning ratios can readily work with our approaches.
128
+
129
+ Discussion: differences from IncReg. Although our work shares a general spirit of growing regularization with IncReg Wang et al. (2019c;b), our work is actually starkly different from theirs in many axes:
130
+
131
+ • Motivation. The motivations for using the growing regularization are different. Wang et al. (2019c;b) adopt growing regularization to select the unimportant weights by training. Namely, they focus on the importance criterion problem. In contrast, we use growing regularization to investigate the pruning schedule problem (for GReg-1) or exploit the underlying Hessian information (for GReg-2). The importance criterion is simply $L _ { 1 }$ -norm.
132
+ Algorithm design. Wang et al. (2019c;b) assign different regularization factors to different weight groups based on their relative importance, while we assign them with the same factors. For GReg-1, this may not be a substantial difference, while for GReg-2, the difference is fundamental because the theoretical analysis of GReg-2 (Sec. 3.3) relies on the fact that regularization factors are kept the same for different weights.
133
+ Theoretical analysis. The algorithm in Wang et al. (2019c;b) is generally heuristic-based, while our work provides rigorous theoretical analyses (Sec. 3.3) to support the proposed algorithm GReg-2.
134
+ • Empirical performance. Both our methods are significantly better than Wang et al. (2019c;b) on the large-scale ImageNet dataset, which will be shown in the experiment section (Tab. 3).
135
+
136
+ Discussion: other regularization forms. The proposed methods in this work adopts $L _ { 2 }$ regularization. Here we discuss the possibility to generalize the method to other regularization forms ( $L 1$ and $L _ { 0 }$ ). (1) For GReg-1, it can be easily generalized to other regularization forms like $L _ { 1 }$ . For GReg-2, since the theoretical basis in Sec. 3.3 relies on the local quadratic approximation, $L _ { 2 }$ regularization meets this requirement while $L _ { 1 }$ does not. Therefore, GReg-2 cannot be (easily) generalized to the
137
+
138
+ Table 1: Comparison between pruning schedules: one-shot pruning vs. our proposed GReg-1. Each setting is randomly run for 3 times, mean and std accuracies reported.
139
+
140
+ <table><tr><td colspan="6">ResNet56 + CIFAR10: Baseline accuracy 93.36%, #Params: 0.8530M,FLOPs: 0.1255G</td></tr><tr><td>Pruning ratio r (%)</td><td>50</td><td>70</td><td>90</td><td>92.5</td><td>95</td></tr><tr><td>Sparsity (%)/ Speedup</td><td>49.82/1.99×</td><td>70.57/3.59×</td><td>90.39/11.41×</td><td>93.43/14.76×</td><td>95.19/19.31×</td></tr><tr><td>Acc.(%,L1+one-shot)</td><td>92.97±0.15</td><td>91.88±0.09</td><td>87.34±0.21</td><td>87.31±0.28</td><td>82.79±0.22</td></tr><tr><td>Acc.(%,GReg-1,ours)</td><td>93.06±0.09</td><td>92.23±0.21</td><td>89.49±0.23</td><td>88.39±0.15</td><td>85.97±0.16</td></tr><tr><td>Acc. gain (%)</td><td>0.09</td><td>0.35</td><td>2.15</td><td>1.08</td><td>3.18</td></tr><tr><td colspan="6">VGG19 + CIFAR100: Baseline accuracy 74.02%,#Params: 20.0812M,FLOPs: 0.3982G</td></tr><tr><td>Pruning ratio r (%)</td><td>50</td><td>60</td><td>70</td><td>80</td><td>90</td></tr><tr><td>Sparsity(%)/Speedup</td><td>74.87/3.60×</td><td>84.00/5.41×</td><td>90.98/8.84×</td><td>95.95/17.30×</td><td>98.96/44.22×</td></tr><tr><td>Acc.(%,L1+one-shot)</td><td>71.49±0.14</td><td>70.27±0.12</td><td>66.05±0.04</td><td>61.59±0.03</td><td>51.36±0.11</td></tr><tr><td>Acc.(%,GReg-1,ours)</td><td>71.50±0.12</td><td>70.33±0.12</td><td>67.35±0.15</td><td>63.55±0.29</td><td>57.09±0.03</td></tr><tr><td>Acc. gain (%)</td><td>0.01</td><td>0.06</td><td>1.30</td><td>1.96</td><td>5.73</td></tr></table>
141
+
142
+ $L _ { 1 }$ regularization as far as we can see currently. (2) For $L _ { 0 }$ regularization, it is well-known NP-hard.
143
+ In practice, it is typically converted to the $L _ { 1 }$ regularization case, which we just discussed.
144
+
145
+ # 4 EXPERIMENTAL RESULTS
146
+
147
+ Datasets and networks. We first conduct analyses on the CIFAR10/100 datasets Krizhevsky (2009) with ResNet56 He et al. (2016)/VGG19 Simonyan & Zisserman (2015). Then we evaluate our methods on the large-scale ImageNet dataset Deng et al. (2009) with ResNet34 and 50 He et al. (2016). For CIFAR datasets, we train our baseline models with accuracies comparable to those in the original papers. For ImageNet, we take the official PyTorch Paszke et al. (2019) pre-trained models2 as baseline to maintain comparability with other methods.
148
+
149
+ Training settings. To control the irrelevant factors as we can, for comparison methods that release their pruning ratios, we will adopt their ratios; otherwise, we will use our specified ones. We compare the speedup (measured by FLOPs reduction) since we mainly target model acceleration rather than compression. Detailed training settings (e.g., hyper-parameters and layer pruning ratios) are summarized in the Appendix.
150
+
151
+ # 4.1 RESNET56/VGG19 ON CIFAR-10/100
152
+
153
+ Pruning schedule: GReg-1. First, we explore the effect of different pruning schedules on the performance of pruning. Specifically, we conduct two sets of experiments for comparison: (1) prune by $L _ { 1 }$ -norm sorting and fine-tune Li et al. (2017) (shorted as $^ { \cdot \cdot } L _ { 1 } +$ one-shot”); (2) employ the proposed growing regularization scheme (“GReg-1”) and fine-tune. We use a uniform pruning ratio scheme here: Pruning ratio $r$ is the same for all $l$ -th conv layer (the first layer is not pruned following common practice Gale et al. (2019)). For ResNet56, since it has the residual addition restriction, we only prune the first conv layer in a block as previous works do Li et al. (2017). For comprehensive comparisons, the pruning ratios vary in a large spectrum, covering acceleration ratios from around $2 \times$ to $4 4 \times$ . Note that we do not intend to obtain the best performance here but systematically explore the effect of different pruning schedules, so we employ relatively simple settings (e.g., the uniform pruning ratios). For fair comparisons, the fine-tuning scheme (e.g., number of epochs, learning rate schedule, etc.) is the same for different methods. Therefore, the key comparison here is to see which method can deliver a better base model before fine-tuning.
154
+
155
+ The results are shown in Tab. 1. We have the following observations: (1) On the whole, the proposed GReg-1 consistently outperforms $L _ { 1 }$ +one-shot. It is important to reiterate that the two settings have exactly the same pruned weights, so the only difference is how they are removed. The accuracy gaps show that apart from importance scoring, pruning schedule is also a critical factor. In the Appendix D, we present more results to demonstrate this finding actually is general, not merely limited to the case of $L _ { 1 }$ -norm criterion. The proposed regularization-based pruning schedule is consistently more favorable than the one-shot counterpart. (2) The larger pruning ratio, the more pronounced of the gain. This is reasonable since when more weights are pruned, the network cannot recover by its inherent plasticity Mittal et al. (2018), then the regularization-based way is more helpful because it helps the model transfer its expressive power to the remaining part. When the pruning ratio is relatively small (such as ResNet56, $r = 5 0 \%$ ) , the plasticity of the model is enough to heal, so the benefit from GReg-1 is less significant compared with the one-shot counterpart.
156
+
157
+ ![](images/ac428ab6cf517902459262b7ec3fb69d47cf04a2e15dd1400507d10a01bda824.jpg)
158
+ Figure 1: Row 1: Illustration of weight separation as $L _ { 2 }$ penalty grows. Row 2: Normalized filter $L _ { 1 }$ -norm over iterations for ResNet50 layer2.3.conv1 (please see the Appendix for VGG19 plots).
159
+
160
+ Table 2: Comparison of different methods on the CIFAR10 and CIFAR100 datasets.
161
+
162
+ <table><tr><td>Method</td><td>Network/Dataset</td><td>Base acc.(%) Pruned acc. (%) Acc. drop Speedup</td><td></td><td></td><td></td></tr><tr><td>CP He et al. (2017)</td><td rowspan="6">ResNet56/CIFAR10</td><td>92.80</td><td>91.80</td><td>1.00</td><td>2.00×</td></tr><tr><td>AMC He et al. (2018b)</td><td>92.80</td><td>91.90</td><td>0.90</td><td>2.00×</td></tr><tr><td>SFP He et al. (2018a)</td><td>93.59</td><td>93.36</td><td>0.23</td><td>2.11×</td></tr><tr><td>AFP Ding et al. (2018)</td><td>93.93</td><td>92.94</td><td>0.99</td><td>2.56×</td></tr><tr><td>C-SGD Ding et al. (2019a)</td><td>93.39</td><td>93.44</td><td>-0.05</td><td>2.55×</td></tr><tr><td>GReg-1 (ours)</td><td>93.36</td><td>93.18</td><td>0.18</td><td>2.55×</td></tr><tr><td>GReg-2 (ours)</td><td></td><td>93.36</td><td>93.36</td><td>0.00</td><td>2.55×</td></tr><tr><td>Kron-OBD Wang et al. (2019a)</td><td rowspan="5"></td><td>73.34</td><td>60.70</td><td>12.64</td><td>5.73×</td></tr><tr><td>Kron-OBS Wang et al. (2019a)</td><td>73.34</td><td>60.66</td><td>12.68</td><td>6.09×</td></tr><tr><td>EigenDamage Wang et al. (2019a) VGG19/CIFAR100</td><td>73.34</td><td>65.18</td><td>8.16</td><td>8.80×</td></tr><tr><td>GReg-1 (ours)</td><td>74.02</td><td>67.55</td><td>6.67</td><td>8.84×</td></tr><tr><td>GReg-2 (ours)</td><td>74.02</td><td>67.75</td><td>6.47</td><td>8.84×</td></tr></table>
163
+
164
+ Importance criterion: GReg-2. Here we empirically validate our finding in Sec. 3.3, that is, with uniformly rising $L _ { 2 }$ penalty, the weights should naturally separate. We claim, if $h _ { 1 1 } > h _ { 2 2 }$ , there should be $r _ { 1 } ~ > ~ r _ { 2 }$ , where $\begin{array} { r } { r _ { 1 } = \frac { \tilde { \hat { w _ { 1 } } } } { w _ { 1 } } , r _ { 2 } = \frac { \hat { w _ { 2 } } } { w _ { 2 } } } \end{array}$ (the \* mark indicating the local minimum is omitted here for readability). $r _ { 1 } ~ > ~ r _ { 2 }$ leads to $\frac { \bar { w } _ { 1 } } { w _ { 1 } } ~ > ~ \frac { \bar { w } _ { 2 } } { w _ { 2 } }$ , namely, $\begin{array} { r } { r _ { 1 } \ = \ \frac { \hat { w _ { 1 } } } { \hat { w _ { 2 } } } \ > \ \frac { w _ { 1 } } { w _ { 2 } } } \end{array}$ This shows that, after the $L _ { 2 }$ penalty grows a little, the new magnitude ratio of weight 1 over weight 2 will be magnified if $h _ { 1 1 } > h _ { 2 2 }$ $( w _ { 1 } , w _ { 2 }$ are positive in the analysis here, while the conclusion still holds if either of them is negative). In Fig. 1 (Row 1), we plot the standard deviation (divided by the means for normalization since the magnitude varies over iterations) of filter $L _ { 1 }$ -norms as the regularization grows. As seen, the normalized $L _ { 1 }$ -norm stddev grows larger and larger as $\lambda$ grows. This phenomenon consistently appears across different models and datasets. To figuratively understand how the increasing penalty affects the relative magnitude over time, in Fig. 1 (Row 2), we plot the relative $L _ { 1 }$ -norms (divided by the max $L _ { 1 }$ -norm for normalization) at different iterations. As shown, it is hard to tell which filters are really important by the initial filter magnitude (Iter 0), but under a large penalty later, their discrepancy turns more and more obvious and finally it is very easy to identify which filters are more important. Since the magnitude gap is so large, the simple $L _ { 1 }$ -norm can make a sufficiently faithful criterion.
165
+
166
+ CIFAR benchmarks. Finally, we compare the proposed algorithms with existing methods on the CIFAR datasets (Tab. 2). Here we adopt non-uniform pruning ratios (see the Appendix for specific numbers) for the best accuracy-FLOPs trade-off. On CIFAR10, compared with AMC He et al.
167
+
168
+ Table 3: Acceleration comparison on ImageNet. FLOPs: ResNet34: 3.66G, ResNet50: 4.09G.
169
+
170
+ <table><tr><td>Method</td><td>Network</td><td></td><td>Base top-1(%) Pruned top-1(%) Top-1 drop Speedup</td><td></td><td></td></tr><tr><td>L1 (pruned-B) Li et al. (2017) Taylor-FO Molchanov et al. (2019)</td><td rowspan="3">ResNet34</td><td>73.23 73.31</td><td>72.17 72.83</td><td>1.06 0.48</td><td>1.32× 1.29×</td></tr><tr><td>GReg-1 (ours)</td><td>73.31</td><td>73.54</td><td>-0.23</td><td>1.32×</td></tr><tr><td>GReg-2 (ours)</td><td>73.31</td><td>73.61</td><td>-0.30</td><td>1.32×</td></tr><tr><td>ProvableFPLiebenwein et al. (2020) GReg-1 (ours)</td><td>ResNet50</td><td>76.13 76.13</td><td>75.21 76.27</td><td>0.92 -0.14</td><td>1.43× 1.49×</td></tr><tr><td rowspan="2">AOFP Ding et al. (2019b) GReg-1 (ours)*</td><td rowspan="2">ResNet50</td><td>75.34</td><td>75.63</td><td>-0.29</td><td>1.49×</td></tr><tr><td>75.40</td><td>76.13</td><td>-0.73</td><td>1.49×</td></tr><tr><td>IncReg Wang et al. (2019b) SFP He et al. (2018a)</td><td></td><td>75.60 76.15</td><td>72.47 74.61</td><td>3.13 1.54</td><td>2.00× 1.72×</td></tr><tr><td>HRank Lin et al. (2020a) Taylor-FO Molchanov et al. (2019)</td><td rowspan="3">ResNet50</td><td>76.15</td><td>74.98</td><td>1.17</td><td>1.78×</td></tr><tr><td>Factorized Li et al. (2019)</td><td>76.18 76.15</td><td>74.50</td><td>1.68</td><td>1.82×</td></tr><tr><td></td><td></td><td>74.55</td><td>1.60</td><td>2.33×</td></tr><tr><td>DCP Zhuang et al. (2018) CCP-AC Peng et al. (2019)</td><td rowspan="3"></td><td>76.01</td><td>74.95</td><td>1.06</td><td>2.25×</td></tr><tr><td></td><td>76.15</td><td>75.32</td><td>0.83</td><td>2.18×</td></tr><tr><td>GReg-1 (ours)</td><td>76.13</td><td>75.16</td><td>0.97</td><td>2.31×</td></tr><tr><td>GReg-2 (ours) C-SGD-50 Ding et al. (2019a)</td><td rowspan="3">ResNet50</td><td>76.13</td><td>75.36</td><td>0.77</td><td>2.31×</td></tr><tr><td></td><td>75.34</td><td>74.54</td><td>0.80</td><td>2.26×</td></tr><tr><td>AOFP Ding et al. (2019b)</td><td>75.34</td><td>75.11</td><td>0.23</td><td>2.31×</td></tr><tr><td>GReg-2 (ours)*</td><td rowspan="3">ResNet50</td><td>75.40</td><td>75.22</td><td>0.18</td><td>2.31×</td></tr><tr><td>LFPC He et al. (2020)</td><td>76.15</td><td>74.46</td><td>1.69</td><td>2.55×</td></tr><tr><td>GReg-1 (ours)</td><td>76.13</td><td>74.85</td><td>1.28</td><td>2.56×</td></tr><tr><td>GReg-2 (ours)</td><td rowspan="3"></td><td>76.13</td><td>74.93</td><td>1.20</td><td>2.56×</td></tr><tr><td>IncReg Wang et al. (2019b)</td><td>75.60</td><td>71.07</td><td>4.53</td><td>3.00×</td></tr><tr><td>Taylor-FO Molchanov et al. (2019)</td><td>76.18</td><td>71.69</td><td></td><td>3.05×</td></tr><tr><td>GReg-1 (ours)</td><td rowspan="3">ResNet50</td><td></td><td></td><td>4.49</td><td></td></tr><tr><td></td><td>76.13</td><td>73.75</td><td>2.38</td><td>3.06×</td></tr><tr><td>GReg-2 (ours)</td><td>76.13</td><td>73.90</td><td>2.23</td><td>3.06×</td></tr></table>
171
+
172
+ Since the base models of C-SGD and AOFP have a much lower accuracy than ours, for fair comparison, we rain our own base models with similar accuracy.
173
+
174
+ Table 4: Compression comparison on ImageNet with ResNet50. #Parameters: 25.56M.
175
+
176
+ <table><tr><td>Method</td><td>Base top-1 (%)</td><td>Pruned top-1(%) Top-1 drop</td><td></td><td>Sparsity (%)</td></tr><tr><td>GSM Ding et al. (2019c)</td><td>75.72</td><td>74.30</td><td>1.42</td><td>80.00</td></tr><tr><td>Variational Dropout Molchanov et al. (2O17a)</td><td>76.69</td><td>75.28</td><td>1.41</td><td>80.00</td></tr><tr><td>DPF Lin et al. (2020b)</td><td>75.95</td><td>74.55</td><td>1.40</td><td>82.60</td></tr><tr><td>WoodFisher Singh &amp; Alistarh (2020)</td><td>75.98</td><td>75.20</td><td>0.78</td><td>82.70</td></tr><tr><td>GReg-1 (ours)</td><td>76.13</td><td>75.45</td><td>0.68</td><td>82.70</td></tr><tr><td>GReg-2 (ours)</td><td>76.13</td><td>75.27</td><td>0.86</td><td>82.70</td></tr></table>
177
+
178
+ (2018b), though it adopts better layer-wise pruning ratios via reinforcement-learning, our algorithms can still deliver more favorable performance using sub-optimal human-specified ratios. AFP Ding et al. (2018) is another work exploring large regularization, while they do not adopt the growing scheme as we do. Its performance is also less favorable on CIFAR10 as shown in the table. Although our methods perform a little worse than C-SGD Ding et al. (2019a) on CIFAR10, on the large-scale ImageNet dataset, we will show our methods are significantly better than C-SGD.
179
+
180
+ Notably, on CIFAR100, Kron-OBD/OBS (an extension by Wang et al. (2019a) of the original OBD/OBS from unstructured pruning to structured pruning) are believed to be more accurate than $L _ { 1 }$ -norm in terms of capturing relative weight importance LeCun et al. (1990); Hassibi & Stork (1993); Wang et al. (2019a). Yet, they are significantly outperformed by our GReg-1 based on the simple $L _ { 1 }$ -norm scoring. This may inspire us that an average pruning schedule (like the one-shot fashion) can offset the gain from a more advanced importance scoring scheme.
181
+
182
+ # 4.2 RESNET34/50 ON IMAGENET
183
+
184
+ Then we evaluate our methods on the standard large-scale ImageNet benchmarks with ResNets He et al. (2016). We refer to the official PyTorch ImageNet training example3 to make sure the implementation (such as data augmentation, weight decay, momentum, etc.) is standard. Please refer to the summarized training setting in the Appendix for details.
185
+
186
+ The results are shown in Tab. 3. Methods with similar speedup are grouped together for easy comparison. In general, our method achieves comparable or better performance across various speedups on ResNet34 and 50. Concretely, (1) On both ResNet34 and 50, when the speedup is small (less than $2 \times$ ), only our methods (and AOFP Ding et al. (2019b) for ResNet50) can even improve the top-1 accuracy. This phenomenon is broadly found by previous works Wen et al. (2016); Wang et al. (2018); He et al. (2017) but mainly on small datasets like CIFAR, while we make it on the much challenging ImageNet benchmark. (2) Similar to the results on CIFAR (Tab. 1), when the speedup is larger, the advantage of our method is more obvious. For example, ours GReg-2 only outperforms Taylor-FO Molchanov et al. (2019) by $0 . 8 6 \%$ top-1 accuracy at the $\sim 2 \times$ setting, while at $\sim 3 \times$ , GReg-2 is better by $2 . 2 1 \%$ top-1 accuracy. (3) Many methods work on the weight importance criterion problem, including some very recent ones (ProvableFP Liebenwein et al. (2020), LFPC He et al. (2020)). Yet as shown, our simple variant of $L _ { 1 }$ -norm pruning can still be a strong competitor in terms of accuracy-FLOPs trade-off. This reiterates one of our key ideas in this work that the pruning schedule may be as important as weight importance scoring and worth more research attention.
187
+
188
+ Unstructured pruning. Although we mainly target filter pruning in this work, the proposed methods actually can be applied to unstructured pruning as effectively. In Tab. 4, we present the results of unstructured pruning on ResNet50. WoodFisher Singh & Alistarh (2020) is the state-of-the-art Hessian-based unstructured pruning approach. Notably, without any Hessian approximation, our GReg-2 can achieve comparable performance with it (better absolute accuracy, yet slightly worse accuracy drop). Besides, the simple magnitude pruning variant GReg-1 delivers more favorable result, implying that a better pruning schedule also matters in the unstructured pruning case.
189
+
190
+ # 5 CONCLUSION
191
+
192
+ Regularization is long deemed as a sparsity-learning tool in neural network pruning, which usually works in the small strength regime. In this work, we present two algorithms that exploit regularization in a new fashion that the penalty factor is uniformly raised to a large level. Two central problems regarding deep neural pruning are tackled by the proposed methods, pruning schedule and weight importance criterion. The proposed approaches rely on few impractical assumptions, have a sound theoretical basis, and are scalable to large datasets and networks. Apart from the methodology itself, the encouraging results on CIFAR and ImageNet also justify our general ideas in this paper: (1) In addition to weight importance scoring, pruning schedule is another pivotal factor in deep neural pruning which may deserve more research attention. (2) Without any Hessian approximation, we can still tap into its power for pruning with the help of growing $L _ { 2 }$ regularization.
193
+
194
+ # ACKNOWLEDGEMENTS
195
+
196
+ The work is supported by the National Science Foundation Award ECCS-1916839 and the U.S. Army Research Office Award W911NF-17-1-0367.
197
+
198
+ # REFERENCES
199
+
200
+ Cristian Bucilua, Rich Caruana, and Alexandru Niculescu-Mizil. Model compression. In ˇ SIGKDD, 2006. 2
201
+
202
+ Yu Cheng, Duo Wang, Pan Zhou, and Tao Zhang. A survey of model compression and acceleration for deep neural networks. arXiv preprint arXiv:1710.09282, 2017. 1
203
+
204
+ M. Courbariaux and Y. Bengio. BinaryNet: Training deep neural networks with weights and activations constrained to $+ 1$ or $- 1$ . arXiv preprint arXiv:1602.02830, 2016. 2
205
+
206
+ Matthieu Courbariaux, Itay Hubara, Daniel Soudry, Ran El-Yaniv, and Yoshua Bengio. Binarized neural networks: Training deep neural networks with weights and activations constrained to $+ 1$ or -1. arXiv preprint arXiv:1602.02830, 2016. 2
207
+
208
+ Jia Deng, Wei Dong, Richard Socher, Li-Jia Li, Kai Li, and Li Fei-Fei. Imagenet: A large-scale hierarchical image database. In CVPR, 2009. 6
209
+ Lei Deng, Guoqi Li, Song Han, Luping Shi, and Yuan Xie. Model compression and hardware acceleration for neural networks: A comprehensive survey. Proceedings of the IEEE, 108(4): 485–532, 2020. 1
210
+ Emily L Denton, Wojciech Zaremba, Joan Bruna, Yann LeCun, and Rob Fergus. Exploiting linear structure within convolutional networks for efficient evaluation. In NeurIPS, 2014. 3
211
+ Xiaohan Ding, Guiguang Ding, Jungong Han, and Sheng Tang. Auto-balanced filter pruning for efficient convolutional neural networks. In AAAI, 2018. 2, 3, 7, 8
212
+ Xiaohan Ding, Guiguang Ding, Yuchen Guo, and Jungong Han. Centripetal sgd for pruning very deep convolutional networks with complicated structure. In CVPR, 2019a. 2, 7, 8
213
+ Xiaohan Ding, Guiguang Ding, Yuchen Guo, Jungong Han, and Chenggang Yan. Approximated oracle filter pruning for destructive cnn width optimization. In ICML, 2019b. 2, 8, 9, 13
214
+ Xiaohan Ding, Xiangxin Zhou, Yuchen Guo, Jungong Han, Ji Liu, et al. Global sparse momentum sgd for pruning very deep neural networks. In NeurIPS, 2019c. 8
215
+ Thomas Elsken, Jan Hendrik Metzen, and Frank Hutter. Neural architecture search: A survey. JMLR, 20(55):1–21, 2019. 3
216
+ Trevor Gale, Erich Elsen, and Sara Hooker. The state of sparsity in deep neural networks. arXiv preprint arXiv:1902.09574, 2019. 1, 6
217
+ Song Han, Jeff Pool, John Tran, and William J Dally. Learning both weights and connections for efficient neural network. In NeurIPS, 2015. 1, 2
218
+ Song Han, Huizi Mao, and William J Dally. Deep compression: Compressing deep neural networks with pruning, trained quantization and huffman coding. In ICLR, 2016. 1, 2
219
+ B. Hassibi and D. G. Stork. Second order derivatives for network pruning: Optimal brain surgeon. In NeurIPS, 1993. 1, 2, 3, 4, 8
220
+ K. He, X. Zhang, S. Ren, and J. Sun. Deep residual learning for image recognition. In CVPR, 2016. 6, 8
221
+ Yang He, Guoliang Kang, Xuanyi Dong, Yanwei Fu, and Yi Yang. Soft filter pruning for accelerating deep convolutional neural networks. In IJCAI, 2018a. 7, 8
222
+ Yang He, Yuhang Ding, Ping Liu, Linchao Zhu, Hanwang Zhang, and Yi Yang. Learning filter pruning criteria for deep convolutional neural networks acceleration. In CVPR, 2020. 1, 8, 9
223
+ Yihui He, Xiangyu Zhang, and Jian Sun. Channel pruning for accelerating very deep neural networks. In ICCV, 2017. 1, 7, 9, 13
224
+ Yihui He, Ji Lin, Zhijian Liu, Hanrui Wang, Li-Jia Li, and Song Han. AMC: Automl for model compression and acceleration on mobile devices. In ECCV, 2018b. 7
225
+ Geoffrey Hinton, Oriol Vinyals, and Jeff Dean. Distilling the knowledge in a neural network. In NeurIPS Workshop, 2014. 2
226
+ Andrew Howard, Mark Sandler, Grace Chu, Liang-Chieh Chen, Bo Chen, Mingxing Tan, Weijun Wang, Yukun Zhu, Ruoming Pang, Vijay Vasudevan, et al. Searching for mobilenetv3. arXiv preprint arXiv:1905.02244, 2019. 3
227
+ Andrew G Howard, Menglong Zhu, Bo Chen, Dmitry Kalenichenko, Weijun Wang, Tobias Weyand, Marco Andreetto, and Hartwig Adam. Mobilenets: Efficient convolutional neural networks for mobile vision applications. arXiv preprint arXiv:1704.04861, 2017. 3
228
+ Max Jaderberg, Andrea Vedaldi, and Andrew Zisserman. Speeding up convolutional neural networks with low rank expansions. In BMVC, 2014. 3
229
+
230
+ Alex Krizhevsky. Learning multiple layers of features from tiny images. Technical report, Citeseer, 2009. 6
231
+
232
+ V. Lebedev and V. Lempitsky. Fast convnets using group-wise brain damage. In CVPR, 2016. 2
233
+
234
+ Vadim Lebedev, Yaroslav Ganin, Maksim Rakhuba, Ivan Oseledets, and Victor Lempitsky. Speeding-up convolutional neural networks using fine-tuned cp-decomposition. arXiv preprint arXiv:1412.6553, 2014. 3
235
+
236
+ Y. LeCun, J. S. Denker, and S. A. Solla. Optimal brain damage. In NeurIPS, 1990. 1, 2, 3, 4, 8, 13, 14, 15
237
+
238
+ Yann LeCun, Yoshua Bengio, and Geoffrey Hinton. Deep learning. Nature, 521(7553):436, 2015. 1
239
+
240
+ Hao Li, Asim Kadav, Igor Durdanovic, Hanan Samet, and Hans Peter Graf. Pruning filters for efficient convnets. In ICLR, 2017. 1, 2, 3, 6, 8, 14
241
+
242
+ Tuanhui Li, Baoyuan Wu, Yujiu Yang, Yanbo Fan, Yong Zhang, and Wei Liu. Compressing convolutional neural networks via factorized convolutional filters. In CVPR, 2019. 8
243
+
244
+ Lucas Liebenwein, Cenk Baykal, Harry Lang, Dan Feldman, and Daniela Rus. Provable filter pruning for efficient neural networks. In ICLR, 2020. 8, 9
245
+
246
+ Mingbao Lin, Rongrong Ji, Yan Wang, Yichen Zhang, Baochang Zhang, Yonghong Tian, and Ling Shao. Hrank: Filter pruning using high-rank feature map. In CVPR, 2020a. 8
247
+
248
+ Tao Lin, Sebastian U Stich, Luis Barba, Daniil Dmitriev, and Martin Jaggi. Dynamic model pruning with feedback. In ICLR, 2020b. 8
249
+
250
+ Zhuang Liu, Jianguo Li, Zhiqiang Shen, Gao Huang, Shoumeng Yan, and Changshui Zhang. Learning efficient convolutional networks through network slimming. In ICCV, 2017. 1, 2
251
+
252
+ Zhuang Liu, Mingjie Sun, Tinghui Zhou, Gao Huang, and Trevor Darrell. Rethinking the value of network pruning. In ICLR, 2019. 14
253
+
254
+ Christos Louizos, Max Welling, and Diederik P Kingma. Learning sparse neural networks through l 0 regularization. In ICLR, 2018. 2
255
+
256
+ James Martens and Roger Grosse. Optimizing neural networks with kronecker-factored approximate curvature. In ICML, 2015. 2
257
+
258
+ Deepak Mittal, Shweta Bhardwaj, Mitesh M Khapra, and Balaraman Ravindran. Recovering from random pruning: On the plasticity of deep convolutional neural networks. In WACV, 2018. 7
259
+
260
+ Dmitry Molchanov, Arsenii Ashukha, and Dmitry Vetrov. Variational dropout sparsifies deep neural networks. In ICML, 2017a. 8
261
+
262
+ P. Molchanov, S. Tyree, and T. Karras. Pruning convolutional neural networks for resource efficient inference. In ICLR, 2017b. 1, 2
263
+
264
+ Pavlo Molchanov, Arun Mallya, Stephen Tyree, Iuri Frosio, and Jan Kautz. Importance estimation for neural network pruning. In CVPR, 2019. 1, 2, 8, 9
265
+
266
+ Michael C Mozer and Paul Smolensky. Skeletonization: A technique for trimming the fat from a network via relevance assessment. In NeurIPS, 1989. 1
267
+
268
+ Adam Paszke, Sam Gross, Francisco Massa, Adam Lerer, James Bradbury, Gregory Chanan, Trevor Killeen, Zeming Lin, Natalia Gimelshein, Luca Antiga, et al. Pytorch: An imperative style, highperformance deep learning library. In NeurIPS, 2019. 6
269
+
270
+ Hanyu Peng, Jiaxiang Wu, Shifeng Chen, and Junzhou Huang. Collaborative channel pruning for deep networks. In ICML, 2019. 8
271
+
272
+ Mohammad Rastegari, Vicente Ordonez, Joseph Redmon, and Ali Farhadi. Xnor-net: Imagenet classification using binary convolutional neural networks. In ECCV, 2016. 2
273
+
274
+ R. Reed. Pruning algorithms – a survey. IEEE Transactions on Neural Networks, 4(5):740–747, 1993. 1, 2
275
+
276
+ Mark Sandler, Andrew Howard, Menglong Zhu, Andrey Zhmoginov, and Liang-Chieh Chen. Mobilenetv2: Inverted residuals and linear bottlenecks. In CVPR, 2018. 3
277
+
278
+ Jurgen Schmidhuber. Deep learning in neural networks: An overview. ¨ Neural networks, 61:85–117, 2015. 1
279
+
280
+ Karen Simonyan and Andrew Zisserman. Very deep convolutional networks for large-scale image recognition. In ICLR, 2015. 6
281
+
282
+ Sidak Pal Singh and Dan Alistarh. Woodfisher: Efficient second-order approximations for model compression. In NeurIPS, 2020. 1, 2, 4, 8, 9, 13
283
+
284
+ Gilbert Strang. Calculus. Wellesley-Cambridge Press, 1991. 4
285
+
286
+ Mingxing Tan and Quoc Le. Efficientnet: Rethinking model scaling for convolutional neural networks. In ICML, 2019. 3
287
+
288
+ Chaoqi Wang, Roger Grosse, Sanja Fidler, and Guodong Zhang. Eigendamage: Structured pruning in the kronecker-factored eigenbasis. In ICML, 2019a. 1, 2, 4, 7, 8
289
+
290
+ Huan Wang, Qiming Zhang, Yuehai Wang, and Haoji Hu. Structured probabilistic pruning for convolutional neural network acceleration. In BMVC, 2018. 9
291
+
292
+ Huan Wang, Xinyi Hu, Qiming Zhang, Yuehai Wang, Lu Yu, and Haoji Hu. Structured pruning for efficient convolutional neural networks via incremental regularization. IEEE Journal of Selected Topics in Signal Processing, 14(4):775–788, 2019b. 5, 8
293
+
294
+ Huan Wang, Qiming Zhang, Yuehai Wang, Lu Yu, and Haoji Hu. Structured pruning for efficient convnets via incremental regularization. In IJCNN, 2019c. 2, 3, 5
295
+
296
+ Wei Wen, Chunpeng Wu, Yandan Wang, Yiran Chen, and Hai Li. Learning structured sparsity in deep neural networks. In NeurIPS, 2016. 1, 2, 9, 13
297
+
298
+ Jianbo Ye, Xin Lu, Zhe Lin, and James Z Wang. Rethinking the smaller-norm-less-informative assumption in channel pruning of convolution layers. In ICLR, 2018. 2
299
+
300
+ Ming Yuan and Yi Lin. Model selection and estimation in regression with grouped variables. Journal of the Royal Statistical Society, 68(1):49–67, 2006. 2
301
+
302
+ Xiangyu Zhang, Jianhua Zou, Xiang Ming, Kaiming He, and Jian Sun. Efficient and accurate approximations of nonlinear convolutional networks. In CVPR, 2015. 3
303
+
304
+ Xiangyu Zhang, Xinyu Zhou, Mengxiao Lin, and Jian Sun. Shufflenet: An extremely efficient convolutional neural network for mobile devices. In CVPR, 2018. 3
305
+
306
+ Zhuangwei Zhuang, Mingkui Tan, Bohan Zhuang, Jing Liu, Yong Guo, Qingyao Wu, Junzhou Huang, and Jinhui Zhu. Discrimination-aware channel pruning for deep neural networks. In NeurIPS, 2018. 8
307
+
308
+ Barret Zoph and Quoc Le. Neural architecture search with reinforcement learning. In ICLR, 2017. 3
309
+
310
+ # A APPENDIX
311
+
312
+ # A.1 EXPERIMENTAL SETTING DETAILS
313
+
314
+ Training setting summary. About the networks evaluated, we intentionally avoid AlexNet and VGG on the ImageNet benchmark because the single-branch architecture is no longer representative of the modern deep network architectures with residuals (but still keep VGG19 on the CIFAR analysis to make sure the findings are not limited to one specific architecture). Apart from some key settings stated in the paper, a more detailed training setting summary is shown as Tab. 5.
315
+
316
+ Table 5: Training setting summary. For the SGD solver, in the parentheses are the momentum and weight decay. For ImageNet, batch size 64 is used for pruning instead of the standard 256, which is because we want to save the training time.
317
+
318
+ <table><tr><td rowspan=1 colspan=1>Dataset</td><td rowspan=1 colspan=1>CIFAR</td><td rowspan=1 colspan=1>ImageNet</td></tr><tr><td rowspan=1 colspan=1>Solver</td><td rowspan=1 colspan=1>SGD (0.9, 5e-4)</td><td rowspan=1 colspan=1>SGD (0.9, 1e-4)</td></tr><tr><td rowspan=1 colspan=1>LR policy (prune)</td><td rowspan=1 colspan=2>Fixed (1e-3)</td></tr><tr><td rowspan=1 colspan=1>LR policy (finetune)</td><td rowspan=1 colspan=1>Multi-step (0:1e-2,60:1e-3,90:1e-4)</td><td rowspan=1 colspan=1>Multi-step (0:1e-2, 60:1e-3,90:1e-4)Multi-step (0:1e-2, 30:1e-3, 60:1e-4,75:1e-5)</td></tr><tr><td rowspan=1 colspan=1>Total epoch (finetune)</td><td rowspan=1 colspan=1>120</td><td rowspan=1 colspan=1>90</td></tr><tr><td rowspan=1 colspan=1>Batch size (prune)</td><td rowspan=1 colspan=1>256</td><td rowspan=1 colspan=1>64</td></tr><tr><td rowspan=1 colspan=1>Batch size (finetune)</td><td rowspan=1 colspan=2>256</td></tr></table>
319
+
320
+ Pruning ratios. Although several recent methods Ding et al. (2019b); Singh & Alistarh (2020) can automatically decide pruning ratios, in this paper we opt to consider pruning independent with the pruning ratio choosing. The main consideration is that pruning ratio is broadly believed to reflect the redundancy of different layers LeCun et al. (1990); Wen et al. (2016); He et al. (2017), which is an inherent characteristic of the model, thus should not be coupled with the subsequent pruning algorithms.
321
+
322
+ Before we list the specific pruning ratios, we explain how we set them. (1) For a ResNet, if it has $N$ stages, we will use a list of $N$ floats to represent its pruning ratios for the $N$ stages. For example, ResNet56 has 4 stages in conv layers, then “[0, 0.5, 0.5, 0.5]” means “for the first stage (which is also the first conv layer), the pruning ratio is 0; the other three stages have pruning ratio of $0 . 5 '$ . Besides, since we do not prune the last conv in a residual block, which means for a two-layer residual block (for ResNet56), we only prune the first layer; for a three-layer bottleneck block (for ResNet34 and 50), we only prune the first and second layers. (2) For VGG19, we use the following pruning ratio setting. For example, “[0:0, 1-9:0.3, 10-15:0.5]” means “for the first layer (index starting from 0), the pruning ratio is 0; for layer 1 to 9, the pruning ratio is 0.3; for layer 10 to 15, the pruning ratio is $0 . 5 '$ .
323
+
324
+ With these, the specific pruning ratio for each of our experiments in the paper are listed in Tab. 6. We do not have strong rules to set them, except one, which is setting the pruning ratios of higher stages smaller, because the FLOPs of higher layers are relatively smaller (due to the fact that the spatial feature map sizes are smaller) and we are targeting more acceleration than compression. Of course, this scheme only is quite crude, yet as our results (Tab. 3 and 4) show, even with these crude settings, the performances are still competitive.
325
+
326
+ # B PROOF OF EQ. 5
327
+
328
+ When a quadratic function $\mathcal { E }$ converges at $\mathbf { w } ^ { * }$ with Hessian matrix $\mathbf { H }$ , it can be formulated as
329
+
330
+ $$
331
+ \mathcal { E } = ( \mathbf { w } - \mathbf { w } ^ { * } ) ^ { T } \mathbf { H } ( \mathbf { w } - \mathbf { w } ^ { * } ) + C ,
332
+ $$
333
+
334
+ where $C$ is a constant. Now a new function is made by increasing the $L _ { 2 }$ penalty by small amount $\delta \lambda$ , namely,
335
+
336
+ $$
337
+ \begin{array} { r } { \hat { \mathcal { E } } = \mathcal { E } + \delta \lambda \mathbf { w } ^ { T } \mathbf { I } \mathbf { w } . } \end{array}
338
+ $$
339
+
340
+ Let the new converged values be $\hat { \mathbf { w } } ^ { * }$ , then similar to Eq. 10, $\hat { \mathcal { E } }$ can be formulated as
341
+
342
+ $$
343
+ \hat { \mathcal { E } } = ( \mathbf { w } - \hat { \mathbf { w } } ^ { * } ) ^ { T } \hat { \mathbf { H } } ( \mathbf { w } - \hat { \mathbf { w } } ^ { * } ) + \hat { C } , \mathrm { w h e r e } \hat { \mathbf { H } } = \mathbf { H } + \delta \lambda \mathbf { I } .
344
+ $$
345
+
346
+ Table 6: Pruning ratio summary.
347
+
348
+ <table><tr><td rowspan=1 colspan=1>Dataset</td><td rowspan=1 colspan=1>Network</td><td rowspan=1 colspan=1>Speedup</td><td rowspan=1 colspan=1>Pruned top-1 accuracy (%)</td><td rowspan=1 colspan=1>Pruning ratio</td></tr><tr><td rowspan=1 colspan=1>CIFAR10CIFAR100</td><td rowspan=1 colspan=1>ResNet56VGG19</td><td rowspan=1 colspan=1>2.55×8.84×</td><td rowspan=1 colspan=1>93.3667.56</td><td rowspan=1 colspan=1>[0, 0.75, 0.75, 0.32, 0][1-15:0.7]</td></tr><tr><td rowspan=4 colspan=1>ImageNetImageNetImageNetImageNetImageNet</td><td rowspan=2 colspan=1>ResNet34ResNet50ResNet50</td><td rowspan=1 colspan=1>1.32×</td><td rowspan=2 colspan=1>73.4476.2475.16</td><td rowspan=4 colspan=1>[0, 0.50, 0.60, 0.40, 0, 0]*[0, 0.30, 0.30, 0.30, 0.14, 0][0, 0.60, 0.60, 0.60, 0.21, 0][0, 0.74, 0.74, 0.60, 0.21, 0][0, 0.68, 0.68, 0.68, 0.50, 0]</td></tr><tr><td rowspan=1 colspan=1>1.49×2.31×</td></tr><tr><td rowspan=2 colspan=1>ResNet50ResNet50</td><td rowspan=1 colspan=1>2.56×</td><td rowspan=2 colspan=1>74.7573.50</td></tr><tr><td rowspan=1 colspan=1>3.06×</td></tr></table>
349
+
350
+ \* In addition to the pruning ratios, several layers are skipped, following the setting of $L _ { 1 }$ (pruned-B) Li et al. (2017). Specifically, we refer to the implementation of Liu et al. (2019) at https://github.com/Ericmingjie/rethinking-network-pruning/tree/master/imagenet/l1-norm-pruning.
351
+
352
+ Meanwhile, combine Eq. 10 and Eq. 11, we can obtain
353
+
354
+ $$
355
+ \begin{array} { r } { \hat { \mathcal { E } } = ( \mathbf { w } - \mathbf { w } ^ { * } ) ^ { T } \mathbf { H } ( \mathbf { w } - \mathbf { w } ^ { * } ) + \delta \lambda \mathbf { w } ^ { T } \mathbf { I } \mathbf { w } + C . } \end{array}
356
+ $$
357
+
358
+ Compare Eq. 13 with Eq. 12, we have
359
+
360
+ $$
361
+ ( \mathbf { H } + \delta \lambda \mathbf { I } ) { \hat { \mathbf { w } } } ^ { * } = \mathbf { H } \mathbf { w } ^ { * } \Rightarrow { \hat { \mathbf { w } } } ^ { * } = ( \mathbf { H } + \delta \lambda \mathbf { I } ) ^ { - 1 } \mathbf { H } \mathbf { w } ^ { * } .
362
+ $$
363
+
364
+ C PROOF OF EQ. 7
365
+
366
+ $$
367
+ \hat { \mathbf { H } } = \left\{ \begin{array} { c c } { h _ { 1 1 } + \delta \lambda } & { h _ { 1 2 } } \\ { h _ { 1 2 } } & { h _ { 2 2 } + \delta \lambda } \end{array} \right\} \Rightarrow \hat { \mathbf { H } } ^ { - 1 } = \frac { 1 } { \vert \hat { \mathbf { H } } \vert } \left\{ \begin{array} { c c } { h _ { 2 2 } + \delta \lambda } & { - h _ { 1 2 } } \\ { - h _ { 1 2 } } & { h _ { 1 1 } + \delta \lambda } \end{array} \right\}
368
+ $$
369
+
370
+ Therefore, $\hat { \mathbf { w } } ^ { * } = \hat { \mathbf { H } } ^ { - 1 } \mathbf { H } \mathbf { w } ^ { * } \Rightarrow$
371
+
372
+ $$
373
+ \begin{array} { r l r } & { } & { \left\{ \hat { w } _ { 1 } ^ { * } \right\} = \hat { \bf H } ^ { - 1 } { \bf H } \left\{ w _ { 1 } ^ { * } \right\} = \frac { 1 } { \left| \hat { \bf H } \right| } \left\{ \begin{array} { c c } { h _ { 2 2 } + \delta \lambda } & { - h _ { 1 2 } } \\ { - h _ { 1 1 } } & { h _ { 1 1 } + \delta \lambda } \end{array} \right\} \left\{ \begin{array} { c c } { h _ { 1 1 } } & { h _ { 1 2 } } \\ { h _ { 1 2 } } & { h _ { 2 2 } } \end{array} \right\} \left\{ \begin{array} { c } { w _ { 1 } ^ { * } } \\ { w _ { 2 } ^ { * } } \end{array} \right\} } \\ & { } & { = \frac { 1 } { \left| \hat { \bf H } \right| } \left\{ \begin{array} { c c } { \left( h _ { 1 1 } h _ { 2 2 } + h _ { 1 1 } \delta \lambda - h _ { 1 2 } ^ { 2 } \right) w _ { 1 } ^ { * } + \delta \lambda h _ { 1 2 } w _ { 2 } ^ { * } } \\ { \left( h _ { 1 1 } h _ { 2 2 } + h _ { 2 2 } \delta \lambda - h _ { 1 2 } ^ { 2 } \right) w _ { 2 } ^ { * } + \delta \lambda h _ { 1 2 } w _ { 1 } ^ { * } } \end{array} \right\} . } \end{array}
374
+ $$
375
+
376
+ # D GREG- $1 + \mathrm { O B D }$
377
+
378
+ In Sec. 4.1, we show when pruning the same weights, GReg-1 is significantly better than the oneshot counterpart, where the pruned weights are selected by the $L _ { 1 }$ -norm criterion. Here we conduct the same comparison just with a different pruning criterion introduced in OBD LeCun et al. (1990). OBD is also an one-shot pruning method, using a Hessian-based criterion which is believed to be more advanced than $L _ { 1 }$ -norm.
379
+
380
+ Results are shown in Tab. 7. As seen, using this more advanced importance criterion, our pruning scheme based on growing regularization is still consistently better than the one-shot counterpart. Besides, it is also verified here that a better pruning schedule can bring more accuracy gain when the speedup is larger.
381
+
382
+ # E FILTER L1-NORM CHANGE OF VGG19
383
+
384
+ In Fig. 1 (Row 2), we plot the filter $L _ { 1 }$ -norm change over time for ResNet50 on ImageNet. Here we plot the case of VGG19 on CIFAR100 to show the weight separation phenomenon under growing regularization is a general one across different datasets and networks.
385
+
386
+ # F HYPER-PARAMETERS AND SENSITIVITY ANALYSIS
387
+
388
+ There are five introduced values in our methods: regularization ceiling $\tau$ , ceiling for picking $\tau ^ { \prime }$ interval $K _ { u } , K _ { s }$ , granularity $\delta \lambda$ . Their settings are summarized in Tab. 8. Among them, the ceilings
389
+
390
+ Table 7: Comparison between pruning schedules: one-shot pruning vs. our proposed GReg-1 using the Hessian-based criterion introduced in OBD LeCun et al. (1990). Each setting is randomly run for 3 times, mean and std accuracies reported. We vary the global pruning ratio from 0.7 to 0.95 so as to cover the major speedup spectrum of interest. Same as Tab. 1, the pruned weights here are exactly the same for the two methods under each speedup ratio. The finetuning processes (number of epochs, LR schedules, etc.) are also the same to keep fair comparison.
391
+
392
+ ![](images/0f2d6935b0744fbb2ed80e72482e888c222e79ac5a2f589b70d6f4f3caae6562.jpg)
393
+ Figure 2: Normalized filter $L _ { 1 }$ -norm over iterations for VGG19 layer3.
394
+
395
+ are set through validation: $\tau = 1$ is set to make sure the unimportant weights are pushed down enough (as stated in the main paper, normally after the regularization training, their magnitudes are too small to cause significant accuracy degradation if they are completely removed). $\tau ^ { \prime } = 0 . 0 1$ is set generally for the same goal as $\tau$ , but since it is applied to all the weight (not just the unimportant ones), we only expect it to be moderately large (thus smaller than $\tau$ ) so that the important and unimportant can be differentiated with a clear boundary. For the $\delta \lambda$ , we use a very small regularization granularity $\delta \lambda$ , which our theoretical analysis is based on. We set its value to 1e-4 for GReg-1 and 1e-5 for GReg-2 with reference to the original weight decay value $5 \times 1 0 ^ { - 4 }$ (for CIFAR models) and $1 0 ^ { - 4 }$ (for ImageNet models). Note that, these values come from our methods per se, not directly related to datasets and networks, thus are invariant to them. This is why we can employ the same setting of these three hyper-parameters in all our experiments, freeing practitioners from heavy tuning when dealing with different networks or datasets.
396
+
397
+ Table 8: Hyper-parameters of our methods.
398
+
399
+ <table><tr><td rowspan=1 colspan=1>Notation</td><td rowspan=1 colspan=1>Default value (CIFAR)</td><td rowspan=1 colspan=1>Default value (ImageNet)</td></tr><tr><td rowspan=1 colspan=1>8入</td><td rowspan=1 colspan=2>GReg-1: 1e-4, GReg-2: 1e-5</td></tr><tr><td rowspan=1 colspan=1>T</td><td rowspan=1 colspan=2>1</td></tr><tr><td rowspan=1 colspan=1>T</td><td rowspan=1 colspan=2>0.01</td></tr><tr><td rowspan=1 colspan=1>Ku</td><td rowspan=1 colspan=1>10 iterations</td><td rowspan=1 colspan=1>5 iterations</td></tr><tr><td rowspan=1 colspan=1>Ks</td><td rowspan=1 colspan=1>5k iterations</td><td rowspan=1 colspan=1>40k iterations</td></tr></table>
400
+
401
+ A little bit of change is for $K _ { u } , K _ { s }$ . Both are generally to let the network have enough time to converge to the new equilibrium. Generally, we prefer large update intervals, yet we also need to consider the time complexity: Too large of them will bring too many iterations, which may be unnecessary. Among them, $K _ { s }$ is less important since it is to stabilize the large regularization $\mathit { \Psi } _ { \tau } = 1 \mathit { \Psi } _ { . }$ ). We introduce it simply to make sure the training is fully converged. Therefore, the possibly more sensitive hyper-parameter is the $K _ { u }$ (set to 5 for ImageNet and 10 for CIFAR). Here we will show the performance is insensitive to the varying $K _ { u }$ . As shown in Tab. 9, the peak performance appears at around $K _ { u } = 1 5$ for ResNet56 and $K _ { u } = 1 0$ for VGG19. We simply adopt 10 for a uniform setting in our paper. We did not heavily tune these hyper-parameters, yet as seen, they work pretty well across different networks and datasets. Notably, even for the worst cases in Tab. 9 (in blue color), they are still significantly better than those of the “ $L _ { 1 } +$ one-shot” scheme, demonstrating the robustness of the proposed algorithm.
402
+
403
+ Table 9: Sensitivity analysis of $K _ { u }$ on CIFAR10/100 datasets with the proposed GReg-1 algorithm. $K _ { u } = 1 0$ is the default setting. Pruning ratio $9 0 \%$ (ResNet56) and $7 0 \%$ (VGG19) are explored here. Experiments are randomly run for 3 times with mean accuracy and standard deviation reported. The best is highlighted with bold and the worst is highlighted with blue color.
404
+
405
+ <table><tr><td rowspan=1 colspan=1>Ku</td><td rowspan=1 colspan=1>1</td><td rowspan=1 colspan=1>5</td><td rowspan=1 colspan=1>10</td><td rowspan=1 colspan=1>15</td><td rowspan=1 colspan=1>20</td><td rowspan=1 colspan=1>L1+one-shot</td></tr><tr><td rowspan=1 colspan=1>Acc. (%,ResNet56)</td><td rowspan=1 colspan=1>89.40±0.04</td><td rowspan=1 colspan=1>89.38±0.13</td><td rowspan=1 colspan=1>89.49±0.23</td><td rowspan=1 colspan=1>89.69±0.05</td><td rowspan=1 colspan=1>89.62±0.13</td><td rowspan=1 colspan=1>87.34±0.21</td></tr><tr><td rowspan=1 colspan=1>Acc. (%,VGG19)</td><td rowspan=1 colspan=1>67.22±0.33</td><td rowspan=1 colspan=1>67.32±0.24</td><td rowspan=1 colspan=1>67.35±0.15</td><td rowspan=1 colspan=1>67.06±0.40</td><td rowspan=1 colspan=1>66.93±0.22</td><td rowspan=1 colspan=1>66.05±0.04</td></tr></table>
406
+
407
+ # G MORE RESULTS OF PRUNING SCHEDULE COMPARISON
408
+
409
+ In Tab. 1, we show using $L _ { 1 }$ -norm sorting, our proposed GReg-1 can consistently surpass the oneshot schedule even pruning the same weights. Here we ask a more general question: Can the benefits from a regularization-based schedule consistently appear, agnostic to the weight importance scoring criterion? This question is important because it will show if the gain from a better pruning schedule is only a bonus concurrent with the $L _ { 1 }$ criterion or a really universal phenomenon. Since there are literally so many weight importance criteria, we cannot ablate them one by one. Nevertheless, given a pre-trained model and a pruning ratio $r$ , no matter what criterion, its role is to select a filter subset. For example, if there are 100 filters in a layer and $r = 0 . 5$ , then they are at most $\binom { 1 0 0 } { 5 0 }$ importance criteria in theory for this layer. We can simply randomly pick a subset of filters (which corresponds to certain criterion, albeit unknown) and compare the one-shot way with regularization-based way on the subset. Based on this idea, we conduct five random runs on the ResNet56 and VGG19 to explore this. The pruning ratio is chosen as $9 0 \%$ for ResNet56 and $7 0 \%$ for VGG19 because under this ratio the compression (or acceleration) ratio is about 10 times, neither too large nor too small (where the network can heal itself regardless of pruning methods).
410
+
411
+ The results are shown in Tab. 10. Here is a sanity check: Compared with Tab. 1, the mean accuracy of pruning randomly picked filters should be less than pruning those picked by $L _ { 1 }$ -norm, confirmed by $8 6 . 8 5 \%$ vs. $8 7 . 3 4 \%$ for ResNet56 and $6 5 . 0 4 \%$ vs. $6 6 . 0 5 \%$ for VGG19. As seen, in each run, the regularization-based way also significantly surpasses its one-shot counterpart. Although five random runs are still too few given the exploding potential combinations, yet as shown by the accuracy standard deviations, the results are stable and thus qualified to support our finding that the regularization-based pruning schedule is better to the one-shot counterpart.
412
+
413
+ Table 10: Comparison between pruning schedules: one-shot vs. GReg-1. Pruning ratio is $90 \%$ for ResNet56 and $70 \%$ for VGG19. In each run, the weights to prune are picked randomly before the training starts.
414
+
415
+ <table><tr><td rowspan=1 colspan=1>ResNet56 + CIFAR10</td><td rowspan=1 colspan=1>Run #1</td><td rowspan=1 colspan=1>Run #2</td><td rowspan=1 colspan=1>Run #3</td><td rowspan=1 colspan=1>Run #4</td><td rowspan=1 colspan=1>Run #5</td><td rowspan=1 colspan=1>Mean±std</td></tr><tr><td rowspan=1 colspan=1>Acc. (%, one-shot)Acc. (%, GReg-1, ours)</td><td rowspan=1 colspan=1>87.5789.26</td><td rowspan=1 colspan=1>87.0088.98</td><td rowspan=1 colspan=1>86.2788.78</td><td rowspan=1 colspan=1>86.7589.42</td><td rowspan=1 colspan=1>86.6788.96</td><td rowspan=1 colspan=1>86.85±0.4389.08±0.23</td></tr><tr><td rowspan=1 colspan=1>VGG19 + CIFAR100</td><td rowspan=1 colspan=1>Run #1</td><td rowspan=1 colspan=1>Run #2</td><td rowspan=1 colspan=1>Run #3</td><td rowspan=1 colspan=1>Run #4</td><td rowspan=1 colspan=1>Run #5</td><td rowspan=1 colspan=1>Mean±std</td></tr><tr><td rowspan=1 colspan=1>Acc. (%,one-shot)Acc. (%, GReg-1, ours)</td><td rowspan=1 colspan=1>64.5666.63</td><td rowspan=1 colspan=1>65.0666.57</td><td rowspan=1 colspan=1>65.0766.80</td><td rowspan=1 colspan=1>65.0566.80</td><td rowspan=1 colspan=1>65.4867.16</td><td rowspan=1 colspan=1>65.04±0.2966.79±0.21</td></tr></table>
md/train/pW2Q2xLwIMD/pW2Q2xLwIMD.md ADDED
The diff for this file is too large to render. See raw diff
 
md/train/qiydAcw6Re/qiydAcw6Re.md ADDED
@@ -0,0 +1,636 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # GEOMETRY OF PROGRAM SYNTHESIS
2
+
3
+ Anonymous authors Paper under double-blind review
4
+
5
+ # ABSTRACT
6
+
7
+ We present a new perspective on program synthesis in which programs may be identified with singularities of analytic functions. As an example, Turing machines are synthesised from input-output examples by propagating uncertainty through a smooth relaxation of a universal Turing machine. The posterior distribution over weights is approximated using Markov chain Monte Carlo and bounds on the generalisation error of these models is estimated using the real log canonical threshold, a geometric invariant from singular learning theory.
8
+
9
+ # 1 INTRODUCTION
10
+
11
+ The idea of program synthesis dates back to the birth of modern computation itself (Turing, 1948) and is recognised as one of the most important open problems in computer science (Gulwani et al., 2017). However, there appear to be serious obstacles to synthesising programs by gradient descent at scale (Neelakantan et al., 2016; Kaiser & Sutskever, 2016; Bunel et al., 2016; Gaunt et al., 2016; Evans & Grefenstette, 2018; Chen et al., 2018) and these problems suggest that it would be appropriate to make a fundamental study of the geometry of loss surfaces in program synthesis, since this geometry determines the learning process. To that end, in this paper we explain a new point of view on program synthesis using the singular learning theory of Watanabe (2009) and the smooth relaxation of Turing machines from Clift & Murfet (2018).
12
+
13
+ In broad strokes this new geometric point of view on program synthesis says:
14
+
15
+ • Programs to be synthesised are singularities of analytic functions. If $U \subseteq \mathbb { R } ^ { d }$ is open and $K : U \longrightarrow \mathbb { R }$ is analytic, then $x \in U$ is a critical point of $K$ if $\nabla K ( x ) = 0$ and a singularity of the function $K$ if it is a critical point where $K ( x ) = 0$ . The Kolmogorov complexity of a program is related to a geometric invariant of the associated singularity called the Real Log Canonical Threshold (RLCT). This invariant controls both the generalisation error and the learning process, and is therefore an appropriate measure of “complexity” in continuous program synthesis. See Section 3. The geometry has concrete practical implications. For example, a MCMC-based approach to program synthesis will find, with high probability, a solution that is of low complexity (if it finds a solution at all). We sketch a novel point of view on the problem of “bad local minima” (Gaunt et al., 2016) based on these ideas. See Section 4.
16
+
17
+ We demonstrate all of these principles in experiments with toy examples of synthesis problems.
18
+
19
+ Program synthesis as inference. We use Turing machines, but mutatis mutandis everything applies to other programming languages. Let $T$ be a Turing machine with tape alphabet $\Sigma$ and set of states $Q$ and assume that on any input $x \in \Sigma ^ { * }$ the machine eventually halts with output $T ( x ) \in \Sigma ^ { * }$ . Then to the machine $T$ we may associate the set $\{ ( x , T ( x ) ) \} _ { x \in \Sigma ^ { * } } \subseteq \Sigma ^ { * } \times \Sigma ^ { * }$ . Program synthesis is the study of the inverse problem: given a subset of $\Sigma ^ { * } \times \Sigma ^ { * }$ we would like to determine (if possible) a Turing machine which computes the given outputs on the given inputs.
20
+
21
+ If we presume given a probability distribution $q ( x )$ on $\Sigma ^ { * }$ then we can formulate this as a problem of statistical inference: given a probability distribution $q ( x , y )$ on $\Sigma ^ { * } \times \Sigma ^ { * }$ determine the most likely machine producing the observed distribution $q ( x , y ) = q ( y | x ) q ( x )$ . If we fix a universal Turing machine $\mathcal { U }$ then Turing machines can be parametrised by codes $\dot { w } \in W ^ { c o d e }$ with $\mathcal { U } ( x , w ) = T ( x )$ for all $x \in \Sigma ^ { * }$ . We let ${ \bar { p } } ( y | x , w )$ denote the probability of $\mathcal { U } ( x , w ) = y$ (which is either zero or one)
22
+
23
+ so that solutions to the synthesis problem are in bijection with the zeros of the Kullback-Leibler divergence between the true distribution and the model
24
+
25
+ $$
26
+ K ( w ) = \int \int q ( y | x ) q ( x ) \log \frac { q ( y | x ) } { p ( y | x , w ) } d x d y .
27
+ $$
28
+
29
+ So far this is just a trivial rephrasing of the combinatorial optimisation problem of finding a Turing machine $T$ with $T ( x ) = y$ for all $( x , y )$ with $q ( x , y ) > 0$ .
30
+
31
+ Smooth relaxation. One approach is to seek a smooth relaxation of the synthesis problem consisting of an analytic manifold $W \bar { \supseteq } W ^ { c o d e }$ and an extension of $K$ to an analytic function $K : W \longrightarrow \mathbb { R }$ so that we can search for the zeros of $K$ using gradient descent. Perhaps the most natural way to construct such a smooth relaxation is to take $W$ to be a space of probability distributions over $W ^ { \dot { c } o d e }$ and prescribe a model $p ( \boldsymbol { y } | \boldsymbol { x } , \boldsymbol { w } )$ for propagating uncertainty about codes to uncertainty about outputs (Gaunt et al., 2016; Evans & Grefenstette, 2018). The particular model we choose is based on the semantics of linear logic (Clift & Murfet, 2018). Supposing that such a smooth relaxation has been chosen together with a prior $\varphi ( w )$ over $W$ , smooth program synthesis becomes the study of the statistical learning theory of the triple $( p , q , \varphi )$ .
32
+
33
+ There are perhaps two primary reasons to consider the smooth relaxation. Firstly, one might hope that stochastic gradient descent or techniques like Markov chain Monte Carlo will be effective means of solving the original combinatorial optimisation problem. This is not a new idea (Gulwani et al., 2017, §6) but so far its effectiveness for large programs has not been proven. Independently, one might hope to find powerful new mathematical ideas that apply to the relaxed problem and shed light on the nature of program synthesis. This is the purpose of the present paper.
34
+
35
+ Singular learning theory. We denote by $W _ { 0 } = \{ w \in W | K ( w ) = 0 \}$ so that
36
+
37
+ $$
38
+ W _ { 0 } \cap W ^ { c o d e } \subseteq W _ { 0 } \subseteq W
39
+ $$
40
+
41
+ where $W _ { 0 } \cap W ^ { c o d e }$ is the discrete set of solutions to the original synthesis problem. We refer to these as the classical solutions. As the vanishing locus of an analytic function, $W _ { 0 }$ is an analytic space over $\mathbb { R }$ (Hironaka, 1964, $\ S 0 . 1 )$ , (Griffith & Harris, 1978) and it is interesting to study the geometry of this space near the classical solutions. Since $K$ is a Kullback-Leibler divergence it is non-negative and so it not only vanishes on $W _ { 0 }$ but $\nabla K$ also vanishes, hence every point of $W _ { 0 }$ is a singular point.
42
+
43
+ Beyond this the geometry of $W _ { 0 }$ depends on the particular model $p ( \boldsymbol { y } | \boldsymbol { x } , \boldsymbol { w } )$ that has been chosen, but some aspects are universal: the nature of program synthesis means that typically $W _ { 0 }$ is an extended object (i.e. it contains points other than the classical solutions) and the Hessian matrix of second order partial derivatives of $K$ at a classical solution is not invertible - that is, the classical solutions are degenerate critical points of $K$ . This means that singularity theory is the appropriate branch of mathematics for studying the geometry of $W _ { 0 }$ near a classical solution. It also means that the Fisher information matrix
44
+
45
+ $$
46
+ I ( w ) _ { i j } = \int \int \frac { \partial } { \partial w _ { i } } \big [ \log p ( y | x , w ) \big ] \frac { \partial } { \partial w _ { j } } \big [ \log p ( y | x , w ) \big ] q ( y | x ) q ( x ) d x d y ,
47
+ $$
48
+
49
+ is degenerate at a classical solution, so that the appropriate branch of statistical learning theory is singular learning theory (Watanabe, 2007; 2009). For an introduction to singular learning theory in the context of deep learning see (Murfet et al., 2020).
50
+
51
+ Broadly speaking the contribution of this paper is to realise program synthesis within the framework of singular learning theory, at both a theoretical and an experimental level. In more detail the contents of the paper are:
52
+
53
+ • We define a staged pseudo-UTM (Appendix E) which is well-suited to experiments with the ideas discussed above. Propagating uncertainty about the code through this UTM using the ideas of (Clift & Murfet, 2018) defines a triple $( p , q , \varphi )$ associated to a synthesis problem. This formally embeds program synthesis within singular learning theory. We realise this embedding in code by providing an implementation in PyTorch of this propagation of uncertainty through a UTM. Using the No-U-Turn variant of MCMC (Hoffman & Gelman, 2014) we can approximate the Bayesian posterior of any program synthesis problem (of course in practice we are limited by computational constraints in doing so).
54
+
55
+ • We explain how the real log canonical threshold (a geometric invariant) is related to Kolmogorov complexity (Section 3). • We give a simple example (Appendix C) in which $W _ { 0 }$ contains the set of classical solutions as a proper subset and every point of $W _ { 0 }$ is a degenerate critical point of $K$ . For two simple synthesis problems detectA and parityCheck we demonstrate all of the above, using MCMC to approximate the Bayesian posterior and theorems from Watanabe (2013) to estimate the RLCT (Section 5). We discuss how $W _ { 0 }$ is an extended object and how the RLCT relates to the local dimension of $W _ { 0 }$ near a classical solution.
56
+
57
+ # RELATED WORK
58
+
59
+ The idea of synthesising Turing machines can be traced back to the work of Solomonoff on inductive inference (Solomonoff, 1964). A more explicit form of the problem was given in Biermann (1972) who proposed an algorithmic method. Machine learning based approaches appear in Schmidhuber (1997) and Hutter (2004), which pay particular attention to model complexity, and Gaunt et al. (2016) and Freer et al. (2014), the latter using the notion of “universal probabilistic Turing machine” (De Leeuw et al., 1956). A different probabilistic extension of a universal Turing machine was introduced in Clift & Murfet (2018) via linear logic. Studies of the singular geometry of learning models go back to Amari et al. (2003) and notably, the extensive work of Watanabe (2007; 2009).
60
+
61
+ # 2 TURING MACHINE SYNTHESIS AS SINGULAR LEARNING
62
+
63
+ All known approaches to program synthesis can be formulated in terms of a singular learning problem. Singular learning theory is the extension of statistical learning theory to account for the fact that the set of learned parameters $W _ { 0 }$ has the structure of an analytic space as opposed to an analytic manifold (Watanabe, 2007; 2009). It is organised around triples $( p , q , \varphi )$ consisting of a class of models $\{ p ( y | x , w ) : w \in W \}$ , a true distribution $q ( y | x )$ and a prior $\varphi$ on $W$ .
64
+
65
+ In our approach we fix a Universal Turing Machine (UTM), denoted $\mathcal { U }$ , with a description tape (which specifies the code of the Turing machine to be executed), a work tape (simulating the tape of that Turing machine during its operation) and a state tape (simulating the state of that Turing machine). The general statistical learning problem that can be formulated using $\mathcal { U }$ is the following: given some initial string $x$ on the work tape, predict the state of the simulated machine and the contents of the work tape after some specified number of steps (Clift & Murfet, 2018, $\ S 7 . 1 )$ . For simplicity, in this paper we consider models that only predict the final state; the necessary modifications in the general case are routine. We also assume that $W$ parametrises Turing machines whose tape alphabet $\Sigma$ and set of states $Q$ have been encoded by individual symbols in the tape alphabet of $\mathcal { U }$ . Hence $\mathcal { U }$ is actually what we call a pseudo-UTM (see Appendix E). Again, treating the general case is routine and for the present purposes only introduces uninteresting complexity.
66
+
67
+ Let $\Sigma$ denote the tape alphabet of the simulated machine, $Q$ the set of states and let $L , S , R$ stand for left, stay and right, the possible motions of the Turing machine head. We assume that $| Q | > 1$ since otherwise the synthesis problem is trivial. The set of ordinary codes $W ^ { c o d e }$ for a Turing machine sits inside a compact space of probability distributions $W$ over codes
68
+
69
+ $$
70
+ W ^ { c o d e } : = \prod _ { \sigma , q } \Sigma \times Q \times \{ L , S , R \} \subseteq \prod _ { \sigma , q } \Delta \Sigma \times \Delta Q \times \Delta \{ L , S , R \} = : W
71
+ $$
72
+
73
+ where $\Delta X$ denotes the set of probability distributions over a set $X$ , see (8), and the product is over pairs $( \sigma , q ) \in \Sigma \times Q$ .1 For example the point $\{ ( \sigma ^ { \prime } , q ^ { \prime } , d ) \} _ { \sigma , q } \in W ^ { c o d e }$ encodes the machine which when it reads $\sigma$ under the head in state $q$ writes $\sigma ^ { \prime }$ , transitions into state $q ^ { \prime }$ and moves in direction $d$ . Given $w \in W ^ { c o d e }$ let $\operatorname { s t e p } ^ { t } ( x , w ) \in Q$ denote the contents of the state tape of $\mathcal { U }$ after $t$ timesteps (of the simulated machine) when the work tape is initialised with $x$ and the description tape with $w$ .
74
+
75
+ There is a principled extension of this operation of $\mathcal { U }$ to a smooth function
76
+
77
+ $$
78
+ \Delta \operatorname { s t e p } ^ { t } : { \Sigma } ^ { * } \times W \longrightarrow \Delta Q
79
+ $$
80
+
81
+ which propagates uncertainty about the symbols on the description tape to uncertainty about the final state and we refer to this extension as the smooth relaxation of $\mathcal { U }$ . The details are given in Appendix F but at an informal level the idea behind the relaxation is easy to understand: to sample from $\Delta \operatorname { s t e p } ^ { t } ( x , w )$ we run $\mathcal { U }$ to simulate $t$ timesteps in such a way that whenever the UTM needs to “look at” an entry on the description tape we sample from the corresponding distribution specified by $w$ .2 The significance of the particular smooth relaxation that we use is that its derivatives have a logical interpretation (Clift & Murfet, 2018, $\ S 7 . 1 \ r _ { . }$ ).
82
+
83
+ The class of models that we consider is
84
+
85
+ $$
86
+ p ( y | x , w ) = \Delta \mathrm { s t e p } ^ { t } ( x , w )
87
+ $$
88
+
89
+ where $t$ is fixed for simplicity in this paper. More generally we could also view $x$ as consisting of a sequence and a timeout, as is done in (Clift & Murfet, 2018, $\ S 7 . 1 )$ . The construction of this model is summarised in Figure 1.
90
+
91
+ ![](images/4a6eaec4d0956e25ce7728bf29fb6ddeee2cacf5f806fd63f0d36ae211bc6fec.jpg)
92
+ Figure 1: The state of $\mathcal { U }$ is represented by the state of the work tape, state tape and description (code) tape. The work tape is initialised with a sequence $x \in \Sigma ^ { * }$ , the code tape with $w \in W$ and the state tape with some standard initial state, the smooth relaxation $\Delta$ step of the pseudo-UTM is run for $t$ steps and the final probability distribution over states is $y$ .
93
+
94
+ Definition 2.1 (Synthesis problem). A synthesis problem for $\mathcal { U }$ consists of a probability distribution $q ( x , y )$ over $\Sigma ^ { * } \times Q$ . We say that the synthesis problem is deterministic if there is $f : \Sigma ^ { * } \longrightarrow Q$ such that $q ( y = f ( x ) | x ) = 1$ for all $x \in \Sigma ^ { * }$ .
95
+
96
+ Definition 2.2. The triple $( p , q , \varphi )$ associated to a synthesis problem is the model $p$ of (5) together with the true distribution $q$ and uniform prior $\varphi$ on the parameter space $W$ . The Kullback-Leibler function $K ( w )$ of the synthesis problem is defined by (1) and a solution to the synthesis problem is a point of $W _ { 0 }$ . A classical solution is a point of $W _ { 0 } \cap W ^ { c o d e }$ .
97
+
98
+ As $\Delta \mathrm { s t e p } ^ { t }$ is a polynomial function, $K$ is analytic and so $W _ { 0 }$ is a semi-analytic space (it is cut out of the semi-analytic space $W$ by the vanishing of $K$ ). If the synthesis problem is deterministic and $q ( x )$ is uniform on some finite subset of $\Sigma ^ { * }$ then $W _ { 0 }$ is semi-algebraic (it is cut out of $W$ by polynomial equations) and all solutions lie at the boundary of the parameter space $W$ (Appendix D). However in general $W _ { 0 }$ is only semi-analytic and intersects the interior of $W$ (Example C.2). We assume that ${ \bar { q } } ( y | x )$ is realisable that is, there exists $w _ { 0 } \in W$ with $q ( y | x ) = p ( y | x , w _ { 0 } )$ .
99
+
100
+ A triple $( p , q , \varphi )$ is regular if the model is identifiable, ie. for all inputs $x \in \mathbb { R } ^ { n }$ , the map sending $w$ to the conditional probability distribution $p ( \boldsymbol { y } | \boldsymbol { x } , \boldsymbol { w } )$ is one-to-one, and the Fisher information matrix is non-degenerate. Otherwise, the learning machine is strictly singular (Watanabe, 2009, $\ S 1 . 2 . 1 $ . Triples arising from synthesis problems are typically singular: in Example 2.5 below we show an explicit example where multiple parameters $w$ determine the same model, and in Example C.2 we give an example where the Hessian of $K$ is degenerate everywhere on $W _ { 0 }$ (Watanabe, 2009, §1.1.3).
101
+
102
+ Remark 2.3. Non-deterministic synthesis problems arise naturally in various contexts, for example in the fitting of algorithms to the behaviour of deep reinforcement learning agents. Suppose an agent is acting in an environment with starting states encoded by $x \in \Sigma ^ { * }$ and possible episode end states by $y \in Q$ . Even if the optimal policy is known to determine a computable function $\Sigma ^ { * } \longrightarrow Q$ the statistics of the observed behaviour after finite training time will only provide a function $\Sigma ^ { * } \longrightarrow \Delta Q$ and if we wish to fit algorithms to behaviour it makes sense to deal with this uncertainty directly.
103
+
104
+ Definition 2.4. Let $( p , q , \varphi )$ be the triple associated to a synthesis problem. The Real Log Canonical Threshold (RLCT) $\lambda$ of the synthesis problem is defined so that $- \lambda$ is the largest pole of the meromorphic extension (Atiyah, 1970) of the zeta function $\begin{array} { r } { \zeta ( z ) = \int K ( w ) ^ { z } \varphi ( w ) \hat { d w } } \end{array}$ .
105
+
106
+ The more singular the analytic space $W _ { 0 }$ of solutions is, the smaller the RLCT. One way to think of the RLCT is as a count of the effective number of parameters near $W _ { 0 }$ (Murfet et al., 2020, $\ S 4$ ). In Section 3 we relate the RLCT to Kolmogorov complexity and in Section 5 we estimate the RLCT of the synthesis problem detectA given below, using the method explained in Appendix A.
107
+
108
+ Example 2.5 (detectA). The deterministic synthesis problem detectA has $\Sigma = \{ \boxed \} , A , B \}$ , $Q = \{ { \mathrm { r e j e c t } } , { \mathrm { a c c e p t } } \}$ and $q ( y | x )$ is determined by the function taking in a string $x$ of $A$ ’s and $B$ ’s and returning the state accept if the string contains an $A$ and state reject otherwise. The conditional true distribution $q ( y | x )$ is realisable because this function is computed by a Turing machine.
109
+
110
+ Two solutions are shown in Figure 2. On the left is a parameter $w _ { l } \in \ b { W } _ { 0 } \setminus \ b { W } ^ { c o d e }$ and on the right is $w _ { r } \in W _ { 0 } \cap W ^ { c o d e }$ . Varying the distributions in $w _ { l }$ that have nonzero entropy we obtain a submanifold $V \subseteq W _ { 0 }$ containing $w _ { l }$ of dimension 14. This leads by (Watanabe, 2009, Remark 7.3) to a bound on the RLCT of $\lambda \le \frac { 1 } { 2 } ( 3 0 - 1 4 ) = 8$ which is consistent with the experimental results in Table 1. This highlights that solutions need not lie at vertices of the probability simplex, and $W _ { 0 }$ may contain a high-dimensional submanifold around a given classical solution.
111
+
112
+ ![](images/94e2cb3be00f1414e5f172ce0b09cdea4b00fe6fbc48f36b360a03838c63cdbb.jpg)
113
+ Figure 2: Visualisation of two solutions for the synthesis problem detectA .
114
+
115
+ # 2.1 THE SYNTHESIS PROCESS
116
+
117
+ Synthesis is a problem because we do not assume that the true distribution is known: for example, if $q { \dot { ( } } y | x )$ is deterministic and the associated function is $f : \Sigma ^ { * } \longrightarrow Q$ , we assume that some example pairs $( x , f ( x ) )$ are known but no general algorithm for computing $f$ is known (if it were, synthesis would have already been performed). In practice synthesis starts with a sample $D _ { n } = \{ ( x _ { i } , y _ { i } ) \} _ { i = 1 } ^ { n }$ from $q ( x , y )$ with associated empirical Kullback-Leibler distance
118
+
119
+ $$
120
+ K _ { n } ( w ) = \frac { 1 } { n } \sum _ { i = 1 } ^ { n } \log \frac { q ( y _ { i } | x _ { i } ) } { p ( y _ { i } | x _ { i } , w ) } .
121
+ $$
122
+
123
+ If the synthesis problem is deterministic and $u \in W ^ { c o d e }$ then $K _ { n } ( u ) = 0$ if and only if $u$ explains the data in the sense that $\operatorname { s t e p } ^ { t } ( x _ { i } , u ) = y _ { i }$ for $1 \leq i \leq n$ . We now review two natural ways of finding such solutions in the context of machine learning.
124
+
125
+ Synthesis by stochastic gradient descent (SGD). The first approach is to view the process of program synthesis as stochastic gradient descent for the function $K : W \longrightarrow \mathbb { R }$ . We view $D _ { n }$ as a large training set and further sample subsets $D _ { m }$ with $m \ll n$ and compute $\nabla K _ { m }$ to take gradient descent steps $w _ { i + 1 } = w _ { i } - \eta \nabla K _ { m } ( w _ { i } )$ for some learning rate $\eta$ . Stochastic gradient descent has the advantage (in principle) of scaling to high-dimensional parameter spaces $W$ , but in practice it is challenging to use gradient descent to find points of $W _ { 0 }$ (Gaunt et al., 2016).
126
+
127
+ Synthesis by sampling. The second approach is to consider the Bayesian posterior associated to the synthesis problem, which can be viewed as an update on the prior distribution $\varphi$ after seeing $D _ { n }$
128
+
129
+ $$
130
+ p ( w | D _ { n } ) = { \frac { p ( D _ { n } | w ) p ( w ) } { p ( D _ { n } ) } } = { \frac { 1 } { Z _ { n } } } \varphi ( w ) \prod _ { i = 1 } ^ { n } p ( y _ { i } | x _ { i } , w ) = { \frac { 1 } { Z _ { n } ^ { 0 } } } \exp \{ - n K _ { n } ( w ) + \log \varphi ( w ) \}
131
+ $$
132
+
133
+ where $\begin{array} { r } { Z _ { n } ^ { 0 } = \int \varphi ( w ) \exp ( - n K _ { n } ( w ) ) d w } \end{array}$ . If $n$ is large the posterior distribution concentrates around solutions $w \in W _ { 0 }$ and so sampling from the posterior will tend to produce machines that are (nearly) solutions. The gold standard sampling is Markov Chain Monte Carlo (MCMC). Scaling MCMC to where $W$ is high-dimensional is a challenging task with many attempts to bridge the gap with SGD (Welling & Teh, 2011; Chen et al., 2014; Ding et al., 2014; Zhang et al., 2020). Nonetheless in simple cases we demonstrate experimentally in Section 5 that machines may be synthesised by using MCMC to sample from the posterior.
134
+
135
+ # 3 COMPLEXITY OF PROGRAMS
136
+
137
+ Every Turing machine is the solution of a deterministic synthesis problem, so Section 2 associates to any Turing machine a singularity of a semi-analytic space $W _ { 0 }$ . To indicate that this connection is not vacuous, we sketch how the complexity of a program is related to the real log canonical threshold of a singularity. A more detailed discussion will appear elsewhere.
138
+
139
+ Let $q ( x , y )$ be a deterministic synthesis problem for $\mathcal { U }$ which only involves input sequences in some restricted alphabet $\Sigma _ { i n p u t }$ , that is, $q ( x ) \bar { = } 0$ if $x \notin ( \Sigma _ { i n p u t } ) ^ { * }$ . Let $D _ { n }$ be sampled from $q ( x , y )$ and let $u , v \in W ^ { c o d e } \cap W _ { 0 }$ be two explanations for the sample in the sense that $K _ { n } ( u ) = K _ { n } ( v ) = 0$ . Which explanation for the data should we prefer? The classical answer based on Occam’s razor (Solomonoff, 1964) is that we should prefer the shorter program, that is, the one using the fewest states and symbols.
140
+
141
+ Set $N = | \Sigma |$ and $M = | Q |$ . Any Turing machine $T$ using $N ^ { \prime } \leq N$ symbols and $M ^ { \prime } \leq M$ states has a code for $\mathcal { U }$ of length $c M ^ { \prime } N ^ { \prime }$ where $c$ is a constant. We assume that $\Sigma _ { i n p u t }$ is included in the tape alphabet of $T$ so that $N ^ { \prime } \geq | \Sigma _ { i n p u t } |$ and define the Kolmogorov complexity of $q$ with respect to $\mathcal { U }$ to be the infimum ${ \mathfrak { c } } ( q )$ of $M ^ { \prime } N ^ { \prime }$ over Turing machines $T$ that give classical solutions for $q$ .
142
+
143
+ Let $\lambda$ be the RLCT of the triple $( p , q , \varphi )$ associated to the synthesis problem (Definition 2.4).
144
+
145
+ Theorem 3.1. $\begin{array} { r } { \lambda \le \frac { 1 } { 2 } ( M + N ) \mathfrak { c } ( q ) } \end{array}$ .
146
+
147
+ Proof. Let $u \in W ^ { c o d e } \cap W _ { 0 }$ be the code of a Turing machine realising the infimum in the definition of the Kolmogorov complexity and suppose that this machine only uses symbols in $\Sigma ^ { \prime }$ and states in $Q ^ { \prime }$ with $N ^ { \prime } = | \Sigma ^ { \prime } |$ and $\bar { M } ^ { \prime } = | Q ^ { \prime } |$ . The time evolution of the staged pseudo-UTM $\mathcal { U }$ simulating $u$ on $x \in \Sigma _ { i n p u t } ^ { * }$ is independent of the entries on the description tape that belong to tuples of the form $( \sigma , q , ? , ? , ? )$ with $( \sigma , q ) \notin \Sigma ^ { \prime } \times Q ^ { \prime }$ . Let $V \subseteq W$ be the submanifold of points which agree with $u$ on all tuples with $( \sigma , q ) \in \Sigma ^ { \prime } \times Q ^ { \prime }$ and are otherwise free. Then $u \in V \subseteq W _ { 0 }$ and $\operatorname { c o d i m } ( V ) =$ $M ^ { \prime } N ^ { \prime } ( \bar { M } + N )$ and by (Watanabe, 2009, Theorem 7.3) we have $\begin{array} { r } { \lambda \le \frac 1 2 \bmod { \mathrm { i m } } ( V ) } \end{array}$ . □
148
+
149
+ Remark 3.2. The Kolmogorov complexity depends only on the number of symbols and states used. The RLCT is a more refined invariant since it also depends on how each symbol and state is used (Clift & Murfet, 2018, Remark 7.8) as this affects the polynomials defining $W _ { 0 }$ (see Appendix D).
150
+
151
+ # 4 PRACTICAL IMPLICATIONS
152
+
153
+ Using singular learning theory we have explained how programs to be synthesised are singularities of analytic functions, and how the Kolmogorov complexity of a program bounds the RLCT of the associated singularity. We now sketch some practical insights that follow from this point of view.
154
+
155
+ Synthesis minimises the free energy: the sampling-based approach to synthesis (Section 2.1) aims to approximate, via MCMC, sampling from the Bayesian posterior for the triple $( p , q , \varphi )$ associated to a synthesis problem. To understand the behaviour of these Markov chains we follow the asymptotic analysis of (Watanabe, 2009, Section 7.6). If we cover $W$ by small closed balls $V _ { \alpha }$ around points $w _ { \alpha }$ then we can compute the probability that a sample comes from $V _ { \alpha }$ by
156
+
157
+ $$
158
+ p _ { \alpha } = \frac { 1 } { Z _ { 0 } } \int _ { V _ { \alpha } } e ^ { - n K _ { n } ( w ) } \varphi ( w ) d w
159
+ $$
160
+
161
+ and if $n$ is sufficiently large this is proportional to $e ^ { - f _ { \alpha } }$ where the quantity
162
+
163
+ $$
164
+ f _ { \alpha } = K _ { \alpha } n + \lambda _ { \alpha } \log ( n )
165
+ $$
166
+
167
+ is called the free energy. Here $K _ { \alpha }$ is the smallest value of the Kullback-Leibler divergence $K$ on $V _ { \alpha }$ and $\lambda _ { \alpha }$ is the RLCT of the set $W _ { K _ { \alpha } } \cap V _ { \alpha }$ where $W _ { c } = \{ w \in W | K ( w ) = c \}$ is a level set of $K$ . The Markov chains used to generate approximate samples from the posterior are attempting to minimise the free energy, which involves a tradeoff between the energy $K _ { \alpha } n$ and the entropy $\lambda _ { \alpha } \log ( n )$ .
168
+
169
+ Why synthesis gets stuck: the kind of local minimum of the free energy that we want the synthesis process to find are solutions $w _ { \alpha } \in W _ { 0 }$ where $\lambda _ { \alpha }$ is minimal. By Section 3 one may think of these points as the “lowest complexity” solutions. However it is possible that there are other local minima of the free energy. Indeed, there may be local minima where the free energy is lower than the free energy at any solution since at finite $n$ it is possible to tradeoff an increase in $K _ { \alpha }$ against a decrease in the RLCT $\lambda _ { \alpha }$ . In practice, the existence of such “siren minima” of the free energy may manifest itself as regions where the synthesis process gets stuck and fails to converge to a solution. In such a region $\bar { K _ { \alpha } } n + \lambda _ { \alpha } \log ( n ) < \lambda \log ( \bar { n } )$ where $\lambda$ is the RLCT of the synthesis problem. In practice it has been observed that program synthesis by gradient descent often fails for complex problems in the sense that it fails to converge to a solution (Gaunt et al., 2016). While synthesis by SGD and sampling are different, it is a reasonable hypothesis that these siren minima are a significant contributing factor in both cases.
170
+
171
+ Can we avoid siren minima? If we let $\lambda _ { c }$ denote the RLCT of the level set $W _ { c }$ then siren minima of the free energy will be impossible at a given value of n and c as long as λc ≥ λ−c nlog(n) . Recall that the more singular $W _ { c }$ is the lower the RLCT, so this lower bound says that the level sets should not become too singular too quickly as $c$ increases. At any given value of $n$ there is a “siren free” region in the range $c \geq { \frac { \lambda \log ( n ) } { n } }$ since the RLCT is non-negative (Figure 3). Thus the learning process will be more reliable the smaller $\frac { \lambda \log ( n ) } { n }$ is. This can arranged either by increasing $n$ (providing more examples) or decreasing $\lambda$ .
172
+
173
+ While the RLCT is determined by the synthesis problem, it is possible to change its value by changing the structure of the UTM $\mathcal { U }$ . As we have defined it $\mathcal { U }$ is a “simulation type” UTM, but one could for example add special states such that if a code specifies a transition into that state a series of steps is executed by the UTM (i.e. a subroutine). This amounts to specifying codes in a higher level programming language. Hence one of the practical insights that can be derived from the geometric point of view on program synthesis is that varying this language is a natural way to engineer the singularities of the level sets of $K$ , which according to singular learning theory has direct implications for the learning process.
174
+
175
+ ![](images/e34800be3128393d0b71b422f4ec9e848e92967fd980b5ceb119d06d14b03a68.jpg)
176
+ Figure 3: Level sets above the cutoff cannot contain siren local minima of the free energy.
177
+
178
+ # 5 EXPERIMENTS
179
+
180
+ We estimate the RLCT for the triples $( p , q , \varphi )$ associated to the synthesis problems detectA (Example 2.5) and parityCheck. Hyperparameters of the various machines are contained in Table 3 of Appendix B. The true distribution $q ( x )$ is defined as follows: we fix a minimum and maximum sequence length $a \leq b$ and to sample $x \sim q ( x )$ we first sample a length $l$ uniformly from $[ a , b ]$ and then uniformly sample $x$ from $\{ A , { \cal B } \} ^ { l }$ .
181
+
182
+ We perform MCMC on the weight vector for the model class $\{ p ( y | x , w ) : w \in W \}$ where $w$ is represented in our PyTorch implementation by three tensors of shape $\{ [ L , n _ { i } ] \} _ { 1 \leq i \leq 3 }$ where $L$ is the number of tuples in the description tape of the TM being simulated and $\{ n _ { i } \}$ are the number of symbols, states and directions respectively. A direct simulation of the UTM is used for all experiments to improve computational efficiency (Appendix G). We generate, for each inverse temperature $\beta$ and dataset $D _ { n }$ , a Markov chain via the No-U-turn sampler from Hoffman & Gelman (2014). We use the standard uniform distribution as our prior $\varphi$ .
183
+
184
+ Table 1: RLCT estimates for detectA.
185
+
186
+ <table><tr><td>Max-length</td><td>Temperature</td><td>RLCT</td><td>Std</td><td>R squared</td></tr><tr><td>7</td><td>log(500)</td><td>8.089205</td><td>3.524719</td><td>0.965384</td></tr><tr><td>7</td><td>log(1000)</td><td>6.533362</td><td>2.094278</td><td>0.966856</td></tr><tr><td>8</td><td>log(500)</td><td>4.601800</td><td>1.156325</td><td>0.974569</td></tr><tr><td>8</td><td>log(1000)</td><td>4.431683</td><td>1.069020</td><td>0.967847</td></tr><tr><td>9</td><td>log(500)</td><td>5.302598</td><td>2.415647</td><td>0.973016</td></tr><tr><td>9</td><td>log(1000)</td><td>4.027324</td><td>1.866802</td><td>0.958805</td></tr><tr><td>10</td><td>log(500)</td><td>3.224910</td><td>1.169699</td><td>0.963358</td></tr><tr><td>10</td><td>log(1000)</td><td>3.433624</td><td>0.999967</td><td>0.949972</td></tr></table>
187
+
188
+ For the problem detectA given in Example 2.5 the dimension of parameter space is dim $W = 3 0$ . We use generalized least squares to fit the RLCT $\lambda$ (with goodness-of-fit measured by $R ^ { 2 }$ ), the algorithm of which is given in Appendix A. Our results are displayed in Table 1 and Figure 4. Our purpose in these experiments is not to provide high accuracy estimates of the RLCT, as these would require much longer Markov chains. Instead we demonstrate how rough estimates consistent with the theory can be obtained at low computational cost. If this model were regular the RLCT would be $\dim W / 2 = 1 5$ .
189
+
190
+ ![](images/9ace473833bc61d56cd4eaf090be6f773656e1bf4f188e396d12fd45dcd66217.jpg)
191
+ Figure 4: Plot of RLCT estimates for detectA. Shaded region shows one standard deviation.
192
+
193
+ The deterministic synthesis problem parityCheck has
194
+
195
+ $$
196
+ \begin{array} { l } { \Sigma = \{ \Pi , A , B , X \} } \\ { Q = \{ \mathrm { r e j e c t , a c c e p t , g e t N e x t A B , g e t N e x t A , g e t N e x t B , g o t o S t a r t } \} . } \end{array}
197
+ $$
198
+
199
+ The distribution $q ( x )$ is as discussed in Section 5 and $q ( y | x )$ is determined by the function taking in a string of $A$ ’s and $B$ ’s, and terminating in state accept if the string contains the same number of $A$ ’s as $B$ ’s, and terminating in state reject otherwise. The string is assumed to contain no blank symbols. The true distribution is realisable because there is a Turing machine using $\Sigma$ and $Q$ which computes this function: the machine works by repeatedly overwriting pairs consisting of a single $A$ and $B$ with $X$ ’s; if there are any $A$ ’s without a matching $B$ left over (or vice versa), we reject, otherwise we accept.
200
+
201
+ In more detail, the starting state getNextAB moves right on the tape until the first $A$ or $B$ is found, and overwrites it with an $X$ . If it’s an $A$ (resp. $B$ ) we enter state getNextB (resp. getNextA). If no $A$ or $B$ is found, we enter the state accept. The state getNextA (resp. getNextB) moves right until an $A$ (resp. $B$ ) is found, overwrites it with an $X$ and enters state gotoStart which moves left until a blank symbol is found (resetting the machine to the left end of the tape). If no $A$ ’s (resp. $B$ ’s) were left on the tape, we enter state reject. The dimension of the parameter space is $\dim W = 2 4 0$ . If this model were regular, the RLCT would be $\dim W / 2 = 1 2 { \bar { 0 } }$ . Our RLCT estimates are contained in Table 2.
202
+
203
+ Table 2: RLCT estimates for parityCheck.
204
+
205
+ <table><tr><td>Max-length</td><td>Temperature</td><td>RLCT</td><td>Std</td><td>R squared</td></tr><tr><td>5</td><td>log(300)</td><td>4.411732</td><td>0.252458</td><td>0.969500</td></tr><tr><td>6</td><td>log(300)</td><td>4.005667</td><td>0.365855</td><td>0.971619</td></tr><tr><td>7</td><td>log(300)</td><td>3.887679</td><td>0.276337</td><td>0.973716</td></tr></table>
206
+
207
+ # 6 DISCUSSION
208
+
209
+ We have developed a theoretical framework in which all programs can in principle be learnt from input-output examples via an existing optimisation procedure. This is done by associating to each program a smooth relaxation which, based on Clift & Murfet (2018), can be argued to be more canonical than existing approaches. This realization has important implications for the building of intelligent systems.
210
+
211
+ In approaches to program synthesis based on gradient descent there is a tendency to think of solutions to the synthesis problem as isolated critical points of the loss function $K$ , but this is a false intuition based on regular models. Since neural networks, Bayesian networks, smooth relaxations of UTMs and all other extant approaches to smooth program synthesis are strictly singular models (the map from parameters to functions is not injective) the set $W _ { 0 }$ of parameters $w$ with $K ( w ) = 0$ is a complex extended object, whose geometry is shown by Watanabe’s singular learning theory to be deeply related to the learning process. We have examined this geometry in several specific examples and shown how to think about complexity of programs from a geometric perspective. It is our hope that algebraic geometry can assist in developing the next generation of synthesis machines.
212
+
213
+ # REFERENCES
214
+
215
+ Shun-ichi Amari, Tomoko Ozeki, and Hyeyoung Park. Learning and inference in hierarchical models with singularities. Systems and Computers in Japan, 34(7):34–42, 2003.
216
+
217
+ Michael F Atiyah. Resolution of singularities and division of distributions. Communications on Pure and Applied Mathematics, 23(2):145–150, 1970.
218
+
219
+ Alan W Biermann. On the inference of Turing machines from sample computations. Artificial Intelligence, 3:181–198, 1972.
220
+
221
+ Rudy R Bunel, Alban Desmaison, Pawan K Mudigonda, Pushmeet Kohli, and Philip Torr. Adaptive neural compilation. In Advances in Neural Information Processing Systems, pp. 1444–1452, 2016.
222
+
223
+ Tianqi Chen, Emily Fox, and Carlos Guestrin. Stochastic gradient Hamiltonian Monte Carlo. In International Conference on Machine Learning, pp. 1683–1691, 2014.
224
+
225
+ Xinyun Chen, Chang Liu, and Dawn Song. Execution-guided neural program synthesis. In International Conference on Learning Representations, 2018.
226
+
227
+ James Clift and Daniel Murfet. Derivatives of Turing machines in linear logic. arXiv preprint arXiv:1805.11813, 2018.
228
+
229
+ Karel De Leeuw, Edward F Moore, Claude E Shannon, and Norman Shapiro. Computability by probabilistic machines. Automata studies, 34:183–198, 1956.
230
+
231
+ Nan Ding, Youhan Fang, Ryan Babbush, Changyou Chen, Robert D Skeel, and Hartmut Neven. Bayesian sampling using stochastic gradient thermostats. In Advances in Neural Information Processing Systems, pp. 3203–3211, 2014.
232
+
233
+ Richard Evans and Edward Grefenstette. Learning explanatory rules from noisy data. Journal of Artificial Intelligence Research, 61:1–64, 2018.
234
+
235
+ Cameron E Freer, Daniel M Roy, and Joshua B Tenenbaum. Towards common-sense reasoning via conditional simulation: legacies of Turing in artificial intelligence. Turing’s Legacy, 42:195–252, 2014.
236
+
237
+ Alexander L Gaunt, Marc Brockschmidt, Rishabh Singh, Nate Kushman, Pushmeet Kohli, Jonathan Taylor, and Daniel Tarlow. Terpret: A probabilistic programming language for program induction. arXiv preprint arXiv:1608.04428, 2016.
238
+
239
+ Phillip Griffith and Joseph Harris. Principles of Algebraic Geometry. Wiley-Interscience, 1978.
240
+
241
+ Sumit Gulwani, Oleksandr Polozov, and Rishabh Singh. Program synthesis. Foundations and Trends in Programming Languages, 4(1-2):1–119, 2017.
242
+
243
+ Heisuke Hironaka. Resolution of singularities of an algebraic variety over a field of characteristic zero: I. Annals of Mathematics, 79(1):109–203, 1964.
244
+
245
+ Matthew D Hoffman and Andrew Gelman. The No-U-Turn sampler: adaptively setting path lengths in Hamiltonian Monte Carlo. J. Mach. Learn. Res., 15(1):1593–1623, 2014.
246
+
247
+ Marcus Hutter. Universal artificial intelligence: Sequential decisions based on algorithmic probability. Springer Science & Business Media, 2004.
248
+
249
+ Łukasz Kaiser and Ilya Sutskever. Neural GPUs learn algorithms. In International Conference on Learning Representations, 2016.
250
+
251
+ Daniel Murfet, Susan Wei, Mingming Gong, Hui Li, Jesse Gell-Redman, and Thomas Quella. Deep learning is singular, and that’s good. arXiv preprint arXiv:2010.11560, 2020.
252
+
253
+ Arvind Neelakantan, Quoc V. Le, and Ilya Sutskever. Neural programmer: Inducing latent programs with gradient descent. In International Conference on Learning Representations, ICLR 2016, 2016.
254
+
255
+ Jurgen Schmidhuber. Discovering neural nets with low Kolmogorov complexity and high general- ¨ ization capability. Neural Networks, 10(5):857–873, 1997.
256
+
257
+ Ray J Solomonoff. A formal theory of inductive inference. Part I. Information and control, 7(1): 1–22, 1964.
258
+
259
+ Alan Turing. Intelligent machinery. NPL Mathematics Division, 1948.
260
+
261
+ Sumio Watanabe. Almost all learning machines are singular. In 2007 IEEE Symposium on Foundations of Computational Intelligence, pp. 383–388. IEEE, 2007.
262
+
263
+ Sumio Watanabe. Algebraic Geometry and Statistical Learning Theory, volume 25. Cambridge University Press, 2009.
264
+
265
+ Sumio Watanabe. A widely applicable Bayesian information criterion. Journal of Machine Learning Research, 14:867–897, 2013.
266
+
267
+ Max Welling and Yee W Teh. Bayesian learning via stochastic gradient Langevin dynamics. In Proceedings of the 28th International Conference on Machine Learning, pp. 681–688, 2011.
268
+
269
+ Ruqi Zhang, Chunyuan Li, Jianyi Zhang, Changyou Chen, and Andrew Gordon Wilson. Cyclical stochastic gradient MCMC for Bayesian deep learning. In International Conference on Learning Representations, 2020.
270
+
271
+ # APPENDIX
272
+
273
+ # A ALGORITHM FOR ESTIMATING RLCTS
274
+
275
+ Given a sample $D _ { n } = \{ ( x _ { i } , y _ { i } ) \} _ { i = 1 } ^ { n }$ from $q ( x , y )$ let $\begin{array} { r } { L _ { n } ( w ) : = - \frac { 1 } { n } \sum _ { i = 1 } ^ { n } \log p ( y _ { i } | x _ { i } , w ) } \end{array}$ be the negative log likelihood. We would like to estimate
276
+
277
+ $$
278
+ \mathbb { E } _ { w } ^ { \beta } [ n L _ { n } ( w ) ] : = \frac { 1 } { Z _ { n } ^ { \beta } } \int n L _ { n } ( w ) \varphi ( w ) \prod _ { i = 1 } ^ { n } p ( y _ { i } | x _ { i } , w ) ^ { \beta } d w
279
+ $$
280
+
281
+ where $\begin{array} { r } { Z _ { n } ^ { \beta } = \int \varphi ( w ) \prod _ { i = 1 } ^ { n } p ( y _ { i } | x _ { i } , w ) ^ { \beta } d w } \end{array}$ for some inverse temperature $\beta$ . If $\begin{array} { r } { \beta = \frac { \beta _ { 0 } } { \log n } } \end{array}$ for some constant $\beta _ { 0 }$ , then by Theorem 4 of Watanabe (2013),
282
+
283
+ $$
284
+ \mathbb { E } _ { w } ^ { \beta } [ n L _ { n } ( w ) ] = n L _ { n } ( w _ { 0 } ) + \frac { \lambda \log n } { \beta _ { 0 } } + U _ { n } \sqrt { \frac { \lambda \log n } { 2 \beta _ { 0 } } } + O _ { p } ( 1 )
285
+ $$
286
+
287
+ where $\{ U _ { n } \}$ is a sequence of random variables satisfying $\mathbb { E } [ U _ { n } ] = 0$ and $\lambda$ is the RLCT. In practice, the last two terms often vary negligibly with $1 / \beta$ and so $\mathbb { E } _ { w } ^ { \beta } [ n L _ { n } ( w ) ]$ approximates a linear function of $1 / \beta$ with slope $\lambda$ (Watanabe, 2013, Corollary 3). This is the foundation of the RLCT estimation procedure found in Algorithm 1 which is used in our experiments.
288
+
289
+ # Algorithm 1 RLCT estimation
290
+
291
+ <table><tr><td></td><td>Input: range of β&#x27;s, set of training sets T each of size n, approximate samples {w1,..,WR} from pβ(w|Dn) for each training set Dn and each β</td><td></td><td></td><td></td><td></td></tr><tr><td></td><td>for training set Dn ∈ T do</td><td></td><td></td><td></td><td></td></tr><tr><td></td><td>for β in range of β&#x27;s do</td><td></td><td></td><td></td><td></td></tr><tr><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td></td><td> ples from pβ(w|Dn)</td><td></td><td></td><td></td><td></td></tr><tr><td>end for</td><td></td><td></td><td></td><td></td><td></td></tr><tr><td></td><td>Perform generalised least squares to fit X in Equation (7),call result λ(Dn)</td><td></td><td></td><td></td><td></td></tr><tr><td>end for</td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>Output: ∑Dn∈T λ(Dn)</td><td></td><td></td><td></td><td></td><td></td></tr></table>
292
+
293
+ Each RLCT estimate $\hat { \lambda } ( \mathcal { D } _ { n } )$ in Algorithm 1 was performed by linear regression on the pairs $\{ ( 1 / \beta _ { i } , \mathbb { E } _ { w } ^ { \beta _ { i } } [ n L _ { n } ( w ) ] ) \} _ { i = 1 } ^ { 5 }$ where the five inverse temperatures $\beta _ { i }$ are centered on the inverse temperature $1 / T$ where $T$ is the temperature reported for each experiment in Table 1 and Table 2.
294
+
295
+ From a Bayesian perspective, predictions about outputs $y$ should be made using the predictive distribution
296
+
297
+ $$
298
+ p ^ { * } ( y | x , D _ { n } ) = \int p ( y | x , w ) p ( w | D _ { n } ) d w .
299
+ $$
300
+
301
+ The Bayesian generalisation error associated to the Bayesian predictor is defined as the KullbackLeibler distance to the true conditional distribution
302
+
303
+ $$
304
+ B _ { g } ( n ) : = D _ { K L } ( q \| p ^ { * } ) = \int q ( y | x ) q ( x ) \log \left( { \frac { q ( y | x ) } { p ^ { * } ( y | x ) } } \right) d y d x .
305
+ $$
306
+
307
+ If some fundamental conditions are satisfied (Definition 6.1 and Definition 6.3 of Watanabe (2009)), then by Theorem 6.8 of loc.cit., there exists a random variable $B _ { g } ^ { * }$ such that as $n \to \infty$ , $\mathbb { E } [ n B _ { g } ( n ) ]$ converges to $\mathbb { E } [ B _ { g } ^ { * } ]$ . In particular, by Theorem 6.10 of Watanabe (2009), $\mathbb { E } [ B _ { g } ^ { * } ] = \lambda$ .
308
+
309
+ # B HYPERPARAMETERS
310
+
311
+ The hyperparameters for the various synthesis tasks are contained in Table 3. The number of samples is $R$ in Algorithm 1 and the number of datasets is $| \tau |$ . Samples are taken according to the Dirichlet distribution, a probability distribution over the simplex, which is controlled by the concentration. When the concentration is a constant across all dimensions, as is assumed here, this corresponds to a density which is symmetric about the uniform probability mass function occurring in the centre of the simplex. The value $\alpha = 1 . 0$ corresponds to the uniform distribution over the simplex. Finally, the chain temperature controls the default $\beta$ value, ie. all inverse temperature values are centered around $1 / T$ where $T$ is the chain temperature.
312
+
313
+ Table 3: Hyperparameters for Datasets and MCMC.
314
+
315
+ <table><tr><td>Hyperparameter</td><td>detectA</td><td>parityCheck</td></tr><tr><td>Dataset size (n)</td><td>200</td><td>100</td></tr><tr><td>Minimum sequence length (a)</td><td>4</td><td>1</td></tr><tr><td>Maximum sequence length (b)</td><td>7/8/9/10</td><td>5/6/7</td></tr><tr><td>Number of samples (R)</td><td>20.000</td><td>2.000</td></tr><tr><td>Number of burn-in steps</td><td>1,000</td><td>500</td></tr><tr><td>Number of datasets (|T|)</td><td>4</td><td>3</td></tr><tr><td>Target accept probability</td><td>0.8</td><td>0.8</td></tr><tr><td>Concentration (α)</td><td>1.0</td><td>1.0</td></tr><tr><td>Chain temperature (T)</td><td>log(500)/log(1000)</td><td>log(300)</td></tr><tr><td>Number of timesteps (t)</td><td>10</td><td>42</td></tr></table>
316
+
317
+ # C THE SHIFT MACHINE
318
+
319
+ The pseudo-UTM $\mathcal { U }$ is a complicated Turing machine, and the models $p ( \boldsymbol { y } | \boldsymbol { x } , \boldsymbol { w } )$ of Section 2 are therefore not easy to analyse by hand. To illustrate the kind of geometry that appears, we study the simple Turing machine shiftMachine of Clift & Murfet (2018) and formulate an associated statistical learning problem. The tape alphabet is $\Sigma = \{ \boxed { \begin{array} { r l } \end{array} } , A , B , 0 , 1 , 2 \}$ and the input to the machine will be a string of the form $\boxed { 1 } n a _ { 1 } a _ { 2 } a _ { 3 } \boxed { 2 }$ where $n$ is called the counter and $\bar { a _ { i } } \in \{ A , B \}$ . The transition function, given in loc.cit., will move the string of $A$ ’s and $B$ ’s leftwards by $n$ steps and fill the right hand end of the string with $A$ ’s, keeping the string length invariant. For example, if $\square 2 B A B \square$ is the input to $M$ , the output will be $\square 0 B A A \square$ .
320
+
321
+ Set $W = \Delta \{ 0 , 2 \} \times \Delta \{ A , B \}$ and view $w = ( h , k ) \in W$ as representing a probability distribution $( 1 - h ) \cdot 0 + h \cdot 2$ for the counter and $( 1 - k ) \cdot B + k \cdot A$ for $a _ { 1 }$ . The model is
322
+
323
+ $$
324
+ p \big ( \boldsymbol { y } | \boldsymbol { x } = ( a _ { 2 } , a _ { 3 } ) , \boldsymbol { w } \big ) = ( 1 - h ) ^ { 2 } \boldsymbol { k } \cdot \boldsymbol { A } + ( 1 - h ) ^ { 2 } ( 1 - \boldsymbol { k } ) \cdot \boldsymbol { B } + \sum _ { i = 2 } ^ { 3 } \binom { 2 } { i - 1 } h ^ { i - 1 } ( 1 - h ) ^ { 3 - i } \cdot a _ { i } .
325
+ $$
326
+
327
+ This model is derived by propagating uncertainty through shiftMachine in the same way that $p ( \boldsymbol { y } | \boldsymbol { x } , \boldsymbol { w } )$ is derived from $\mathrm { \Delta } \mathrm { { s t e p } } ^ { t }$ in Section 2 by propagating uncertainty through $\mathcal { U }$ . We assume that some distribution $q ( x )$ over $\{ A , B \} ^ { 2 }$ is given.
328
+
329
+ Example C.1. Suppose $q ( y | x ) = p ( y | x , w _ { 0 } )$ where $w _ { 0 } = ( 1 , 1 )$ . It is easy to see that
330
+
331
+ $$
332
+ K ( w ) = - { \frac { 1 } { 4 } } \sum _ { a _ { 2 } , a _ { 3 } } \log p \big ( y = a _ { 3 } | x = ( a _ { 2 } , a _ { 3 } ) , w \big ) = - { \frac { 1 } { 2 } } \log [ g ( h , k ) ]
333
+ $$
334
+
335
+ where $g ( h , k ) = \left( ( 1 - h ) ^ { 2 } k + h ^ { 2 } \right) \left( ( 1 - h ) ^ { 2 } ( 1 - k ) + h ^ { 2 } \right)$ is a polynomial in $w$ . Hence
336
+
337
+ $$
338
+ W _ { 0 } = \{ ( h , k ) \in W : g ( h , k ) = 1 \} = \mathbb { V } ( g - 1 ) \cap [ 0 , 1 ] ^ { 2 }
339
+ $$
340
+
341
+ is a semi-algebraic variety, that is, it is defined by polynomial equations and inequalities. Here $\mathbb { V } ( h )$ denotes the vanishing locus of a function $h$ .
342
+
343
+ Example C.2. Suppose $q ( A B ) = 1$ and $\begin{array} { r } { q ( y | x = A B ) = \frac { 1 } { 2 } A + \frac { 1 } { 2 } B } \end{array}$ . Then the Kullback-Leibler divergence is $\begin{array} { r } { K ( h , k ) = - \frac { 1 } { 2 } \log ( 4 f ( 1 - f ) ) } \end{array}$ where $f = ( 1 - h ) ^ { 2 } k + 2 h ( 1 - h )$ . Hence $\nabla K =$ $\begin{array} { r } { ( f - \frac { 1 } { 2 } ) \frac { 1 } { f ( 1 - f ) } \nabla f . } \end{array}$ . Note that $f$ has no critical points, and so $\nabla K = 0$ at $( h , k ) \in ( 0 , 1 ) ^ { 2 }$ if and only if $\begin{array} { r } { f ( h , k ) = \frac { 1 } { 2 } } \end{array}$ . Since $K$ is non-negative, any $w \in W _ { 0 }$ satisfies $\nabla K ( w ) = 0$ and so
344
+
345
+ $$
346
+ W _ { 0 } = [ 0 , 1 ] ^ { 2 } \cap \mathbb { V } ( 4 f ( 1 - f ) - 1 ) = [ 0 , 1 ] ^ { 2 } \cap \mathbb { V } ( f - \frac { 1 } { 2 } )
347
+ $$
348
+
349
+ is semi-algebraic. Note that the curve $\begin{array} { r } { f = \frac { 1 } { 2 } } \end{array}$ is regular while the curve $4 f ( 1 - f ) = 1$ is singular and it is the geometry of the singular curve that is related to the behaviour of $K$ . This curve is shown in Figure 5. It is straightforward to check that the determinant of the Hessian of $K$ is identically zero on $W _ { 0 }$ , so that every point on $W _ { 0 }$ is a degenerate critical point of $K$ .
350
+
351
+ ![](images/6e526ca2a8223c4c58975329dac1b2911fc337af16f18add2a573fa4cdb23bdf.jpg)
352
+ Figure 5: Values of $K ( h , k )$ on $[ 0 , 1 ] ^ { 2 }$ are shown by colour, ranging from blue (zero) to red (0.01). The singular analytic space $K = 0$ (white) and the regular analytic level set $K = 0 . 0 0 1$ (black).
353
+
354
+ # D GENERAL SOLUTION FOR DETERMINISTIC SYNTHESIS PROBLEMS
355
+
356
+ In this section we consider the case of a deterministic synthesis problem $q ( x , y )$ which is finitely supported in the sense that there exists a finite set $\mathcal { X } \subseteq \Sigma ^ { * }$ such that $q ( x ) = c$ for all $x \in \mathcal { X }$ and $q ( x ) = 0$ for all $x \notin \mathcal { X }$ . We first need to discuss the coordinates on the parameter space $W$ of (3). To specify a point on $W$ is to specify for each pair $( \sigma , q ) \in \Sigma \times Q$ (that is, for each tuple on the description tape) a triple of probability distributions
357
+
358
+ $$
359
+ \begin{array} { r l } & { \displaystyle \sum _ { \sigma ^ { \prime } \in Q } x _ { \sigma ^ { \prime } } ^ { \sigma , q } \cdot \sigma ^ { \prime } \in \Delta \Sigma , } \\ & { \displaystyle \sum _ { q ^ { \prime } \in Q } y _ { q ^ { \prime } } ^ { \sigma , q } \cdot q ^ { \prime } \in \Delta Q , } \\ & { \displaystyle \sum _ { d \in \{ L , S , R \} } z _ { d } ^ { \sigma , q } \cdot d \in \Delta \{ L , S , R \} . } \end{array}
360
+ $$
361
+
362
+ The space $W$ of distributions is therefore contained in the affine space with coordinate ring
363
+
364
+ $$
365
+ R _ { W } = \mathbb { R } \big [ \big \{ x _ { \sigma ^ { \prime } } ^ { \sigma , q } \big \} _ { \sigma , q , \sigma ^ { \prime } } , \big \{ y _ { q ^ { \prime } } ^ { \sigma , q } \big \} _ { \sigma , q , q ^ { \prime } } , \big \{ z _ { d } ^ { \sigma , q } \big \} _ { \sigma , q , d } \big ] .
366
+ $$
367
+
368
+ The function $F ^ { x } = \Delta \mathrm { s t e p } ^ { t } ( x , - ) : W \longrightarrow \Delta Q$ is polynomial (Clift & Murfet, 2018, Proposition 4.2) and we denote for $s \in Q$ by $F _ { s } ^ { x } \in R _ { W }$ the polynomial computing the associated component of the function $F ^ { x }$ . Let $\partial W$ denote the boundary of the manifold with corners $W$ , that is, the set of all points on $W$ where at least one of the coordinate functions given above vanishes
369
+
370
+ $$
371
+ \partial W = \mathbb { V } \big ( \prod _ { \sigma , q } \Big [ \prod _ { \sigma ^ { \prime } \in Q } x _ { \sigma ^ { \prime } } ^ { \sigma , q } \prod _ { q ^ { \prime } \in Q } y _ { q ^ { \prime } } ^ { \sigma , q } \prod _ { \substack { d \in \{ L , S , R \} } } z _ { d } ^ { \sigma , q } \Big ] \big )
372
+ $$
373
+
374
+ where $\mathbb { V } ( h )$ denotes the vanishing locus of $h$ .
375
+
376
+ Lemma D.1. $W _ { 0 } \neq W$
377
+
378
+ Proof. Choose $x \in \mathcal { X }$ with $q ( x ) > 0$ and let $y$ be such that $q ( y | x ) = 1$ . Let $w \in W ^ { c o d e }$ be the code for the Turing machine which ignores the symbol under the head and current state, transitions to some fixed state $s \neq y$ and stays. Then $w \not \in W _ { 0 }$ . □
379
+
380
+ Lemma D.2. The set $W _ { 0 }$ is semi-algebraic and $W _ { 0 } \subseteq \partial W$ .
381
+
382
+ Proof. Given $x \in \Sigma ^ { * }$ with $q ( x ) > 0$ we write $y = y ( x )$ for the unique state with $q ( x , y ) \neq 0$ . In this notation the Kullback-Leibler divergence is
383
+
384
+ $$
385
+ K ( w ) = \sum _ { x \in \mathcal { X } } c D _ { K L } ( y | | F ^ { x } ( w ) ) = - c \sum _ { x \in \mathcal { X } } \log F _ { y } ^ { x } ( w ) = - c \log \prod _ { x \in \mathcal { X } } F _ { y } ^ { x } ( w ) .
386
+ $$
387
+
388
+ Hence
389
+
390
+ $$
391
+ W _ { 0 } = W \cap \bigcap _ { x \in \mathcal { X } } \mathbb { V } ( 1 - F _ { y } ^ { x } ( w ) )
392
+ $$
393
+
394
+ is semi-algebraic.
395
+
396
+ Recall that the function $\Delta \mathrm { s t e p } ^ { t }$ is associated to an encoding of the UTM in linear logic by the Sweedler semantics (Clift & Murfet, 2018) and the particular polynomials involved have a form that is determined by the details of that encoding (Clift & Murfet, 2018, Proposition 4.3). From the design of our UTM we obtain positive integers $l _ { \sigma } , m _ { q } , n _ { d }$ for $\sigma \in \Sigma , q \in \bar { Q } , d \in \{ L , S , R \}$ and a function $\pi : \Theta \longrightarrow Q$ where
397
+
398
+ $$
399
+ \Theta = \prod _ { \sigma , q } \Sigma ^ { l _ { \sigma } } \times Q ^ { m _ { q } } \times \{ L , S , R \} ^ { n _ { d } } .
400
+ $$
401
+
402
+ We represent elements of $\Theta$ by tuples $( \mu , \zeta , \xi ) \in \Theta$ where $\mu ( \sigma , q , i ) \in \Sigma$ for $\sigma \in \Sigma , q \in Q$ and $1 \leq i \leq l _ { \sigma }$ and similarly $\zeta ( \sigma , q , j ) \in Q$ and $\xi ( \sigma , q , k ) \in \{ L , S , R \}$ . The polynomial $F _ { s } ^ { x }$ is
403
+
404
+ $$
405
+ F _ { s } ^ { x } = \sum _ { ( \mu , \zeta , \xi ) \in \Theta } \delta ( s = \pi ( \mu , \zeta , \xi ) ) \prod _ { \sigma , q } \Big [ \prod _ { i = 1 } ^ { l _ { \sigma } } x _ { \mu ( \sigma , q , i ) } ^ { \sigma , q } \prod _ { j = 1 } ^ { m _ { q } } y _ { \zeta ( \sigma , q , j ) } ^ { \sigma , q } \prod _ { k = 1 } ^ { n _ { d } } z _ { \xi ( \sigma , q , k ) } ^ { \sigma , q } \Big ]
406
+ $$
407
+
408
+ where $\delta$ is a Kronecker delta. With this in hand we may compute
409
+
410
+ $$
411
+ \begin{array} { r } { W _ { 0 } = W \cap \displaystyle \bigcap _ { x \in \mathcal { X } } \mathbb { V } ( 1 - F _ { y } ^ { x } ( w ) ) } \\ { = W \cap \displaystyle \bigcap _ { x \in \mathcal { X } } \bigcap _ { s \neq y } \mathbb { V } ( F _ { s } ^ { x } ( w ) ) . } \end{array}
412
+ $$
413
+
414
+ But $F _ { s } ^ { x }$ is a polynomial with non-negative integer coefficients, which takes values in $[ 0 , 1 ]$ for $w \in$ $W$ . Hence it vanishes on $w$ if and only if for each triple $\mu , \zeta , \xi$ with $s = \pi ( \mu , \zeta , \xi )$ one or more of the coordinate functions xσ,qµ(σ,q,i), yσ,qζ(σ,q,j), zσ,qξ(σ,q,k) vanishes on $w$ .
415
+
416
+ The desired conclusion follows unless for every $x \in \mathcal { X }$ and $( \mu , \zeta , \xi ) \in \Theta$ we have $\pi ( \mu , \zeta , \xi ) = y$ so that $F _ { s } ^ { x } = 0$ for all $s \neq y$ . But in this case case $W _ { 0 } = W$ which contradicts Lemma D.1. □
417
+
418
+ # E STAGED PSEUDO-UTM
419
+
420
+ Simulating a Turing machine $M$ with tape alphabet $\Sigma$ and set of states $Q$ on a standard UTM requires the specification of an encoding of $\Sigma$ and $Q$ in the tape alphabet of the UTM. From the point of view of exploring the geometry of program synthesis, this additional complexity is uninteresting and so here we consider a staged pseudo-UTM whose alphabet is
421
+
422
+ $$
423
+ \Sigma _ { \mathrm { U T M } } = \Sigma \cup Q \cup \{ L , R , S \} \cup \{ X , \sqsubseteq \}
424
+ $$
425
+
426
+ where the union is disjoint where $\boxed { \begin{array} { r l } \end{array} }$ is the blank symbol (which is distinct from the blank symbol of $M$ ). Such a machine is capable of simulating any machine with tape alphabet $\Sigma$ and set of states $Q$ but cannot simulate arbitrary machines and is not a UTM in the standard sense. The adjective staged refers to the design of the UTM, which we now explain. The set of states is
427
+
428
+ $$
429
+ \begin{array} { r } { Q _ { \mathrm { U T M } } = \{ \mathrm { c o m p S y m b o l , c o m p S t a t e , c o p y S y m b o l , c o p y S t a t e , c o p y } \mathrm { ~ } \forall \mathrm { t o p y ~ } \mathrm { ~ c o p y ~ } \mathrm { ~ c o p y ~ } \mathrm { ~ c o p y ~ } \mathrm { ~ c o p y ~ } \mathrm { ~ c o p y ~ } \mathrm { ~ c o p y ~ } \mathrm { ~ c o m p ~ } } \\ \mathrm { ~ \ " c o m p S t a t e , ~ } \mathrm { \ " { c o p y S y m b o l , } \mathrm { ~ \ " { c o p y S t a t e , } \mathrm { ~ - c o p y S t a t e , } \mathrm { ~ - c o p y D i r , } \mathrm { ~ \ ~ } } } \\ \mathrm { ~ \ " { u p d a t e S y m b o l , u p d a t e S t a t e , u p d a t e D i r , r e s e t D e s c r ~ } \} . } \end{array}
430
+ $$
431
+
432
+ The UTM has four tapes numbered from 0 to 3, which we refer to as the description tape, the staging tape, the state tape and the working tape respectively. Initially the description tape contains a string of the form
433
+
434
+ $$
435
+ X s _ { 0 } q _ { 0 } s _ { 0 } ^ { \prime } q _ { 0 } ^ { \prime } d _ { 0 } s _ { 1 } q _ { 1 } s _ { 1 } ^ { \prime } q _ { 1 } ^ { \prime } d _ { 1 } \dots s _ { N } q _ { N } s _ { N } ^ { \prime } q _ { N } ^ { \prime } d _ { N } X ,
436
+ $$
437
+
438
+ corresponding to the tuples which define $M$ , with the tape head initially on $s _ { 0 }$ . The staging tape is initially a string $X X X$ with the tape head over the second $X$ . The state tape has a single square containing some distribution in $\Delta Q$ , corresponding to the initial state of the simulated machine $M$ , with the tape head over that square. Each square on the the working tape is some distribution in $\Delta \Sigma$ with only finitely many distributions different from $\boxed { \begin{array} { r l } \end{array} }$ . The UTM is initialized in state compSymbol.
439
+
440
+ The operation of the UTM is outlined in Figure 6. It consists of two phases; the scan phase (middle and right path), and the update phase (left path). During the scan phase, the description tape is scanned from left to right, and the first two squares of each tuple are compared to the contents of the working tape and state tape respectively. If both agree, then the last three symbols of the tuple are written to the staging tape (middle path), otherwise the tuple is ignored (right path). Once the $X$ at the end of the description tape is reached, the UTM begins the update phase, wherein the three symbols on the staging tape are then used to print the new symbol on the working tape, to update the simulated state on the state tape, and to move the working tape head in the appropriate direction. The tape head on the description tape is then reset to the initial $X$ .
441
+
442
+ Remark E.1. One could imagine a variant of the UTM which did not include a staging tape, instead performing the actions on the work and state tape directly upon reading the appropriate tuple on the description tape. However, this is problematic when the contents of the state or working tape are distributions, as the exact time-step of the simulated machine can become unsynchronised, increasing entropy. As a simple example, suppose that the contents of the state tape were $0 . 5 q + 0 . 5 p$ , and the symbol under the working tape head was $s$ . Upon encountering the tuple $s q s { ' } q { ' } R$ , the machine would enter a superposition of states corresponding to the tape head having both moved right and not moved, complicating the future behaviour.
443
+
444
+ We define the period of the UTM to be the smallest nonzero time interval taken for the tape head on the description tape to return to the initial $X$ , and the machine to reenter the state compSymbol. If the number of tuples on the description tape is $N$ , then the period of the UTM is $T = 1 0 N + 5$ . Moreover, other than the working tape, the position of the tape heads are $T$ -periodic.
445
+
446
+ # F SMOOTH TURING MACHINES
447
+
448
+ Let $\mathcal { U }$ be the staged pseudo-UTM of Appendix E. In defining the model $p ( \boldsymbol { y } | \boldsymbol { x } , \boldsymbol { w } )$ associated to a synthesis problem in Section 2 we use a smooth relaxation $\Delta \mathrm { { s t e p } } ^ { t }$ of the step function of $\mathcal { U }$ . In this appendix we define the smooth relaxation of any Turing machine following Clift & Murfet (2018).
449
+
450
+ Let $M = ( \Sigma , Q , \delta )$ be a Turing machine with a finite set of symbols $\Sigma$ , a finite set of states $Q$ and transition function $\delta : \Sigma \times Q \bar { \to } \Sigma \times Q \times \{ - 1 , 0 , 1 \}$ . We write $\delta _ { i } = \mathsf { p r o j } _ { i } \circ \delta$ for the $i$ th component of $\delta$ for $i \in \{ 1 , 2 , 3 \}$ . For $\sqsubseteq \Sigma$ , let
451
+
452
+ $$
453
+ \Sigma ^ { \mathbb { Z } , \sqcap } = \{ f : \mathbb { Z } \to \Sigma | f ( i ) = \bigsqcup \mathrm { e x c e p t ~ f o r ~ f i n i t e l y ~ m a n y ~ } i \} .
454
+ $$
455
+
456
+ ![](images/8439277769c907e73a890f5d22819ba3dcc4dc5cc4f53963fd296742f6e34336.jpg)
457
+ Figure 6: The UTM. Each of the rectangles are states, and an arrow $q q ^ { \prime }$ has the following interpretation: if the UTM is in state $q$ and sees the tape symbols (on the four tapes) as indicated by the source of the arrow, then the UTM transitions to state $q ^ { \prime }$ , writes the indicated symbols (or if there is no write instruction, simply rewrites the same symbols back onto the tapes), and performs the indicated movements of each of the tape heads. The symbols $a , b , c , d$ stand for generic symbols which are not $X$ .
458
+
459
+ We can associate to $M$ a discrete dynamical system ${ \widehat { M } } = ( \Sigma ^ { \mathbb { Z } , \sqcup } \times Q , { \mathrm { s t e } } ]$ p) where
460
+
461
+ $$
462
+ { \mathrm { s t e p } } : \Sigma ^ { \mathbb { Z } , \sqcap } \times Q \Sigma ^ { \mathbb { Z } , \sqcap } \times Q
463
+ $$
464
+
465
+ is the step function defined by
466
+
467
+ $$
468
+ \mathrm { s t e p } ( \sigma , q ) = \Bigl ( \alpha ^ { \delta _ { 3 } ( \sigma _ { 0 } , q ) } \bigl ( \ldots , \sigma _ { - 2 } , \sigma _ { - 1 } , \delta _ { 1 } ( \sigma _ { 0 } , q ) , \sigma _ { 1 } , \sigma _ { 2 } , \ldots \bigr ) , \delta _ { 2 } ( \sigma _ { 0 } , q ) \Bigr ) .
469
+ $$
470
+
471
+ with shift map $\alpha ^ { \delta _ { 3 } ( \sigma _ { 0 } , q ) } ( \sigma ) _ { u } = \sigma _ { u + \delta _ { 3 } ( \sigma _ { 0 } , q ) } .$
472
+
473
+ Let $X$ be a finite set. The standard $X$ -simplex is defined as
474
+
475
+ $$
476
+ \Delta X = \{ \sum _ { x \in X } \lambda _ { x } x \in \mathbb { R } X | \sum _ { x } \lambda _ { x } = 1 { \mathrm { a n d } } \lambda _ { x } \geq 0 { \mathrm { f o r ~ a l l } } x \in X \}
477
+ $$
478
+
479
+ where $\mathbb { R } X$ is the free vector space on $X$ . We often identify $X$ with the vertices of $\Delta X$ under the canonical inclusion $i : X \to \Delta X$ given by $\begin{array} { r } { i ( x ) = \sum _ { x ^ { \prime } \in X } \delta _ { x = x ^ { \prime } } x ^ { \prime } } \end{array}$ . For example $\{ 0 , 1 \} \subset$ $\Delta ( \{ 0 , 1 \} ) \simeq [ 0 , 1 ]$ .
480
+
481
+ A tape square is said to be at relative position $u \in \mathbb { Z }$ if it is labelled $u$ after enumerating all squares in increasing order from left to right such that the square currently under the head is assigned zero. Consider the following random variables at times $t \geq 0$ :
482
+
483
+ • $Y _ { u , t } \in \Sigma$ : the content of the tape square at relative position $u$ at time $t$ .
484
+ • $S _ { t } \in Q$ : the internal state at time $t$ .
485
+ · $W r _ { t } \in \Sigma$ : the symbol to be written, in the transition from time $t$ to $t + 1$ .
486
+ · $M v _ { t } \in \{ L , S , R \}$ : the direction to move, in the transition from time $t$ to $t + 1$ .
487
+
488
+ We call a smooth dynamical system a pair $( A , \phi )$ consisting of a smooth manifold $A$ with corners together with a smooth transformation $\phi : A A$ .
489
+
490
+ Definition F.1. Let $M = ( \Sigma , Q , \delta )$ be a Turing machine. The smooth relaxation of $M$ is the smooth dynamical system $( ( \Delta \Sigma ) ^ { \mathbb { Z } , \sqsupset } \times \Delta Q , \Delta \mathrm { s t e p } )$ where
491
+
492
+ $$
493
+ \Delta \mathrm { s t e p } : ( \Delta \Sigma ) ^ { \mathbb { Z } , \square } \times \Delta Q ( \Delta \Sigma ) ^ { \mathbb { Z } , \square } \times \Delta Q
494
+ $$
495
+
496
+ is a smooth transformation sending a state $( \{ P ( Y _ { u , t } ) \} _ { u \in \mathbb { Z } } , P ( S _ { t } ) )$ to $( \{ P ( Y _ { u , t + 1 } ) \} _ { u \in \mathbb { Z } } , P ( S _ { t + 1 } ) )$ determined by the equations
497
+
498
+ $$
499
+ \begin{array} { r } { P ( M v _ { t } = d | C ) = \sum _ { \sigma , q } \delta _ { \delta _ { 3 } ( \sigma , q ) = d } P ( Y _ { 0 , t } = \sigma | C ) P ( S _ { t } = q | C ) , } \end{array}
500
+ $$
501
+
502
+ $$
503
+ \begin{array} { r } { P ( W r _ { t } = \sigma | C ) = \sum _ { \sigma ^ { \prime } , q } \delta _ { \delta _ { 1 } ( \sigma ^ { \prime } , q ) = \sigma } P ( Y _ { 0 , t } = \sigma ^ { \prime } | C ) P ( S _ { t } = q | C ) , } \end{array}
504
+ $$
505
+
506
+ $$
507
+ \begin{array} { r l } & { P ( Y _ { u , t + 1 } = \sigma | C ) = P ( M v _ { t } = L | C ) \Big ( \delta _ { u \neq 1 } P ( Y _ { u - 1 , t } = \sigma | C ) + \delta _ { u = 1 } P ( W r _ { t } = \sigma | C ) \Big ) } \\ & { \qquad + P ( M v _ { t } = S | C ) \Big ( \delta _ { u \neq 0 } P ( Y _ { u , t } = \sigma | C ) + \delta _ { u = 0 } P ( W r _ { t } = \sigma | C ) \Big ) } \\ & { \qquad + P ( M v _ { t } = R | C ) \Big ( \delta _ { u \neq - 1 } P ( Y _ { u + 1 , t } = \sigma | C ) + \delta _ { u = - 1 } P ( W r _ { t } = \sigma | C ) \Big ) , } \end{array}
508
+ $$
509
+
510
+ where $C \in ( \Delta \Sigma ) ^ { \mathbb { Z } , \square } \times \Delta Q$ is an initial state.
511
+
512
+ We will call the smooth relaxation of a Turing machine a smooth Turing machine. A smooth Turing machine encodes uncertainty in the initial configuration of a Turing machine together with an update rule for how to propagate this uncertainty over time. We interpret the smooth step function as updating the state of belief of a “naive” Bayesian observer. This nomenclature comes from the assumption of conditional independence between random variables in our probability functions.
513
+
514
+ Remark F.2. Propagating uncertainty using standard probability leads to a smooth dynamical system which encodes the state evolution of an “ordinary” Bayesian observer of the Turing machine. This requires the calculation of various joint distributions which makes such an extension computationally difficult to work with. Computation aside, the naive probabilistic extension is justified from the point of view of derivatives of algorithms according to the denotational semantics of differential linear logic. See Clift & Murfet (2018) for further details.
515
+
516
+ We call the smooth extension of a universal Turing machine a smooth universal Turing machine. Recall that the staged pseudo-UTM $\mathcal { U }$ has four tapes: the description tape, the staging tape, the state tape and working tape. The smooth relaxation of $\mathcal { U }$ is a smooth dynamical system
517
+
518
+ $$
519
+ \Delta \mathrm { s t e p } _ { \mathcal { U } } : [ ( \Delta \Sigma _ { \mathrm { U T M } } ) ^ { \mathbb { Z } , \bigtriangledown } ] ^ { 4 } \times \Delta Q _ { \mathrm { U T M } } \to [ ( \Delta \Sigma _ { \mathrm { U T M } } ) ^ { \mathbb { Z } , \bigtriangledown } ] ^ { 4 } \times \Delta Q _ { \mathrm { U T M } } .
520
+ $$
521
+
522
+ If we use the staged pseudo-UTM to simulate a Turing machine with tape alphabet $\Sigma \subseteq \Sigma _ { \mathrm { U T M } }$ and states $Q \subseteq \Sigma _ { \mathrm { U T M } }$ then with some determined initial state the function $\Delta$ step restricts to
523
+
524
+ $$
525
+ \Delta \mathrm { s t e p } _ { \mathscr { U } } : ( \Delta \Sigma ) ^ { \mathbb { Z } , \sharp } \times { \mathscr { W } } \times \Delta Q \times \mathscr { X } \longrightarrow ( \Delta \Sigma ) ^ { \mathbb { Z } , \sharp } \times { \mathscr { W } } \times \Delta Q \times \mathscr { X }
526
+ $$
527
+
528
+ where the first factor is the configuration of the work tape, $W$ is as in (3) and
529
+
530
+ $$
531
+ \mathcal { X } = [ ( \Delta \Sigma _ { \mathrm { U T M } } ) ^ { \mathbb { Z } , \sqcap } ] \times \Delta Q _ { \mathrm { U T M } }
532
+ $$
533
+
534
+ where the first factor is the configuration of the staging tape. Since $\mathcal { U }$ is periodic of period $T =$ $1 0 N + 5$ (Appendix E) the iterated function $( \Delta \mathrm { s t e p } _ { \mathscr { U } } ) ^ { T }$ takes an input with staging tape in its
535
+
536
+ default state $X X X$ and UTM state compSymbol and returns a configuration with the same staging tape and state, but with the configuration of the work tape, description tape and state tape updated by one complete simulation step. That is,
537
+
538
+ $$
539
+ ( \Delta \operatorname { s t e p } _ { \mathcal { U } } ) ^ { T } ( x , w , q , X X X , \mathrm { c o m p S y m b o l } ) = ( F ( x , w , q ) , X X X , \mathrm { c o m p S y m b o l } )
540
+ $$
541
+
542
+ for some smooth function
543
+
544
+ $$
545
+ F : ( \Delta \Sigma ) ^ { \mathbb { Z } , \sharp } \times W \times \Delta Q \longrightarrow ( \Delta \Sigma ) ^ { \mathbb { Z } , \sharp } \times W \times \Delta Q .
546
+ $$
547
+
548
+ Finally we can define the function $\Delta \mathrm { s t e p } ^ { t }$ of (4). We assume all Turing machines are initialised in some common state init $\in Q$ .
549
+
550
+ Definition F.3. Given $t \geq 0$ we define $\Delta \operatorname { s t e p } ^ { t } : \Sigma ^ { * } \times W \longrightarrow \Delta Q$ by
551
+
552
+ $$
553
+ \Delta \operatorname { s t e p } ^ { t } ( x , w ) = \Pi _ { Q } F ^ { t } ( x , w , \operatorname { i n i t } )
554
+ $$
555
+
556
+ where $\Pi _ { Q }$ is the projection onto $\Delta Q$ .
557
+
558
+ # G DIRECT SIMULATION
559
+
560
+ For computational efficiency in our PyTorch implementation of the staged pseudo-UTM we implement $F$ of (9) rather than $\Delta \mathrm { s t e p } _ { \mathcal { U } }$ . We refer to this as direction simulation since it means that we update in one step the state and working tape of the UTM for a full cycle where a cycle consists of $T = 1 0 N + 5$ steps of the UTM.
561
+
562
+ Let $S ( t )$ and $Y _ { u } ( t )$ be random variables describing the contents of state tape and working tape in relative positions $0 , u$ respectively after $t \geq 0$ time steps of the UTM. We define ${ \widetilde { S } } ( t ) : = S ( 4 + T t )$ and $\widetilde { Y } _ { u } ( t ) : = Y _ { u } ( 4 + T t )$ where $t \geq 0$ and $u \in \mathbb { Z }$ . The task then is to define functions $f , g$ such that
563
+
564
+ $$
565
+ \widetilde { S } ( t + 1 ) = f ( \widetilde { S } ( t ) )
566
+ $$
567
+
568
+ $$
569
+ \widetilde Y _ { u } ( t + 1 ) = g ( \widetilde Y _ { u } ( t ) ) .
570
+ $$
571
+
572
+ The functional relationship is given as follows: for $1 \leq i \leq N$ indexing tuples on the description tape, while processing that tuple, the UTM is in a state distribution $\lambda _ { i } \cdot \bar { q } + ( 1 - \lambda _ { i } ) \cdot \neg \bar { q }$ where $\bar { q } \in$ {copySymbol, copyState, $\mathrm { c o p y D i r } \}$ . Given the initial state of the description tape, we assume uncertainty about $s ^ { \prime } , q ^ { \prime } , d$ only. This determines a map
573
+
574
+ $$
575
+ \theta : \{ 1 , \dots , N \} \to \Sigma \times Q
576
+ $$
577
+
578
+ where the description tape at tuple number $i$ is given by $\theta ( i ) _ { 1 } \theta ( i ) _ { 2 } P ( s _ { i } ^ { \prime } ) P ( q _ { i } ^ { \prime } ) P ( d _ { i } )$ . We define the conditionally independent joint distribution between $\{ \widetilde { Y } _ { 0 , t - 1 } , \widetilde { S } _ { t - 1 } \}$ by
579
+
580
+ $$
581
+ \begin{array} { l } { { \lambda _ { i } = \displaystyle \sum _ { \sigma \in \Sigma } \delta _ { \theta ( i ) _ { 1 } = \sigma } P ( \widetilde { Y } _ { 0 , t - 1 } = \sigma ) \cdot \sum _ { q \in Q } \delta _ { \theta ( i ) _ { 2 } = q } P ( \widetilde { S } _ { t - 1 } = q ) \hfill } } \\ { { \quad = P ( \widetilde { Y } _ { 0 , t - 1 } = \theta ( i ) _ { 1 } ) \cdot P ( \widetilde { S } _ { t - 1 } = \theta ( i ) _ { 2 } ) . } } \end{array}
582
+ $$
583
+
584
+ We then calculate a recursive set of equations for $0 \leq j \leq N$ describing distributions $P ( \hat { s } _ { j } ) , P ( \hat { q } _ { j } )$ and $P ( \hat { d } _ { j } )$ on the staging tape after processing all tuples up to and including tuple $j$ . These are given by $P ( \hat { s } _ { 0 } ) = P ( \hat { q } _ { 0 } ) = P ( \hat { d } _ { 0 } ) = 1 \cdot X$ and
585
+
586
+ $$
587
+ \begin{array} { r l } & { \displaystyle { P ( \hat { s } _ { i } ) = \sum _ { \sigma \in \Sigma } \{ \lambda _ { i } \cdot P ( s _ { i } ^ { \prime } = \sigma ) + ( 1 - \lambda _ { i } ) \cdot P ( \hat { s } _ { i - 1 } = \sigma ) \} \cdot \sigma + ( 1 - \lambda _ { i } ) \cdot P ( \hat { s } _ { i - 1 } = X ) \cdot X } } \\ & { \displaystyle { P ( \hat { q } _ { i } ) = \sum _ { \ q \in Q } \{ \lambda _ { i } \cdot P ( q _ { i } ^ { \prime } = q ) + ( 1 - \lambda _ { i } ) \cdot P ( \hat { q } _ { i - 1 } = q ) \} \cdot q + ( 1 - \lambda _ { i } ) \cdot P ( \hat { q } _ { i - 1 } = X ) \cdot X } } \\ & { \displaystyle { \hat { l } _ { i } ) = \sum _ { \alpha \in \{ L , R , S \} } \{ \lambda _ { i } \cdot P ( d _ { i } = a ) + ( 1 - \lambda _ { i } ) \cdot P ( \hat { d } _ { i - 1 } = a ) \} \cdot a + ( 1 - \lambda _ { i } ) \cdot P ( \hat { d } _ { i - 1 } = X ) \cdot X . } } \end{array}
588
+ $$
589
+
590
+ Let $A _ { \sigma } = P ( \widehat { s } _ { N } = X ) \cdot P ( \widetilde { Y } _ { 0 , t - 1 } = \sigma ) + P ( \widehat { s } _ { N } = \sigma ) .$ . In terms of the above distributions
591
+
592
+ $$
593
+ P ( \widetilde { S } _ { t } ) = \sum _ { q \in Q } \Big ( P ( \hat { q } _ { N } = X ) \cdot P ( \widetilde { S } _ { t - 1 } = q ) + P ( \hat { q } _ { N } = q ) \Big ) \cdot q
594
+ $$
595
+
596
+ and
597
+
598
+ $$
599
+ \begin{array} { r l } & { P ( \widetilde { Y } _ { u , t } = \sigma ) = P ( \hat { d } _ { N } = L ) \left( \delta _ { u \neq 1 } P ( \widetilde { Y } _ { u - 1 , t - 1 } = \sigma ) + \delta _ { u = 1 } A _ { \sigma } \right) } \\ & { \quad \quad \quad \quad \quad + P ( \hat { d } _ { N } = R ) \left( \delta _ { u \neq - 1 } P ( \widetilde { Y } _ { u + 1 , t - 1 } = \sigma ) + \delta _ { u = - 1 } A _ { \sigma } \right) } \\ & { \quad \quad \quad \quad \quad + P ( \hat { d } _ { N } = S ) \left( \delta _ { u \neq 0 } P ( \widetilde { Y } _ { u , t - 1 } = \sigma ) + \delta _ { u = 0 } A _ { \sigma } \right) } \\ & { \quad \quad \quad \quad \quad + P ( \hat { d } _ { N } = X ) \left( \delta _ { u \neq 0 } P ( \widetilde { Y } _ { u , t - 1 } = \sigma ) + \delta _ { u = 0 } A _ { \sigma } \right) . } \end{array}
600
+ $$
601
+
602
+ Using these equations, we can state efficient update rules for the staging tape. We have
603
+
604
+ $$
605
+ \begin{array} { l l l } { { \displaystyle P ( \hat { s } _ { N } = X ) = \prod _ { j = 1 } ^ { N } ( 1 - \lambda _ { j } ) , \quad } } & { { \displaystyle P ( \hat { s } _ { N } = \sigma ) = \sum _ { j = 1 } ^ { N } \lambda _ { j } \cdot P ( s _ { j } ^ { \prime } = \sigma ) \prod _ { l = j + 1 } ^ { N } ( 1 - \lambda _ { l } ) } } \\ { { \displaystyle P ( \hat { q } _ { N } = X ) = \prod _ { j = 1 } ^ { N } ( 1 - \lambda _ { j } ) , \quad } } & { { \displaystyle P ( \hat { q } _ { N } = q ) = \sum _ { j = 1 } ^ { N } \lambda _ { j } \cdot P ( q _ { j } ^ { \prime } = q ) \prod _ { l = j + 1 } ^ { N } ( 1 - \lambda _ { l } ) } } \\ { { \displaystyle P ( \hat { d } _ { N } = X ) = \prod _ { j = 1 } ^ { N } ( 1 - \lambda _ { j } ) , \quad } } & { { \displaystyle P ( \hat { d } _ { N } = a ) = \sum _ { j = 1 } ^ { N } \lambda _ { j } \cdot P ( d _ { j } = a ) \prod _ { l = j + 1 } ^ { N } ( 1 - \lambda _ { l } ) . } } \end{array}
606
+ $$
607
+
608
+ To enable efficient computation, we can express these equations using tensor calculus. Let $\lambda =$ $( \lambda _ { 1 } , \dots , \lambda _ { N } ) \in \mathbb { R } ^ { N }$ . We view
609
+
610
+ $$
611
+ \theta : \mathbb { R } ^ { N } \xrightarrow { } \mathbb { R } \Sigma \otimes \mathbb { R } Q
612
+ $$
613
+
614
+ as a tensor and so $\begin{array} { r } { \theta = \sum _ { i = 1 } ^ { N } i \otimes \theta ( i ) _ { 1 } \otimes \theta ( i ) _ { 2 } \in \mathbb { R } ^ { N } \otimes \mathbb { R } \Sigma \otimes \mathbb { R } Q . } \end{array}$ . Then
615
+
616
+ $$
617
+ \theta _ { - } \left( P ( \widetilde { Y } _ { 0 , t - 1 } ) \otimes P ( \widetilde { S } _ { t - 1 } ) \right) = \sum _ { i = 1 } ^ { N } i \cdot P ( \widetilde { Y } _ { 0 , t - 1 } = \theta ( i ) _ { 1 } ) \cdot P ( \widetilde { S } _ { t - 1 } = \theta ( i ) _ { 2 } ) = \lambda .
618
+ $$
619
+
620
+ If we view $P ( s _ { * } ^ { \prime } = \bullet ) \in \mathbb { R } ^ { N } \otimes \mathbb { R } ^ { \Sigma }$ as a tensor, then
621
+
622
+ $$
623
+ { \mathcal { S } } ( { \widehat { \mathfrak { s } } } _ { N } ) = \sum _ { j = 1 } ^ { N } P ( s _ { j } ^ { \prime } = \bullet ) \cdot \left( \lambda _ { j } \prod _ { l = j + 1 } ^ { N } ( 1 - \lambda _ { l } ) \right) = \lambda \cdot \left( \prod _ { l = 2 } ^ { N } ( 1 - \lambda _ { l } ) , \prod _ { l = 3 } ^ { N } ( 1 - \lambda _ { l } ) , \ldots , ( 1 - \lambda _ { N } ) , 1 \right)
624
+ $$
625
+
626
+ can be expressed in terms on the vector $\lambda$ only. Similarly, $P ( q _ { * } ^ { \prime } = \bullet ) \in \mathbb { R } ^ { N } \otimes \mathbb { R } ^ { Q }$ with
627
+
628
+ $$
629
+ { \cal P } ( \hat { q } _ { N } ) = \sum _ { j = 1 } ^ { N } P ( q _ { j } ^ { \prime } = \bullet ) \cdot \left( \lambda _ { j } \prod _ { l = j + 1 } ^ { N } ( 1 - \lambda _ { l } ) \right) = \lambda \cdot \left( \prod _ { l = 2 } ^ { N } ( 1 - \lambda _ { l } ) , \prod _ { l = 3 } ^ { N } ( 1 - \lambda _ { l } ) , \ldots , ( 1 - \lambda _ { N } ) , 1 \right)
630
+ $$
631
+
632
+ and $P ( d _ { * } = \bullet ) \in \mathbb { R } ^ { N } \otimes \mathbb { R } ^ { 3 }$ with
633
+
634
+ $$
635
+ ^ { > } ( \hat { d } _ { N } ) = \sum _ { j = 1 } ^ { N } P ( d _ { j } = \bullet ) \cdot \left( \lambda _ { j } \prod _ { l = j + 1 } ^ { N } ( 1 - \lambda _ { l } ) \right) = \lambda \cdot \left( \prod _ { l = 2 } ^ { N } ( 1 - \lambda _ { l } ) , \prod _ { l = 3 } ^ { N } ( 1 - \lambda _ { l } ) , \ldots , ( 1 - \lambda _ { N } ) , 1 \right) .
636
+ $$
md/train/zoQJBVrhnn3/zoQJBVrhnn3.md CHANGED
@@ -251,7 +251,7 @@ $$
251
  $$
252
 
253
  199 where $\begin{array} { r } { | k | _ { m - 1 } ^ { * } = \sum _ { i = 1 } ^ { m - 1 } \mathcal { T } ( z _ { i } ^ { * } = k ) } \end{array}$ . Here, the hard assignment $z _ { m } ^ { * }$ for $\tau _ { m }$ is based on previous
254
- 200 assignments $z _ { 1 : m - 1 } ^ { * }$ and policies $\phi _ { k } ^ { m - 1 }$ , which is equivalent to applying assumed density filtering
255
  201 (ADF) [41] to approximate the true posterior in Eq. (3) with a Delta distribution $\delta \big ( z _ { 1 : m } ^ { * } \big )$ . The hard
256
  202 assignment prevents creating a new policy at each step if $\tau _ { m }$ is assigned to an existing policy, which
257
  203 significantly reduces the memory usage. Furthermore, the MAP estimations for all existing policies,
@@ -318,7 +318,7 @@ output :Policy $\bar { \pi } _ { 1 , \ldots , E } ^ { i }$ and meta-policy $\sig
318
  Initialize learning agent $i$ ’s policy $\pi _ { 0 } ^ { i }$
319
  Initialize a memory buffer $\mathbf { B }$
320
  Initialize opponent meta-policy $\sigma ^ { - i } ( \cdot ) = 1$
321
- for epoch e in $\{ 1 , 2 , \ldots , E \}$ do for episode $h \in \{ 1 , 2 , \dots , H \}$ do Play an episode against the opponent with strategy $\sigma _ { R N R } ^ { 1 }$ Collect the trajectory $\tau _ { e , h }$ and save them into $\mathbf { B }$ end $\begin{array} { r l } & { \tilde { \sigma } ^ { 2 } , \tilde { \Pi } ^ { 2 } = \mathrm { o p p o n e n t } \underline { { \mathrm { { m o d e l i n g } } } } ( \mathbf { B } ) } \\ & { \bar { p } = \frac { 1 } { | \tilde { \Pi } ^ { 2 } | } \sum _ { j } p ^ { j } \tilde { \sigma } ^ { 2 } ( j ) } \end{array}$ Compute missing entries in $U ^ { \tilde { \Pi } }$ from $\tilde { \Pi } = \Pi ^ { 1 } \times \tilde { \Pi } ^ { 2 }$ by simulations ${ \bf \underline { { \ } } } , \sigma _ { R N R } ^ { 2 } = \mathrm { R N R } _ { - } \mathrm { s o l v e r } ( U ^ { \tilde { \Pi } } , \bar { p } , \tilde { \sigma } ^ { 2 } )$ $h \in \{ 1 , 2 , \dots , H \}$ Sample ⇡˜2 from 2RNR Train oracle $\pi ^ { 1 }$ over $\rho \sim \left( \pi ^ { 1 } , \tilde { \pi } ^ { 2 } \right)$ end $\Pi ^ { 1 } = \Pi ^ { 1 } \cup \left\{ \pi ^ { 1 } \right\}$ Compute missing entries in $U ^ { \tilde { \Pi } }$ from $\tilde { \Pi } = \Pi ^ { 1 } \times \tilde { \Pi } ^ { 2 }$ by simulations $\sigma _ { R N R } ^ { 1 } , \ l _ { - } = \mathrm { R N R \_ s o l v e r } ( U ^ { \tilde { \Pi } } , \bar { p } , \tilde { \sigma } ^ { 2 } )$
322
  end
323
 
324
  255 To address the above issues, we combine DO with RNR to solve a meta-game built from EGTA where
 
251
  $$
252
 
253
  199 where $\begin{array} { r } { | k | _ { m - 1 } ^ { * } = \sum _ { i = 1 } ^ { m - 1 } \mathcal { T } ( z _ { i } ^ { * } = k ) } \end{array}$ . Here, the hard assignment $z _ { m } ^ { * }$ for $\tau _ { m }$ is based on previous
254
+ 200 assignments $z _ { 1 : m - 1 } ^ { * }$ and policies $\phi _ { k } ^ { m - 1 }$ , which is equivalent to applying assumed density filtering
255
  201 (ADF) [41] to approximate the true posterior in Eq. (3) with a Delta distribution $\delta \big ( z _ { 1 : m } ^ { * } \big )$ . The hard
256
  202 assignment prevents creating a new policy at each step if $\tau _ { m }$ is assigned to an existing policy, which
257
  203 significantly reduces the memory usage. Furthermore, the MAP estimations for all existing policies,
 
318
  Initialize learning agent $i$ ’s policy $\pi _ { 0 } ^ { i }$
319
  Initialize a memory buffer $\mathbf { B }$
320
  Initialize opponent meta-policy $\sigma ^ { - i } ( \cdot ) = 1$
321
+ for epoch e in $\{ 1 , 2 , \ldots , E \}$ do for episode $h \in \{ 1 , 2 , \dots , H \}$ do Play an episode against the opponent with strategy $\sigma _ { R N R } ^ { 1 }$ Collect the trajectory $\tau _ { e , h }$ and save them into $\mathbf { B }$ end $\begin{array} { r l } & { \tilde { \sigma } ^ { 2 } , \tilde { \Pi } ^ { 2 } = \mathrm { o p p o n e n t } \underline { { \mathrm { { m o d e l i n g } } } } ( \mathbf { B } ) } \\ & { \bar { p } = \frac { 1 } { | \tilde { \Pi } ^ { 2 } | } \sum _ { j } p ^ { j } \tilde { \sigma } ^ { 2 } ( j ) } \end{array}$ Compute missing entries in $U ^ { \tilde { \Pi } }$ from $\tilde { \Pi } = \Pi ^ { 1 } \times \tilde { \Pi } ^ { 2 }$ by simulations ${ \bf \underline { { \ } } } , \sigma _ { R N R } ^ { 2 } = \mathrm { R N R } _ { - } \mathrm { s o l v e r } ( U ^ { \tilde { \Pi } } , \bar { p } , \tilde { \sigma } ^ { 2 } )$ $h \in \{ 1 , 2 , \dots , H \}$ Sample ⇡˜2 from 2RNR Train oracle $\pi ^ { 1 }$ over $\rho \sim \left( \pi ^ { 1 } , \tilde { \pi } ^ { 2 } \right)$ end $\Pi ^ { 1 } = \Pi ^ { 1 } \cup \left\{ \pi ^ { 1 } \right\}$ Compute missing entries in $U ^ { \tilde { \Pi } }$ from $\tilde { \Pi } = \Pi ^ { 1 } \times \tilde { \Pi } ^ { 2 }$ by simulations $\sigma _ { R N R } ^ { 1 } , \ l _ { - } = \mathrm { R N R \_ s o l v e r } ( U ^ { \tilde { \Pi } } , \bar { p } , \tilde { \sigma } ^ { 2 } )$
322
  end
323
 
324
  255 To address the above issues, we combine DO with RNR to solve a meta-game built from EGTA where