ZHANGYUXUAN-zR commited on
Commit
ae00636
·
verified ·
1 Parent(s): 877d91f

Add files using upload-large-folder tool

Browse files
parse/train/BJlxmAKlg/BJlxmAKlg_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/BJlxmAKlg/BJlxmAKlg_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/Bygq-H9eg/Bygq-H9eg.md ADDED
@@ -0,0 +1,139 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # AN ANALYSIS OF DEEP NEURAL NETWORK MODELS FOR PRACTICAL APPLICATIONS
2
+
3
+ # Adam Paszke
4
+
5
+ Alfredo Canziani & Eugenio Culurciello Weldon School of Biomedical Engineering Purdue University {canziani,euge}@purdue.edu
6
+
7
+ Faculty of Mathematics, Informatics and Mechanics University of Warsaw a.paszke@students.mimuw.edu.pl
8
+
9
+ # ABSTRACT
10
+
11
+ Since the emergence of Deep Neural Networks (DNNs) as a prominent technique in the field of computer vision, the ImageNet classification challenge has played a major role in advancing the state-of-the-art. While accuracy figures have steadily increased, the resource utilisation of winning models has not been properly taken into account. In this work, we present a comprehensive analysis of important metrics in practical applications: accuracy, memory footprint, parameters, operations count, inference time and power consumption. Key findings are: (1) power consumption is independent of batch size and architecture; (2) accuracy and inference time are in a hyperbolic relationship; (3) energy constraint are an upper bound on the maximum achievable accuracy and model complexity; (4) the number of operations is a reliable estimate of the inference time. We believe our analysis provides a compelling set of information that helps design and engineer efficient DNNs.
12
+
13
+ # 1 INTRODUCTION
14
+
15
+ Since the breakthrough in 2012 ImageNet competition (Russakovsky et al., 2015) achieved by AlexNet (Krizhevsky et al., 2012) — the first entry that used a Deep Neural Network (DNN) — several other DNNs with increasing complexity have been submitted to the challenge in order to achieve better performance.
16
+
17
+ In the ImageNet classification challenge, the ultimate goal is to obtain the highest accuracy in a multi-class classification problem framework, regardless of the actual inference time. We believe that this has given rise to several problems. Firstly, it is now normal practice to run several trained instances of a given model over multiple similar instances of each validation image. This practice, also know as model averaging or ensemble of DNNs, dramatically increases the amount of computation required at inference time to achieve the published accuracy. Secondly, model selection is hindered by the fact that different submissions are evaluating their (ensemble of) models a different number of times on the validation images, and therefore the reported accuracy is biased on the specific sampling technique (and ensemble size). Thirdly, there is currently no incentive in speeding up inference time, which is a key element in practical applications of these models, and affects resource utilisation, power-consumption, and latency.
18
+
19
+ This article aims to compare state-of-the-art DNN architectures, submitted for the ImageNet challenge over the last 4 years, in terms of computational requirements and accuracy. We compare these architectures on multiple metrics related to resource utilisation in actual deployments: accuracy, memory footprint, parameters, operations count, inference time and power consumption. The purpose of this paper is to stress the importance of these figures, which are essential hard constraints for the optimisation of these networks in practical deployments and applications.
20
+
21
+ # 2 METHODS
22
+
23
+ In order to compare the quality of different models, we collected and analysed the accuracy values reported in the literature. We immediately found that different sampling techniques do not allow for a direct comparison of resource utilisation. For example, central-crop (top-5 validation) errors of a single run of $\mathrm { V G G } { - 1 6 } ^ { 1 }$ (Simonyan & Zisserman, 2014) and GoogLeNet (Szegedy et al., 2014) are $8 . 7 0 \%$ and $1 0 . 0 7 \%$ respectively, revealing that VGG-16 performs better than GoogLeNet. When models are run with 10-crop sampling,2 then the errors become $9 . 3 3 \%$ and $9 . 1 5 \%$ respectively, and therefore VGG-16 will perform worse than GoogLeNet, using a single central-crop. For this reason, we decided to base our analysis on re-evaluations of top-1 accuracies3 for all networks with a single central-crop sampling technique (Zagoruyko, 2016).
24
+
25
+ ![](images/97f128eda3b18c2127db0b319391cdbf65baec98fe2d8119b0d26c71fe268a31.jpg)
26
+ Figure 1: Top1 vs. network. Single-crop top-1 validation accuracies for top scoring single-model architectures. We introduce with this chart our choice of colour scheme, which will be used throughout this publication to distinguish effectively different architectures and their correspondent authors. Notice that networks of the same group share the same hue, for example ResNet are all variations of pink.
27
+
28
+ ![](images/d8494fc9da93f54ddd0fda9d4bb3dc29b11b3990f8dbd675704c1fb2a138415e.jpg)
29
+ Figure 2: Top1 vs. operations, size $\propto$ parameters. Top-1 one-crop accuracy versus amount of operations required for a single forward pass. The size of the blobs is proportional to the number of network parameters; a legend is reported in the bottom right corner, spanning from $5 \times \mathrm { i 0 } ^ { 6 }$ to $1 5 5 \times { { 1 0 } ^ { 6 } }$ params. Both these figures share the same $y$ -axis, and the grey dots highlight the centre of the blobs.
30
+
31
+ For inference time and memory usage measurements we have used Torch7 (Collobert et al., 2011) with cuDNN-v5 (Chetlur et al., 2014) and CUDA-v8 back-end. All experiments were conducted on a JetPack-2.3 NVIDIA Jetson TX1 board (nVIDIA): an embedded visual computing system with a 64-bit $\mathbf { A R M } ( \mathbf { R } )$ A57 CPU, a 1 T-Flop/s 256-core NVIDIA Maxwell GPU and 4 GB LPDDR4 of shared RAM. We use this resource-limited device to better underline the differences between network architecture, but similar results can be obtained on most recent GPUs, such as the NVIDIA K40 or Titan X, to name a few. Operation counts were obtained using an open-source tool that we developed (Paszke, 2016). For measuring the power consumption, a Keysight 1146B Hall effect current probe has been used with a Keysight MSO-X 2024A 200 MHz digital oscilloscope with a sampling period of $2 \mathrm { s }$ and $5 0 \mathrm { k S a } / \mathrm { s }$ sample rate. The system was powered by a Keysight E3645A GPIB controlled DC power supply.
32
+
33
+ # 3 RESULTS
34
+
35
+ In this section we report our results and comparisons. We analysed the following DDNs: AlexNet (Krizhevsky et al., 2012), batch normalised AlexNet (Zagoruyko, 2016), batch normalised Network In Network (NIN) (Lin et al., 2013), ENet (Paszke et al., 2016) for ImageNet (Culurciello, 2016), GoogLeNet (Szegedy et al., 2014), VGG-16 and -19 (Simonyan & Zisserman, 2014), ResNet-18, -34, -50, -101 and -152 (He et al., 2015), Inception-v3 (Szegedy et al., 2015) and Inception-v4 (Szegedy et al., 2016) since they obtained the highest performance, in these four years, on the ImageNet (Russakovsky et al., 2015) challenge.
36
+
37
+ ![](images/f5cc9b7692c2b9e3cbec9508d167d657b9fc30b42d37c3c0ee365edf7c959a6e.jpg)
38
+ Figure 3: Inference time vs. batch size. This chart show inference time across different batch sizes with a logarithmic ordinate and logarithmic abscissa. Missing data points are due to lack of enough system memory required to process larger batches. A speed up of $3 \times$ is achieved by AlexNet due to better optimisation of its fully connected layers for larger batches.
39
+
40
+ ![](images/a39b3b8affd92f3f43beaff072aae4f99b40990bd5a13e1557e05205fdad9c81.jpg)
41
+ Figure 4: Power vs. batch size. Net power consumption (due only to the forward processing of several DNNs) for different batch sizes. The idle power of the TX1 board, with no HDMI screen connected, was $1 . 3 0 \mathrm { W }$ on average. The max frequency component of power supply current was $1 . 4 \mathrm { k } \mathrm { \bar { H } z }$ , corresponding to a Nyquist sampling frequency of $2 . 8 \mathrm { k H z }$ .
42
+
43
+ # 3.1 ACCURACY
44
+
45
+ Figure 1 shows one-crop accuracies of the most relevant entries submitted to the ImageNet challenge, from the AlexNet (Krizhevsky et al., 2012), on the far left, to the best performing Inception-v4 (Szegedy et al., 2016). The newest ResNet and Inception architectures surpass all other architectures by a significant margin of at least $7 \%$ .
46
+
47
+ Figure 2 provides a different, but more informative view of the accuracy values, because it also visualises computational cost and number of network’s parameters. The first thing that is very apparent is that VGG, even though it is widely used in many applications, is by far the most expensive architecture — both in terms of computational requirements and number of parameters. Its 16- and 19-layer implementations are in fact isolated from all other networks. The other architectures form a steep straight line, that seems to start to flatten with the latest incarnations of Inception and ResNet. This might suggest that models are reaching an inflection point on this data set. At this inflection point, the costs — in terms of complexity — start to outweigh gains in accuracy. We will later show that this trend is hyperbolic.
48
+
49
+ # 3.2 INFERENCE TIME
50
+
51
+ Figure 3 reports inference time per image on each architecture, as a function of image batch size (from 1 to 64). We notice that VGG processes one image in a fifth of a second, making it a less likely contender in real-time applications on an NVIDIA TX1. AlexNet shows a speed up of roughly $3 \times$ going from batch of 1 to 64 images, due to weak optimisation of its fully connected layers. It is a very surprising finding, that will be further discussed in the next subsection.
52
+
53
+ # 3.3 POWER
54
+
55
+ Power measurements are complicated by the high frequency swings in current consumption, which required high sampling current read-out to avoid aliasing. In this work, we used a $2 0 0 \mathrm { \bar { M H z } }$ digital oscilloscope with a current probe, as reported in section 2. Other measuring instruments, such as an AC power strip with $2 \mathrm { H z }$ sampling rate, or a GPIB controlled DC power supply with $1 2 \mathrm { H z }$ sampling rate, did not provide enough bandwidth to properly conduct power measurements.
56
+
57
+ In figure 4 we see that the power consumption is mostly independent with the batch size. Low power values for AlexNet (batch of 1) and VGG (batch of 2) are associated to slower forward times per image, as shown in figure 3.
58
+
59
+ ![](images/d0002f37131be13a4e0e9ef4ac4f3e834a382fc74debf3929c9b3741b1339e1c.jpg)
60
+ Figure 5: Memory vs. batch size. Maximum system memory utilisation for batches of different sizes. Memory usage shows a knee graph, due to the network model memory static allocation and the variable memory used by batch size.
61
+
62
+ ![](images/3bb28e96aa9afdc55bb49ee864d39e4aa0090f848ddb8a03900c6bba25af51c8.jpg)
63
+ Figure 6: Memory vs. parameters count. Detailed view on static parameters allocation and corresponding memory utilisation. Minimum memory of $\bar { 2 } 0 0 \mathrm { M B }$ , linear afterwards with slope 1.30.
64
+
65
+ ![](images/e901d1ce9b91a9d61c506892baec6f21d470094f880c3bbe889fcc6fbda5e329.jpg)
66
+ Figure 7: Operations vs. inference time, size $\propto$ parameters. Relationship between operations and inference time, for batches of size 1 and 16 (biggest size for which all architectures can still run). Not surprisingly, we notice a linear trend, and therefore operations count represent a good estimation of inference time. Furthermore, we can notice an increase in the slope of the trend for larger batches, which correspond to shorter inference time due to batch processing optimisation.
67
+
68
+ # 3.4 MEMORY
69
+
70
+ We analysed system memory consumption of the TX1 device, which uses shared memory for both CPU and GPU. Figure 5 shows that the maximum system memory usage is initially constant and then raises with the batch size. This is due the initial memory allocation of the network model — which is the large static component — and the contribution of the memory required while processing the batch, proportionally increasing with the number of images. In figure 6 we can also notice that the initial allocation never drops below $2 0 0 \mathrm { M B }$ , for network sized below $1 0 0 \mathrm { M B }$ , and it is linear afterwards, with respect to the parameters and a slope of 1.30.
71
+
72
+ # 3.5 OPERATIONS
73
+
74
+ Operations count is essential for establishing a rough estimate of inference time and hardware circuit size, in case of custom implementation of neural network accelerators. In figure 7, for a batch of 16 images, there is a linear relationship between operations count and inference time per image. Therefore, at design time, we can pose a constraint on the number of operation to keep processing speed in a usable range for real-time applications or resource-limited deployments.
75
+
76
+ ![](images/ef21bcfe28e109712f1105e75699ee535ca6483997ef81323e4ca6bd8bb4165b.jpg)
77
+ Figure 8: Operations vs. power consumption, size $\propto$ parameters. Independency of power and operations is shown by a lack of directionality of the distributions shown in these scatter charts. Full resources utilisation and lower inference time for AlexNet architecture is reached with larger batches.
78
+
79
+ ![](images/8aa74c74153f5e1a3c6252eaed7cf7924902a9c1fe2ca98ab5e206f343e52d9a.jpg)
80
+ Figure 9: Accuracy vs. inferences per second, size $\propto$ operations. Non trivial linear upper bound is shown in these scatter plots, illustrating the relationship between prediction accuracy and throughput of all examined architectures. These are the first charts in which the area of the blobs is proportional to the amount of operations, instead of the parameters count. We can notice that larger blobs are concentrated on the left side of the charts, in correspondence of low throughput, i.e. longer inference times. Most of the architectures lay on the linear interface between the grey and white areas. If a network falls in the shaded area, it means it achieves exceptional accuracy or inference speed. The white area indicates a suboptimal region. E.g. both AlexNet architectures improve processing speed as larger batches are adopted, gaining $8 0 \mathrm { H z }$ .
81
+
82
+ # 3.6 OPERATIONS AND POWER
83
+
84
+ In this section we analyse the relationship between power consumption and number of operations required by a given model. Figure 8 reports that there is no specific power footprint for different architectures. When full resources utilisation is reached, generally with larger batch sizes, all networks consume roughly an additional $1 1 . 8 \mathrm { W }$ , with a standard deviation of $0 . 7 \mathrm { W }$ . Idle power is $1 . 3 0 \mathrm { W }$ . This corresponds to the maximum system power at full utilisation. Therefore, if energy consumption is one of our concerns, for example for battery-powered devices, one can simply choose the slowest architecture which satisfies the application minimum requirements.
85
+
86
+ # 3.7 ACCURACY AND THROUGHPUT
87
+
88
+ We note that there is a non-trivial linear upper bound between accuracy and number of inferences per unit time. Figure 9 illustrates that for a given frame rate, the maximum accuracy that can be achieved is linearly proportional to the frame rate itself. All networks analysed here come from several publications, and have been independently trained by other research groups. A linear fit of the accuracy shows all architecture trade accuracy vs. speed. Moreover, chosen a specific inference time, one can now come up with the theoretical accuracy upper bound when resources are fully utilised, as seen in section 3.6. Since the power consumption is constant, we can even go one step further, and obtain an upper bound in accuracy even for an energetic constraint, which could possibly be an essential designing factor for a network that needs to run on an embedded system.
89
+
90
+ ![](images/4aac5add8255a1a08a339c05a9921c11410d93383548097749df19f7ad8f25e9.jpg)
91
+ Figure 10: Accuracy per parameter vs. network. Information density (accuracy per parameters) is an efficiency metric that highlight that capacity of a specific architecture to better utilise its parametric space. Models like VGG and AlexNet are clearly oversized, and do not take fully advantage of their potential learning ability. On the far right, ResNet-18, BN-NIN, GoogLeNet and ENet (marked by grey arrows) do a better job at “squeezing” all their neurons to learn the given task, and are the winners of this section.
92
+
93
+ As the spoiler in section 3.1 gave already away, the linear nature of the accuracy vs. throughput relationship translates into a hyperbolical one when the forward inference time is considered instead. Then, given that the operations count is linear with the inference time, we get that the accuracy has an hyperbolical dependency on the amount of computations that a network requires.
94
+
95
+ # 3.8 PARAMETERS UTILISATION
96
+
97
+ DNNs are known to be highly inefficient in utilising their full learning power (number of parameters / degrees of freedom). Prominent work (Han et al., 2015) exploits this flaw to reduce network file size up to $5 0 \times$ , using weights pruning, quantisation and variable-length symbol encoding. It is worth noticing that, using more efficient architectures to begin with may produce even more compact representations. In figure 10 we clearly see that, although VGG has a better accuracy than AlexNet (as shown by figure 1), its information density is worse. This means that the amount of degrees of freedom introduced in the VGG architecture bring a lesser improvement in terms of accuracy. Moreover, ENet (Paszke et al., 2016) — which we have specifically designed to be highly efficient and it has been adapted and retrained on ImageNet (Culurciello, 2016) for this work — achieves the highest score, showing that $2 4 \times$ less parameters are sufficient to provide state-of-the-art results.
98
+
99
+ # 4 CONCLUSIONS
100
+
101
+ In this paper we analysed multiple state-of-the-art deep neural networks submitted to the ImageNet challenge, in terms of accuracy, memory footprint, parameters, operations count, inference time and power consumption. Our goal is to provide insights into the design choices that can lead to efficient neural networks for practical application, and optimisation of the often-limited resources in actual deployments, which lead us to the creation of ENet — or Efficient-Network — for ImageNet. We show that accuracy and inference time are in a hyperbolic relationship: a little increment in accuracy costs a lot of computational time. We show that number of operations in a network model can effectively estimate inference time. We show that an energy constraint will set a specific upper bound on the maximum achievable accuracy and model complexity, in terms of operations counts. Finally, we show that ENet is the best architecture in terms of parameters space utilisation, squeezing up to $1 3 \times$ more information per parameter used respect to the reference model AlexNet, and $2 4 \times$ respect VGG-19.
102
+
103
+ # ACKNOWLEDGMENTS
104
+
105
+ This paper would have not look so pretty without the Python Software Foundation, the matplotlib library and the communities of stackoverflow and $\mathrm { T } \mathrm { E } ^ { \mathrm { X } }$ of StackExchange which I ought to thank. This work is partly supported by the Office of Naval Research (ONR) grants N00014-12-1- 0167, N00014-15-1-2791 and MURI N00014-10-1-0278. We gratefully acknowledge the support of NVIDIA Corporation with the donation of the TX1, Titan X, K40 GPUs used for this research.
106
+
107
+ # REFERENCES
108
+
109
+ Sharan Chetlur, Cliff Woolley, Philippe Vandermersch, Jonathan Cohen, John Tran, Bryan Catanzaro, and Evan Shelhamer. cuDNN: Efficient Primitives for Deep Learning. arXiv.org arXiv:1410.0759, 2014.
110
+
111
+ Ronan Collobert, Koray Kavukcuoglu, and Clement Farabet. Torch7: A matlab-like environment for machine ´ learning. In BigLearn, NIPS Workshop, number EPFL-CONF-192376, 2011.
112
+
113
+ Eugenio Culurciello. Training enet. https://culurciello.github.io/tech/2016/06/20/ training-enet.html, 2016.
114
+
115
+ Song Han, Huizi Mao, and William J Dally. Deep compression: Compressing deep neural networks with pruning, trained quantization and huffman coding. arXiv preprint arXiv:1510.00149, 2015.
116
+
117
+ Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. arXiv preprint arXiv:1512.03385, 2015.
118
+
119
+ Alex Krizhevsky, Ilya Sutskever, and Geoffrey E Hinton. Imagenet classification with deep convolutional neural networks. In Advances in neural information processing systems, pp. 1097–1105, 2012.
120
+
121
+ Min Lin, Qiang Chen, and Shuicheng Yan. Network in network. arXiv preprint arXiv:1312.4400, 2013.
122
+
123
+ nVIDIA. Jetson tx1 module. http://www.nvidia.com/object/jetson-tx1-module.html.
124
+
125
+ Adam Paszke. torch-opcounter. https://github.com/apaszke/torch-opCounter, 2016.
126
+
127
+ Adam Paszke, Abhishek Chaurasia, Sangpil Kim, and Eugenio Culurciello. Enet: A deep neural network architecture for real-time semantic segmentation. arXiv preprint arXiv:1606.02147, 2016.
128
+
129
+ Olga Russakovsky, Jia Deng, Hao Su, Jonathan Krause, Sanjeev Satheesh, Sean Ma, Zhiheng Huang, Andrej Karpathy, Aditya Khosla, Michael Bernstein, et al. Imagenet large scale visual recognition challenge. International Journal of Computer Vision, 115(3):211–252, 2015.
130
+
131
+ Karen Simonyan and Andrew Zisserman. Very deep convolutional networks for large-scale image recognition. arXiv preprint arXiv:1409.1556, 2014.
132
+
133
+ Christian Szegedy, Wei Liu, Yangqing Jia, Pierre Sermanet, Scott Reed, Dragomir Anguelov, Dumitru Erhan, Vincent Vanhoucke, and Andrew Rabinovich. Going deeper with convolutions. arXiv preprint arXiv:1409.4842, 2014.
134
+
135
+ Christian Szegedy, Vincent Vanhoucke, Sergey Ioffe, Jonathon Shlens, and Zbigniew Wojna. Rethinking the inception architecture for computer vision. arXiv preprint arXiv:1512.00567, 2015.
136
+
137
+ Christian Szegedy, Sergey Ioffe, and Vincent Vanhoucke. Inception-v4, inception-resnet and the impact of residual connections on learning. arXiv preprint arXiv:1602.07261, 2016.
138
+
139
+ Sergey Zagoruyko. imagenet-validation.torch. https://github.com/szagoruyko/imagenetvalidation.torch, 2016.
parse/train/Bygq-H9eg/Bygq-H9eg_content_list.json ADDED
@@ -0,0 +1,796 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "type": "text",
4
+ "text": "AN ANALYSIS OF DEEP NEURAL NETWORK MODELS FOR PRACTICAL APPLICATIONS ",
5
+ "text_level": 1,
6
+ "bbox": [
7
+ 176,
8
+ 98,
9
+ 823,
10
+ 146
11
+ ],
12
+ "page_idx": 0
13
+ },
14
+ {
15
+ "type": "text",
16
+ "text": "Adam Paszke ",
17
+ "text_level": 1,
18
+ "bbox": [
19
+ 488,
20
+ 171,
21
+ 583,
22
+ 184
23
+ ],
24
+ "page_idx": 0
25
+ },
26
+ {
27
+ "type": "text",
28
+ "text": "Alfredo Canziani & Eugenio Culurciello Weldon School of Biomedical Engineering Purdue University {canziani,euge}@purdue.edu ",
29
+ "bbox": [
30
+ 184,
31
+ 170,
32
+ 467,
33
+ 227
34
+ ],
35
+ "page_idx": 0
36
+ },
37
+ {
38
+ "type": "text",
39
+ "text": "Faculty of Mathematics, Informatics and Mechanics University of Warsaw a.paszke@students.mimuw.edu.pl ",
40
+ "bbox": [
41
+ 486,
42
+ 185,
43
+ 828,
44
+ 227
45
+ ],
46
+ "page_idx": 0
47
+ },
48
+ {
49
+ "type": "text",
50
+ "text": "ABSTRACT ",
51
+ "text_level": 1,
52
+ "bbox": [
53
+ 454,
54
+ 262,
55
+ 544,
56
+ 277
57
+ ],
58
+ "page_idx": 0
59
+ },
60
+ {
61
+ "type": "text",
62
+ "text": "Since the emergence of Deep Neural Networks (DNNs) as a prominent technique in the field of computer vision, the ImageNet classification challenge has played a major role in advancing the state-of-the-art. While accuracy figures have steadily increased, the resource utilisation of winning models has not been properly taken into account. In this work, we present a comprehensive analysis of important metrics in practical applications: accuracy, memory footprint, parameters, operations count, inference time and power consumption. Key findings are: (1) power consumption is independent of batch size and architecture; (2) accuracy and inference time are in a hyperbolic relationship; (3) energy constraint are an upper bound on the maximum achievable accuracy and model complexity; (4) the number of operations is a reliable estimate of the inference time. We believe our analysis provides a compelling set of information that helps design and engineer efficient DNNs. ",
63
+ "bbox": [
64
+ 233,
65
+ 295,
66
+ 764,
67
+ 462
68
+ ],
69
+ "page_idx": 0
70
+ },
71
+ {
72
+ "type": "text",
73
+ "text": "1 INTRODUCTION ",
74
+ "text_level": 1,
75
+ "bbox": [
76
+ 176,
77
+ 489,
78
+ 336,
79
+ 506
80
+ ],
81
+ "page_idx": 0
82
+ },
83
+ {
84
+ "type": "text",
85
+ "text": "Since the breakthrough in 2012 ImageNet competition (Russakovsky et al., 2015) achieved by AlexNet (Krizhevsky et al., 2012) — the first entry that used a Deep Neural Network (DNN) — several other DNNs with increasing complexity have been submitted to the challenge in order to achieve better performance. ",
86
+ "bbox": [
87
+ 174,
88
+ 521,
89
+ 825,
90
+ 578
91
+ ],
92
+ "page_idx": 0
93
+ },
94
+ {
95
+ "type": "text",
96
+ "text": "In the ImageNet classification challenge, the ultimate goal is to obtain the highest accuracy in a multi-class classification problem framework, regardless of the actual inference time. We believe that this has given rise to several problems. Firstly, it is now normal practice to run several trained instances of a given model over multiple similar instances of each validation image. This practice, also know as model averaging or ensemble of DNNs, dramatically increases the amount of computation required at inference time to achieve the published accuracy. Secondly, model selection is hindered by the fact that different submissions are evaluating their (ensemble of) models a different number of times on the validation images, and therefore the reported accuracy is biased on the specific sampling technique (and ensemble size). Thirdly, there is currently no incentive in speeding up inference time, which is a key element in practical applications of these models, and affects resource utilisation, power-consumption, and latency. ",
97
+ "bbox": [
98
+ 174,
99
+ 585,
100
+ 825,
101
+ 738
102
+ ],
103
+ "page_idx": 0
104
+ },
105
+ {
106
+ "type": "text",
107
+ "text": "This article aims to compare state-of-the-art DNN architectures, submitted for the ImageNet challenge over the last 4 years, in terms of computational requirements and accuracy. We compare these architectures on multiple metrics related to resource utilisation in actual deployments: accuracy, memory footprint, parameters, operations count, inference time and power consumption. The purpose of this paper is to stress the importance of these figures, which are essential hard constraints for the optimisation of these networks in practical deployments and applications. ",
108
+ "bbox": [
109
+ 174,
110
+ 744,
111
+ 823,
112
+ 828
113
+ ],
114
+ "page_idx": 0
115
+ },
116
+ {
117
+ "type": "text",
118
+ "text": "2 METHODS ",
119
+ "text_level": 1,
120
+ "bbox": [
121
+ 174,
122
+ 849,
123
+ 290,
124
+ 866
125
+ ],
126
+ "page_idx": 0
127
+ },
128
+ {
129
+ "type": "text",
130
+ "text": "In order to compare the quality of different models, we collected and analysed the accuracy values reported in the literature. We immediately found that different sampling techniques do not allow for a direct comparison of resource utilisation. For example, central-crop (top-5 validation) errors of a single run of $\\mathrm { V G G } { - 1 6 } ^ { 1 }$ (Simonyan & Zisserman, 2014) and GoogLeNet (Szegedy et al., 2014) are $8 . 7 0 \\%$ and $1 0 . 0 7 \\%$ respectively, revealing that VGG-16 performs better than GoogLeNet. When models are run with 10-crop sampling,2 then the errors become $9 . 3 3 \\%$ and $9 . 1 5 \\%$ respectively, and therefore VGG-16 will perform worse than GoogLeNet, using a single central-crop. For this reason, we decided to base our analysis on re-evaluations of top-1 accuracies3 for all networks with a single central-crop sampling technique (Zagoruyko, 2016). ",
131
+ "bbox": [
132
+ 176,
133
+ 882,
134
+ 823,
135
+ 924
136
+ ],
137
+ "page_idx": 0
138
+ },
139
+ {
140
+ "type": "image",
141
+ "img_path": "images/97f128eda3b18c2127db0b319391cdbf65baec98fe2d8119b0d26c71fe268a31.jpg",
142
+ "image_caption": [
143
+ "Figure 1: Top1 vs. network. Single-crop top-1 validation accuracies for top scoring single-model architectures. We introduce with this chart our choice of colour scheme, which will be used throughout this publication to distinguish effectively different architectures and their correspondent authors. Notice that networks of the same group share the same hue, for example ResNet are all variations of pink. "
144
+ ],
145
+ "image_footnote": [],
146
+ "bbox": [
147
+ 178,
148
+ 103,
149
+ 485,
150
+ 285
151
+ ],
152
+ "page_idx": 1
153
+ },
154
+ {
155
+ "type": "image",
156
+ "img_path": "images/d8494fc9da93f54ddd0fda9d4bb3dc29b11b3990f8dbd675704c1fb2a138415e.jpg",
157
+ "image_caption": [
158
+ "Figure 2: Top1 vs. operations, size $\\propto$ parameters. Top-1 one-crop accuracy versus amount of operations required for a single forward pass. The size of the blobs is proportional to the number of network parameters; a legend is reported in the bottom right corner, spanning from $5 \\times \\mathrm { i 0 } ^ { 6 }$ to $1 5 5 \\times { { 1 0 } ^ { 6 } }$ params. Both these figures share the same $y$ -axis, and the grey dots highlight the centre of the blobs. "
159
+ ],
160
+ "image_footnote": [],
161
+ "bbox": [
162
+ 513,
163
+ 102,
164
+ 820,
165
+ 273
166
+ ],
167
+ "page_idx": 1
168
+ },
169
+ {
170
+ "type": "text",
171
+ "text": "",
172
+ "bbox": [
173
+ 174,
174
+ 444,
175
+ 825,
176
+ 529
177
+ ],
178
+ "page_idx": 1
179
+ },
180
+ {
181
+ "type": "text",
182
+ "text": "For inference time and memory usage measurements we have used Torch7 (Collobert et al., 2011) with cuDNN-v5 (Chetlur et al., 2014) and CUDA-v8 back-end. All experiments were conducted on a JetPack-2.3 NVIDIA Jetson TX1 board (nVIDIA): an embedded visual computing system with a 64-bit $\\mathbf { A R M } ( \\mathbf { R } )$ A57 CPU, a 1 T-Flop/s 256-core NVIDIA Maxwell GPU and 4 GB LPDDR4 of shared RAM. We use this resource-limited device to better underline the differences between network architecture, but similar results can be obtained on most recent GPUs, such as the NVIDIA K40 or Titan X, to name a few. Operation counts were obtained using an open-source tool that we developed (Paszke, 2016). For measuring the power consumption, a Keysight 1146B Hall effect current probe has been used with a Keysight MSO-X 2024A 200 MHz digital oscilloscope with a sampling period of $2 \\mathrm { s }$ and $5 0 \\mathrm { k S a } / \\mathrm { s }$ sample rate. The system was powered by a Keysight E3645A GPIB controlled DC power supply. ",
183
+ "bbox": [
184
+ 173,
185
+ 536,
186
+ 825,
187
+ 689
188
+ ],
189
+ "page_idx": 1
190
+ },
191
+ {
192
+ "type": "text",
193
+ "text": "3 RESULTS ",
194
+ "text_level": 1,
195
+ "bbox": [
196
+ 176,
197
+ 712,
198
+ 281,
199
+ 727
200
+ ],
201
+ "page_idx": 1
202
+ },
203
+ {
204
+ "type": "text",
205
+ "text": "In this section we report our results and comparisons. We analysed the following DDNs: AlexNet (Krizhevsky et al., 2012), batch normalised AlexNet (Zagoruyko, 2016), batch normalised Network In Network (NIN) (Lin et al., 2013), ENet (Paszke et al., 2016) for ImageNet (Culurciello, 2016), GoogLeNet (Szegedy et al., 2014), VGG-16 and -19 (Simonyan & Zisserman, 2014), ResNet-18, -34, -50, -101 and -152 (He et al., 2015), Inception-v3 (Szegedy et al., 2015) and Inception-v4 (Szegedy et al., 2016) since they obtained the highest performance, in these four years, on the ImageNet (Russakovsky et al., 2015) challenge. ",
206
+ "bbox": [
207
+ 174,
208
+ 744,
209
+ 825,
210
+ 842
211
+ ],
212
+ "page_idx": 1
213
+ },
214
+ {
215
+ "type": "image",
216
+ "img_path": "images/f5cc9b7692c2b9e3cbec9508d167d657b9fc30b42d37c3c0ee365edf7c959a6e.jpg",
217
+ "image_caption": [
218
+ "Figure 3: Inference time vs. batch size. This chart show inference time across different batch sizes with a logarithmic ordinate and logarithmic abscissa. Missing data points are due to lack of enough system memory required to process larger batches. A speed up of $3 \\times$ is achieved by AlexNet due to better optimisation of its fully connected layers for larger batches. "
219
+ ],
220
+ "image_footnote": [],
221
+ "bbox": [
222
+ 178,
223
+ 103,
224
+ 488,
225
+ 270
226
+ ],
227
+ "page_idx": 2
228
+ },
229
+ {
230
+ "type": "image",
231
+ "img_path": "images/a39b3b8affd92f3f43beaff072aae4f99b40990bd5a13e1557e05205fdad9c81.jpg",
232
+ "image_caption": [
233
+ "Figure 4: Power vs. batch size. Net power consumption (due only to the forward processing of several DNNs) for different batch sizes. The idle power of the TX1 board, with no HDMI screen connected, was $1 . 3 0 \\mathrm { W }$ on average. The max frequency component of power supply current was $1 . 4 \\mathrm { k } \\mathrm { \\bar { H } z }$ , corresponding to a Nyquist sampling frequency of $2 . 8 \\mathrm { k H z }$ . "
234
+ ],
235
+ "image_footnote": [],
236
+ "bbox": [
237
+ 514,
238
+ 103,
239
+ 820,
240
+ 271
241
+ ],
242
+ "page_idx": 2
243
+ },
244
+ {
245
+ "type": "text",
246
+ "text": "3.1 ACCURACY ",
247
+ "text_level": 1,
248
+ "bbox": [
249
+ 174,
250
+ 419,
251
+ 294,
252
+ 433
253
+ ],
254
+ "page_idx": 2
255
+ },
256
+ {
257
+ "type": "text",
258
+ "text": "Figure 1 shows one-crop accuracies of the most relevant entries submitted to the ImageNet challenge, from the AlexNet (Krizhevsky et al., 2012), on the far left, to the best performing Inception-v4 (Szegedy et al., 2016). The newest ResNet and Inception architectures surpass all other architectures by a significant margin of at least $7 \\%$ . ",
259
+ "bbox": [
260
+ 173,
261
+ 446,
262
+ 825,
263
+ 502
264
+ ],
265
+ "page_idx": 2
266
+ },
267
+ {
268
+ "type": "text",
269
+ "text": "Figure 2 provides a different, but more informative view of the accuracy values, because it also visualises computational cost and number of network’s parameters. The first thing that is very apparent is that VGG, even though it is widely used in many applications, is by far the most expensive architecture — both in terms of computational requirements and number of parameters. Its 16- and 19-layer implementations are in fact isolated from all other networks. The other architectures form a steep straight line, that seems to start to flatten with the latest incarnations of Inception and ResNet. This might suggest that models are reaching an inflection point on this data set. At this inflection point, the costs — in terms of complexity — start to outweigh gains in accuracy. We will later show that this trend is hyperbolic. ",
270
+ "bbox": [
271
+ 174,
272
+ 510,
273
+ 825,
274
+ 635
275
+ ],
276
+ "page_idx": 2
277
+ },
278
+ {
279
+ "type": "text",
280
+ "text": "3.2 INFERENCE TIME ",
281
+ "text_level": 1,
282
+ "bbox": [
283
+ 176,
284
+ 656,
285
+ 336,
286
+ 671
287
+ ],
288
+ "page_idx": 2
289
+ },
290
+ {
291
+ "type": "text",
292
+ "text": "Figure 3 reports inference time per image on each architecture, as a function of image batch size (from 1 to 64). We notice that VGG processes one image in a fifth of a second, making it a less likely contender in real-time applications on an NVIDIA TX1. AlexNet shows a speed up of roughly $3 \\times$ going from batch of 1 to 64 images, due to weak optimisation of its fully connected layers. It is a very surprising finding, that will be further discussed in the next subsection. ",
293
+ "bbox": [
294
+ 174,
295
+ 685,
296
+ 825,
297
+ 755
298
+ ],
299
+ "page_idx": 2
300
+ },
301
+ {
302
+ "type": "text",
303
+ "text": "3.3 POWER ",
304
+ "text_level": 1,
305
+ "bbox": [
306
+ 174,
307
+ 776,
308
+ 264,
309
+ 790
310
+ ],
311
+ "page_idx": 2
312
+ },
313
+ {
314
+ "type": "text",
315
+ "text": "Power measurements are complicated by the high frequency swings in current consumption, which required high sampling current read-out to avoid aliasing. In this work, we used a $2 0 0 \\mathrm { \\bar { M H z } }$ digital oscilloscope with a current probe, as reported in section 2. Other measuring instruments, such as an AC power strip with $2 \\mathrm { H z }$ sampling rate, or a GPIB controlled DC power supply with $1 2 \\mathrm { H z }$ sampling rate, did not provide enough bandwidth to properly conduct power measurements. ",
316
+ "bbox": [
317
+ 174,
318
+ 804,
319
+ 825,
320
+ 875
321
+ ],
322
+ "page_idx": 2
323
+ },
324
+ {
325
+ "type": "text",
326
+ "text": "In figure 4 we see that the power consumption is mostly independent with the batch size. Low power values for AlexNet (batch of 1) and VGG (batch of 2) are associated to slower forward times per image, as shown in figure 3. ",
327
+ "bbox": [
328
+ 176,
329
+ 882,
330
+ 823,
331
+ 924
332
+ ],
333
+ "page_idx": 2
334
+ },
335
+ {
336
+ "type": "image",
337
+ "img_path": "images/d0002f37131be13a4e0e9ef4ac4f3e834a382fc74debf3929c9b3741b1339e1c.jpg",
338
+ "image_caption": [
339
+ "Figure 5: Memory vs. batch size. Maximum system memory utilisation for batches of different sizes. Memory usage shows a knee graph, due to the network model memory static allocation and the variable memory used by batch size. "
340
+ ],
341
+ "image_footnote": [],
342
+ "bbox": [
343
+ 178,
344
+ 104,
345
+ 491,
346
+ 270
347
+ ],
348
+ "page_idx": 3
349
+ },
350
+ {
351
+ "type": "image",
352
+ "img_path": "images/3bb28e96aa9afdc55bb49ee864d39e4aa0090f848ddb8a03900c6bba25af51c8.jpg",
353
+ "image_caption": [
354
+ "Figure 6: Memory vs. parameters count. Detailed view on static parameters allocation and corresponding memory utilisation. Minimum memory of $\\bar { 2 } 0 0 \\mathrm { M B }$ , linear afterwards with slope 1.30. "
355
+ ],
356
+ "image_footnote": [],
357
+ "bbox": [
358
+ 513,
359
+ 104,
360
+ 818,
361
+ 270
362
+ ],
363
+ "page_idx": 3
364
+ },
365
+ {
366
+ "type": "image",
367
+ "img_path": "images/e901d1ce9b91a9d61c506892baec6f21d470094f880c3bbe889fcc6fbda5e329.jpg",
368
+ "image_caption": [
369
+ "Figure 7: Operations vs. inference time, size $\\propto$ parameters. Relationship between operations and inference time, for batches of size 1 and 16 (biggest size for which all architectures can still run). Not surprisingly, we notice a linear trend, and therefore operations count represent a good estimation of inference time. Furthermore, we can notice an increase in the slope of the trend for larger batches, which correspond to shorter inference time due to batch processing optimisation. "
370
+ ],
371
+ "image_footnote": [],
372
+ "bbox": [
373
+ 176,
374
+ 382,
375
+ 823,
376
+ 561
377
+ ],
378
+ "page_idx": 3
379
+ },
380
+ {
381
+ "type": "text",
382
+ "text": "3.4 MEMORY ",
383
+ "text_level": 1,
384
+ "bbox": [
385
+ 176,
386
+ 672,
387
+ 279,
388
+ 686
389
+ ],
390
+ "page_idx": 3
391
+ },
392
+ {
393
+ "type": "text",
394
+ "text": "We analysed system memory consumption of the TX1 device, which uses shared memory for both CPU and GPU. Figure 5 shows that the maximum system memory usage is initially constant and then raises with the batch size. This is due the initial memory allocation of the network model — which is the large static component — and the contribution of the memory required while processing the batch, proportionally increasing with the number of images. In figure 6 we can also notice that the initial allocation never drops below $2 0 0 \\mathrm { M B }$ , for network sized below $1 0 0 \\mathrm { M B }$ , and it is linear afterwards, with respect to the parameters and a slope of 1.30. ",
395
+ "bbox": [
396
+ 174,
397
+ 702,
398
+ 825,
399
+ 799
400
+ ],
401
+ "page_idx": 3
402
+ },
403
+ {
404
+ "type": "text",
405
+ "text": "3.5 OPERATIONS",
406
+ "text_level": 1,
407
+ "bbox": [
408
+ 174,
409
+ 824,
410
+ 305,
411
+ 839
412
+ ],
413
+ "page_idx": 3
414
+ },
415
+ {
416
+ "type": "text",
417
+ "text": "Operations count is essential for establishing a rough estimate of inference time and hardware circuit size, in case of custom implementation of neural network accelerators. In figure 7, for a batch of 16 images, there is a linear relationship between operations count and inference time per image. Therefore, at design time, we can pose a constraint on the number of operation to keep processing speed in a usable range for real-time applications or resource-limited deployments. ",
418
+ "bbox": [
419
+ 176,
420
+ 853,
421
+ 825,
422
+ 924
423
+ ],
424
+ "page_idx": 3
425
+ },
426
+ {
427
+ "type": "image",
428
+ "img_path": "images/ef21bcfe28e109712f1105e75699ee535ca6483997ef81323e4ca6bd8bb4165b.jpg",
429
+ "image_caption": [
430
+ "Figure 8: Operations vs. power consumption, size $\\propto$ parameters. Independency of power and operations is shown by a lack of directionality of the distributions shown in these scatter charts. Full resources utilisation and lower inference time for AlexNet architecture is reached with larger batches. "
431
+ ],
432
+ "image_footnote": [],
433
+ "bbox": [
434
+ 176,
435
+ 101,
436
+ 823,
437
+ 280
438
+ ],
439
+ "page_idx": 4
440
+ },
441
+ {
442
+ "type": "image",
443
+ "img_path": "images/8aa74c74153f5e1a3c6252eaed7cf7924902a9c1fe2ca98ab5e206f343e52d9a.jpg",
444
+ "image_caption": [
445
+ "Figure 9: Accuracy vs. inferences per second, size $\\propto$ operations. Non trivial linear upper bound is shown in these scatter plots, illustrating the relationship between prediction accuracy and throughput of all examined architectures. These are the first charts in which the area of the blobs is proportional to the amount of operations, instead of the parameters count. We can notice that larger blobs are concentrated on the left side of the charts, in correspondence of low throughput, i.e. longer inference times. Most of the architectures lay on the linear interface between the grey and white areas. If a network falls in the shaded area, it means it achieves exceptional accuracy or inference speed. The white area indicates a suboptimal region. E.g. both AlexNet architectures improve processing speed as larger batches are adopted, gaining $8 0 \\mathrm { H z }$ . "
446
+ ],
447
+ "image_footnote": [],
448
+ "bbox": [
449
+ 176,
450
+ 349,
451
+ 823,
452
+ 527
453
+ ],
454
+ "page_idx": 4
455
+ },
456
+ {
457
+ "type": "text",
458
+ "text": "3.6 OPERATIONS AND POWER",
459
+ "text_level": 1,
460
+ "bbox": [
461
+ 176,
462
+ 671,
463
+ 395,
464
+ 684
465
+ ],
466
+ "page_idx": 4
467
+ },
468
+ {
469
+ "type": "text",
470
+ "text": "In this section we analyse the relationship between power consumption and number of operations required by a given model. Figure 8 reports that there is no specific power footprint for different architectures. When full resources utilisation is reached, generally with larger batch sizes, all networks consume roughly an additional $1 1 . 8 \\mathrm { W }$ , with a standard deviation of $0 . 7 \\mathrm { W }$ . Idle power is $1 . 3 0 \\mathrm { W }$ . This corresponds to the maximum system power at full utilisation. Therefore, if energy consumption is one of our concerns, for example for battery-powered devices, one can simply choose the slowest architecture which satisfies the application minimum requirements. ",
471
+ "bbox": [
472
+ 174,
473
+ 696,
474
+ 825,
475
+ 795
476
+ ],
477
+ "page_idx": 4
478
+ },
479
+ {
480
+ "type": "text",
481
+ "text": "3.7 ACCURACY AND THROUGHPUT ",
482
+ "text_level": 1,
483
+ "bbox": [
484
+ 176,
485
+ 814,
486
+ 431,
487
+ 828
488
+ ],
489
+ "page_idx": 4
490
+ },
491
+ {
492
+ "type": "text",
493
+ "text": "We note that there is a non-trivial linear upper bound between accuracy and number of inferences per unit time. Figure 9 illustrates that for a given frame rate, the maximum accuracy that can be achieved is linearly proportional to the frame rate itself. All networks analysed here come from several publications, and have been independently trained by other research groups. A linear fit of the accuracy shows all architecture trade accuracy vs. speed. Moreover, chosen a specific inference time, one can now come up with the theoretical accuracy upper bound when resources are fully utilised, as seen in section 3.6. Since the power consumption is constant, we can even go one step further, and obtain an upper bound in accuracy even for an energetic constraint, which could possibly be an essential designing factor for a network that needs to run on an embedded system. ",
494
+ "bbox": [
495
+ 174,
496
+ 840,
497
+ 825,
498
+ 924
499
+ ],
500
+ "page_idx": 4
501
+ },
502
+ {
503
+ "type": "image",
504
+ "img_path": "images/4aac5add8255a1a08a339c05a9921c11410d93383548097749df19f7ad8f25e9.jpg",
505
+ "image_caption": [
506
+ "Figure 10: Accuracy per parameter vs. network. Information density (accuracy per parameters) is an efficiency metric that highlight that capacity of a specific architecture to better utilise its parametric space. Models like VGG and AlexNet are clearly oversized, and do not take fully advantage of their potential learning ability. On the far right, ResNet-18, BN-NIN, GoogLeNet and ENet (marked by grey arrows) do a better job at “squeezing” all their neurons to learn the given task, and are the winners of this section. "
507
+ ],
508
+ "image_footnote": [],
509
+ "bbox": [
510
+ 299,
511
+ 102,
512
+ 699,
513
+ 280
514
+ ],
515
+ "page_idx": 5
516
+ },
517
+ {
518
+ "type": "text",
519
+ "text": "",
520
+ "bbox": [
521
+ 174,
522
+ 392,
523
+ 821,
524
+ 434
525
+ ],
526
+ "page_idx": 5
527
+ },
528
+ {
529
+ "type": "text",
530
+ "text": "As the spoiler in section 3.1 gave already away, the linear nature of the accuracy vs. throughput relationship translates into a hyperbolical one when the forward inference time is considered instead. Then, given that the operations count is linear with the inference time, we get that the accuracy has an hyperbolical dependency on the amount of computations that a network requires. ",
531
+ "bbox": [
532
+ 174,
533
+ 441,
534
+ 825,
535
+ 498
536
+ ],
537
+ "page_idx": 5
538
+ },
539
+ {
540
+ "type": "text",
541
+ "text": "3.8 PARAMETERS UTILISATION ",
542
+ "text_level": 1,
543
+ "bbox": [
544
+ 176,
545
+ 523,
546
+ 405,
547
+ 537
548
+ ],
549
+ "page_idx": 5
550
+ },
551
+ {
552
+ "type": "text",
553
+ "text": "DNNs are known to be highly inefficient in utilising their full learning power (number of parameters / degrees of freedom). Prominent work (Han et al., 2015) exploits this flaw to reduce network file size up to $5 0 \\times$ , using weights pruning, quantisation and variable-length symbol encoding. It is worth noticing that, using more efficient architectures to begin with may produce even more compact representations. In figure 10 we clearly see that, although VGG has a better accuracy than AlexNet (as shown by figure 1), its information density is worse. This means that the amount of degrees of freedom introduced in the VGG architecture bring a lesser improvement in terms of accuracy. Moreover, ENet (Paszke et al., 2016) — which we have specifically designed to be highly efficient and it has been adapted and retrained on ImageNet (Culurciello, 2016) for this work — achieves the highest score, showing that $2 4 \\times$ less parameters are sufficient to provide state-of-the-art results. ",
554
+ "bbox": [
555
+ 173,
556
+ 553,
557
+ 825,
558
+ 691
559
+ ],
560
+ "page_idx": 5
561
+ },
562
+ {
563
+ "type": "text",
564
+ "text": "4 CONCLUSIONS ",
565
+ "text_level": 1,
566
+ "bbox": [
567
+ 176,
568
+ 720,
569
+ 328,
570
+ 736
571
+ ],
572
+ "page_idx": 5
573
+ },
574
+ {
575
+ "type": "text",
576
+ "text": "In this paper we analysed multiple state-of-the-art deep neural networks submitted to the ImageNet challenge, in terms of accuracy, memory footprint, parameters, operations count, inference time and power consumption. Our goal is to provide insights into the design choices that can lead to efficient neural networks for practical application, and optimisation of the often-limited resources in actual deployments, which lead us to the creation of ENet — or Efficient-Network — for ImageNet. We show that accuracy and inference time are in a hyperbolic relationship: a little increment in accuracy costs a lot of computational time. We show that number of operations in a network model can effectively estimate inference time. We show that an energy constraint will set a specific upper bound on the maximum achievable accuracy and model complexity, in terms of operations counts. Finally, we show that ENet is the best architecture in terms of parameters space utilisation, squeezing up to $1 3 \\times$ more information per parameter used respect to the reference model AlexNet, and $2 4 \\times$ respect VGG-19. ",
577
+ "bbox": [
578
+ 173,
579
+ 757,
580
+ 825,
581
+ 922
582
+ ],
583
+ "page_idx": 5
584
+ },
585
+ {
586
+ "type": "text",
587
+ "text": "ACKNOWLEDGMENTS ",
588
+ "text_level": 1,
589
+ "bbox": [
590
+ 176,
591
+ 104,
592
+ 326,
593
+ 117
594
+ ],
595
+ "page_idx": 6
596
+ },
597
+ {
598
+ "type": "text",
599
+ "text": "This paper would have not look so pretty without the Python Software Foundation, the matplotlib library and the communities of stackoverflow and $\\mathrm { T } \\mathrm { E } ^ { \\mathrm { X } }$ of StackExchange which I ought to thank. This work is partly supported by the Office of Naval Research (ONR) grants N00014-12-1- 0167, N00014-15-1-2791 and MURI N00014-10-1-0278. We gratefully acknowledge the support of NVIDIA Corporation with the donation of the TX1, Titan X, K40 GPUs used for this research. ",
600
+ "bbox": [
601
+ 174,
602
+ 127,
603
+ 825,
604
+ 196
605
+ ],
606
+ "page_idx": 6
607
+ },
608
+ {
609
+ "type": "text",
610
+ "text": "REFERENCES ",
611
+ "text_level": 1,
612
+ "bbox": [
613
+ 174,
614
+ 218,
615
+ 285,
616
+ 233
617
+ ],
618
+ "page_idx": 6
619
+ },
620
+ {
621
+ "type": "text",
622
+ "text": "Sharan Chetlur, Cliff Woolley, Philippe Vandermersch, Jonathan Cohen, John Tran, Bryan Catanzaro, and Evan Shelhamer. cuDNN: Efficient Primitives for Deep Learning. arXiv.org arXiv:1410.0759, 2014. ",
623
+ "bbox": [
624
+ 174,
625
+ 239,
626
+ 823,
627
+ 266
628
+ ],
629
+ "page_idx": 6
630
+ },
631
+ {
632
+ "type": "text",
633
+ "text": "Ronan Collobert, Koray Kavukcuoglu, and Clement Farabet. Torch7: A matlab-like environment for machine ´ learning. In BigLearn, NIPS Workshop, number EPFL-CONF-192376, 2011. ",
634
+ "bbox": [
635
+ 174,
636
+ 275,
637
+ 823,
638
+ 301
639
+ ],
640
+ "page_idx": 6
641
+ },
642
+ {
643
+ "type": "text",
644
+ "text": "Eugenio Culurciello. Training enet. https://culurciello.github.io/tech/2016/06/20/ training-enet.html, 2016. ",
645
+ "bbox": [
646
+ 176,
647
+ 309,
648
+ 820,
649
+ 337
650
+ ],
651
+ "page_idx": 6
652
+ },
653
+ {
654
+ "type": "text",
655
+ "text": "Song Han, Huizi Mao, and William J Dally. Deep compression: Compressing deep neural networks with pruning, trained quantization and huffman coding. arXiv preprint arXiv:1510.00149, 2015. ",
656
+ "bbox": [
657
+ 173,
658
+ 344,
659
+ 821,
660
+ 372
661
+ ],
662
+ "page_idx": 6
663
+ },
664
+ {
665
+ "type": "text",
666
+ "text": "Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. arXiv preprint arXiv:1512.03385, 2015. ",
667
+ "bbox": [
668
+ 173,
669
+ 380,
670
+ 823,
671
+ 406
672
+ ],
673
+ "page_idx": 6
674
+ },
675
+ {
676
+ "type": "text",
677
+ "text": "Alex Krizhevsky, Ilya Sutskever, and Geoffrey E Hinton. Imagenet classification with deep convolutional neural networks. In Advances in neural information processing systems, pp. 1097–1105, 2012. ",
678
+ "bbox": [
679
+ 173,
680
+ 415,
681
+ 823,
682
+ 443
683
+ ],
684
+ "page_idx": 6
685
+ },
686
+ {
687
+ "type": "text",
688
+ "text": "Min Lin, Qiang Chen, and Shuicheng Yan. Network in network. arXiv preprint arXiv:1312.4400, 2013. ",
689
+ "bbox": [
690
+ 171,
691
+ 450,
692
+ 787,
693
+ 464
694
+ ],
695
+ "page_idx": 6
696
+ },
697
+ {
698
+ "type": "text",
699
+ "text": "nVIDIA. Jetson tx1 module. http://www.nvidia.com/object/jetson-tx1-module.html. ",
700
+ "bbox": [
701
+ 169,
702
+ 473,
703
+ 800,
704
+ 487
705
+ ],
706
+ "page_idx": 6
707
+ },
708
+ {
709
+ "type": "text",
710
+ "text": "Adam Paszke. torch-opcounter. https://github.com/apaszke/torch-opCounter, 2016. ",
711
+ "bbox": [
712
+ 173,
713
+ 496,
714
+ 779,
715
+ 511
716
+ ],
717
+ "page_idx": 6
718
+ },
719
+ {
720
+ "type": "text",
721
+ "text": "Adam Paszke, Abhishek Chaurasia, Sangpil Kim, and Eugenio Culurciello. Enet: A deep neural network architecture for real-time semantic segmentation. arXiv preprint arXiv:1606.02147, 2016. ",
722
+ "bbox": [
723
+ 173,
724
+ 518,
725
+ 821,
726
+ 545
727
+ ],
728
+ "page_idx": 6
729
+ },
730
+ {
731
+ "type": "text",
732
+ "text": "Olga Russakovsky, Jia Deng, Hao Su, Jonathan Krause, Sanjeev Satheesh, Sean Ma, Zhiheng Huang, Andrej Karpathy, Aditya Khosla, Michael Bernstein, et al. Imagenet large scale visual recognition challenge. International Journal of Computer Vision, 115(3):211–252, 2015. ",
733
+ "bbox": [
734
+ 176,
735
+ 554,
736
+ 823,
737
+ 593
738
+ ],
739
+ "page_idx": 6
740
+ },
741
+ {
742
+ "type": "text",
743
+ "text": "Karen Simonyan and Andrew Zisserman. Very deep convolutional networks for large-scale image recognition. arXiv preprint arXiv:1409.1556, 2014. ",
744
+ "bbox": [
745
+ 173,
746
+ 602,
747
+ 821,
748
+ 628
749
+ ],
750
+ "page_idx": 6
751
+ },
752
+ {
753
+ "type": "text",
754
+ "text": "Christian Szegedy, Wei Liu, Yangqing Jia, Pierre Sermanet, Scott Reed, Dragomir Anguelov, Dumitru Erhan, Vincent Vanhoucke, and Andrew Rabinovich. Going deeper with convolutions. arXiv preprint arXiv:1409.4842, 2014. ",
755
+ "bbox": [
756
+ 173,
757
+ 637,
758
+ 823,
759
+ 676
760
+ ],
761
+ "page_idx": 6
762
+ },
763
+ {
764
+ "type": "text",
765
+ "text": "Christian Szegedy, Vincent Vanhoucke, Sergey Ioffe, Jonathon Shlens, and Zbigniew Wojna. Rethinking the inception architecture for computer vision. arXiv preprint arXiv:1512.00567, 2015. ",
766
+ "bbox": [
767
+ 173,
768
+ 684,
769
+ 821,
770
+ 712
771
+ ],
772
+ "page_idx": 6
773
+ },
774
+ {
775
+ "type": "text",
776
+ "text": "Christian Szegedy, Sergey Ioffe, and Vincent Vanhoucke. Inception-v4, inception-resnet and the impact of residual connections on learning. arXiv preprint arXiv:1602.07261, 2016. ",
777
+ "bbox": [
778
+ 174,
779
+ 720,
780
+ 823,
781
+ 747
782
+ ],
783
+ "page_idx": 6
784
+ },
785
+ {
786
+ "type": "text",
787
+ "text": "Sergey Zagoruyko. imagenet-validation.torch. https://github.com/szagoruyko/imagenetvalidation.torch, 2016. ",
788
+ "bbox": [
789
+ 173,
790
+ 756,
791
+ 821,
792
+ 782
793
+ ],
794
+ "page_idx": 6
795
+ }
796
+ ]
parse/train/Bygq-H9eg/Bygq-H9eg_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/Bygq-H9eg/Bygq-H9eg_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/HOFxeCutxZR/HOFxeCutxZR.md ADDED
@@ -0,0 +1,334 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # ENJOY YOUR EDITING: CONTROLLABLE GANS FOR IMAGE EDITING VIA LATENT SPACE NAVIGATION
2
+
3
+ Peiye Zhuang, Oluwasanmi Koyejo, Alexander G. Schwing University of Illinois at Urbana-Champaign {peiye, sanmi, aschwing}@illinois.edu
4
+
5
+ # ABSTRACT
6
+
7
+ Controllable semantic image editing enables a user to change entire image attributes with a few clicks, e.g., gradually making a summer scene look like it was taken in winter. Classic approaches for this task use a Generative Adversarial Net (GAN) to learn a latent space and suitable latent-space transformations. However, current approaches often suffer from attribute edits that are entangled, global image identity changes, and diminished photo-realism. To address these concerns, we learn multiple attribute transformations simultaneously, integrate attribute regression into the training of transformation functions, and apply a content loss and an adversarial loss that encourages the maintenance of image identity and photo-realism. We propose quantitative evaluation strategies for measuring controllable editing performance, unlike prior work, which primarily focuses on qualitative evaluation. Our model permits better control for both single- and multipleattribute editing while preserving image identity and realism during transformation. We provide empirical results for both natural and synthetic images, highlighting that our model achieves state-of-the-art performance for targeted image manipulation.
8
+
9
+ # 1 INTRODUCTION
10
+
11
+ Semantic image editing is the task of transforming a source image to a target image while modifying desired semantic attributes, e.g., to make an image taken during summer look like it was captured in winter. The ability to semantically edit images is useful for various real-world tasks, including artistic visualization, design, photo enhancement, and targeted data augmentation. To this end, semantic image editing has two primary goals: (i) providing continuous manipulation of multiple attributes simultaneously and (ii) maintaining the original image’s identity as much as possible while ensuring photo-realism.
12
+
13
+ Existing GAN-based approaches for semantic image editing can be categorized roughly into two groups: (i) image-space editing methods directly transform one image to another across domains (Choi et al., 2018; 2020; Isola et al., 2017; Lee et al., 2020; Wu et al., 2019; Zhu et al., 2017a;b), usually using variants of generative adversarial nets (GANs) (Goodfellow et al., 2014). These approaches often have high computational cost, and they primarily focus on binary attribute (on/off) changes, rather than providing continuous attribute editing abilities. (ii) latent-space editing methods focus on discovering latent variable manipulations that permit continuous semantic image edits. The chosen latent space is most often the latent space of GANs. Both unsupervised and (self-)supervised latent space editing methods have been proposed. Unsupervised latent-space editing methods (Hark ¨ onen et al., 2020; Voynov & Babenko, 2020) are often less effective at pro- ¨ viding semantically meaningful directions and all too often change image identity during an edit. Current (self-)supervised methods (Jahanian et al., 2019; Plumerault et al., 2020) are limited to geometric edits such as rotation and scale. To our knowledge, only one supervised approach has been proposed (Shen et al., 2019) – developed to discover semantic latent-space directions for binary attributes. As we show, this method suffers from entangled attributes and often does not preserve image identity during manipulation.
14
+
15
+ Contributions. We propose a latent-space editing framework for semantic image manipulation that fulfills the aforementioned primary goals. Specifically, we use a GAN and employ a joint sampling strategy trained to edit multiple attributes simultaneously. To disentangle attribute transformations in the latent space of GANs, we integrate a regressor to predict the attributes that an image exhibits. The regressor also permits precise control of the manipulation degree and is easily extended to multiple attributes simultaneously. In addition, we incorporate a perceptual loss (Li et al., 2019) and an adversarial loss that helps preserve image identity and photo-realism during manipulation.
16
+
17
+ ![](images/fb07bc41864ba9b101d2f40fa0c12c3111aac85a77e90532d3aaba7be5d481e0.jpg)
18
+ Figure 1: Real image manipulation on scene (top two rows, photo from Flickr) and face (bottom two rows, unseen image from CelebA-HQ) using pretrained StyleGAN2 (Karras et al., 2019b): We reconstruct the real images (col.1) by finding a latent vector with the best inversion result (col.2) on StyleGAN2 (Abdal et al., 2019). After that, we transform the latent vectors for single- and multipleattribute manipulations (col.3-6). Note that unlike ours, the baseline method (Shen et al., 2019) either changes image identity or confounds semantic properties, or both.
19
+
20
+ We compare our method to several popular frameworks, from existing image-to-image translation methods (Choi et al., 2020; Wu et al., 2019; Zhu et al., 2017a) to latent space transformation-based approaches (Shen et al., 2019; Voynov & Babenko, 2020). We mention that prior work primarily uses qualitative evaluation like the one in Fig. 1. In contrast, we propose a quantitative evaluation to measure controllability. Both qualitative and quantitative results provide evidence that our approach outperforms prior work in terms of quality of the semantic image manipulation while maintaining image identity.
21
+
22
+ # 2 RELATED WORK
23
+
24
+ Generative Adversarial Networks (GANs) (Goodfellow et al., 2014) have significantly improved realistic image generation in recent years (Brock et al., 2018; Jolicoeur-Martineau, 2019; Karras et al., 2017; 2019a;b; Park et al., 2019; Zhang et al., 2018). For this, a GAN formulates a 2-player non-cooperative game between two deep nets: (i) a generator that produces an image given a random noise vector in the latent space, sampled from a known prior distribution, usually a normal or a uniform distribution; (ii) a discriminator whose input is both synthetic and real data, which is to be differentiated.
25
+
26
+ Semantic image editing seeks to automate image manipulation of semantics. Encouraged by the success of deep nets, recent works have applied deep learning methods for semantic image editing tasks such as style transfer (Li et al., 2017; Luan et al., 2017), image-to-image translation (Choi et al., 2018; 2020; Isola et al., 2017; Lee et al., 2020; Wang et al., 2018; Wu et al., 2019; Zhu et al., 2017a) and discovering semantically meaningful directions in a GAN latent space (Hark ¨ onen et al., 2020; ¨ Jahanian et al., 2019; Plumerault et al., 2020; Shen et al., 2019; Voynov & Babenko, 2020). Note that our task is an extended version of semantic image editing that requires more comprehensive control to satisfy user-desired operations. Therefore, most aforementioned approaches do not meet the requirements. Nonetheless, we categorize the approaches most relevant to our task into two groups: (i) image editing via manipulation in image space, and (ii) image editing via latent space navigation.
27
+
28
+ ![](images/396e29840d9828a2d1068da81859a87debad70ba35b15b3077f0c3d628a6e7d9.jpg)
29
+ Figure 2: Our overall framework (top row) and 3 training strategies different from prior work (bottom row). In (a), $G$ takes $_ { z }$ and an edited latent vector separately to synthesize images. $T = \{ d _ { 1 } , . . . , d _ { N } \}$ are the trainable latent-space directions and $\varepsilon$ represents transformation extent. Original and edited image attributes, $_ { \pmb { \alpha } }$ and $\hat { \alpha }$ , are predicted by the pre-trained regressor $R$ . The discriminator loss ${ \mathcal { L } } _ { \mathrm { d i s c } }$ (the discriminator $D$ not shown due to limited space), the regression loss $\mathcal { L } _ { \mathrm { r e g } }$ , and the perceptual loss $\mathcal { L } _ { \mathrm { { c o n t e n t } } }$ are used to update $\mathbf { T }$ . We explain (b-d) in Sec. 3.2.
30
+
31
+ Image-space editing using GANs directly manipulates an image for targeted editing. Early work (Isola et al., 2017) used GANs to implement semantic translations between two image domains with paired data, e.g., day to night. Follow-up work focused on multi-modal (Bhattarai & Kim, 2020; Choi et al., 2018; 2020; Lee et al., 2020; Wang et al., 2018; Wu et al., 2019) and unpaired image domain translation (Zhu et al., 2017a). In this case, they primarily consider binary (on/off) attribute changes, regardless of whether the process is dynamic, for example, day to night.
32
+
33
+ Latent-space editing via GANs has received an increasing amount of recent interest. Most prior work focused on identifying semantically meaningful directions in the latent space of GANs, so that shifting latent vectors towards these directions achieves the desired image manipulation. Recent papers found semantics in the latent space of GANs, such as color transformations and camera movements (Jahanian et al., 2019), or face attribute changes (Shen et al., 2019), such as smile. Other work considered unsupervised methods (Hark ¨ onen et al., 2020; Voynov & Babenko, 2020) to dis-¨ cover interpretable latent space directions. However, additional challenges inherent to unsupervised manipulation of the latent space arise, and have not been addressed in prior work, e.g., direction quality with regard to degree control and image identity preservation.
34
+
35
+ # 3 METHOD
36
+
37
+ # 3.1 PROBLEM STATEMENT
38
+
39
+ We consider controllable semantic image editing via latent space navigation in GANs. We begin with a fixed GAN model that consists of a generator $G$ and a discriminator $D$ . The input of $G$ is a latent vector $z \in \mathbb { R } ^ { m }$ from a latent space $\mathcal { Z }$ . Here, $m$ is the dimensionality of the latent space. Given $N$ attributes, we aim to discover semantically meaningful latent-space GAN directions, $\bar { \pmb { T } } = \{ { \pmb d } _ { 1 } , \ldots , { \pmb d } _ { N } \}$ , to manipulate the attributes of synthetic images $G ( z )$ with an assigned step size $\boldsymbol \varepsilon = \{ \varepsilon _ { 1 } , \ldots , \varepsilon _ { N } \}$ , where $\pmb { d } _ { i } \in \mathbb { R } ^ { m }$ for all $i \in \{ 1 , \ldots , N \}$ . In the end, each attribute of an edited image can be changed with the corresponding degree $\varepsilon$ from ${ \pmb { \alpha } } = \{ \alpha _ { 1 } , . . . , \alpha _ { N } \}$ , the original attributes of $G ( z )$ predicted by a regressor $R$ .
40
+
41
+ # 3.2 PROPOSED APPROACH
42
+
43
+ We provide an overview of our method in Fig. 2 (a), and further illustrate how our approach differs from prior work in Fig. 2 (b-d).
44
+
45
+ Overview. As shown in Fig. 2 (a), we employ a GAN model consisting of a generator $G$ and a discriminator $D$ (not shown due to limited space), as well as a regressor $R$ , all of which are pretrained. Our goal is to find latent directions $\mathbf { T }$ that provide attribute specific image edits. At each training step, $G$ takes $_ { z }$ and an edited latent vector referred to as $z ^ { \prime }$ . We follow prior work which suggests that direction vectors in latent space of GANs permit image editing (Jahanian et al., 2019). Formally, given a transformation degree $\varepsilon$ , we obtain the latent-space edit as $z ^ { \prime } = z + { \cal T } \varepsilon =$ $\begin{array} { r } { z + \sum _ { i = 1 } ^ { N } \varepsilon _ { i } d _ { i } } \end{array}$ . $G$ provides the recovered and edited images $G ( z )$ and $G ( z ^ { \prime } )$ , which are separately processed by the regressor to predict attribute values. The original attributes of $R ( G ( z ) )$ . The (pseudo-) ground truth and predicted attribute of $G ( z ^ { \prime } )$ are $\alpha ^ { \prime }$ and $\hat { \mathbf { \alpha } } ^ { \prime }$ , respectively, where ${ \pmb { \alpha } } ^ { \prime } = { \pmb { \alpha } } + { \pmb { \varepsilon } }$ and $\hat { \pmb { \alpha } } ^ { \prime } = R ( G ( \pmb { z } ^ { \prime } ) )$ .
46
+
47
+ Intuitively, the goal of $_ { \mathbf { T } }$ is to transform $_ { z }$ by adding semantically meaningful information such that the corresponding output image $G ( z ^ { \prime } )$ exhibits attribute changes $\varepsilon$ from $_ { \pmb { \alpha } }$ . In practice, we normalize the range of attribute values to $[ \mathbf { 0 } , \mathbf { 1 } ]$ , i.e., both $_ { \pmb { \alpha } }$ and ${ \pmb { \alpha } } ^ { \prime } \in [ { \bf 0 } , { \bf 1 } ]$ . During training, we maintain the unit range by controlling the given $\varepsilon$ . Formally, $\varepsilon$ is drawn from a distribution $\mathcal { D } _ { \varepsilon }$ uniform in $[ - 1 , 1 ] ^ { N }$ while considering the constraint that $\mathbf { 0 } \leq \alpha + \varepsilon \leq 1$ .
48
+
49
+ Objective function. To find $\mathbf { T }$ we minimize the weighted objective:
50
+
51
+ $$
52
+ \operatorname* { m i n } _ { \pmb { T } } \pmb { \mathcal { L } } \triangleq \lambda _ { 1 } \mathcal { L } _ { \mathrm { r e g } } + \lambda _ { 2 } \mathcal { L } _ { \mathrm { d i s c } } + \lambda _ { 3 } \mathcal { L } _ { \mathrm { c o n t e n t } } .
53
+ $$
54
+
55
+ Note, the objective is only used for optimizing $_ { \mathbf { T } }$ , while the other modules remain fixed. Hyperparameters $\lambda _ { 1 } , \lambda _ { 2 }$ , and $\lambda _ { 3 }$ adjust the loss terms.
56
+
57
+ The regression loss $\mathcal { L } _ { \mathrm { r e g } }$ assesses whether $_ { \mathbf { T } }$ performs the transformations indicated by $\varepsilon$ . We express the regression loss via a binary cross entropy:
58
+
59
+ $$
60
+ \begin{array} { r l } { \mathcal { L } _ { \mathrm { r e g } } = \ } & { { } \mathbb { E } _ { z \sim \mathcal { Z } , \varepsilon \sim \mathcal { D } _ { \varepsilon } } [ - \hat { \alpha } ^ { \prime } \log \alpha ^ { \prime } - ( { \bf 1 } - \hat { \alpha } ^ { \prime } ) \log \left( { \bf 1 } - \alpha ^ { \prime } \right) ] _ { \mathrm { t } } } \end{array}
61
+ $$
62
+
63
+ Note that $\alpha ^ { \prime }$ is from the distribution generated by $_ z$ and $\varepsilon$ . Please refer to the appendix C.1 for more details on this distribution.
64
+
65
+ The second loss term ${ \mathcal { L } } _ { \mathrm { d i s c } }$ is computed using the discriminator $D$ and measures the quality of the generated images, i.e.,
66
+
67
+ $$
68
+ \begin{array} { r l } { \mathcal { L } _ { \mathrm { d i s c } } = } & { { } \ \mathbb { E } _ { z ^ { \prime } \sim \mathcal { Z } ^ { \prime } | z } \left[ \log ( 1 - D ( G ( z ^ { \prime } ) ) ) \right] . } \end{array}
69
+ $$
70
+
71
+ Here we refer to the domain of $z ^ { \prime }$ via $\mathcal { Z } ^ { \prime }$ , which is conditioned on $_ z$ . We write this using $\mathcal { Z } ^ { \prime } | z$ .
72
+
73
+ Lastly, we use a content loss $\mathcal { L } _ { \mathrm { { c o n t e n t } } }$ , often also referred to as perceptual loss. It is designed to estimate the distance between two images and it is employed to maintain the image identity during the transformation. Specifically, we use the content loss term
74
+
75
+ $$
76
+ \begin{array} { r l } { \mathcal { L } _ { \mathrm { c o n t e n t } } = } & { \ \mathbb { E } _ { z \sim \mathcal { Z } , z ^ { \prime } \sim \mathcal { Z } ^ { \prime } | z } \displaystyle \sum _ { i \in \mathcal { D } _ { \mathrm { c o n t e n t } } } \| F _ { i } ( G ( z ^ { \prime } ) ) - F _ { i } ( G ( z ) ) \| _ { 2 } ^ { 2 } , } \end{array}
77
+ $$
78
+
79
+ where $F _ { i } ( \cdot )$ denotes a feature function which extracts intermediate features from images. $\mathcal { D } _ { \mathrm { c o n t e n t } }$ indicates the layers of a pre-trained model which are used as features. We approximate the aforementioned expectations by empirical sampling. We defer algorithm details to Appendix A.
80
+
81
+ Joint-distribution sampling and training. The regressor operates in a multi-label setting, i.e., each data possesses multiple attributes. To ensure the disentanglement of attribute edits we sample synthetic images from the entire data distribution and find all transformations at once (illustrated in Fig. 2 (b,c) right). In contrast, Shen et al. (2019) prepare training samples on the two opposing data subsets with regards to an attribute, e.g., no clouds vs. many clouds, and find the directions with $N$ one-vs-one classifiers (sketched in Fig. 2 (b,c) left).
82
+
83
+ Transformation module $_ { \mathbf { T } }$ . We study two types of transformations $\mathbf { T }$ : (i) global and (ii) local. A global transformation $\mathbf { T }$ refers to a semantic latent-space transformation identical for all $_ z$ during inference. This is illustrated via parallel red dashed arrows in Fig. 2 (d) left. These global directions are commonly used (Hark ¨ onen et al., 2020; Jahanian et al., 2019; Shen et al., 2019; Viazovetskyi ¨ et al., 2020). However, a globally identical direction might not serve all data. In contrast, a local transformation $_ { \mathbf { T } }$ is a function of $_ z$ which provides various directions for different $_ z$ (in Fig. 2 (d) right, shown via non-parallel red arrows). Formally, $d _ { i } = f _ { \theta } ^ { i } ( z )$ , where $f _ { \theta } ^ { i }$ is implemented via a deep net. In Sec. 4 we show that the local transformation $\mathbf { T }$ succeeds on failure cases of the global transformation.
84
+
85
+ ![](images/d6d3e6bc1c1ba9ae9062257137ebc1913590a9a30bfac3de55c26f3b4059cfda.jpg)
86
+ Figure 3: Comparison of image-space editing approaches with respect to “removing clouds” (top), “enhancing night” (middle) and “adding snow” (bottom). The original images (col.1) are followed by a given editing task. From (a-e): (a) CycleGAN (Zhu et al., 2017a), (b) StarGAN v2 (Choi et al., 2020), (c) RelGAN (Wu et al., 2019), (d) $\mathrm { D R I T + + }$ (Lee et al., 2020), and (e) Ours.
87
+
88
+ ![](images/8276997cfc6eb8e8ffa6c1fdebf8f9f1218dac268c9fbfd842f4affa8afe9c4e.jpg)
89
+ Figure 4: Comparison of latent-space editing approaches on StyleGAN2. (a) Shen et al. (2019); (b) Voynov & Babenko (2020); (c) Ours. Original synthetic image (col.1); edited results of a semantic manipulation noted on top (col.2-4; col.5-7). Shen & Zhou (2021) mention that “age,” “gender,” and “glasses” directions are hard to disentangle potentially due to data bias, while our results suggest a better direction disentanglement.
90
+
91
+ # 4 EXPERIMENTS
92
+
93
+ We introduce datasets, implementation details, evaluation metrics, and show results next.
94
+
95
+ Datasets. We evaluate the proposed approach on two types of datasets: (i) face datasets – FFHQ (Karras et al., 2019a), CelebA (Liu et al., 2018) and CelebA-HQ (Karras et al., 2017), commonly used in prior work (Hark ¨ onen et al., 2020; Karras et al., 2017; 2019a;b; Shen et al., 2019; ¨
96
+
97
+ Viazovetskyi et al., 2020). (ii) natural scene datasets – Transient Attribute Database (Laffont et al., 2014) and MIT Places2 data (Zhou et al., 2017), which contain attributes suitable for continuous semantic image editing. We briefly introduce the scene datasets:
98
+
99
+ • Transient Attribute Database (Laffont et al., 2014): It contains 8,571 scene images with 40 attributes in 5 categories including lighting (e.g., “bright”), weather (e.g., “cloudy”) , seasons (e.g., “winter”), subjective impressions (e.g., “beautiful”), and additional attributes (e.g., “dirty”). Each attribute is annotated with a real-valued score between 0 and 1, where 0 indicates absence of the attribute.
100
+ • MIT Places2 data (Zhou et al., 2017): Using the provided category annotations (i.e., indoor/outdoor and natural/artificial), we select the natural outdoor scenes, obtaining a total of 144,543 images.
101
+
102
+ Implementation details. We choose $\lambda _ { 1 } = 1 0 , \lambda _ { 2 } = 0 . 0 5 , \lambda _ { 3 } = 0 . 0 5$ in Eq. (1) and compute the perceptual loss using the conv1 2, conv2 2, conv3 2, conv4 2 activations in a VGG-19 network (Simonyan & Zisserman, 2014) pre-trained on the ImageNet dataset (Russakovsky et al., 2015). We train $\mathbf { T }$ for $5 0 \mathrm { k }$ iterations with a batch size of 4. An Adam optimizer is used with a learning rate of 1e-4. For the latent space $\mathcal { Z }$ in the proposed method we use the $\mathcal { W }$ space of StyleGAN2 and the $\mathcal { Z }$ space of PGGAN. For the attribute regressor $R$ , we adopt a ResNet-50 (He et al., 2016) for attribute prediction on the Transient Attribute (Laffont et al., 2014) and the CelebA (Liu et al., 2018) data. The last fully connected layer in the ResNet-50 is replaced by a linear layer with an output dimension of 40. We train the regressors for 500 epochs and use the weights with the best validation mean squared error (MSE) on CelebA and the best test MSE on the Transient Scene Database. The GAN follows the StyleGAN2 architecture and is pretrained with $2 0 0 \mathrm { k }$ iterations on a union of the two natural scene datasets using a resolution of $2 5 6 \times 2 5 6$ . The training batch size is 32 and an Adam optimizer is used with a learning rate of 2e-3. For the face datasets, we use FFHQ pre-trained weights1 of StyleGAN2, and CelebA-HQ weights of $\mathrm { P G G A N } ^ { 2 }$ .
103
+
104
+ Baselines. We compare our approach to several popular image-to-image translation approaches (Choi et al., 2020; Wu et al., 2019; Zhu et al., 2017a) and latent space direction discovery methods (Shen et al., 2019; Voynov & Babenko, 2020). Since Choi et al. (2020); Shen et al. (2019); Zhu et al. (2017a) cannot deal with continuous attributes, we split the data into 2 domains using a threshold value of 0.5 for each of the 40 attributes. Afterward, the models are trained on 2 contrast domains, e.g., with or without a certain attribute. We use the official code of all baseline methods and rigorously follow their training steps. Note that work by Voynov & Babenko (2020) is unsupervised, i.e., the latent-space directions are human interpreted. To avoid bias during the selection of directions, we use the attribute regressor to automatically identify the most significant directions that can edit predetermined attributes. The details of preparing the baselines are given in Appendix C.2.
105
+
106
+ Evaluation metrics. There is no good numerical metric to evaluate image editing (Shen et al., 2019; Voynov & Babenko, 2020). In an attempt to address this concern, we automate quantitative evaluation based on a property that editing of attributes should maintain image identity. To achieve this, we employ a popular image identity recognition model3 pre-trained on the VGGface2 data (Cao et al., 2018). Cosine similarity is used to represent the similarity between paired original and edited images (Cao et al., 2018). In addition, we evaluate changes of the other independent attributes using the pre-trained regressor.
107
+
108
+ # 4.1 RESULTS ON NATURAL SCENE DATASETS
109
+
110
+ Comparison to image-to-image translation: As shown in Fig. 3 (a-d), we observe image-to-image translation to perform poorly when editing image details (e.g., removing clouds). Moreover, sometimes artifacts (orange spots in (a) and (b)) are introduced. In contrast, our model shows overall compelling transfer performance on all these attributes.
111
+
112
+ Comparison to latent-space translation: Inspecting Fig. 1, we observe our approach to improve upon work by Shen et al. (2019) in attribute edit quality and number of artifacts. Similarly, in
113
+
114
+ ![](images/2a075a8f6392e39967cfd1bca5063ddb38b1894f9895b367a74c0bc9a135410e.jpg)
115
+
116
+ Question1: Compared to the picture on the left, how cloudy is the picture on the right?
117
+
118
+ ![](images/73703449f7e679fa02f343ed6f43883fb95d0b5197a5344311e448950de5bd4b.jpg)
119
+
120
+ Question2: Ignoring the attribute clouds, determine if the two pictures record the same scene.
121
+
122
+ ![](images/779850f4a63da68102681994d49d10d728dc794f9dc3158d85d16ae82a39bfd4.jpg)
123
+ Figure 5: User study for image editing and image identity preservation. Blue bars show the predicted presence of a given attribute for images $( I +$ , higher is better). The orange bars measure the difference between paired images (lower is better).
124
+ Figure 6: Real image synthesis with multiple attributes. Shen et al. (2019) (top row); ours (bottom row): original real image (col.1); inverted result (col.2) from Abdal et al. (2019); edited results (col.3-7) with target attribute changes shown at the bottom.
125
+
126
+ Fig. 4, we notice that our method performs well in attribute editing, and has a better ability to preserve image identity when adding “night” and “snow.” We show additional analysis and results in Appendix D and E.1.
127
+
128
+ Quantitative evaluation: We follow a user study proposed by Kowalski et al. (2020) to evaluate controllability of our scene edits. Concretely, given an image $I = G ( z )$ , we generate paired images $( I + , I - )$ that have opposing values for attribute $n$ . 40 users took the test to answer: (a) the presence and strength of the attribute $n$ in $^ { I + }$ , and (b) if $I +$ and $I -$ are identical when ignoring the attribute. Both types of questions have options on a 5-level scale from 0 (“not at all”) to 1 (“totally”). Ideally, the response to question (a) should be 1 while we expect replies for (b) to be 0. We test performance of image editing with “clouds”, “sunrise&sunset”, “night” and “snow” attributes. A question example and statistical results over 50 image pairs are shown in Fig. 5. Statistical evidence supports our claim that the proposed approach performs well with regards to image edits while maintaining image identity.
129
+
130
+ # 4.2 RESULTS ON FACE DATASETS
131
+
132
+ Manipulation results on StyleGAN2: The comparison on real images shown in Fig. 1 suggests that our method works well for attribute edits. Further, the synthetic image edit results in Fig. 4 indicate that our edits are disentangled, while the baselines unexpectedly add “glasses” when aging the face. To increase the task difficulty, we edit real images with multiple attribute changes simultaneously. Results are summarized in Fig. 6, which highlights the controllability of our edits.
133
+
134
+ Quantitative evaluation: We measure the changing degrees of the other independent attributes and the image identity when editing attributes with various degrees $\hat { \varepsilon }$ . Here $\hat { \varepsilon }$ is a predicted changing degree on a target attribute by $R$ . For a thorough comparison, we evaluate the performance on 3 segments according to the absolute value of $\hat { \varepsilon }$ , i.e., $| \hat { \varepsilon } |$ in the range of $( 0 , 0 . 3 ]$ , (0.3, 0.6] and (0.6, 0.9]. Evaluation on “smile,” “hair color,” and “smile+hair color” attributes are shown in Tab. 1 and Tab. 2. The “hair color” attribute includes “blond” and “black” colors where we average the results on both cases. For multiple attribute editing, “smile $^ +$ hair color,” we evaluate the case that both the two targeted attributes change within the $| \hat { \varepsilon } |$ range. We use around 1k original images, generate $1 0 \mathrm { k }$ edited images with regard to each target attribute, and repeat the experiment 3 times. The averaged results and the standard deviations presented in Tab. 1 and Tab. 2 suggest that our model outperforms the baselines with regard to disentanglement and image identity preservation.
135
+
136
+ Table 1: Quantitative evaluation of numerical changes on the other semantically independent attributes (lower is better). (first row) edited attributes; (second row) the absolute changing range of the edited attributes; (bottom three rows) averages (up) and standard deviations (down) in each row.
137
+
138
+ <table><tr><td></td><td colspan="3">Smile</td><td colspan="3">Hair color</td><td colspan="3">Smile + Hair color</td></tr><tr><td></td><td>(0,.3]</td><td>(.3,.6]</td><td>(.6,.9]</td><td>(0,.3]</td><td>(.3, 6] (.6,.9]</td><td></td><td>(0,.3]</td><td>(.3,.6]</td><td>(.6,.9]</td></tr><tr><td>Shen et al.</td><td>.202 ±5e-2</td><td>.204 ±6e-2</td><td>.224 ±4e-2</td><td>.256 ±1e-2</td><td>.272 ±2e-2</td><td>.277 ±2e-2</td><td>.299 ±5e-3</td><td>.318 ±1e-2</td><td>.329 ±3e-2</td></tr><tr><td>Voynov et al.</td><td>.115 ± 6e-3</td><td>.211 ±4e-2</td><td>.277</td><td>.162</td><td>.166</td><td>.177</td><td>.155</td><td>.220 ±4e-2</td><td>.284 ±2e-2</td></tr><tr><td>Ours</td><td>.085 ±4e-2</td><td>.084 ±3e-3</td><td>±7e-3 .098 ±4e-3</td><td>±1e-2 .075 ±7e-4</td><td>±3e-2 .083 ±5e-3</td><td>±9e-3 .084 ±5e-3</td><td>±4e-3 .088 ±7e-3</td><td>.111 ±4e-3</td><td>.134 ±4e-3</td></tr></table>
139
+
140
+ Table 2: Quantitative evaluation on image identity preservation (higher is better). Notation is identical to Tab. 1.
141
+
142
+ <table><tr><td></td><td>Smile</td><td></td><td></td><td>Hair color</td><td></td><td></td><td>Smile+Haircolor</td><td></td></tr><tr><td></td><td>(0,.3] (.3,.6] (.6,.9] (0,.3] (.3,.6] (.6,.9] (0,.3] (.3,.6] (.6,.9)</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>Shen et al.</td><td>.918.916.907.887.877.874.877.819.801 ± 4e-3 ±1e-3 ± 5e-3 ±3e-2 ± 4e-2 ±4e-2 ± 6e-3 ± 3e-2 ±4e-2</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>Voynov et al.</td><td>.979</td><td></td><td></td><td></td><td></td><td></td><td></td><td>.896.869.955.909.904.940.829.811</td></tr><tr><td>Ours</td><td>.995.994.992.993.993.993.992.986.984</td><td></td><td></td><td></td><td></td><td></td><td></td><td>± 2e-3 ±4e-3 ± 9e-3 ± 6e-2 ±4e-2 ±3e-2 ±9e-3 ± 4e-2 ±3e-2 ± 7e-4 ± 1e-3 ± 9e-4 ± 5e-4 ±1e-4 ± 2e-4 ± 9e-4 ± 2e-3 ± 4e-4</td></tr></table>
143
+
144
+ Manipulation results on PGGAN: For PGGAN, we use local transformations parameterized by three-layer perceptrons with leaky ReLU activations. We show the detailed MLP architecture in Appendix B.1. Editing results in Fig. 7 suggest that the proposed approach is able to continuously edit faces with various semantic attributes. We also study the differences between local and global directions in Fig. 11. Particularly, a global $\mathbf { T }$ (in Fig. 11 (a)) is a matrix where each column $i$ is given by $\mathbf { \ b { d } } _ { i }$ . For a local $\mathbf { T }$ (in Fig. 11 (b)) $\mathbf { \ b { d } } _ { i }$ is given by a fully-connected layer with identical input and output dimensions. Fig. 11 (c) and (d) use the MLP components with the aforementioned structure. We use $\mathcal { L } _ { \mathrm { r e g } }$ to train $\mathbf { T }$ in (c), while the total loss $\mathcal { L }$ is used for (d). The results in Fig. 11 indicate that a local $_ { \mathbf { T } }$ , with either linear or MLP structure works well for face attribute edits. Moreover, our loss $\mathcal { L }$ stabilizes the training process of $\mathbf { T }$ .
145
+
146
+ ![](images/4fa6e5104333e00a1e806c7aae8b7cd5a1fcdbf707a582fbe68a63e86a89de99.jpg)
147
+ Figure 7: Continuous editing results on PGGAN (Karras et al., 2017) with the “black hair” (left) and the “smile” (right) attribute.
148
+
149
+ ![](images/65a0ce13abac868def241a0d1ed0540afe7ab5e45559a10ee00dfd0c82016709.jpg)
150
+ Figure 8: Comparison of global and local transformations on PGGAN. Original synthetic images (col.1); the edited results on enhancing “smile” (col.2-5): (a) a global $_ { \mathbf { T } }$ , (b) a local $\mathbf { T }$ , with linearlayer direction functions, (c) a local $\mathbf { T }$ with MLP direction functions trained via $\mathcal { L } _ { \mathrm { r e g } }$ loss only, and (d) a local $_ { \mathbf { T } }$ with MLP direction functions training via the entire loss $\mathcal { L }$ .
151
+
152
+ # 5 CONCLUSION
153
+
154
+ We propose an effective approach to semantically edit images by transferring latent vectors towards meaningful latent space directions. The proposed method enables continuous image manipulations with respect to various attributes. Extensive experiments highlight that the model achieves state-ofthe-art performance for targeted image manipulation.
155
+
156
+ Acknowledgements: This work is supported in part by NSF under Grant No. 1718221, 2008387, 1934986 and MRI #1725729, NIFA award 2020-67021-32799, UIUC, Samsung, Amazon, 3M, and Cisco Systems Inc. (Gift Award CG 1377144). We thank Cisco for access to the Arcetri cluster. We thank Amazon for EC2 credits.
157
+
158
+ # REFERENCES
159
+
160
+ Rameen Abdal, Yipeng Qin, and Peter Wonka. Image2stylegan: How to embed images into the stylegan latent space? In ICCV, 2019.
161
+ Binod Bhattarai and Tae-Kyun Kim. Inducing optimal attribute representations for conditional gans. ECCV, 2020.
162
+ Andrew Brock, Jeff Donahue, and Karen Simonyan. Large scale gan training for high fidelity natural image synthesis. arXiv, 2018.
163
+ Q. Cao, L. Shen, W. Xie, et al. Vggface2: A dataset for recognising faces across pose and age. In IEEE FG, 2018.
164
+ Yunjey Choi, Minje Choi, Munyoung Kim, et al. Stargan: Unified generative adversarial networks for multi-domain image-to-image translation. In CVPR, 2018.
165
+ Yunjey Choi, Youngjung Uh, Jaejun Yoo, et al. Stargan v2: Diverse image synthesis for multiple domains. CVPR, 2020.
166
+ Ian Goodfellow, Jean Pouget-Abadie, Mehdi Mirza, et al. Generative adversarial nets. In NeurIPS, 2014.
167
+ Erik Hark ¨ onen, Aaron Hertzmann, Jaakko Lehtinen, et al. Ganspace: Discovering interpretable gan ¨ controls. arXiv, 2020.
168
+ Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In CVPR, 2016.
169
+ Phillip Isola, Jun-Yan Zhu, Tinghui Zhou, et al. Image-to-image translation with conditional adversarial networks. In CVPR, 2017.
170
+
171
+ Ali Jahanian, Lucy Chai, and Phillip Isola. On the”steerability” of generative adversarial networks. ICLR, 2019.
172
+
173
+ Alexia Jolicoeur-Martineau. The relativistic discriminator: a key element missing from standard gan. ICLR, 2019.
174
+
175
+ Tero Karras, Timo Aila, Samuli Laine, et al. Progressive growing of gans for improved quality, stability, and variation. arXiv, 2017.
176
+
177
+ Tero Karras, Samuli Laine, and Timo Aila. A style-based generator architecture for generative adversarial networks. In CVPR, 2019a.
178
+
179
+ Tero Karras, Samuli Laine, Miika Aittala, et al. Analyzing and improving the image quality of stylegan. arXiv, 2019b.
180
+
181
+ Marek Kowalski, Stephan J Garbin, Virginia Estellers, Tadas Baltrusaitis, Matthew Johnson, and ˇ Jamie Shotton. Config: Controllable neural face image generation. ICML, 2020.
182
+
183
+ Pierre-Yves Laffont, Zhile Ren, Xiaofeng Tao, et al. Transient attributes for high-level understanding and editing of outdoor scenes. TOG, 2014.
184
+
185
+ H.Y. Lee, H.Y. Tseng, Q. Mao, et al. Drit++: Diverse image-to-image translation via disentangled representations. IJCV, 2020.
186
+
187
+ Bowen Li, Xiaojuan Qi, Thomas Lukasiewicz, and Others. Controllable text-to-image generation. In NeurIPS, 2019.
188
+
189
+ Y. Li, C. Fang, J. Yang, et al. Universal style transfer via feature transforms. In NeurIPS, 2017.
190
+
191
+ Ziwei Liu, Ping Luo, Xiaogang Wang, et al. Large-scale celebfaces attributes (celeba) dataset. 2018.
192
+
193
+ F. Luan, S. Paris, and E. andothers Shechtman. Deep photo style transfer. In PCVPR, 2017.
194
+
195
+ Taesung Park, Ming-Yu Liu, Ting-Chun Wang, and Jun-Yan Zhu. Semantic image synthesis with spatially-adaptive normalization. In CVPR, 2019.
196
+
197
+ Antoine Plumerault, Herve Le Borgne, and C ´ eline Hudelot. Controlling generative models with ´ continuous factors of variations. ICLR, 2020.
198
+
199
+ Olga Russakovsky, Jia Deng, Hao Su, et al. Imagenet large scale visual recognition challenge. ICCV, 2015.
200
+
201
+ Yujun Shen and Bolei Zhou. Closed-form factorization of latent semantics in gans. CVPR, 2021.
202
+
203
+ Yujun Shen, Jinjin Gu, Xiaoou Tang, et al. Interpreting the latent space of gans for semantic face editing. 2019.
204
+
205
+ Karen Simonyan and Andrew Zisserman. Very deep convolutional networks for large-scale image recognition. arXiv, 2014.
206
+
207
+ Yuri Viazovetskyi, Vladimir Ivashkin, and Evgeny Kashin. Stylegan2 distillation for feed-forward image manipulation. arXiv, 2020.
208
+
209
+ Andrey Voynov and Artem Babenko. Unsupervised discovery of interpretable directions in the gan latent space. ICML, 2020.
210
+
211
+ Sheng-Yu Wang, Oliver Wang, Richard Zhang, et al. Cnn-generated images are surprisingly easy to spot... for now. CVPR, 2019a.
212
+
213
+ Sheng-Yu Wang, Oliver Wang, et al. Detecting photoshopped faces by scripting photoshop. In ICCV, 2019b.
214
+
215
+ Ting-Chun Wang, Ming-Yu Liu, Jun-Yan Zhu, et al. High-resolution image synthesis and semantic manipulation with conditional gans. In CVPR, 2018.
216
+
217
+ Po-Wei Wu, Yu-Jing Lin, Che-Han Chang, et al. Relgan: Multi-domain image-to-image translation via relative attributes. In ICCV, 2019.
218
+
219
+ Han Zhang, Ian Goodfellow, Dimitris Metaxas, et al. Self-attention generative adversarial networks. PMLR, 2018.
220
+
221
+ Bolei Zhou, Agata Lapedriza, Aditya Khosla, et al. Places: A 10 million image database for scene recognition. TPAMI, 2017.
222
+
223
+ Jun-Yan Zhu, Taesung Park, Phillip Isola, et al. Unpaired image-to-image translation using cycleconsistent adversarial networks. In ICCV, 2017a.
224
+
225
+ Jun-Yan Zhu, Richard Zhang, Deepak Pathak, et al. Toward multimodal image-to-image translation. In NeurIPS, 2017b.
226
+
227
+ # APPENDIX
228
+
229
+ A. ALGORITHM
230
+
231
+ The overall procedure of the proposed method in Algorithm 1, taking local transformation $\mathbf { T }$ as an example.
232
+
233
+ # Algorithm 1 Training Procedure
234
+
235
+ Input: A pre-trained GAN with $G$ , $D$ , and input noise distribution $z \sim \mathcal { Z }$ ; a pre-trained regressor
236
+ $R$ for predictions on $_ \mathrm { N }$ attributes; an initialized $\mathbf { T }$ ; max iteration number $M$ .
237
+ 1: for iteration $m = 1 , \ldots , M$ do
238
+ 2: Sample random noise $z \sim \mathcal { Z }$ , and $\varepsilon$
239
+ 3: Compute internal attributes for a synthetic image, i.e., ${ \pmb \alpha } = R ( G ( { \pmb z } ) )$
240
+ 4: Compute the actual shift value $\pmb { \delta } = C L I P ( \pmb { \alpha } + \pmb { \varepsilon } , ( 0 , 1 ) ) - \pmb { \alpha }$
241
+ 5: Compute the transformed latent vector $z ^ { \prime } = z + { \cal T } ( z ) \delta$
242
+ 6: Compute $I ^ { \prime } = G ( z ^ { \prime } )$ , ${ \pmb { \alpha } } ^ { \prime } = { \pmb { \alpha } } + { \pmb { \delta } }$
243
+ 7: Compute attribute predictions $\hat { \pmb { \alpha } } ^ { \prime } = { \cal R } ( { \cal I ^ { \prime } } )$
244
+ 8: Compute the loss $\mathcal { L }$
245
+ 9: Update $\mathbf { T }$
246
+
247
+ 10: end for Return: T
248
+
249
+ # B. METHOD DETAILS
250
+
251
+ # B.1. METHOD ON PGGAN
252
+
253
+ We apply a multi-layer perceptron (MLP) to parameterize a latent space path on PGGAN. Fig. 9 shows the MLP architecture that we use.
254
+
255
+ ![](images/b73e22acdc9562bd91a2933f94ca6e6ff199eae5f9734ff99eb3251d59132010.jpg)
256
+ Figure 9: Example MLP architecture on PGGAN.
257
+
258
+ In practice, we find that normalizing the direction vector $\mathbf { \ b { d } } _ { i }$ helps preserve image identity during manipulation on PGGAN. Formally, the transformed latent vector can be written as
259
+
260
+ $$
261
+ z ^ { \prime } = z + \lambda \varepsilon { \frac { d _ { i } } { \parallel d _ { i } \parallel } } ,
262
+ $$
263
+
264
+ where $\lambda$ is a weight adjusting the direction scale. We set $\lambda = 3$ .
265
+
266
+ # C. EXPERIMENTAL DETAILS
267
+
268
+ C.1 THE EXPECTATION IN $\mathcal { L } _ { \mathrm { { R E G } } }$
269
+
270
+ We define the regression loss $\mathcal { L } _ { \mathrm { r e g } }$ as
271
+
272
+ $$
273
+ \begin{array} { r l } { \mathcal { L } _ { \mathrm { r e g } } = \ } & { { } \mathbb { E } _ { z \sim \mathcal { Z } , \varepsilon \sim \mathcal { D } _ { \varepsilon } } [ - \hat { \alpha } ^ { \prime } \log \alpha ^ { \prime } - ( { \bf 1 } - \hat { \alpha } ^ { \prime } ) \log \left( { \bf 1 } - \alpha ^ { \prime } \right) ] , } \end{array}
274
+ $$
275
+
276
+ where $\alpha ^ { \prime }$ is from the distribution generated by $_ z$ and $\varepsilon$ . We now discuss how we derive the distribution of $\alpha ^ { \prime }$ . To begin, $_ { z }$ is sampled from $\mathcal { Z }$ and $\varepsilon$ is sampled from $\mathcal { D } _ { \varepsilon }$ . The other variables are generated by $_ z$ and $\varepsilon$ :
277
+
278
+ $$
279
+ \begin{array} { r l } & { z ^ { \prime } = z + \pmb { T } \pmb { \varepsilon } } \\ & { \pmb { \alpha } ^ { \prime } = \boldsymbol { R } ( G ( z ) ) + \pmb { \varepsilon } } \\ & { \hat { \pmb { \alpha } } ^ { \prime } = \boldsymbol { R } ( G ( z ^ { \prime } ) ) . } \end{array}
280
+ $$
281
+
282
+ As a result, the distribution of $\alpha ^ { \prime }$ is dependent on $\mathcal { Z }$ and $\mathcal { D } _ { \varepsilon }$ .
283
+
284
+ # C.2 UNSUPERVISED LATENT-SPACE EDITS OF GANS
285
+
286
+ Voynov & Babenko (2020) learn a matrix where each column is a direction. Yet, Voynov & Babenko (2020) require a human to interpret the learnt directions. To avoid bias during the selection of directions in our comparison, we use the pre-trained attribute regressor to automatically identify the most significant directions. Concretely, we first generate 100 images and edit them with target attributes of various degrees. Next, we use the regressor $R$ on the edited images to predict attributes. We choose for an attribute edit the direction on which all the edited images have the overall highest changing response on the target attribute.
287
+
288
+ # D. ADDITIONAL ANALYSIS
289
+
290
+ # D.1 GAN INVERSION PERFORMANCE
291
+
292
+ We use an optimization-based GAN inversion method (Abdal et al., 2019) to find optimal latent vectors that can best reconstruct the real images via the generator. To examine the effect of GAN inversion performance on our approach, we terminated the GAN inversion approach at different training steps, i.e., 500 and 4,000 iterations. We show averaged reconstruction MSE loss in Tab. 3. In this case, we reconstructed 20 real face images and edited their “Smile” and the “Blond hair” attribute with 10 different degrees $\varepsilon$ , i.e., 200 images in total for each attribute editing. Quantitative evaluation on image identity preservation and numerical changes on the other semantically independent attributes for the reconstructed face images are given in Tab. 4. The results in Tab. 4 suggest that the performance of the GAN inversion method affects our method to some degree. Visualized inversion and editing results are shown in Fig. 10. The qualitative results suggest that our method still works remarkably well on the worse inversion image.
293
+
294
+ Table 3: Averaged MSE loss of reconstructing 20 real face images. The GAN inversion method (Abdal et al., 2019) was trained and terminated at $4 \mathrm { k \Omega }$ and 500 iterations with averaged MSE loss in the right column.
295
+
296
+ <table><tr><td>Training iterations</td><td>MSE</td></tr><tr><td>4k iters</td><td>1657.40</td></tr><tr><td>500 iters</td><td>3096.75</td></tr></table>
297
+
298
+ # D.2 ABLATION STUDY
299
+
300
+ We conduct an ablation study with single- and joint-distribution training strategies in our method. Specifically, single-distribution sampling refers to learn one attribute direction at a time. In contrast, joint-distribution training means to train multiple attribute directions simultaneously. Fig. 11 shows the visualized results with the two training strategies on the face and the scene dataset. We observe that the model with the single-distribution training strategy generates more unexpected changes as the manipulation degree is getting large, e.g., darker scene colors by the model trained for a single attribute, shown in Fig. 11 (b).
301
+
302
+ Table 4: Quantitative evaluation of identity preservation $\mathbf { \Pi } ^ { ( \mathbf { I I D } ) }$ and attribute changes (Attr). We edited two attributes for the real face images, i.e., “Smile” (col.2-7) and “Blond hair” (col.8-13).
303
+
304
+ <table><tr><td colspan="7">Smile</td><td colspan="6">Blond hair</td></tr><tr><td></td><td></td><td>ID (↑)</td><td></td><td></td><td>Attr (↓)</td><td></td><td>ID(↑)</td><td></td><td></td><td>Attr (↓)</td><td></td><td></td></tr><tr><td>国</td><td>(0,.3]</td><td>(.3,.6]</td><td>(.6,.9] (0, .3]</td><td></td><td></td><td>(.3,.6] (.6,.9]</td><td>(0,.3] (.3,.6]</td><td></td><td>(.6,.9] (0,.3] (.3,.6] (.6,.9]</td><td></td><td></td><td></td></tr><tr><td>4k iters 500 iters</td><td>.997 .996</td><td>.994 .99</td><td>.986 .982</td><td>.077 .087</td><td>.108 .138</td><td>.147 .165</td><td>.988 .978</td><td>.979 .936</td><td>.94 .914</td><td>.1 .122</td><td>.112 .158</td><td>.16 .185</td></tr></table>
305
+
306
+ ![](images/af8db2995983534031404349d44950bd87eef7c591b07f228e520b77de7cd045.jpg)
307
+ Figure 10: Visual comparisons of “Smile” editing with different reconstructed images: (col.1) Original image; (col.2) reconstructed images with 500 (top) and $4 \mathrm { k }$ (bottom) inversion optimization steps; (col.3-6) results of editing the “Smile” attribute.
308
+
309
+ # E. ADDITIONAL RESULTS
310
+
311
+ # E.1 SCENE IMAGE EDITS ON STYLEGAN2
312
+
313
+ We show more results of our method on continuous scene image edits in Fig. 12 - 15. The semantically edited attributes include “clouds” (Fig. 12), “brightness” (Fig. 13), “snow” (Fig. 14), and “summer” (Fig. 15).
314
+
315
+ # F. BROADER IMPACT
316
+
317
+ From an application perspective, our method is effective and efficient with regard to image manipulation and photo-realism, which we hope will contribute to 2D and 3D controllable image editing tasks. Moreover, usage of deep nets to learn mappings between spaces is still not well understood, e.g., mappings between low-dimensional space and image space in classification and generation tasks. We hope our method provides inspiration for representation learning and a first step for a new view with regard to deep net interpretability.
318
+
319
+ Obviously, we are aware of the dangers of automated image manipulation. Similar to deepfake tasks whose aim is to produce fabricated images and videos that appear to be real, improper use of image manipulation approaches might raise negative issues with regard to information security, property, etc. Beyond that, edited image detection techniques Wang et al. (2019a;b) are proposed recently to avoid the aforementioned issues, which promotes growth in both domains.
320
+
321
+ ![](images/070499f2f63fa653dfec515acb1f5e8b3c6dcbe6b26fef8e4ea673ab6cbf7190.jpg)
322
+ Figure 11: Visual comparisons of single- and joint-distribution training. Single-distribution training refers to train one attribute direction at a time, while joint-distribution training means to train multiple attribute directions simultaneously.
323
+
324
+ ![](images/191cda68622e417c6d8420dd5a11163fe54fe664b24042948c573d3330369ea7.jpg)
325
+ Figure 12: Additional results. Continuous image edits using StyleGAN2 (Karras et al., 2019b) on the “clouds” attribute.
326
+
327
+ ![](images/18b8b7a561e6889f43597a128284efa207895a9e0477c5d4698ddd06161657af.jpg)
328
+ Figure 13: Additional results. Continuous image edits using StyleGAN2 (Karras et al., 2019b) on the “brightness” attribute.
329
+
330
+ ![](images/ff2234514908b69cd7c90051e7852b66cdc1b435be6dd2d622ff6f37ebbd9971.jpg)
331
+ Figure 14: Additional results. Continuous image edits using StyleGAN2 (Karras et al., 2019b) on the “snow” attribute.
332
+
333
+ ![](images/683ee00e8b0863b6e305268599fb5308be987905f6b832d5f8490b4a0911e2b8.jpg)
334
+ Figure 15: Additional results. Continuous image edits using StyleGAN2 (Karras et al., 2019b) on the “summer” attribute.
parse/train/HOFxeCutxZR/HOFxeCutxZR_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/Hy6b4Pqee/Hy6b4Pqee.md ADDED
@@ -0,0 +1,507 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # DEEP PROBABILISTIC PROGRAMMING
2
+
3
+ Dustin Tran Columbia University
4
+
5
+ Matthew D. Hoffman Adobe Research
6
+
7
+ Rif A. Saurous Google Research
8
+
9
+ Eugene Brevdo Google Brain
10
+
11
+ Kevin Murphy Google Research
12
+
13
+ David M. Blei Columbia University
14
+
15
+ # ABSTRACT
16
+
17
+ We propose Edward, a Turing-complete probabilistic programming language. Edward defines two compositional representations—random variables and inference. By treating inference as a first class citizen, on a par with modeling, we show that probabilistic programming can be as flexible and computationally efficient as traditional deep learning. For flexibility, Edward makes it easy to fit the same model using a variety of composable inference methods, ranging from point estimation to variational inference to MCMC. In addition, Edward can reuse the modeling representation as part of inference, facilitating the design of rich variational models and generative adversarial networks. For efficiency, Edward is integrated into TensorFlow, providing significant speedups over existing probabilistic systems. For example, we show on a benchmark logistic regression task that Edward is at least $3 5 \mathrm { x }$ faster than Stan and 6x faster than PyMC3. Further, Edward incurs no runtime overhead: it is as fast as handwritten TensorFlow.
18
+
19
+ # 1 INTRODUCTION
20
+
21
+ The nature of deep neural networks is compositional. Users can connect layers in creative ways, without having to worry about how to perform testing (forward propagation) or inference (gradientbased optimization, with back propagation and automatic differentiation).
22
+
23
+ In this paper, we design compositional representations for probabilistic programming. Probabilistic programming lets users specify generative probabilistic models as programs and then “compile” those models down into inference procedures. Probabilistic models are also compositional in nature, and much work has enabled rich probabilistic programs via compositions of random variables (Goodman et al., 2012; Ghahramani, 2015; Lake et al., 2016).
24
+
25
+ Less work, however, has considered an analogous compositionality for inference. Rather, many existing probabilistic programming languages treat the inference engine as a black box, abstracted away from the model. These cannot capture probabilistic inferences that reuse the model’s representation—a key idea in recent advances in variational inference (Kingma & Welling, 2014; Rezende & Mohamed, 2015; Tran et al., 2016b), generative adversarial networks (Goodfellow et al., 2014), and also in more classic inferences (Dayan et al., 1995; Gutmann & Hyvärinen, 2010).
26
+
27
+ We propose Edward1, a Turing-complete probabilistic programming language which builds on two compositional representations—one for random variables and one for inference. By treating inference as a first class citizen, on a par with modeling, we show that probabilistic programming can be as flexible and computationally efficient as traditional deep learning. For flexibility, we show how Edward makes it easy to fit the same model using a variety of composable inference methods, ranging from point estimation to variational inference to MCMC. For efficiency, we show how to integrate Edward into existing computational graph frameworks such as TensorFlow (Abadi et al., 2016). Frameworks like TensorFlow provide computational benefits like distributed training, parallelism, vectorization, and GPU support “for free.” For example, we show on a benchmark task that Edward’s Hamiltonian Monte Carlo is many times faster than existing software. Further, Edward incurs no runtime overhead: it is as fast as handwritten TensorFlow.
28
+
29
+ # 2 RELATED WORK
30
+
31
+ Probabilistic programming languages (PPLs) typically trade off the expressiveness of the language with the computational efficiency of inference. On one side, there are languages which emphasize expressiveness (Pfeffer, 2001; Milch et al., 2005; Pfeffer, 2009; Goodman et al., 2012), representing a rich class beyond graphical models. Each employs a generic inference engine, but scales poorly with respect to model and data size. On the other side, there are languages which emphasize efficiency (Spiegelhalter et al., 1995; Murphy, 2001; Plummer, 2003; Salvatier et al., 2015; Carpenter et al., 2016). The PPL is restricted to a specific class of models, and inference algorithms are optimized to be efficient for this class. For example, Infer.NET enables fast message passing for graphical models (Minka et al., 2014), and Augur enables data parallelism with GPUs for Gibbs sampling in Bayesian networks (Tristan et al., 2014). Edward bridges this gap. It is Turing complete—it supports any computable probability distribution—and it supports efficient algorithms, such as those that leverage model structure and those that scale to massive data.
32
+
33
+ There has been some prior research on efficient algorithms in Turing-complete languages. Venture and Anglican design inference as a collection of local inference problems, defined over program fragments (Mansinghka et al., 2014; Wood et al., 2014). This produces fast program-specific inference code, which we build on. Neither system supports inference methods such as programmable posterior approximations, inference models, or data subsampling. Concurrent with our work, WebPPL features amortized inference (Ritchie et al., 2016). Unlike Edward, WebPPL does not reuse the model’s representation; rather, it annotates the original program and leverages helper functions, which is a less flexible strategy. Finally, inference is designed as program transformations in Kiselyov & Shan (2009); Scibior et al. ´ (2015); Zinkov & Shan (2016). This enables the flexibility of composing inference inside other probabilistic programs. Edward builds on this idea to compose not only inference within modeling but also modeling within inference (e.g., variational models).
34
+
35
+ # 3 COMPOSITIONAL REPRESENTATIONS FOR PROBABILISTIC MODELS
36
+
37
+ We first develop compositional representations for probabilistic models. We desire two criteria: (a) integration with computational graphs, an efficient framework where nodes represent operations on data and edges represent data communicated between them (Culler, 1986); and (b) invariance of the representation under the graph, that is, the representation can be reused during inference.
38
+
39
+ Edward defines random variables as the key compositional representation. They are class objects with methods, for example, to compute the log density and to sample. Further, each random variable $\mathbf { x }$ is associated to a tensor (multi-dimensional array) $\mathbf { x } ^ { * }$ , which represents a single sample $\mathbf { x } ^ { * } \sim$ $p ( \mathbf { x } )$ . This association embeds the random variable onto a computational graph on tensors.
40
+
41
+ The design’s simplicity makes it easy to develop probabilistic programs in a computational graph framework. Importantly, all computation is represented on the graph. This enables one to compose random variables with complex deterministic structure such as deep neural networks, a diverse set of math operations, and third party libraries that build on the same framework. The design also enables compositions of random variables to capture complex stochastic structure.
42
+
43
+ As an lustration, we use a Beta-Bernoulli model, $p ( \mathbf { x } , \theta ) = \mathrm { B e t a } ( \theta \mid 1 , 1 ) \prod _ { n = 1 } ^ { 5 0 } \mathrm { B e r n o u l l i } ( x _ { n } \mid \theta )$ $\theta$ is a latent probability shared across the 50 data points $\mathbf { x } \in \{ 0 , 1 \} ^ { 5 0 }$ . The random variable $_ \textrm { x }$ is 50-dimensional, parameterized by the random tensor $\theta ^ { * }$ . Fetching the object $_ \textrm { x }$ runs the graph: it simulates from the generative process and outputs a binary vector of 50 elements.
44
+
45
+ ![](images/0287bfe10947a2c5c9120ae3d5226db94ad8a6095713a184099d55a1a2ab7bf6.jpg)
46
+ Figure 1: Beta-Bernoulli program (left) alongside its computational graph (right). Fetching $\mathbf { x }$ from the graph generates a binary vector of 50 elements.
47
+
48
+ All computation is registered symbolically on random variables and not over their execution. Symbolic representations do not require reifying the full model, which leads to unreasonable memory consumption for large models (Tristan et al., 2014). Moreover, it enables us to simplify both deterministic and stochastic operations in the graph, before executing any code (Scibior et al. ´ , 2015; Zinkov & Shan, 2016).
49
+
50
+ ![](images/836aa7338dea55095b17e76f84cab77f475d156f099a4a66b186d4de36d50608.jpg)
51
+ Figure 2: Variational auto-encoder for a data set of $2 8 \times 2 8$ pixel images: (left) graphical model, with dotted lines for the inference model; (right) probabilistic program, with 2-layer neural networks.
52
+
53
+ With computational graphs, it is also natural to build mutable states within the probabilistic program. As a typical use of computational graphs, such states can define model parameters; in TensorFlow, this is given by a tf.Variable. Another use case is for building discriminative models $p ( \mathbf { y } \mid \mathbf { x } )$ , where x are features that are input as training or test data. The program can be written independent of the data, using a mutable state (tf.placeholder) for $\mathbf { x }$ in its graph. During training and testing, we feed the placeholder the appropriate values.
54
+
55
+ In Appendix A, we provide examples of a Bayesian neural network for classification (A.1), latent Dirichlet allocation (A.2), and Gaussian matrix factorization (A.3). We present others below.
56
+
57
+ # 3.1 EXAMPLE: VARIATIONAL AUTO-ENCODER
58
+
59
+ Figure 2 implements a variational auto-encoder (VAE) (Kingma & Welling, 2014; Rezende et al., 2014) in Edward. It comprises a probabilistic model over data and a variational model designed to approximate the former’s posterior. Here we use random variables to construct both the probabilistic model and the variational model; they are fit during inference (more details in Section 4).
60
+
61
+ There are $N$ data points $x _ { n } \in \{ 0 , 1 \} ^ { 2 8 \cdot 2 8 }$ each with $d$ latent variables, $z _ { n } \in \mathbb { R } ^ { d }$ . The program uses Keras (Chollet, 2015) to define neural networks. The probabilistic model is parameterized by a 2-layer neural network, with 256 hidden units (and ReLU activation), and generates $2 8 \times 2 8$ pixel images. The variational model is parameterized by a 2-layer inference network, with 256 hidden units and outputs parameters of a normal posterior approximation.
62
+
63
+ The probabilistic program is concise. Core elements of the VAE—such as its distributional assumptions and neural net architectures—are all extensible. With model compositionality, we can embed it into more complicated models (Gregor et al., 2015; Rezende et al., 2016) and for other learning tasks (Kingma et al., 2014). With inference compositionality (which we discuss in Section 4), we can embed it into more complicated algorithms, such as with expressive variational approximations (Rezende & Mohamed, 2015; Tran et al., 2016b; Kingma et al., 2016) and alternative objectives (Ranganath et al., 2016a; Li & Turner, 2016; Dieng et al., 2016).
64
+
65
+ # 3.2 EXAMPLE: BAYESIAN RECURRENT NEURAL NETWORK WITH VARIABLE LENGTH
66
+
67
+ Random variables can also be composed with control flow operations. As an example, Figure 3 implements a Bayesian recurrent neural network (RNN) with variable length. The data is a sequence of inputs $\{ \mathbf { x } _ { 1 } , \dotsc , \mathbf { x } _ { T } \}$ and outputs $\{ y _ { 1 } , \dots , y _ { T } \}$ of length $T$ with $\mathbf { x } _ { t } \in \mathbb { R } ^ { D }$ and $y _ { t } \in \mathbb { R }$ per time step. For $t = 1 , \dots , T$ , a RNN applies the update
68
+
69
+ $$
70
+ \mathbf { h } _ { t } = \operatorname { t a n h } ( \mathbf { W } _ { h } \mathbf { h } _ { t - 1 } + \mathbf { W } _ { x } \mathbf { x } _ { t } + \mathbf { b } _ { h } ) ,
71
+ $$
72
+
73
+ where the previous hidden state is $\mathbf { h } _ { t - 1 } \in \mathbb { R } ^ { H }$ . We feed each hidden state into the output’s likelihood, $y _ { t } \sim \mathrm { N o r m a l } ( \mathbf { W } _ { y } \mathbf { h } _ { t } + \mathbf { b } _ { y } , 1 )$ , and we place a standard normal prior over all parameters $\begin{array} { r } { \{ \mathbf { W } _ { h } \in \mathbb { R } ^ { H \times H } , \mathbf { W } _ { x } \in \mathbb { R } ^ { D \times H } , \mathbf { W } _ { y } \in \mathbb { R } ^ { H \times 1 } , \mathbf { b } _ { h } \in \mathbb { R } ^ { H } , \mathbf { b } _ { y } \in \mathbb { R } \} . } \end{array}$ Our implementation is dynamic: it differs from a RNN with fixed length, which pads and unrolls the computation.
74
+
75
+ ![](images/a452f8ac4f3281243dec5a50796c87adc722ba2d0e6e35fb5bec3b46538665f3.jpg)
76
+ Figure 3: Bayesian RNN: (left) graphical model; (right) probabilistic program. The program has an unspecified number of time steps; it uses a symbolic for loop (tf.scan).
77
+
78
+ 3.3 STOCHASTIC CONTROL FLOW AND MODEL PARALLELISM
79
+
80
+ ![](images/35633709cc7374ff58b7b9dddbe2ba61769af7ed37faacacf5cdaada6a39c34d.jpg)
81
+ Figure 4: Computational graph for a probabilistic program with stochastic control flow.
82
+
83
+ Random variables can also be placed in the control flow itself, enabling probabilistic programs with stochastic control flow. Stochastic control flow defines dynamic conditional dependencies, known in the literature as contingent or existential dependencies (Mansinghka et al., 2014; Wu et al., 2016). See Figure 4, where $\mathbf { x }$ may or may not depend on a for a given execution. In Appendix A.4, we use stochastic control flow to implement a Dirichlet process mixture model. Tensors with stochastic shape are also possible: for example, tf.zeros(Poisson( $\mathtt { 1 a m = 5 . 0 }$ )) defines a vector of zeros with length given by a Poisson draw with rate 5.0.
84
+
85
+ Stochastic control flow produces difficulties for algorithms that use the graph structure because the relationship of conditional dependencies changes across execution traces. The computational graph, however, provides an elegant way of teasing out static conditional dependence structure $\mathbf { \tau } ( \mathbf { p } )$ from dynamic dependence structure (a). We can perform model parallelism (parallel computation across components of the model) over the static structure with GPUs and batch training. We can use more generic computations to handle the dynamic structure.
86
+
87
+ # 4 COMPOSITIONAL REPRESENTATIONS FOR INFERENCE
88
+
89
+ We described random variables as a representation for building rich probabilistic programs over computational graphs. We now describe a compositional representation for inference. We desire two criteria: (a) support for many classes of inference, where the form of the inferred posterior depends on the algorithm; and (b) invariance of inference under the computational graph, that is, the posterior can be further composed as part of another model.
90
+
91
+ To explain our approach, we will use a simple hierarchical model as a running example. Figure 5 displays a joint distribution $p ( \mathbf { x } , \mathbf { z } , \beta )$ of data $\mathbf { x }$ , local variables $\mathbf { z }$ , and global variables $\beta$ . The ideas here extend to more expressive programs.
92
+
93
+ # 4.1 INFERENCE AS STOCHASTIC GRAPH OPTIMIZATION
94
+
95
+ The goal of inference is to calculate the posterior distribution $p ( \mathbf { z } , \beta \mid \mathbf { x } _ { \mathrm { t r a i n } } ; \theta )$ given data $\mathbf { X } _ { \mathrm { t r a i n } }$ where $\pmb \theta$ are any model parameters that we will compute point estimates for.2 We formalize this as
96
+
97
+ ![](images/44003676b9c0dcc29b6f0f163e45a0b8d6a5cd17bfb0fe2babeb5033313a12e5.jpg)
98
+ Figure 5: Hierarchical model: (left) graphical model; (right) probabilistic program. It is a mixture of Gaussians over $D$ -dimensional data $\mathbf { \bar { \{ x } } _ { n } \mathbf \} \in \mathbb { R } ^ { N \times D }$ . There are $K$ latent cluster means $\beta \ \in$ $\mathbb { R } ^ { K \times D }$ .
99
+
100
+ the following optimization problem:
101
+
102
+ $$
103
+ \operatorname* { m i n } _ { \mathbf { \lambda } , \theta } \mathcal { L } ( p ( \mathbf { z } , \beta \mid \mathbf { x } _ { \mathrm { t r a i n } } ; \mathbf { \boldsymbol { \theta } } ) , \mathbf { \boldsymbol { q } } ( \mathbf { z } , \beta ; \mathbf { \lambda } ) ) ,
104
+ $$
105
+
106
+ where $q ( \mathbf { z } , { \boldsymbol { \beta } } ; { \boldsymbol { \lambda } } )$ is an approximation to the posterior $p ( \mathbf { z } , \beta \mid \mathbf { x } _ { \mathrm { t r a i n } } ; \theta )$ , and $\mathcal { L }$ is a loss function with respect to $p$ and $q$ .
107
+
108
+ The choice of approximation $q$ , loss $\mathcal { L }$ , and rules to update parameters $\{ \theta , \lambda \}$ are specified by an inference algorithm. (Note $q$ can be nonparametric, such as a point or a collection of samples.)
109
+
110
+ In Edward, we write this problem as follows:
111
+
112
+ 1 inference $=$ ed.Inference({beta: qbeta, z: qz}, data $\equiv$ {x: x_train})
113
+
114
+ Inference is an abstract class which takes two inputs. The first is a collection of latent random variables beta and $_ { \textrm { z } }$ , associated to their “posterior variables” qbeta and $\mathtt { q z }$ respectively. The second is a collection of observed random variables $_ \textrm { x }$ , which is associated to their realizations x_train.
115
+
116
+ The idea is that Inference defines and solves the optimization in Equation 1. It adjusts parameters of the distribution of qbeta and $\mathtt { q z }$ (and any model parameters) to be close to the posterior.
117
+
118
+ Class methods are available to finely control the inference. Calling inference.initialize() builds a computational graph to update $\{ \bar { \pmb \theta } , \lambda \}$ . Calling inference.update() runs this computation once to update $\{ \theta , \lambda \}$ ; we call the method in a loop until convergence. Importantly, no efficiency is lost in Edward’s language: the computational graph is the same as if it were handwritten for a specific model. This means the runtime is the same; also see our experiments in Section 5.2.
119
+
120
+ A key concept in Edward is that there is no distinct “model” or “inference” block. A model is simply a collection of random variables, and inference is a way of modifying parameters in that collection subject to another. This reductionism offers significant flexibility. For example, we can infer only parts of a model (e.g., layer-wise training (Hinton et al., 2006)), infer parts used in multiple models (e.g., multi-task learning), or plug in a posterior into a new model (e.g., Bayesian updating).
121
+
122
+ # 4.2 CLASSES OF INFERENCE
123
+
124
+ The design of Inference is very general. We describe subclasses to represent many algorithms below: variational inference, Monte Carlo, and generative adversarial networks.
125
+
126
+ Variational inference posits a family of approximating distributions and finds the closest member in the family to the posterior (Jordan et al., 1999). In Edward, we build the variational family in the graph; see Figure 6 (left). For our running example, the family has mutable variables as parameters $\bar { \lambda } \doteq \{ \pi , \mu , \sigma \bar { \} }$ , where $q ( \beta ; \mu , \sigma ) = \mathrm { N o r m a l } ( \beta ; \bar { \mu } , \sigma )$ and $q ( \mathbf { z } ; \pi ) = \operatorname { C a t e g o r i c a l } ( \mathbf { z } ; \pi )$ .
127
+
128
+ Specific variational algorithms inherit from the VariationalInference class. Each defines its own methods, such as a loss function and gradient. For example, we represent maximum a posteriori (MAP) estimation with an approximating family (qbeta and $\mathtt { q z }$ ) of PointMass random variables, i.e., with all probability mass concentrated at a point. MAP inherits from VariationalInference and defines the negative log joint density as the loss function; it uses existing optimizers inside TensorFlow. In Section 5.1, we experiment with multiple gradient estimators for black box variational inference (Ranganath et al., 2014). Each estimator implements the same loss (an objective proportional to the divergence $\mathrm { K L } ( q \parallel p ) .$ ) and a different update rule (stochastic gradient).
129
+
130
+ 1 qbeta $=$ Normal( 1
131
+ 2 mu=tf.Variable(tf.zeros([K, D])), 2
132
+ 3 sigma=tf.exp(tf.Variable(tf.zeros([K, D]))))3
133
+ 4 qz $=$ Categorical( 4
134
+ 5 logits=tf.Variable(tf.zeros([N, K]))) 5
135
+ 6 6
136
+ 7 inference $=$ ed.VariationalInference( 7
137
+ 8 {beta: qbeta, z: qz}, data={x: x_train}) 8
138
+
139
+ $\mathrm { ~ T ~ } = \mathrm { ~ 1 0 0 0 0 }$ # number of samples
140
+ qbeta $=$ Empirical( params=tf.Variable(tf.zeros([T, K, D])))
141
+ qz $=$ Empirical( params=tf.Variable(tf.zeros([T, N])))
142
+ inference $=$ ed.MonteCarlo( {beta: qbeta, z: qz}, data={x: x_train})
143
+
144
+ ![](images/4b59dec2233301cf213908e0b2d65837f6b4eca826c4067836a5724708bb8c49.jpg)
145
+ Figure 6: (left) Variational inference. (right) Monte Carlo.
146
+ Figure 7: Generative adversarial networks: (left) graphical model; (right) probabilistic program. The model (generator) uses a parameterized function (discriminator) for training.
147
+
148
+ Monte Carlo approximates the posterior using samples (Robert & Casella, 1999). Monte Carlo is an inference where the approximating family is an empirical distribution, $q ( \beta ; \{ \beta ^ { ( t ) } \} ) ~ =$ $\begin{array} { r } { \frac { 1 } { T } \sum _ { t = 1 } ^ { T } \delta ( \beta , \beta ^ { ( t ) } ) } \end{array}$ and $\begin{array} { r } { q ( \mathbf { z } ; \{ \mathbf { z } ^ { ( t ) } \} ) = \frac { 1 } { T } \sum _ { t = 1 } ^ { T } \delta ( \mathbf { z } , \mathbf { z } ^ { ( t ) } ) } \end{array}$ . The parameters are $\boldsymbol \lambda = \{ \beta ^ { ( t ) } , { \bf z } ^ { ( t ) } \}$ . See Figure 6 (right). Monte Carlo algorithms proceed by updating one sample $\beta ^ { ( t ) } , \mathbf { z } ^ { ( t ) }$ at a time in the empirical approximation. Specific MC samplers determine the update rules: they can use gradients such as in Hamiltonian Monte Carlo (Neal, 2011) and graph structure such as in sequential Monte Carlo (Doucet et al., 2001).
149
+
150
+ Edward also supports non-Bayesian methods such as generative adversarial networks (GANs) (Goodfellow et al., 2014). See Figure 7. The model posits random noise eps over $N$ data points, each with $d$ dimensions; this random noise feeds into a generative_network function, a neural network that outputs real-valued data $_ \textrm { x }$ . In addition, there is a discriminative_network which takes data as input and outputs the probability that the data is real (in logit parameterization). We build GANInference; running it optimizes parameters inside the two neural network functions. This approach extends to many advances in GANs (e.g., Denton et al. (2015); Li et al. (2015)).
151
+
152
+ Finally, one can design algorithms that would otherwise require tedious algebraic manipulation. With symbolic algebra on nodes of the computational graph, we can uncover conjugacy relationships between random variables. Users can then integrate out variables to automatically derive classical Gibbs (Gelfand & Smith, 1990), mean-field updates (Bishop, 2006), and exact inference. These algorithms are being currently developed in Edward.
153
+
154
+ # 4.3 COMPOSING INFERENCES
155
+
156
+ Core to Edward’s design is that inference can be written as a collection of separate inference programs. Below we demonstrate variational EM, with an (approximate) E-step over local variables and an M-step over global variables. We instantiate two algorithms, each of which conditions on inferences from the other, and we alternate with one update of each (Neal & Hinton, 1993),
157
+
158
+ This extends to many other cases such as exact EM for exponential families, contrastive divergence (Hinton, 2002), pseudo-marginal methods (Andrieu & Roberts, 2009), and Gibbs sampling within variational inference (Wang & Blei, 2012; Hoffman & Blei, 2015). We can also write message passing algorithms, which solve a collection of local inference problems (Koller & Friedman, 2009). For example, classical message passing uses exact local inference and expectation propagation locally minimizes the Kullback-Leibler divergence, $\operatorname { K L } ( p \| q )$ (Minka, 2001).
159
+
160
+ # 4.4 DATA SUBSAMPLING
161
+
162
+ Stochastic optimization (Bottou, 2010) scales inference to massive data and is key to algorithms such as stochastic gradient Langevin dynamics (Welling & Teh, 2011) and stochastic variational inference (Hoffman et al., 2013). The idea is to cheaply estimate the model’s log joint density in an unbiased way. At each step, one subsamples a data set $\{ x _ { m } \}$ of size $M$ and then scales densities with respect to local variables,
163
+
164
+ $$
165
+ \begin{array} { l } { \displaystyle \log p ( \mathbf { x } , \mathbf { z } , \boldsymbol { \beta } ) = \log p ( \boldsymbol { \beta } ) + \sum _ { n = 1 } ^ { N } \Big [ \log p ( x _ { n } | z _ { n } , \boldsymbol { \beta } ) + \log p ( z _ { n } | \boldsymbol { \beta } ) \Big ] } \\ { \displaystyle \approx \log p ( \boldsymbol { \beta } ) + \frac { N } { M } \sum _ { m = 1 } ^ { M } \Big [ \log p ( x _ { m } | z _ { m } , \boldsymbol { \beta } ) + \log p ( z _ { m } | \boldsymbol { \beta } ) \Big ] . } \end{array}
166
+ $$
167
+
168
+ To support stochastic optimization, we represent only a subgraph of the full model. This prevents reifying the full model, which can lead to unreasonable memory consumption (Tristan et al., 2014). During initialization, we pass in a dictionary to properly scale the arguments. See Figure 8.
169
+
170
+ ![](images/3def8d21fa605db78c927d62261d3d45f32202c962a67b83ea66847046571314.jpg)
171
+ Figure 8: Data subsampling with a hierarchical model. We define a subgraph of the full model, forming a plate of size $M$ rather than $N$ . We then scale all local random variables by $N / M$ .
172
+
173
+ Conceptually, the scale argument represents scaling for each random variable’s plate, as if we had seen that random variable $N / M$ as many times. As an example, Appendix B shows how to implement stochastic variational inference in Edward. The approach extends naturally to streaming data (Doucet et al., 2000; Broderick et al., 2013; McInerney et al., 2015), dynamic batch sizes, and data structures in which working on a subgraph does not immediately apply (Binder et al., 1997; Johnson & Willsky, 2014; Foti et al., 2014).
174
+
175
+ # 5 EXPERIMENTS
176
+
177
+ In this section, we illustrate two main benefits of Edward: flexibility and efficiency. For the former, we show how it is easy to compare different inference algorithms on the same model. For the latter, we show how it is easy to get significant speedups by exploiting computational graphs.
178
+
179
+ # 5.1 RECENT METHODS IN VARIATIONAL INFERENCE
180
+
181
+ We demonstrate Edward’s flexibility for experimenting with complex inference algorithms. We consider the VAE setup from Figure 2 and the binarized MNIST data set (Salakhutdinov & Murray,
182
+
183
+ <table><tr><td>Inference method</td><td>Negative log-likelihood</td></tr><tr><td>VAE (Kingma &amp; Welling, 2014)</td><td>≤88.2</td></tr><tr><td>VAE without analytic KL</td><td>≤89.4</td></tr><tr><td>VAE with analytic entropy</td><td>≤88.1</td></tr><tr><td>VAE with score function gradient</td><td>≤87.9</td></tr><tr><td>Normalizing flows (Rezende &amp; Mohamed, 2015)</td><td>≤85.8</td></tr><tr><td>Hierarchical variational model (Ranganath etal., 2O16b)</td><td>≤85.4</td></tr><tr><td>Importance-weighted auto-encoders (K = 5O) (Burda et al., 2016)</td><td>≤86.3</td></tr><tr><td>HVM with IWAE objective (K = 5)</td><td>≤85.2</td></tr><tr><td>Rényi divergence (α = -1) (Li&amp; Turner,2016)</td><td>≤140.5</td></tr></table>
184
+
185
+ Table 1: Inference methods for a probabilistic decoder on binarized MNIST. The Edward PPL is a convenient research platform, making it easy to both develop and experiment with many algorithms.
186
+
187
+ 2008). We use $d = 5 0$ latent variables per data point and optimize using ADAM. We study different components of the VAE setup using different methods; Appendix C.1 is a complete script. After training we evaluate held-out log likelihoods, which are lower bounds on the true value.
188
+
189
+ Table 1 shows the results. The first method uses the VAE from Figure 2. The next three methods use the same VAE but apply different gradient estimators: reparameterization gradient without an analytic KL; reparameterization gradient with an analytic entropy; and the score function gradient (Paisley et al., 2012; Ranganath et al., 2014). This typically leads to the same optima but at different convergence rates. The score function gradient was slowest. Gradients with an analytic entropy produced difficulties around convergence: we switched to stochastic estimates of the entropy as it approached an optima. We also use hierarchical variational models (HVMs) (Ranganath et al., 2016b) with a normalizing flow prior; it produced similar results as a normalizing flow on the latent variable space (Rezende & Mohamed, 2015), and better than importance-weighted auto-encoders (IWAEs) (Burda et al., 2016).
190
+
191
+ We also study novel combinations, such as HVMs with the IWAE objective, GAN-based optimization on the decoder (with pixel intensity-valued data), and Rényi divergence on the decoder. GAN-based optimization does not enable calculation of the log-likelihood; Rényi divergence does not directly optimize for log-likelihood so it does not perform well. The key point is that Edward is a convenient research platform: they are all easy modifications of a given script.
192
+
193
+ # 5.2 GPU-ACCELERATED HAMILTONIAN MONTE CARLO
194
+
195
+ ![](images/77737bcf0e344c4192296f407414d205a868b38834a0658ea6d57e90590124ca.jpg)
196
+ Figure 9: Edward program for Bayesian logistic regression with Hamiltonian Monte Carlo (HMC).
197
+
198
+ We benchmark runtimes for a fixed number of Hamiltonian Monte Carlo (HMC; Neal, 2011) iterations on modern hardware: a 12-core Intel i7-5930K CPU at 3.50GHz and an NVIDIA Titan X (Maxwell) GPU. We apply logistic regression on the Covertype dataset $N = 5 8 1 0 1 2$ , $D = 5 4$ ; responses were binarized) using Edward, Stan (with PyStan) (Carpenter et al., 2016), and PyMC3 (Salvatier et al., 2015). We ran $1 0 0 ~ \mathrm { H M C }$ iterations, with 10 leapfrog updates per iteration, a step size of $0 . 5 / N$ , and single precision. Figure 9 illustrates the program in Edward.
199
+
200
+ Table 2 displays the runtimes.3 Edward (GPU) features a dramatic $3 5 \mathrm { x }$ speedup over Stan (1 CPU) and 6x speedup over PyMC3 (12 CPU). This showcases the value of building a PPL on top of computational graphs. The speedup stems from fast matrix multiplication when calculating the model’s log-likelihood; GPUs can efficiently parallelize this computation. We expect similar speedups for models whose bottleneck is also matrix multiplication, such as deep neural networks.
201
+
202
+ Table 2: HMC benchmark for large-scale logistic regression. Edward (GPU) is significantly faster than other systems. In addition, Edward has no overhead: it is as fast as handwritten TensorFlow.
203
+
204
+ <table><tr><td>Probabilistic programming system</td><td>Runtime (s)</td></tr><tr><td>Handwritten NumPy (1 CPU)</td><td>534</td></tr><tr><td>Stan (1 CPU) (Carpenter et al., 2016)</td><td>171</td></tr><tr><td>PyMC3 (12 CPU) (Salvatier et al., 2015)</td><td>30.0</td></tr><tr><td>Edward (12 CPU)</td><td>8.2</td></tr><tr><td>Handwritten TensorFlow (GPU)</td><td>5.0</td></tr><tr><td>Edward (GPU)</td><td>4.9</td></tr></table>
205
+
206
+ There are various reasons for the speedup. Stan only used 1 CPU as it leverages multiple cores by running HMC chains in parallel. Stan also used double-precision floating point as it does not allow single-precision. For PyMC3, we note Edward’s speedup is not a result of PyMC3’s Theano backend compared to Edward’s TensorFlow. Rather, PyMC3 does not use Theano for all its computation, so it experiences communication overhead with NumPy. (PyMC3 was actually slower when using the GPU.) We predict that porting Edward’s design to Theano would feature similar speedups.
207
+
208
+ In addition to these speedups, we highlight that Edward has no runtime overhead: it is as fast as handwritten TensorFlow. Following Section 4.1, this is because the computational graphs for inference are in fact the same for Edward and the handwritten code.
209
+
210
+ # 5.3 PROBABILITY ZOO
211
+
212
+ In addition to Edward, we also release the Probability Zoo, a community repository for pre-trained probability models and their posteriors.4 It is inspired by the model zoo in Caffe (Jia et al., 2014), which provides many pre-trained discriminative neural networks, and which has been key to making large-scale deep learning more transparent and accessible. It is also inspired by Forest (Stuhlmüller, 2012), which provides examples of probabilistic programs.
213
+
214
+ # 6 DISCUSSION: CHALLENGES & EXTENSIONS
215
+
216
+ We described Edward, a Turing-complete PPL with compositional representations for probabilistic models and inference. Edward expands the scope of probabilistic programming to be as flexible and computationally efficient as traditional deep learning. For flexibility, we showed how Edward can use a variety of composable inference methods, capture recent advances in variational inference and generative adversarial networks, and finely control the inference algorithms. For efficiency, we showed how Edward leverages computational graphs to achieve fast, parallelizable computation, scales to massive data, and incurs no runtime overhead over handwritten code.
217
+
218
+ In present work, we are applying Edward as a research platform for developing new probabilistic models (Rudolph et al., 2016; Tran et al., 2017) and new inference algorithms (Dieng et al., 2016). As with any language design, Edward makes tradeoffs in pursuit of its flexibility and speed for research. For example, an open challenge in Edward is to better facilitate programs with complex control flow and recursion. While possible to represent, it is unknown how to enable their flexible inference strategies. In addition, it is open how to expand Edward’s design to dynamic computational graph frameworks—which provide more flexibility in their programming paradigm—but may sacrifice performance. A crucial next step for probabilistic programming is to leverage dynamic computational graphs while maintaining the flexibility and efficiency that Edward offers.
219
+
220
+ # ACKNOWLEDGEMENTS
221
+
222
+ We thank the probabilistic programming community—for sharing our enthusiasm and motivating further work—including developers of Church, Venture, Gamalon, Hakaru, and WebPPL. We also thank Stan developers for providing extensive feedback as we developed the language, as well as Thomas Wiecki for experimental details. We thank the Google BayesFlow team—Joshua Dillon, Ian Langmore, Ryan Sepassi, and Srinivas Vasudevan—as well as Amr Ahmed, Matthew Johnson, Hung Bui, Rajesh Ranganath, Maja Rudolph, and Francisco Ruiz for their helpful feedback. This work is supported by NSF IIS-1247664, ONR N00014-11-1-0651, DARPA FA8750-14-2-0009, DARPA N66001-15-C-4032, Adobe, Google, NSERC PGS-D, and the Sloan Foundation.
223
+
224
+ # REFERENCES
225
+
226
+ Martín Abadi, Paul Barham, Jianmin Chen, Zhifeng Chen, Andy Davis, Jeffrey Dean, Matthieu Devin, Sanjay Ghemawat, Geoffrey Irving, Michael Isard, Manjunath Kudlur, Josh Levenberg, Rajat Monga, Sherry Moore, Derek G Murray, Benoit Steiner, Paul Tucker, Vijay Vasudevan, Pete Warden, Martin Wicke, Yuan Yu, and Xiaoqiang Zhang. TensorFlow: A system for largescale machine learning. arXiv preprint arXiv:1605.08695, 2016.
227
+
228
+ Christophe Andrieu and Gareth O Roberts. The pseudo-marginal approach for efficient Monte Carlo computations. The Annals of Statistics, pp. 697–725, 2009.
229
+
230
+ John Binder, Kevin Murphy, and Stuart Russell. Space-efficient inference in dynamic probabilistic networks. In International Joint Conference on Artificial Intelligence, 1997.
231
+
232
+ Christopher M. Bishop. Pattern Recognition and Machine Learning. Springer, 2006.
233
+
234
+ David M Blei, Andrew $\mathrm { Y } \mathrm { N g }$ , and Michael I Jordan. Latent Dirichlet Allocation. Journal of Machine Learning Research, 3:993–1022, 2003.
235
+
236
+ Léon Bottou. Large-scale machine learning with stochastic gradient descent. In Proceedings of COMPSTAT’2010, pp. 177–186. Springer, 2010.
237
+
238
+ Tamara Broderick, Nicholas Boyd, Andre Wibisono, Ashia C Wilson, and Michael I Jordan. Streaming Variational Bayes. In Neural Information Processing Systems, 2013.
239
+
240
+ Yuri Burda, Roger Grosse, and Ruslan Salakhutdinov. Importance weighted autoencoders. In International Conference on Learning Representations, 2016.
241
+
242
+ Bob Carpenter, Andrew Gelman, Matthew D Hoffman, Daniel Lee, Ben Goodrich, Michael Betancourt, Marcus Brubaker, Jiqiang Guo, Peter Li, and Allen Riddell. Stan: A probabilistic programming language. Journal of Statistical Software, 2016.
243
+
244
+ François Chollet. Keras. https://github.com/fchollet/keras, 2015.
245
+
246
+ David E Culler. Dataflow architectures. Technical report, DTIC Document, 1986.
247
+
248
+ Peter Dayan, Geoffrey E Hinton, Radford M Neal, and Richard S Zemel. The Helmholtz machine Neural computation, 7(5):889–904, 1995.
249
+
250
+ Emily L Denton, Soumith Chintala, Rob Fergus, et al. Deep generative image models using a Laplacian pyramid of adversarial networks. In Neural Information Processing Systems, 2015.
251
+
252
+ Adji B. Dieng, Dustin Tran, Rajesh Ranganath, John Paisley, and David M. Blei. $\chi$ -divergence for approximate inference. In arXiv preprint arXiv:1611.00328, 2016.
253
+
254
+ Arnaud Doucet, Simon Godsill, and Christophe Andrieu. On sequential Monte Carlo sampling methods for Bayesian filtering. Statistics and Computing, 10(3):197–208, 2000.
255
+
256
+ Arnaud Doucet, Nando De Freitas, and Neil Gordon. An introduction to sequential monte carlo methods. In Sequential Monte Carlo methods in practice, pp. 3–14. Springer, 2001.
257
+
258
+ Nicholas Foti, Jason Xu, Dillon Laird, and Emily Fox. Stochastic variational inference for hidden Markov models. In Neural Information Processing Systems, 2014.
259
+
260
+ Alan E Gelfand and Adrian FM Smith. Sampling-based approaches to calculating marginal densities. Journal of the American statistical association, 85(410):398–409, 1990.
261
+
262
+ Zoubin Ghahramani. Probabilistic machine learning and artificial intelligence. Nature, 521(7553): 452–459, 2015.
263
+
264
+ Ian Goodfellow, Jean Pouget-Abadie, M Mirza, Bing Xu, David Warde-Farley, Sherjil Ozair, Aaron Courville, and Yoshua Bengio. Generative adversarial nets. In Neural Information Processing Systems, 2014.
265
+
266
+ Noah Goodman, Vikash Mansinghka, Daniel M Roy, Keith Bonawitz, and Joshua B Tenenbaum. Church: A language for generative models. In Uncertainty in Artificial Intelligence, 2012.
267
+
268
+ Karol Gregor, Ivo Danihelka, Alex Graves, Danilo J Rezende, and Daan Wierstra. DRAW: A recurrent neural network for image generation. In International Conference on Machine Learning, 2015.
269
+
270
+ M Gutmann and A Hyvärinen. Noise-contrastive estimation: A new estimation principle for unnormalized statistical models. Artificial Intelligence and Statistics, 2010.
271
+
272
+ Geoffrey E Hinton. Training products of experts by minimizing contrastive divergence. Neural computation, 14(8):1771–1800, 2002.
273
+
274
+ Geoffrey E Hinton, Simon Osindero, and Yee-Whye Teh. A fast learning algorithm for deep belief nets. Neural computation, 18(7):1527–1554, 2006.
275
+
276
+ Matthew Hoffman and David M. Blei. Structured stochastic variational inference. In Artificial Intelligence and Statistics, 2015.
277
+
278
+ Matthew D Hoffman, David M Blei, Chong Wang, and John Paisley. Stochastic variational inference. The Journal of Machine Learning Research, 14(1):1303–1347, 2013.
279
+
280
+ Yangqing Jia, Evan Shelhamer, Jeff Donahue, Sergey Karayev, Jonathan Long, Ross Girshick, Sergio Guadarrama, and Trevor Darrell. Caffe: Convolutional architecture for fast feature embedding. arXiv preprint arXiv:1408.5093, 2014.
281
+
282
+ Matthew Johnson and Alan S Willsky. Stochastic variational inference for Bayesian time series models. In International Conference on Machine Learning, 2014.
283
+
284
+ M. I. Jordan, Z. Ghahramani, T. S. Jaakkola, and L. K. Saul. An introduction to variational methods for graphical models. Machine Learning, 37(2):183–233, 1999.
285
+
286
+ Diederik P Kingma and Max Welling. Auto-encoding variational Bayes. In International Conference on Learning Representations, 2014.
287
+
288
+ Diederik P Kingma, Shakir Mohamed, Danilo Jimenez Rezende, and Max Welling. Semi-supervised learning with deep generative models. In Neural Information Processing Systems, 2014.
289
+
290
+ Diederik P Kingma, Tim Salimans, and Max Welling. Improving variational inference with inverse autoregressive flow. In Neural Information Processing Systems, 2016.
291
+
292
+ Oleg Kiselyov and Chung-Chieh Shan. Embedded probabilistic programming. In Domain-Specific Languages, pp. 360–384. Springer, 2009.
293
+
294
+ Daphne Koller and Nir Friedman. Probabilistic Graphical Models: Principles and Techniques. MIT press, 2009.
295
+
296
+ Brenden M Lake, Tomer D Ullman, Joshua B Tenenbaum, and Samuel J Gershman. Building machines that learn and think like people. arXiv preprint arXiv:1604.00289, 2016.
297
+
298
+ Yingzhen Li and Richard E Turner. Variational inference with Rényi divergence. In Neural Information Processing Systems, 2016.
299
+
300
+ Yujia Li, Kevin Swersky, and Richard Zemel. Generative moment matching networks. In International Conference on Machine Learning, 2015.
301
+
302
+ V Mansinghka, D Selsam, and Y Perov. Venture: A higher-order probabilistic programming platform with programmable inference. arXiv.org, 2014.
303
+
304
+ James McInerney, Rajesh Ranganath, and David M Blei. The Population Posterior and Bayesian Inference on Streams. In Neural Information Processing Systems, 2015.
305
+
306
+ Brian Milch, Bhaskara Marthi, Stuart Russell, David Sontag, Daniel L Ong, and Andrey Kolobov. Blog. In International Joint Conference on Artificial Intelligence, 2005.
307
+
308
+ T. Minka, J.M. Winn, J.P. Guiver, S. Webster, Y. Zaykov, B. Yangel, A. Spengler, and J. Bronskill. Infer.NET 2.6, 2014. Microsoft Research Cambridge. http://research.microsoft.com/infernet.
309
+
310
+ Thomas P Minka. Expectation propagation for approximate Bayesian inference. In Uncertainty in Artificial Intelligence, 2001.
311
+
312
+ Kevin Murphy. The Bayes net toolbox for Matlab. Computing Science and Statistics, 33(2):1024– 1034, 2001.
313
+
314
+ Radford M Neal. MCMC using Hamiltonian dynamics. Handbook of Markov Chain Monte Carlo, 2011.
315
+
316
+ Radford M. Neal and Geoffrey E. Hinton. A new view of the EM algorithm that justifies incremental and other variants. In Learning in Graphical Models, pp. 355–368. Kluwer Academic Publishers, 1993.
317
+
318
+ John Paisley, David M. Blei, and Michael Jordan. Variational Bayesian inference with stochastic search. In International Conference on Machine Learning, 2012.
319
+
320
+ Avi Pfeffer. IBAL: A probabilistic rational programming language. In International Joint Conference on Artificial Intelligence, pp. 733–740. Citeseer, 2001.
321
+
322
+ Avi Pfeffer. Figaro: An object-oriented probabilistic programming language. Charles River Analytics Technical Report, 137, 2009.
323
+
324
+ Martyn Plummer. JAGS: A program for analysis of Bayesian graphical models using Gibbs sampling. In International Workshop on Distributed Statistical Computing, 2003.
325
+
326
+ Rajesh Ranganath, Sean Gerrish, and David M. Blei. Black box variational inference. In Artificial Intelligence and Statistics, 2014.
327
+
328
+ Rajesh Ranganath, Jaan Altosaar, Dustin Tran, and David M. Blei. Operator variational inference. In Neural Information Processing Systems, 2016a.
329
+
330
+ Rajesh Ranganath, Dustin Tran, and David M Blei. Hierarchical variational models. In International Conference on Machine Learning, 2016b.
331
+
332
+ Danilo J Rezende and Shakir Mohamed. Variational inference with normalizing flows. In International Conference on Machine Learning, 2015.
333
+
334
+ Danilo J Rezende, Shakir Mohamed, and Daan Wierstra. Stochastic backpropagation and approximate inference in deep generative models. In International Conference on Machine Learning, 2014.
335
+
336
+ Danilo Jimenez Rezende, Shakir Mohamed, Ivo Danihelka, Karol Gregor, and Daan Wierstra. Oneshot generalization in deep generative models. In International Conference on Machine Learning, 2016.
337
+
338
+ Daniel Ritchie, Paul Horsfall, and Noah D Goodman. Deep amortized inference for probabilistic programs. arXiv preprint arXiv:1610.05735, 2016.
339
+
340
+ Christian P Robert and George Casella. Monte Carlo Statistical Methods. Springer, 1999.
341
+
342
+ Maja R Rudolph, Francisco J R Ruiz, Stephan Mandt, and David M Blei. Exponential family embeddings. In Neural Information Processing Systems, 2016.
343
+
344
+ Ruslan Salakhutdinov and Iain Murray. On the quantitative analysis of deep belief networks. In International Conference on Machine Learning, 2008.
345
+
346
+ John Salvatier, Thomas Wiecki, and Christopher Fonnesbeck. Probabilistic Programming in Python using PyMC. arXiv preprint arXiv:1507.08050, 2015.
347
+
348
+ Adam Scibior, Zoubin Ghahramani, and Andrew D Gordon. Practical probabilistic programming ´ with monads. In the 8th ACM SIGPLAN Symposium, pp. 165–176, New York, New York, USA, 2015. ACM Press.
349
+
350
+ David J Spiegelhalter, Andrew Thomas, Nicky G Best, and Wally R Gilks. BUGS: Bayesian inference using Gibbs sampling, version 0.50. MRC Biostatistics Unit, Cambridge, 1995.
351
+ Andreas Stuhlmüller. Forest: A repository for generative models, 2012. URL http:// forestdb.org.
352
+ Dustin Tran, Alp Kucukelbir, Adji B. Dieng, Maja Rudolph, Dawen Liang, and David M. Blei. Edward: A library for probabilistic modeling, inference, and criticism. arXiv preprint arXiv:1610.09787, 2016a.
353
+ Dustin Tran, Rajesh Ranganath, and David M. Blei. The variational Gaussian process. In International Conference on Learning Representations, 2016b.
354
+ Dustin Tran, Rajesh Ranganath, and David M Blei. Deep and hierarchical implicit models. arXiv preprint arXiv:1702.08896, 2017.
355
+ Jean-Baptiste Tristan, Daniel Huang, Joseph Tassarotti, Adam C Pocock, Stephen Green, and Guy L Steele. Augur: Data-parallel probabilistic modeling. In Neural Information Processing Systems, 2014.
356
+ Chong Wang and David M Blei. Truncation-free online variational inference for Bayesian nonparametric models. In Neural Information Processing Systems, pp. 413–421, 2012.
357
+ Max Welling and Yee Whye Teh. Bayesian learning via stochastic gradient Langevin dynamics. In International Conference on Machine Learning, 2011.
358
+ Frank Wood, Jan Willem van de Meent, and Vikash Mansinghka. A new approach to probabilistic programming inference. In Artificial Intelligence and Statistics, 2014.
359
+ Yi Wu, Lei Li, Stuart Russell, and Rastislav Bodik. Swift: Compiled inference for probabilistic programming languages. arXiv preprint arXiv:1606.09242, 2016.
360
+ Robert Zinkov and Chung-chieh Shan. Composing inference algorithms as program transformations. arXiv preprint arXiv:1603.01882, 2016.
361
+
362
+ ![](images/1f9a5c95b89fa690dd8847410420418e081c99163a3bd4c1928add4be399c822.jpg)
363
+ Figure 10: Bayesian neural network for classification.
364
+
365
+ 1 W_0 $=$ Normal(mu=tf.zeros([D, H]), sigma=tf.ones([D, H]))
366
+ 2 W_1 $=$ Normal(mu=tf.zeros([H, 1]), sigma=tf.ones([H, 1]))
367
+ 3 b_0 $=$ Normal(mu=tf.zeros(H), sigma=tf.ones(H))
368
+ 4 b_1 $=$ Normal(mu=tf.zeros(1), sigma=tf.ones(1))
369
+ 5
370
+ 6 $\textrm { x } =$ tf.placeholder(tf.float32, [N, D])
371
+ 7 $\textrm { y } =$ Bernoulli(logits=tf.matmul(tf.nn.tanh(tf.matmul(x, W_0) + b_0), W_1) + b_1)
372
+
373
+ # A MODEL EXAMPLES
374
+
375
+ There are many examples available at http://edwardlib.org, including models, inference methods, and complete scripts. Below we describe several model examples; Appendix B describes an inference example (stochastic variational inference); Appendix C describes complete scripts. All examples in this paper are comprehensive, only leaving out import statements and fixed values. See the companion webpage for this paper (http://edwardlib.org/iclr2017) for examples in a machine-readable format with runnable code.
376
+
377
+ A.1 BAYESIAN NEURAL NETWORK FOR CLASSIFICATION
378
+
379
+ A Bayesian neural network is a neural network with a prior distribution on its weights.
380
+
381
+ Define the likelihood of an observation $\left( \mathbf { x } _ { n } , y _ { n } \right)$ with binary label $y _ { n } \in \{ 0 , 1 \}$ as
382
+
383
+ $$
384
+ p ( y _ { n } \mid \mathbf { W } _ { 0 } , \mathbf { b } _ { 0 } , \mathbf { W } _ { 1 } , \mathbf { b } _ { 1 } ; \mathbf { x } _ { n } ) = \operatorname { B e r n o u l l i } ( y _ { n } \mid \operatorname { N N } ( \mathbf { x } _ { n } ; \mathbf { W } _ { 0 } , \mathbf { b } _ { 0 } , \mathbf { W } _ { 1 } , \mathbf { b } _ { 1 } ) ) ,
385
+ $$
386
+
387
+ where NN is a 2-layer neural network whose weights and biases form the latent variables $\mathbf { W } _ { 0 } , \mathbf { b } _ { 0 } , \mathbf { W } _ { 1 } , \mathbf { b } _ { 1 }$ . Define the prior on the weights and biases to be the standard normal. See Figure 10. There are $N$ data points, $D$ features, and $H$ hidden units.
388
+
389
+ # A.2 LATENT DIRICHLET ALLOCATION
390
+
391
+ See Figure 11. Note that the program is written for illustration. We recommend vectorization in practice: instead of storing scalar random variables in lists of lists, one should prefer to represent few random variables, each which have many dimensions.
392
+
393
+ ![](images/2df841142a489bcb2eae8c5ef939033f74b58e6e19946744fcb7188e655b4c36.jpg)
394
+ Figure 11: Latent Dirichlet allocation (Blei et al., 2003).
395
+
396
+ # A.3 GAUSSIAN MATRIX FACTORIZATIONN
397
+
398
+ # See Figure 12.
399
+
400
+ ![](images/8528ea4eb39870132d285ca7536d210157adc55341c3529dfd678b643158a318.jpg)
401
+ Figure 12: Gaussian matrix factorization.
402
+
403
+ # A.4 DIRICHLET PROCESS MIXTURE MODEL
404
+
405
+ # See Figure 13.
406
+
407
+ A Dirichlet process mixture model is written as follows:
408
+
409
+ 1 mu $=$ DirichletProcess(alpha $\mathord { \mathrm { 1 2 0 . 1 } }$ , base_cls=Normal, mu=tf.zeros(D), sigma=tf.ones(D), sample_n=N)
410
+ 2 $\textrm { x } =$ Normal(mu=mu, sigma=tf.ones([N, D]))
411
+
412
+ where mu has shape (N, D). The DirichletProcess random variable returns sample_n ${ = } \mathrm { N }$ draws, each with shape given by the base distribution Normal(mu, sigma). The essential component defining the DirichletProcess random variable is a stochastic while loop. We define it below. See Edward’s code base for a more involved version with a base distribution.
413
+
414
+ ![](images/344f296b31ce5a3afef956fe884fb59425106d5a5f364670d77ec6b01e98b05e.jpg)
415
+ Figure 13: Dirichlet process mixture model.
416
+
417
+ # B INFERENCE EXAMPLE: STOCHASTIC VARIATIONAL INFERENCE
418
+
419
+ In the subgraph setting, we do data subsampling while working with a subgraph of the full model. This setting is necessary when the data and model do not fit in memory. It is scalable in that both the algorithm’s computational complexity (per iteration) and memory complexity are independent of the data set size.
420
+
421
+ For the code, we use the running example, a mixture model described in Figure 5.
422
+
423
+ 1 $\mathrm { ~ N ~ } = \mathrm { ~ 1 0 0 0 0 0 0 0 }$ # data set size
424
+ 2 $\Sigma = 2$ # data dimension
425
+ 3 $\mathtt { K } = 5$ # number of clusters
426
+
427
+ The model is
428
+
429
+ $$
430
+ p ( \mathbf { x } , \mathbf { z } , \beta ) = p ( \beta ) \prod _ { n = 1 } ^ { N } p ( z _ { n } \mid \beta ) p ( x _ { n } \mid z _ { n } , \beta ) .
431
+ $$
432
+
433
+ To avoid memory issues, we work on only a subgraph of the model,
434
+
435
+ $$
436
+ p ( \mathbf { x } , \mathbf { z } , \beta ) = p ( \beta ) \prod _ { m = 1 } ^ { M } p ( z _ { m } \mid \beta ) p ( x _ { m } \mid z _ { m } , \beta )
437
+ $$
438
+
439
+ 1 $\mathrm { ~ M ~ } = \ 1 2 8$ # mini-batch size
440
+ 2
441
+ 3 beta $=$ Normal(mu=tf.zeros([K, D]), sigma=tf.ones([K, D]))
442
+ 4 $z =$ Categorical(logits=tf.zeros([M, K]))
443
+ 5 $\textrm { x } =$ Normal(mu=tf.gather(beta, z), sigma=tf.ones([M, D]))
444
+
445
+ Assume the variational model is
446
+
447
+ $$
448
+ q ( \mathbf { z } , \beta ) = q ( \beta ; \lambda ) \prod _ { n = 1 } ^ { N } q ( z _ { n } \mid \beta ; \gamma _ { n } ) ,
449
+ $$
450
+
451
+ parameterized by $\{ \lambda , \{ \gamma _ { n } \} \}$ . Again, we work on only a subgraph of the model,
452
+
453
+ $$
454
+ q ( \mathbf { z } , \beta ) = q ( \beta ; \lambda ) \prod _ { m = 1 } ^ { M } q ( z _ { m } \mid \beta ; \gamma _ { m } ) .
455
+ $$
456
+
457
+ parameterized by $\{ \lambda , \{ \gamma _ { m } \} \}$ . Importantly, only $M$ parameters are stored in memory for $\{ \gamma _ { m } \}$ rather than $N$ .
458
+
459
+ 1 qbeta $=$ Normal(mu=tf.Variable(tf.zeros([K, D])),
460
+ 2 sigma=tf.nn.softplus(tf.Variable(tf.zeros[K, D])))
461
+ 3 qz_variables $=$ tf.Variable(tf.zeros([M, K]))
462
+ 4 ${ \tt q z } = { \tt }$ Categorical(logits=qz_variables)
463
+
464
+ We use KLqp, a variational method that minimizes the divergence measure $\mathrm { K L } ( q \parallel p )$ (Jordan et al., 1999). We instantiate two algorithms: a global inference over $\beta$ given the subset of $\mathbf { z }$ and a local inference over the subset of $\mathbf { z }$ given $\beta$ . We also pass in a TensorFlow placeholder $\tt { x \_ p h }$ for the data, so we can change the data at each step.
465
+
466
+ 1 x_ph $=$ tf.placeholder(tf.float32, [M])
467
+ 2 inference_global $=$ ed.KLqp({beta: qbeta}, data={x: x_ph, z: qz})
468
+ 3 inference_local $=$ ed.KLqp({z: qz}, data={x: x_ph, beta: qbeta})
469
+
470
+ We initialize the algorithms with the scale argument, so that computation on $_ { \textrm { z } }$ and $_ \textrm { x }$ will be scaled appropriately. This enables unbiased estimates for stochastic gradients.
471
+
472
+ 1 inference_global.initialize(scale={x: float(N) / M, z: float(N) / M})
473
+ 2 inference_local.initialize(scale={x: float(N) / M, z: float(N) / M})
474
+
475
+ We now run the algorithm, assuming there is a next_batch function which provides the next batch of data.
476
+
477
+ 1 qz_init $=$ tf.initialize_variables([qz_variables])
478
+ 2 for _ in range(1000):
479
+ 3 x_batch $=$ next_batch(size=M)
480
+ 4 for _ in range(10): # make local inferences
481
+ 5 inference_local.update(feed_dict {x_ph: x_batch})
482
+ 7 # update global parameters
483
+ 8 inference_global.update(feed_dict={x_ph: x_batch})
484
+ 9 # reinitialize the local factors
485
+ 10 qz_init.run()
486
+
487
+ After each iteration, we also reinitialize the parameters for $q ( \mathbf { z } \mid \boldsymbol { \beta } )$ ; this is because we do inference on a new set of local variational factors for each batch. This demo readily applies to other inference algorithms such as SGLD (stochastic gradient Langevin dynamics): simply replace qbeta and $\mathtt { q z }$ with Empirical random variables; then call ed.SGLD instead of $\mathtt { e d . K L 9 p }$ .
488
+
489
+ Note that if the data and model fit in memory but you’d still like to perform data subsampling for fast inference, we recommend not defining subgraphs. You can reify the full model, and simply index the local variables with a placeholder. The placeholder is fed at runtime to determine which of the local variables to update at a time. (For more details, see the website’s API.)
490
+
491
+ # C COMPLETE EXAMPLES
492
+
493
+ # C.1 VARIATIONAL AUTO-ENCODER
494
+
495
+ # See Figure 14.
496
+
497
+ ![](images/be84ecad7ceedfa52c141d52ee5e1ea97057eab028a7c42d70ab23ef244dee05.jpg)
498
+ Figure 14: Complete script for a VAE (Kingma & Welling, 2014) with batch training. It generates MNIST digits after every 1000 updates.
499
+
500
+ # C.2 PROBABILISTIC MODEL FOR WORD EMBEDDINGS
501
+
502
+ See Figure 15. This example uses data subsampling (Section 4.4). The priors and conditional likelihoods are defined only for a minibatch of data. Similarly the variational model only models the embeddings used in a given minibatch. TensorFlow variables contain the embedding vectors for the entire vocabulary. TensorFlow placeholders ensure that the correct embedding vectors are used as variational parameters for a given minibatch.
503
+
504
+ The Bernoulli variables $\tt Y \mathrm { \_ p o s }$ and $\mathtt { Y \_ n e g }$ are fixed to be 1’s and 0’s respectively. They model whether a word is indeed the target word for a given context window or has been drawn as a negative sample. Without regularization (via priors), the objective we optimize is identical to negative sampling.
505
+
506
+ ![](images/fc61c670455aac17eff5730b67f88fa5c7af0873c4342bbf195ef1b02580c0f4.jpg)
507
+ Figure 15: Exponential family embedding for binary data (Rudolph et al., 2016). Here, MAP is used to maximize the total sum of conditional log-likelihoods and log-priors.
parse/train/Hy6b4Pqee/Hy6b4Pqee_content_list.json ADDED
@@ -0,0 +1,2500 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "type": "text",
4
+ "text": "DEEP PROBABILISTIC PROGRAMMING ",
5
+ "text_level": 1,
6
+ "bbox": [
7
+ 174,
8
+ 99,
9
+ 632,
10
+ 121
11
+ ],
12
+ "page_idx": 0
13
+ },
14
+ {
15
+ "type": "text",
16
+ "text": "Dustin Tran Columbia University ",
17
+ "bbox": [
18
+ 184,
19
+ 145,
20
+ 323,
21
+ 172
22
+ ],
23
+ "page_idx": 0
24
+ },
25
+ {
26
+ "type": "text",
27
+ "text": "Matthew D. Hoffman Adobe Research ",
28
+ "bbox": [
29
+ 372,
30
+ 145,
31
+ 522,
32
+ 172
33
+ ],
34
+ "page_idx": 0
35
+ },
36
+ {
37
+ "type": "text",
38
+ "text": "Rif A. Saurous Google Research ",
39
+ "bbox": [
40
+ 563,
41
+ 145,
42
+ 678,
43
+ 172
44
+ ],
45
+ "page_idx": 0
46
+ },
47
+ {
48
+ "type": "text",
49
+ "text": "Eugene Brevdo Google Brain ",
50
+ "bbox": [
51
+ 184,
52
+ 195,
53
+ 292,
54
+ 222
55
+ ],
56
+ "page_idx": 0
57
+ },
58
+ {
59
+ "type": "text",
60
+ "text": "Kevin Murphy Google Research ",
61
+ "bbox": [
62
+ 370,
63
+ 195,
64
+ 485,
65
+ 222
66
+ ],
67
+ "page_idx": 0
68
+ },
69
+ {
70
+ "type": "text",
71
+ "text": "David M. Blei Columbia University ",
72
+ "bbox": [
73
+ 563,
74
+ 195,
75
+ 702,
76
+ 222
77
+ ],
78
+ "page_idx": 0
79
+ },
80
+ {
81
+ "type": "text",
82
+ "text": "ABSTRACT ",
83
+ "text_level": 1,
84
+ "bbox": [
85
+ 454,
86
+ 260,
87
+ 544,
88
+ 273
89
+ ],
90
+ "page_idx": 0
91
+ },
92
+ {
93
+ "type": "text",
94
+ "text": "We propose Edward, a Turing-complete probabilistic programming language. Edward defines two compositional representations—random variables and inference. By treating inference as a first class citizen, on a par with modeling, we show that probabilistic programming can be as flexible and computationally efficient as traditional deep learning. For flexibility, Edward makes it easy to fit the same model using a variety of composable inference methods, ranging from point estimation to variational inference to MCMC. In addition, Edward can reuse the modeling representation as part of inference, facilitating the design of rich variational models and generative adversarial networks. For efficiency, Edward is integrated into TensorFlow, providing significant speedups over existing probabilistic systems. For example, we show on a benchmark logistic regression task that Edward is at least $3 5 \\mathrm { x }$ faster than Stan and 6x faster than PyMC3. Further, Edward incurs no runtime overhead: it is as fast as handwritten TensorFlow. ",
95
+ "bbox": [
96
+ 233,
97
+ 289,
98
+ 764,
99
+ 468
100
+ ],
101
+ "page_idx": 0
102
+ },
103
+ {
104
+ "type": "text",
105
+ "text": "1 INTRODUCTION ",
106
+ "text_level": 1,
107
+ "bbox": [
108
+ 176,
109
+ 493,
110
+ 336,
111
+ 510
112
+ ],
113
+ "page_idx": 0
114
+ },
115
+ {
116
+ "type": "text",
117
+ "text": "The nature of deep neural networks is compositional. Users can connect layers in creative ways, without having to worry about how to perform testing (forward propagation) or inference (gradientbased optimization, with back propagation and automatic differentiation). ",
118
+ "bbox": [
119
+ 176,
120
+ 522,
121
+ 823,
122
+ 564
123
+ ],
124
+ "page_idx": 0
125
+ },
126
+ {
127
+ "type": "text",
128
+ "text": "In this paper, we design compositional representations for probabilistic programming. Probabilistic programming lets users specify generative probabilistic models as programs and then “compile” those models down into inference procedures. Probabilistic models are also compositional in nature, and much work has enabled rich probabilistic programs via compositions of random variables (Goodman et al., 2012; Ghahramani, 2015; Lake et al., 2016). ",
129
+ "bbox": [
130
+ 174,
131
+ 570,
132
+ 823,
133
+ 640
134
+ ],
135
+ "page_idx": 0
136
+ },
137
+ {
138
+ "type": "text",
139
+ "text": "Less work, however, has considered an analogous compositionality for inference. Rather, many existing probabilistic programming languages treat the inference engine as a black box, abstracted away from the model. These cannot capture probabilistic inferences that reuse the model’s representation—a key idea in recent advances in variational inference (Kingma & Welling, 2014; Rezende & Mohamed, 2015; Tran et al., 2016b), generative adversarial networks (Goodfellow et al., 2014), and also in more classic inferences (Dayan et al., 1995; Gutmann & Hyvärinen, 2010). ",
140
+ "bbox": [
141
+ 174,
142
+ 647,
143
+ 825,
144
+ 731
145
+ ],
146
+ "page_idx": 0
147
+ },
148
+ {
149
+ "type": "text",
150
+ "text": "We propose Edward1, a Turing-complete probabilistic programming language which builds on two compositional representations—one for random variables and one for inference. By treating inference as a first class citizen, on a par with modeling, we show that probabilistic programming can be as flexible and computationally efficient as traditional deep learning. For flexibility, we show how Edward makes it easy to fit the same model using a variety of composable inference methods, ranging from point estimation to variational inference to MCMC. For efficiency, we show how to integrate Edward into existing computational graph frameworks such as TensorFlow (Abadi et al., 2016). Frameworks like TensorFlow provide computational benefits like distributed training, parallelism, vectorization, and GPU support “for free.” For example, we show on a benchmark task that Edward’s Hamiltonian Monte Carlo is many times faster than existing software. Further, Edward incurs no runtime overhead: it is as fast as handwritten TensorFlow. ",
151
+ "bbox": [
152
+ 174,
153
+ 738,
154
+ 825,
155
+ 890
156
+ ],
157
+ "page_idx": 0
158
+ },
159
+ {
160
+ "type": "text",
161
+ "text": "2 RELATED WORK ",
162
+ "text_level": 1,
163
+ "bbox": [
164
+ 176,
165
+ 102,
166
+ 344,
167
+ 117
168
+ ],
169
+ "page_idx": 1
170
+ },
171
+ {
172
+ "type": "text",
173
+ "text": "Probabilistic programming languages (PPLs) typically trade off the expressiveness of the language with the computational efficiency of inference. On one side, there are languages which emphasize expressiveness (Pfeffer, 2001; Milch et al., 2005; Pfeffer, 2009; Goodman et al., 2012), representing a rich class beyond graphical models. Each employs a generic inference engine, but scales poorly with respect to model and data size. On the other side, there are languages which emphasize efficiency (Spiegelhalter et al., 1995; Murphy, 2001; Plummer, 2003; Salvatier et al., 2015; Carpenter et al., 2016). The PPL is restricted to a specific class of models, and inference algorithms are optimized to be efficient for this class. For example, Infer.NET enables fast message passing for graphical models (Minka et al., 2014), and Augur enables data parallelism with GPUs for Gibbs sampling in Bayesian networks (Tristan et al., 2014). Edward bridges this gap. It is Turing complete—it supports any computable probability distribution—and it supports efficient algorithms, such as those that leverage model structure and those that scale to massive data. ",
174
+ "bbox": [
175
+ 174,
176
+ 130,
177
+ 825,
178
+ 296
179
+ ],
180
+ "page_idx": 1
181
+ },
182
+ {
183
+ "type": "text",
184
+ "text": "There has been some prior research on efficient algorithms in Turing-complete languages. Venture and Anglican design inference as a collection of local inference problems, defined over program fragments (Mansinghka et al., 2014; Wood et al., 2014). This produces fast program-specific inference code, which we build on. Neither system supports inference methods such as programmable posterior approximations, inference models, or data subsampling. Concurrent with our work, WebPPL features amortized inference (Ritchie et al., 2016). Unlike Edward, WebPPL does not reuse the model’s representation; rather, it annotates the original program and leverages helper functions, which is a less flexible strategy. Finally, inference is designed as program transformations in Kiselyov & Shan (2009); Scibior et al. ´ (2015); Zinkov & Shan (2016). This enables the flexibility of composing inference inside other probabilistic programs. Edward builds on this idea to compose not only inference within modeling but also modeling within inference (e.g., variational models). ",
185
+ "bbox": [
186
+ 174,
187
+ 304,
188
+ 825,
189
+ 458
190
+ ],
191
+ "page_idx": 1
192
+ },
193
+ {
194
+ "type": "text",
195
+ "text": "3 COMPOSITIONAL REPRESENTATIONS FOR PROBABILISTIC MODELS ",
196
+ "text_level": 1,
197
+ "bbox": [
198
+ 173,
199
+ 474,
200
+ 764,
201
+ 491
202
+ ],
203
+ "page_idx": 1
204
+ },
205
+ {
206
+ "type": "text",
207
+ "text": "We first develop compositional representations for probabilistic models. We desire two criteria: (a) integration with computational graphs, an efficient framework where nodes represent operations on data and edges represent data communicated between them (Culler, 1986); and (b) invariance of the representation under the graph, that is, the representation can be reused during inference. ",
208
+ "bbox": [
209
+ 174,
210
+ 502,
211
+ 823,
212
+ 558
213
+ ],
214
+ "page_idx": 1
215
+ },
216
+ {
217
+ "type": "text",
218
+ "text": "Edward defines random variables as the key compositional representation. They are class objects with methods, for example, to compute the log density and to sample. Further, each random variable $\\mathbf { x }$ is associated to a tensor (multi-dimensional array) $\\mathbf { x } ^ { * }$ , which represents a single sample $\\mathbf { x } ^ { * } \\sim$ $p ( \\mathbf { x } )$ . This association embeds the random variable onto a computational graph on tensors. ",
219
+ "bbox": [
220
+ 174,
221
+ 564,
222
+ 825,
223
+ 621
224
+ ],
225
+ "page_idx": 1
226
+ },
227
+ {
228
+ "type": "text",
229
+ "text": "The design’s simplicity makes it easy to develop probabilistic programs in a computational graph framework. Importantly, all computation is represented on the graph. This enables one to compose random variables with complex deterministic structure such as deep neural networks, a diverse set of math operations, and third party libraries that build on the same framework. The design also enables compositions of random variables to capture complex stochastic structure. ",
230
+ "bbox": [
231
+ 174,
232
+ 627,
233
+ 825,
234
+ 698
235
+ ],
236
+ "page_idx": 1
237
+ },
238
+ {
239
+ "type": "text",
240
+ "text": "As an lustration, we use a Beta-Bernoulli model, $p ( \\mathbf { x } , \\theta ) = \\mathrm { B e t a } ( \\theta \\mid 1 , 1 ) \\prod _ { n = 1 } ^ { 5 0 } \\mathrm { B e r n o u l l i } ( x _ { n } \\mid \\theta )$ $\\theta$ is a latent probability shared across the 50 data points $\\mathbf { x } \\in \\{ 0 , 1 \\} ^ { 5 0 }$ . The random variable $_ \\textrm { x }$ is 50-dimensional, parameterized by the random tensor $\\theta ^ { * }$ . Fetching the object $_ \\textrm { x }$ runs the graph: it simulates from the generative process and outputs a binary vector of 50 elements. ",
241
+ "bbox": [
242
+ 173,
243
+ 705,
244
+ 823,
245
+ 765
246
+ ],
247
+ "page_idx": 1
248
+ },
249
+ {
250
+ "type": "image",
251
+ "img_path": "images/0287bfe10947a2c5c9120ae3d5226db94ad8a6095713a184099d55a1a2ab7bf6.jpg",
252
+ "image_caption": [
253
+ "Figure 1: Beta-Bernoulli program (left) alongside its computational graph (right). Fetching $\\mathbf { x }$ from the graph generates a binary vector of 50 elements. "
254
+ ],
255
+ "image_footnote": [],
256
+ "bbox": [
257
+ 163,
258
+ 777,
259
+ 696,
260
+ 844
261
+ ],
262
+ "page_idx": 1
263
+ },
264
+ {
265
+ "type": "text",
266
+ "text": "All computation is registered symbolically on random variables and not over their execution. Symbolic representations do not require reifying the full model, which leads to unreasonable memory consumption for large models (Tristan et al., 2014). Moreover, it enables us to simplify both deterministic and stochastic operations in the graph, before executing any code (Scibior et al. ´ , 2015; Zinkov & Shan, 2016). ",
267
+ "bbox": [
268
+ 173,
269
+ 895,
270
+ 821,
271
+ 924
272
+ ],
273
+ "page_idx": 1
274
+ },
275
+ {
276
+ "type": "image",
277
+ "img_path": "images/836aa7338dea55095b17e76f84cab77f475d156f099a4a66b186d4de36d50608.jpg",
278
+ "image_caption": [
279
+ "Figure 2: Variational auto-encoder for a data set of $2 8 \\times 2 8$ pixel images: (left) graphical model, with dotted lines for the inference model; (right) probabilistic program, with 2-layer neural networks. "
280
+ ],
281
+ "image_footnote": [],
282
+ "bbox": [
283
+ 191,
284
+ 99,
285
+ 696,
286
+ 228
287
+ ],
288
+ "page_idx": 2
289
+ },
290
+ {
291
+ "type": "text",
292
+ "text": "",
293
+ "bbox": [
294
+ 174,
295
+ 291,
296
+ 825,
297
+ 335
298
+ ],
299
+ "page_idx": 2
300
+ },
301
+ {
302
+ "type": "text",
303
+ "text": "With computational graphs, it is also natural to build mutable states within the probabilistic program. As a typical use of computational graphs, such states can define model parameters; in TensorFlow, this is given by a tf.Variable. Another use case is for building discriminative models $p ( \\mathbf { y } \\mid \\mathbf { x } )$ , where x are features that are input as training or test data. The program can be written independent of the data, using a mutable state (tf.placeholder) for $\\mathbf { x }$ in its graph. During training and testing, we feed the placeholder the appropriate values. ",
304
+ "bbox": [
305
+ 174,
306
+ 342,
307
+ 825,
308
+ 426
309
+ ],
310
+ "page_idx": 2
311
+ },
312
+ {
313
+ "type": "text",
314
+ "text": "In Appendix A, we provide examples of a Bayesian neural network for classification (A.1), latent Dirichlet allocation (A.2), and Gaussian matrix factorization (A.3). We present others below. ",
315
+ "bbox": [
316
+ 174,
317
+ 433,
318
+ 823,
319
+ 462
320
+ ],
321
+ "page_idx": 2
322
+ },
323
+ {
324
+ "type": "text",
325
+ "text": "3.1 EXAMPLE: VARIATIONAL AUTO-ENCODER ",
326
+ "text_level": 1,
327
+ "bbox": [
328
+ 176,
329
+ 478,
330
+ 509,
331
+ 492
332
+ ],
333
+ "page_idx": 2
334
+ },
335
+ {
336
+ "type": "text",
337
+ "text": "Figure 2 implements a variational auto-encoder (VAE) (Kingma & Welling, 2014; Rezende et al., 2014) in Edward. It comprises a probabilistic model over data and a variational model designed to approximate the former’s posterior. Here we use random variables to construct both the probabilistic model and the variational model; they are fit during inference (more details in Section 4). ",
338
+ "bbox": [
339
+ 174,
340
+ 503,
341
+ 825,
342
+ 560
343
+ ],
344
+ "page_idx": 2
345
+ },
346
+ {
347
+ "type": "text",
348
+ "text": "There are $N$ data points $x _ { n } \\in \\{ 0 , 1 \\} ^ { 2 8 \\cdot 2 8 }$ each with $d$ latent variables, $z _ { n } \\in \\mathbb { R } ^ { d }$ . The program uses Keras (Chollet, 2015) to define neural networks. The probabilistic model is parameterized by a 2-layer neural network, with 256 hidden units (and ReLU activation), and generates $2 8 \\times 2 8$ pixel images. The variational model is parameterized by a 2-layer inference network, with 256 hidden units and outputs parameters of a normal posterior approximation. ",
349
+ "bbox": [
350
+ 174,
351
+ 565,
352
+ 825,
353
+ 637
354
+ ],
355
+ "page_idx": 2
356
+ },
357
+ {
358
+ "type": "text",
359
+ "text": "The probabilistic program is concise. Core elements of the VAE—such as its distributional assumptions and neural net architectures—are all extensible. With model compositionality, we can embed it into more complicated models (Gregor et al., 2015; Rezende et al., 2016) and for other learning tasks (Kingma et al., 2014). With inference compositionality (which we discuss in Section 4), we can embed it into more complicated algorithms, such as with expressive variational approximations (Rezende & Mohamed, 2015; Tran et al., 2016b; Kingma et al., 2016) and alternative objectives (Ranganath et al., 2016a; Li & Turner, 2016; Dieng et al., 2016). ",
360
+ "bbox": [
361
+ 173,
362
+ 643,
363
+ 825,
364
+ 742
365
+ ],
366
+ "page_idx": 2
367
+ },
368
+ {
369
+ "type": "text",
370
+ "text": "3.2 EXAMPLE: BAYESIAN RECURRENT NEURAL NETWORK WITH VARIABLE LENGTH",
371
+ "text_level": 1,
372
+ "bbox": [
373
+ 171,
374
+ 757,
375
+ 774,
376
+ 772
377
+ ],
378
+ "page_idx": 2
379
+ },
380
+ {
381
+ "type": "text",
382
+ "text": "Random variables can also be composed with control flow operations. As an example, Figure 3 implements a Bayesian recurrent neural network (RNN) with variable length. The data is a sequence of inputs $\\{ \\mathbf { x } _ { 1 } , \\dotsc , \\mathbf { x } _ { T } \\}$ and outputs $\\{ y _ { 1 } , \\dots , y _ { T } \\}$ of length $T$ with $\\mathbf { x } _ { t } \\in \\mathbb { R } ^ { D }$ and $y _ { t } \\in \\mathbb { R }$ per time step. For $t = 1 , \\dots , T$ , a RNN applies the update ",
383
+ "bbox": [
384
+ 174,
385
+ 784,
386
+ 825,
387
+ 840
388
+ ],
389
+ "page_idx": 2
390
+ },
391
+ {
392
+ "type": "equation",
393
+ "img_path": "images/bb1ccb6fcd7a117ca5c18d541e29235bfeca748846a195daa3b444428882e5a5.jpg",
394
+ "text": "$$\n\\mathbf { h } _ { t } = \\operatorname { t a n h } ( \\mathbf { W } _ { h } \\mathbf { h } _ { t - 1 } + \\mathbf { W } _ { x } \\mathbf { x } _ { t } + \\mathbf { b } _ { h } ) ,\n$$",
395
+ "text_format": "latex",
396
+ "bbox": [
397
+ 370,
398
+ 844,
399
+ 624,
400
+ 862
401
+ ],
402
+ "page_idx": 2
403
+ },
404
+ {
405
+ "type": "text",
406
+ "text": "where the previous hidden state is $\\mathbf { h } _ { t - 1 } \\in \\mathbb { R } ^ { H }$ . We feed each hidden state into the output’s likelihood, $y _ { t } \\sim \\mathrm { N o r m a l } ( \\mathbf { W } _ { y } \\mathbf { h } _ { t } + \\mathbf { b } _ { y } , 1 )$ , and we place a standard normal prior over all parameters $\\begin{array} { r } { \\{ \\mathbf { W } _ { h } \\in \\mathbb { R } ^ { H \\times H } , \\mathbf { W } _ { x } \\in \\mathbb { R } ^ { D \\times H } , \\mathbf { W } _ { y } \\in \\mathbb { R } ^ { H \\times 1 } , \\mathbf { b } _ { h } \\in \\mathbb { R } ^ { H } , \\mathbf { b } _ { y } \\in \\mathbb { R } \\} . } \\end{array}$ Our implementation is dynamic: it differs from a RNN with fixed length, which pads and unrolls the computation. ",
407
+ "bbox": [
408
+ 174,
409
+ 866,
410
+ 823,
411
+ 924
412
+ ],
413
+ "page_idx": 2
414
+ },
415
+ {
416
+ "type": "image",
417
+ "img_path": "images/a452f8ac4f3281243dec5a50796c87adc722ba2d0e6e35fb5bec3b46538665f3.jpg",
418
+ "image_caption": [
419
+ "Figure 3: Bayesian RNN: (left) graphical model; (right) probabilistic program. The program has an unspecified number of time steps; it uses a symbolic for loop (tf.scan). "
420
+ ],
421
+ "image_footnote": [],
422
+ "bbox": [
423
+ 214,
424
+ 101,
425
+ 785,
426
+ 251
427
+ ],
428
+ "page_idx": 3
429
+ },
430
+ {
431
+ "type": "text",
432
+ "text": "3.3 STOCHASTIC CONTROL FLOW AND MODEL PARALLELISM ",
433
+ "bbox": [
434
+ 173,
435
+ 315,
436
+ 619,
437
+ 330
438
+ ],
439
+ "page_idx": 3
440
+ },
441
+ {
442
+ "type": "image",
443
+ "img_path": "images/35633709cc7374ff58b7b9dddbe2ba61769af7ed37faacacf5cdaada6a39c34d.jpg",
444
+ "image_caption": [
445
+ "Figure 4: Computational graph for a probabilistic program with stochastic control flow. "
446
+ ],
447
+ "image_footnote": [],
448
+ "bbox": [
449
+ 336,
450
+ 347,
451
+ 648,
452
+ 415
453
+ ],
454
+ "page_idx": 3
455
+ },
456
+ {
457
+ "type": "text",
458
+ "text": "Random variables can also be placed in the control flow itself, enabling probabilistic programs with stochastic control flow. Stochastic control flow defines dynamic conditional dependencies, known in the literature as contingent or existential dependencies (Mansinghka et al., 2014; Wu et al., 2016). See Figure 4, where $\\mathbf { x }$ may or may not depend on a for a given execution. In Appendix A.4, we use stochastic control flow to implement a Dirichlet process mixture model. Tensors with stochastic shape are also possible: for example, tf.zeros(Poisson( $\\mathtt { 1 a m = 5 . 0 }$ )) defines a vector of zeros with length given by a Poisson draw with rate 5.0. ",
459
+ "bbox": [
460
+ 173,
461
+ 457,
462
+ 825,
463
+ 554
464
+ ],
465
+ "page_idx": 3
466
+ },
467
+ {
468
+ "type": "text",
469
+ "text": "Stochastic control flow produces difficulties for algorithms that use the graph structure because the relationship of conditional dependencies changes across execution traces. The computational graph, however, provides an elegant way of teasing out static conditional dependence structure $\\mathbf { \\tau } ( \\mathbf { p } )$ from dynamic dependence structure (a). We can perform model parallelism (parallel computation across components of the model) over the static structure with GPUs and batch training. We can use more generic computations to handle the dynamic structure. ",
470
+ "bbox": [
471
+ 174,
472
+ 561,
473
+ 825,
474
+ 645
475
+ ],
476
+ "page_idx": 3
477
+ },
478
+ {
479
+ "type": "text",
480
+ "text": "4 COMPOSITIONAL REPRESENTATIONS FOR INFERENCE ",
481
+ "text_level": 1,
482
+ "bbox": [
483
+ 174,
484
+ 665,
485
+ 650,
486
+ 681
487
+ ],
488
+ "page_idx": 3
489
+ },
490
+ {
491
+ "type": "text",
492
+ "text": "We described random variables as a representation for building rich probabilistic programs over computational graphs. We now describe a compositional representation for inference. We desire two criteria: (a) support for many classes of inference, where the form of the inferred posterior depends on the algorithm; and (b) invariance of inference under the computational graph, that is, the posterior can be further composed as part of another model. ",
493
+ "bbox": [
494
+ 174,
495
+ 696,
496
+ 825,
497
+ 767
498
+ ],
499
+ "page_idx": 3
500
+ },
501
+ {
502
+ "type": "text",
503
+ "text": "To explain our approach, we will use a simple hierarchical model as a running example. Figure 5 displays a joint distribution $p ( \\mathbf { x } , \\mathbf { z } , \\beta )$ of data $\\mathbf { x }$ , local variables $\\mathbf { z }$ , and global variables $\\beta$ . The ideas here extend to more expressive programs. ",
504
+ "bbox": [
505
+ 174,
506
+ 773,
507
+ 825,
508
+ 815
509
+ ],
510
+ "page_idx": 3
511
+ },
512
+ {
513
+ "type": "text",
514
+ "text": "4.1 INFERENCE AS STOCHASTIC GRAPH OPTIMIZATION ",
515
+ "text_level": 1,
516
+ "bbox": [
517
+ 174,
518
+ 833,
519
+ 575,
520
+ 847
521
+ ],
522
+ "page_idx": 3
523
+ },
524
+ {
525
+ "type": "text",
526
+ "text": "The goal of inference is to calculate the posterior distribution $p ( \\mathbf { z } , \\beta \\mid \\mathbf { x } _ { \\mathrm { t r a i n } } ; \\theta )$ given data $\\mathbf { X } _ { \\mathrm { t r a i n } }$ where $\\pmb \\theta$ are any model parameters that we will compute point estimates for.2 We formalize this as ",
527
+ "bbox": [
528
+ 176,
529
+ 859,
530
+ 823,
531
+ 887
532
+ ],
533
+ "page_idx": 3
534
+ },
535
+ {
536
+ "type": "image",
537
+ "img_path": "images/44003676b9c0dcc29b6f0f163e45a0b8d6a5cd17bfb0fe2babeb5033313a12e5.jpg",
538
+ "image_caption": [
539
+ "Figure 5: Hierarchical model: (left) graphical model; (right) probabilistic program. It is a mixture of Gaussians over $D$ -dimensional data $\\mathbf { \\bar { \\{ x } } _ { n } \\mathbf \\} \\in \\mathbb { R } ^ { N \\times D }$ . There are $K$ latent cluster means $\\beta \\ \\in$ $\\mathbb { R } ^ { K \\times D }$ . "
540
+ ],
541
+ "image_footnote": [],
542
+ "bbox": [
543
+ 212,
544
+ 99,
545
+ 787,
546
+ 202
547
+ ],
548
+ "page_idx": 4
549
+ },
550
+ {
551
+ "type": "text",
552
+ "text": "the following optimization problem: ",
553
+ "bbox": [
554
+ 174,
555
+ 279,
556
+ 411,
557
+ 292
558
+ ],
559
+ "page_idx": 4
560
+ },
561
+ {
562
+ "type": "equation",
563
+ "img_path": "images/eaf4872705f4eedce6c0e817899165786db1f3be296b4d5815287e66c8bbec7a.jpg",
564
+ "text": "$$\n\\operatorname* { m i n } _ { \\mathbf { \\lambda } , \\theta } \\mathcal { L } ( p ( \\mathbf { z } , \\beta \\mid \\mathbf { x } _ { \\mathrm { t r a i n } } ; \\mathbf { \\boldsymbol { \\theta } } ) , \\mathbf { \\boldsymbol { q } } ( \\mathbf { z } , \\beta ; \\mathbf { \\lambda } ) ) ,\n$$",
565
+ "text_format": "latex",
566
+ "bbox": [
567
+ 374,
568
+ 296,
569
+ 620,
570
+ 321
571
+ ],
572
+ "page_idx": 4
573
+ },
574
+ {
575
+ "type": "text",
576
+ "text": "where $q ( \\mathbf { z } , { \\boldsymbol { \\beta } } ; { \\boldsymbol { \\lambda } } )$ is an approximation to the posterior $p ( \\mathbf { z } , \\beta \\mid \\mathbf { x } _ { \\mathrm { t r a i n } } ; \\theta )$ , and $\\mathcal { L }$ is a loss function with respect to $p$ and $q$ . ",
577
+ "bbox": [
578
+ 174,
579
+ 325,
580
+ 825,
581
+ 354
582
+ ],
583
+ "page_idx": 4
584
+ },
585
+ {
586
+ "type": "text",
587
+ "text": "The choice of approximation $q$ , loss $\\mathcal { L }$ , and rules to update parameters $\\{ \\theta , \\lambda \\}$ are specified by an inference algorithm. (Note $q$ can be nonparametric, such as a point or a collection of samples.) ",
588
+ "bbox": [
589
+ 174,
590
+ 361,
591
+ 823,
592
+ 390
593
+ ],
594
+ "page_idx": 4
595
+ },
596
+ {
597
+ "type": "text",
598
+ "text": "In Edward, we write this problem as follows: ",
599
+ "bbox": [
600
+ 173,
601
+ 396,
602
+ 470,
603
+ 410
604
+ ],
605
+ "page_idx": 4
606
+ },
607
+ {
608
+ "type": "text",
609
+ "text": "1 inference $=$ ed.Inference({beta: qbeta, z: qz}, data $\\equiv$ {x: x_train}) ",
610
+ "bbox": [
611
+ 166,
612
+ 415,
613
+ 609,
614
+ 428
615
+ ],
616
+ "page_idx": 4
617
+ },
618
+ {
619
+ "type": "text",
620
+ "text": "Inference is an abstract class which takes two inputs. The first is a collection of latent random variables beta and $_ { \\textrm { z } }$ , associated to their “posterior variables” qbeta and $\\mathtt { q z }$ respectively. The second is a collection of observed random variables $_ \\textrm { x }$ , which is associated to their realizations x_train. ",
621
+ "bbox": [
622
+ 173,
623
+ 440,
624
+ 825,
625
+ 483
626
+ ],
627
+ "page_idx": 4
628
+ },
629
+ {
630
+ "type": "text",
631
+ "text": "The idea is that Inference defines and solves the optimization in Equation 1. It adjusts parameters of the distribution of qbeta and $\\mathtt { q z }$ (and any model parameters) to be close to the posterior. ",
632
+ "bbox": [
633
+ 171,
634
+ 489,
635
+ 821,
636
+ 518
637
+ ],
638
+ "page_idx": 4
639
+ },
640
+ {
641
+ "type": "text",
642
+ "text": "Class methods are available to finely control the inference. Calling inference.initialize() builds a computational graph to update $\\{ \\bar { \\pmb \\theta } , \\lambda \\}$ . Calling inference.update() runs this computation once to update $\\{ \\theta , \\lambda \\}$ ; we call the method in a loop until convergence. Importantly, no efficiency is lost in Edward’s language: the computational graph is the same as if it were handwritten for a specific model. This means the runtime is the same; also see our experiments in Section 5.2. ",
643
+ "bbox": [
644
+ 174,
645
+ 525,
646
+ 825,
647
+ 594
648
+ ],
649
+ "page_idx": 4
650
+ },
651
+ {
652
+ "type": "text",
653
+ "text": "A key concept in Edward is that there is no distinct “model” or “inference” block. A model is simply a collection of random variables, and inference is a way of modifying parameters in that collection subject to another. This reductionism offers significant flexibility. For example, we can infer only parts of a model (e.g., layer-wise training (Hinton et al., 2006)), infer parts used in multiple models (e.g., multi-task learning), or plug in a posterior into a new model (e.g., Bayesian updating). ",
654
+ "bbox": [
655
+ 174,
656
+ 602,
657
+ 825,
658
+ 672
659
+ ],
660
+ "page_idx": 4
661
+ },
662
+ {
663
+ "type": "text",
664
+ "text": "4.2 CLASSES OF INFERENCE ",
665
+ "text_level": 1,
666
+ "bbox": [
667
+ 174,
668
+ 688,
669
+ 385,
670
+ 702
671
+ ],
672
+ "page_idx": 4
673
+ },
674
+ {
675
+ "type": "text",
676
+ "text": "The design of Inference is very general. We describe subclasses to represent many algorithms below: variational inference, Monte Carlo, and generative adversarial networks. ",
677
+ "bbox": [
678
+ 173,
679
+ 713,
680
+ 821,
681
+ 742
682
+ ],
683
+ "page_idx": 4
684
+ },
685
+ {
686
+ "type": "text",
687
+ "text": "Variational inference posits a family of approximating distributions and finds the closest member in the family to the posterior (Jordan et al., 1999). In Edward, we build the variational family in the graph; see Figure 6 (left). For our running example, the family has mutable variables as parameters $\\bar { \\lambda } \\doteq \\{ \\pi , \\mu , \\sigma \\bar { \\} }$ , where $q ( \\beta ; \\mu , \\sigma ) = \\mathrm { N o r m a l } ( \\beta ; \\bar { \\mu } , \\sigma )$ and $q ( \\mathbf { z } ; \\pi ) = \\operatorname { C a t e g o r i c a l } ( \\mathbf { z } ; \\pi )$ . ",
688
+ "bbox": [
689
+ 174,
690
+ 750,
691
+ 825,
692
+ 806
693
+ ],
694
+ "page_idx": 4
695
+ },
696
+ {
697
+ "type": "text",
698
+ "text": "Specific variational algorithms inherit from the VariationalInference class. Each defines its own methods, such as a loss function and gradient. For example, we represent maximum a posteriori (MAP) estimation with an approximating family (qbeta and $\\mathtt { q z }$ ) of PointMass random variables, i.e., with all probability mass concentrated at a point. MAP inherits from VariationalInference and defines the negative log joint density as the loss function; it uses existing optimizers inside TensorFlow. In Section 5.1, we experiment with multiple gradient estimators for black box variational inference (Ranganath et al., 2014). Each estimator implements the same loss (an objective proportional to the divergence $\\mathrm { K L } ( q \\parallel p ) .$ ) and a different update rule (stochastic gradient). ",
699
+ "bbox": [
700
+ 174,
701
+ 811,
702
+ 825,
703
+ 924
704
+ ],
705
+ "page_idx": 4
706
+ },
707
+ {
708
+ "type": "text",
709
+ "text": "1 qbeta $=$ Normal( 1 \n2 mu=tf.Variable(tf.zeros([K, D])), 2 \n3 sigma=tf.exp(tf.Variable(tf.zeros([K, D]))))3 \n4 qz $=$ Categorical( 4 \n5 logits=tf.Variable(tf.zeros([N, K]))) 5 \n6 6 \n7 inference $=$ ed.VariationalInference( 7 \n8 {beta: qbeta, z: qz}, data={x: x_train}) 8 ",
710
+ "bbox": [
711
+ 163,
712
+ 108,
713
+ 495,
714
+ 193
715
+ ],
716
+ "page_idx": 5
717
+ },
718
+ {
719
+ "type": "text",
720
+ "text": "$\\mathrm { ~ T ~ } = \\mathrm { ~ 1 0 0 0 0 }$ # number of samples \nqbeta $=$ Empirical( params=tf.Variable(tf.zeros([T, K, D]))) \nqz $=$ Empirical( params=tf.Variable(tf.zeros([T, N]))) \ninference $=$ ed.MonteCarlo( {beta: qbeta, z: qz}, data={x: x_train}) ",
721
+ "bbox": [
722
+ 490,
723
+ 108,
724
+ 784,
725
+ 194
726
+ ],
727
+ "page_idx": 5
728
+ },
729
+ {
730
+ "type": "image",
731
+ "img_path": "images/4b59dec2233301cf213908e0b2d65837f6b4eca826c4067836a5724708bb8c49.jpg",
732
+ "image_caption": [
733
+ "Figure 6: (left) Variational inference. (right) Monte Carlo. ",
734
+ "Figure 7: Generative adversarial networks: (left) graphical model; (right) probabilistic program. The model (generator) uses a parameterized function (discriminator) for training. "
735
+ ],
736
+ "image_footnote": [],
737
+ "bbox": [
738
+ 253,
739
+ 247,
740
+ 810,
741
+ 395
742
+ ],
743
+ "page_idx": 5
744
+ },
745
+ {
746
+ "type": "text",
747
+ "text": "Monte Carlo approximates the posterior using samples (Robert & Casella, 1999). Monte Carlo is an inference where the approximating family is an empirical distribution, $q ( \\beta ; \\{ \\beta ^ { ( t ) } \\} ) ~ =$ $\\begin{array} { r } { \\frac { 1 } { T } \\sum _ { t = 1 } ^ { T } \\delta ( \\beta , \\beta ^ { ( t ) } ) } \\end{array}$ and $\\begin{array} { r } { q ( \\mathbf { z } ; \\{ \\mathbf { z } ^ { ( t ) } \\} ) = \\frac { 1 } { T } \\sum _ { t = 1 } ^ { T } \\delta ( \\mathbf { z } , \\mathbf { z } ^ { ( t ) } ) } \\end{array}$ . The parameters are $\\boldsymbol \\lambda = \\{ \\beta ^ { ( t ) } , { \\bf z } ^ { ( t ) } \\}$ . See Figure 6 (right). Monte Carlo algorithms proceed by updating one sample $\\beta ^ { ( t ) } , \\mathbf { z } ^ { ( t ) }$ at a time in the empirical approximation. Specific MC samplers determine the update rules: they can use gradients such as in Hamiltonian Monte Carlo (Neal, 2011) and graph structure such as in sequential Monte Carlo (Doucet et al., 2001). ",
748
+ "bbox": [
749
+ 174,
750
+ 468,
751
+ 825,
752
+ 573
753
+ ],
754
+ "page_idx": 5
755
+ },
756
+ {
757
+ "type": "text",
758
+ "text": "Edward also supports non-Bayesian methods such as generative adversarial networks (GANs) (Goodfellow et al., 2014). See Figure 7. The model posits random noise eps over $N$ data points, each with $d$ dimensions; this random noise feeds into a generative_network function, a neural network that outputs real-valued data $_ \\textrm { x }$ . In addition, there is a discriminative_network which takes data as input and outputs the probability that the data is real (in logit parameterization). We build GANInference; running it optimizes parameters inside the two neural network functions. This approach extends to many advances in GANs (e.g., Denton et al. (2015); Li et al. (2015)). ",
759
+ "bbox": [
760
+ 174,
761
+ 580,
762
+ 825,
763
+ 678
764
+ ],
765
+ "page_idx": 5
766
+ },
767
+ {
768
+ "type": "text",
769
+ "text": "Finally, one can design algorithms that would otherwise require tedious algebraic manipulation. With symbolic algebra on nodes of the computational graph, we can uncover conjugacy relationships between random variables. Users can then integrate out variables to automatically derive classical Gibbs (Gelfand & Smith, 1990), mean-field updates (Bishop, 2006), and exact inference. These algorithms are being currently developed in Edward. ",
770
+ "bbox": [
771
+ 174,
772
+ 685,
773
+ 825,
774
+ 755
775
+ ],
776
+ "page_idx": 5
777
+ },
778
+ {
779
+ "type": "text",
780
+ "text": "4.3 COMPOSING INFERENCES ",
781
+ "text_level": 1,
782
+ "bbox": [
783
+ 176,
784
+ 772,
785
+ 393,
786
+ 786
787
+ ],
788
+ "page_idx": 5
789
+ },
790
+ {
791
+ "type": "text",
792
+ "text": "Core to Edward’s design is that inference can be written as a collection of separate inference programs. Below we demonstrate variational EM, with an (approximate) E-step over local variables and an M-step over global variables. We instantiate two algorithms, each of which conditions on inferences from the other, and we alternate with one update of each (Neal & Hinton, 1993), ",
793
+ "bbox": [
794
+ 173,
795
+ 797,
796
+ 823,
797
+ 854
798
+ ],
799
+ "page_idx": 5
800
+ },
801
+ {
802
+ "type": "text",
803
+ "text": "This extends to many other cases such as exact EM for exponential families, contrastive divergence (Hinton, 2002), pseudo-marginal methods (Andrieu & Roberts, 2009), and Gibbs sampling within variational inference (Wang & Blei, 2012; Hoffman & Blei, 2015). We can also write message passing algorithms, which solve a collection of local inference problems (Koller & Friedman, 2009). For example, classical message passing uses exact local inference and expectation propagation locally minimizes the Kullback-Leibler divergence, $\\operatorname { K L } ( p \\| q )$ (Minka, 2001). ",
804
+ "bbox": [
805
+ 174,
806
+ 152,
807
+ 825,
808
+ 237
809
+ ],
810
+ "page_idx": 6
811
+ },
812
+ {
813
+ "type": "text",
814
+ "text": "4.4 DATA SUBSAMPLING ",
815
+ "text_level": 1,
816
+ "bbox": [
817
+ 174,
818
+ 253,
819
+ 361,
820
+ 267
821
+ ],
822
+ "page_idx": 6
823
+ },
824
+ {
825
+ "type": "text",
826
+ "text": "Stochastic optimization (Bottou, 2010) scales inference to massive data and is key to algorithms such as stochastic gradient Langevin dynamics (Welling & Teh, 2011) and stochastic variational inference (Hoffman et al., 2013). The idea is to cheaply estimate the model’s log joint density in an unbiased way. At each step, one subsamples a data set $\\{ x _ { m } \\}$ of size $M$ and then scales densities with respect to local variables, ",
827
+ "bbox": [
828
+ 176,
829
+ 279,
830
+ 825,
831
+ 349
832
+ ],
833
+ "page_idx": 6
834
+ },
835
+ {
836
+ "type": "equation",
837
+ "img_path": "images/a391eafb61abf91aaac5c3bb403cc0f13d13cd8b33575cdb86be803edb89bf55.jpg",
838
+ "text": "$$\n\\begin{array} { l } { \\displaystyle \\log p ( \\mathbf { x } , \\mathbf { z } , \\boldsymbol { \\beta } ) = \\log p ( \\boldsymbol { \\beta } ) + \\sum _ { n = 1 } ^ { N } \\Big [ \\log p ( x _ { n } | z _ { n } , \\boldsymbol { \\beta } ) + \\log p ( z _ { n } | \\boldsymbol { \\beta } ) \\Big ] } \\\\ { \\displaystyle \\approx \\log p ( \\boldsymbol { \\beta } ) + \\frac { N } { M } \\sum _ { m = 1 } ^ { M } \\Big [ \\log p ( x _ { m } | z _ { m } , \\boldsymbol { \\beta } ) + \\log p ( z _ { m } | \\boldsymbol { \\beta } ) \\Big ] . } \\end{array}\n$$",
839
+ "text_format": "latex",
840
+ "bbox": [
841
+ 254,
842
+ 354,
843
+ 741,
844
+ 443
845
+ ],
846
+ "page_idx": 6
847
+ },
848
+ {
849
+ "type": "text",
850
+ "text": "To support stochastic optimization, we represent only a subgraph of the full model. This prevents reifying the full model, which can lead to unreasonable memory consumption (Tristan et al., 2014). During initialization, we pass in a dictionary to properly scale the arguments. See Figure 8. ",
851
+ "bbox": [
852
+ 178,
853
+ 445,
854
+ 821,
855
+ 488
856
+ ],
857
+ "page_idx": 6
858
+ },
859
+ {
860
+ "type": "image",
861
+ "img_path": "images/3def8d21fa605db78c927d62261d3d45f32202c962a67b83ea66847046571314.jpg",
862
+ "image_caption": [
863
+ "Figure 8: Data subsampling with a hierarchical model. We define a subgraph of the full model, forming a plate of size $M$ rather than $N$ . We then scale all local random variables by $N / M$ . "
864
+ ],
865
+ "image_footnote": [],
866
+ "bbox": [
867
+ 192,
868
+ 507,
869
+ 874,
870
+ 614
871
+ ],
872
+ "page_idx": 6
873
+ },
874
+ {
875
+ "type": "text",
876
+ "text": "Conceptually, the scale argument represents scaling for each random variable’s plate, as if we had seen that random variable $N / M$ as many times. As an example, Appendix B shows how to implement stochastic variational inference in Edward. The approach extends naturally to streaming data (Doucet et al., 2000; Broderick et al., 2013; McInerney et al., 2015), dynamic batch sizes, and data structures in which working on a subgraph does not immediately apply (Binder et al., 1997; Johnson & Willsky, 2014; Foti et al., 2014). ",
877
+ "bbox": [
878
+ 174,
879
+ 675,
880
+ 825,
881
+ 760
882
+ ],
883
+ "page_idx": 6
884
+ },
885
+ {
886
+ "type": "text",
887
+ "text": "5 EXPERIMENTS ",
888
+ "text_level": 1,
889
+ "bbox": [
890
+ 176,
891
+ 779,
892
+ 326,
893
+ 795
894
+ ],
895
+ "page_idx": 6
896
+ },
897
+ {
898
+ "type": "text",
899
+ "text": "In this section, we illustrate two main benefits of Edward: flexibility and efficiency. For the former, we show how it is easy to compare different inference algorithms on the same model. For the latter, we show how it is easy to get significant speedups by exploiting computational graphs. ",
900
+ "bbox": [
901
+ 174,
902
+ 810,
903
+ 825,
904
+ 853
905
+ ],
906
+ "page_idx": 6
907
+ },
908
+ {
909
+ "type": "text",
910
+ "text": "5.1 RECENT METHODS IN VARIATIONAL INFERENCE ",
911
+ "text_level": 1,
912
+ "bbox": [
913
+ 174,
914
+ 869,
915
+ 553,
916
+ 883
917
+ ],
918
+ "page_idx": 6
919
+ },
920
+ {
921
+ "type": "text",
922
+ "text": "We demonstrate Edward’s flexibility for experimenting with complex inference algorithms. We consider the VAE setup from Figure 2 and the binarized MNIST data set (Salakhutdinov & Murray, ",
923
+ "bbox": [
924
+ 174,
925
+ 895,
926
+ 825,
927
+ 924
928
+ ],
929
+ "page_idx": 6
930
+ },
931
+ {
932
+ "type": "table",
933
+ "img_path": "images/d6fc7365e4df6f8e06c71719225ce63dc5e43c6396f7f0640b001d5c14d3164e.jpg",
934
+ "table_caption": [],
935
+ "table_footnote": [],
936
+ "table_body": "<table><tr><td>Inference method</td><td>Negative log-likelihood</td></tr><tr><td>VAE (Kingma &amp; Welling, 2014)</td><td>≤88.2</td></tr><tr><td>VAE without analytic KL</td><td>≤89.4</td></tr><tr><td>VAE with analytic entropy</td><td>≤88.1</td></tr><tr><td>VAE with score function gradient</td><td>≤87.9</td></tr><tr><td>Normalizing flows (Rezende &amp; Mohamed, 2015)</td><td>≤85.8</td></tr><tr><td>Hierarchical variational model (Ranganath etal., 2O16b)</td><td>≤85.4</td></tr><tr><td>Importance-weighted auto-encoders (K = 5O) (Burda et al., 2016)</td><td>≤86.3</td></tr><tr><td>HVM with IWAE objective (K = 5)</td><td>≤85.2</td></tr><tr><td>Rényi divergence (α = -1) (Li&amp; Turner,2016)</td><td>≤140.5</td></tr></table>",
937
+ "bbox": [
938
+ 183,
939
+ 101,
940
+ 813,
941
+ 256
942
+ ],
943
+ "page_idx": 7
944
+ },
945
+ {
946
+ "type": "text",
947
+ "text": "Table 1: Inference methods for a probabilistic decoder on binarized MNIST. The Edward PPL is a convenient research platform, making it easy to both develop and experiment with many algorithms. ",
948
+ "bbox": [
949
+ 174,
950
+ 265,
951
+ 823,
952
+ 295
953
+ ],
954
+ "page_idx": 7
955
+ },
956
+ {
957
+ "type": "text",
958
+ "text": "2008). We use $d = 5 0$ latent variables per data point and optimize using ADAM. We study different components of the VAE setup using different methods; Appendix C.1 is a complete script. After training we evaluate held-out log likelihoods, which are lower bounds on the true value. ",
959
+ "bbox": [
960
+ 174,
961
+ 320,
962
+ 825,
963
+ 363
964
+ ],
965
+ "page_idx": 7
966
+ },
967
+ {
968
+ "type": "text",
969
+ "text": "Table 1 shows the results. The first method uses the VAE from Figure 2. The next three methods use the same VAE but apply different gradient estimators: reparameterization gradient without an analytic KL; reparameterization gradient with an analytic entropy; and the score function gradient (Paisley et al., 2012; Ranganath et al., 2014). This typically leads to the same optima but at different convergence rates. The score function gradient was slowest. Gradients with an analytic entropy produced difficulties around convergence: we switched to stochastic estimates of the entropy as it approached an optima. We also use hierarchical variational models (HVMs) (Ranganath et al., 2016b) with a normalizing flow prior; it produced similar results as a normalizing flow on the latent variable space (Rezende & Mohamed, 2015), and better than importance-weighted auto-encoders (IWAEs) (Burda et al., 2016). ",
970
+ "bbox": [
971
+ 173,
972
+ 369,
973
+ 825,
974
+ 508
975
+ ],
976
+ "page_idx": 7
977
+ },
978
+ {
979
+ "type": "text",
980
+ "text": "We also study novel combinations, such as HVMs with the IWAE objective, GAN-based optimization on the decoder (with pixel intensity-valued data), and Rényi divergence on the decoder. GAN-based optimization does not enable calculation of the log-likelihood; Rényi divergence does not directly optimize for log-likelihood so it does not perform well. The key point is that Edward is a convenient research platform: they are all easy modifications of a given script. ",
981
+ "bbox": [
982
+ 174,
983
+ 516,
984
+ 825,
985
+ 585
986
+ ],
987
+ "page_idx": 7
988
+ },
989
+ {
990
+ "type": "text",
991
+ "text": "5.2 GPU-ACCELERATED HAMILTONIAN MONTE CARLO ",
992
+ "text_level": 1,
993
+ "bbox": [
994
+ 173,
995
+ 603,
996
+ 576,
997
+ 617
998
+ ],
999
+ "page_idx": 7
1000
+ },
1001
+ {
1002
+ "type": "image",
1003
+ "img_path": "images/77737bcf0e344c4192296f407414d205a868b38834a0658ea6d57e90590124ca.jpg",
1004
+ "image_caption": [
1005
+ "Figure 9: Edward program for Bayesian logistic regression with Hamiltonian Monte Carlo (HMC). "
1006
+ ],
1007
+ "image_footnote": [],
1008
+ "bbox": [
1009
+ 199,
1010
+ 631,
1011
+ 754,
1012
+ 726
1013
+ ],
1014
+ "page_idx": 7
1015
+ },
1016
+ {
1017
+ "type": "text",
1018
+ "text": "We benchmark runtimes for a fixed number of Hamiltonian Monte Carlo (HMC; Neal, 2011) iterations on modern hardware: a 12-core Intel i7-5930K CPU at 3.50GHz and an NVIDIA Titan X (Maxwell) GPU. We apply logistic regression on the Covertype dataset $N = 5 8 1 0 1 2$ , $D = 5 4$ ; responses were binarized) using Edward, Stan (with PyStan) (Carpenter et al., 2016), and PyMC3 (Salvatier et al., 2015). We ran $1 0 0 ~ \\mathrm { H M C }$ iterations, with 10 leapfrog updates per iteration, a step size of $0 . 5 / N$ , and single precision. Figure 9 illustrates the program in Edward. ",
1019
+ "bbox": [
1020
+ 174,
1021
+ 768,
1022
+ 825,
1023
+ 852
1024
+ ],
1025
+ "page_idx": 7
1026
+ },
1027
+ {
1028
+ "type": "text",
1029
+ "text": "Table 2 displays the runtimes.3 Edward (GPU) features a dramatic $3 5 \\mathrm { x }$ speedup over Stan (1 CPU) and 6x speedup over PyMC3 (12 CPU). This showcases the value of building a PPL on top of computational graphs. The speedup stems from fast matrix multiplication when calculating the model’s log-likelihood; GPUs can efficiently parallelize this computation. We expect similar speedups for models whose bottleneck is also matrix multiplication, such as deep neural networks. ",
1030
+ "bbox": [
1031
+ 173,
1032
+ 858,
1033
+ 820,
1034
+ 887
1035
+ ],
1036
+ "page_idx": 7
1037
+ },
1038
+ {
1039
+ "type": "table",
1040
+ "img_path": "images/4d3f44ddfbd2ea60f0f0a4fdfd9d4fa5770636e7c21ec6f4296f8fed6fcb73f8.jpg",
1041
+ "table_caption": [
1042
+ "Table 2: HMC benchmark for large-scale logistic regression. Edward (GPU) is significantly faster than other systems. In addition, Edward has no overhead: it is as fast as handwritten TensorFlow. "
1043
+ ],
1044
+ "table_footnote": [],
1045
+ "table_body": "<table><tr><td>Probabilistic programming system</td><td>Runtime (s)</td></tr><tr><td>Handwritten NumPy (1 CPU)</td><td>534</td></tr><tr><td>Stan (1 CPU) (Carpenter et al., 2016)</td><td>171</td></tr><tr><td>PyMC3 (12 CPU) (Salvatier et al., 2015)</td><td>30.0</td></tr><tr><td>Edward (12 CPU)</td><td>8.2</td></tr><tr><td>Handwritten TensorFlow (GPU)</td><td>5.0</td></tr><tr><td>Edward (GPU)</td><td>4.9</td></tr></table>",
1046
+ "bbox": [
1047
+ 305,
1048
+ 101,
1049
+ 692,
1050
+ 214
1051
+ ],
1052
+ "page_idx": 8
1053
+ },
1054
+ {
1055
+ "type": "text",
1056
+ "text": "",
1057
+ "bbox": [
1058
+ 174,
1059
+ 281,
1060
+ 825,
1061
+ 323
1062
+ ],
1063
+ "page_idx": 8
1064
+ },
1065
+ {
1066
+ "type": "text",
1067
+ "text": "There are various reasons for the speedup. Stan only used 1 CPU as it leverages multiple cores by running HMC chains in parallel. Stan also used double-precision floating point as it does not allow single-precision. For PyMC3, we note Edward’s speedup is not a result of PyMC3’s Theano backend compared to Edward’s TensorFlow. Rather, PyMC3 does not use Theano for all its computation, so it experiences communication overhead with NumPy. (PyMC3 was actually slower when using the GPU.) We predict that porting Edward’s design to Theano would feature similar speedups. ",
1068
+ "bbox": [
1069
+ 174,
1070
+ 329,
1071
+ 825,
1072
+ 414
1073
+ ],
1074
+ "page_idx": 8
1075
+ },
1076
+ {
1077
+ "type": "text",
1078
+ "text": "In addition to these speedups, we highlight that Edward has no runtime overhead: it is as fast as handwritten TensorFlow. Following Section 4.1, this is because the computational graphs for inference are in fact the same for Edward and the handwritten code. ",
1079
+ "bbox": [
1080
+ 174,
1081
+ 420,
1082
+ 825,
1083
+ 462
1084
+ ],
1085
+ "page_idx": 8
1086
+ },
1087
+ {
1088
+ "type": "text",
1089
+ "text": "5.3 PROBABILITY ZOO ",
1090
+ "text_level": 1,
1091
+ "bbox": [
1092
+ 176,
1093
+ 481,
1094
+ 346,
1095
+ 494
1096
+ ],
1097
+ "page_idx": 8
1098
+ },
1099
+ {
1100
+ "type": "text",
1101
+ "text": "In addition to Edward, we also release the Probability Zoo, a community repository for pre-trained probability models and their posteriors.4 It is inspired by the model zoo in Caffe (Jia et al., 2014), which provides many pre-trained discriminative neural networks, and which has been key to making large-scale deep learning more transparent and accessible. It is also inspired by Forest (Stuhlmüller, 2012), which provides examples of probabilistic programs. ",
1102
+ "bbox": [
1103
+ 174,
1104
+ 507,
1105
+ 825,
1106
+ 577
1107
+ ],
1108
+ "page_idx": 8
1109
+ },
1110
+ {
1111
+ "type": "text",
1112
+ "text": "6 DISCUSSION: CHALLENGES & EXTENSIONS ",
1113
+ "text_level": 1,
1114
+ "bbox": [
1115
+ 174,
1116
+ 598,
1117
+ 573,
1118
+ 614
1119
+ ],
1120
+ "page_idx": 8
1121
+ },
1122
+ {
1123
+ "type": "text",
1124
+ "text": "We described Edward, a Turing-complete PPL with compositional representations for probabilistic models and inference. Edward expands the scope of probabilistic programming to be as flexible and computationally efficient as traditional deep learning. For flexibility, we showed how Edward can use a variety of composable inference methods, capture recent advances in variational inference and generative adversarial networks, and finely control the inference algorithms. For efficiency, we showed how Edward leverages computational graphs to achieve fast, parallelizable computation, scales to massive data, and incurs no runtime overhead over handwritten code. ",
1125
+ "bbox": [
1126
+ 174,
1127
+ 631,
1128
+ 825,
1129
+ 728
1130
+ ],
1131
+ "page_idx": 8
1132
+ },
1133
+ {
1134
+ "type": "text",
1135
+ "text": "In present work, we are applying Edward as a research platform for developing new probabilistic models (Rudolph et al., 2016; Tran et al., 2017) and new inference algorithms (Dieng et al., 2016). As with any language design, Edward makes tradeoffs in pursuit of its flexibility and speed for research. For example, an open challenge in Edward is to better facilitate programs with complex control flow and recursion. While possible to represent, it is unknown how to enable their flexible inference strategies. In addition, it is open how to expand Edward’s design to dynamic computational graph frameworks—which provide more flexibility in their programming paradigm—but may sacrifice performance. A crucial next step for probabilistic programming is to leverage dynamic computational graphs while maintaining the flexibility and efficiency that Edward offers. ",
1136
+ "bbox": [
1137
+ 174,
1138
+ 734,
1139
+ 825,
1140
+ 861
1141
+ ],
1142
+ "page_idx": 8
1143
+ },
1144
+ {
1145
+ "type": "text",
1146
+ "text": "ACKNOWLEDGEMENTS ",
1147
+ "text_level": 1,
1148
+ "bbox": [
1149
+ 176,
1150
+ 104,
1151
+ 334,
1152
+ 117
1153
+ ],
1154
+ "page_idx": 9
1155
+ },
1156
+ {
1157
+ "type": "text",
1158
+ "text": "We thank the probabilistic programming community—for sharing our enthusiasm and motivating further work—including developers of Church, Venture, Gamalon, Hakaru, and WebPPL. We also thank Stan developers for providing extensive feedback as we developed the language, as well as Thomas Wiecki for experimental details. We thank the Google BayesFlow team—Joshua Dillon, Ian Langmore, Ryan Sepassi, and Srinivas Vasudevan—as well as Amr Ahmed, Matthew Johnson, Hung Bui, Rajesh Ranganath, Maja Rudolph, and Francisco Ruiz for their helpful feedback. This work is supported by NSF IIS-1247664, ONR N00014-11-1-0651, DARPA FA8750-14-2-0009, DARPA N66001-15-C-4032, Adobe, Google, NSERC PGS-D, and the Sloan Foundation. ",
1159
+ "bbox": [
1160
+ 174,
1161
+ 127,
1162
+ 825,
1163
+ 238
1164
+ ],
1165
+ "page_idx": 9
1166
+ },
1167
+ {
1168
+ "type": "text",
1169
+ "text": "REFERENCES ",
1170
+ "text_level": 1,
1171
+ "bbox": [
1172
+ 174,
1173
+ 261,
1174
+ 285,
1175
+ 275
1176
+ ],
1177
+ "page_idx": 9
1178
+ },
1179
+ {
1180
+ "type": "text",
1181
+ "text": "Martín Abadi, Paul Barham, Jianmin Chen, Zhifeng Chen, Andy Davis, Jeffrey Dean, Matthieu Devin, Sanjay Ghemawat, Geoffrey Irving, Michael Isard, Manjunath Kudlur, Josh Levenberg, Rajat Monga, Sherry Moore, Derek G Murray, Benoit Steiner, Paul Tucker, Vijay Vasudevan, Pete Warden, Martin Wicke, Yuan Yu, and Xiaoqiang Zhang. TensorFlow: A system for largescale machine learning. arXiv preprint arXiv:1605.08695, 2016. ",
1182
+ "bbox": [
1183
+ 174,
1184
+ 282,
1185
+ 825,
1186
+ 353
1187
+ ],
1188
+ "page_idx": 9
1189
+ },
1190
+ {
1191
+ "type": "text",
1192
+ "text": "Christophe Andrieu and Gareth O Roberts. The pseudo-marginal approach for efficient Monte Carlo computations. The Annals of Statistics, pp. 697–725, 2009. ",
1193
+ "bbox": [
1194
+ 174,
1195
+ 359,
1196
+ 821,
1197
+ 388
1198
+ ],
1199
+ "page_idx": 9
1200
+ },
1201
+ {
1202
+ "type": "text",
1203
+ "text": "John Binder, Kevin Murphy, and Stuart Russell. Space-efficient inference in dynamic probabilistic networks. In International Joint Conference on Artificial Intelligence, 1997. ",
1204
+ "bbox": [
1205
+ 174,
1206
+ 395,
1207
+ 821,
1208
+ 424
1209
+ ],
1210
+ "page_idx": 9
1211
+ },
1212
+ {
1213
+ "type": "text",
1214
+ "text": "Christopher M. Bishop. Pattern Recognition and Machine Learning. Springer, 2006. ",
1215
+ "bbox": [
1216
+ 176,
1217
+ 429,
1218
+ 732,
1219
+ 445
1220
+ ],
1221
+ "page_idx": 9
1222
+ },
1223
+ {
1224
+ "type": "text",
1225
+ "text": "David M Blei, Andrew $\\mathrm { Y } \\mathrm { N g }$ , and Michael I Jordan. Latent Dirichlet Allocation. Journal of Machine Learning Research, 3:993–1022, 2003. ",
1226
+ "bbox": [
1227
+ 176,
1228
+ 452,
1229
+ 823,
1230
+ 479
1231
+ ],
1232
+ "page_idx": 9
1233
+ },
1234
+ {
1235
+ "type": "text",
1236
+ "text": "Léon Bottou. Large-scale machine learning with stochastic gradient descent. In Proceedings of COMPSTAT’2010, pp. 177–186. Springer, 2010. ",
1237
+ "bbox": [
1238
+ 174,
1239
+ 486,
1240
+ 823,
1241
+ 515
1242
+ ],
1243
+ "page_idx": 9
1244
+ },
1245
+ {
1246
+ "type": "text",
1247
+ "text": "Tamara Broderick, Nicholas Boyd, Andre Wibisono, Ashia C Wilson, and Michael I Jordan. Streaming Variational Bayes. In Neural Information Processing Systems, 2013. ",
1248
+ "bbox": [
1249
+ 174,
1250
+ 521,
1251
+ 820,
1252
+ 550
1253
+ ],
1254
+ "page_idx": 9
1255
+ },
1256
+ {
1257
+ "type": "text",
1258
+ "text": "Yuri Burda, Roger Grosse, and Ruslan Salakhutdinov. Importance weighted autoencoders. In International Conference on Learning Representations, 2016. ",
1259
+ "bbox": [
1260
+ 174,
1261
+ 556,
1262
+ 820,
1263
+ 585
1264
+ ],
1265
+ "page_idx": 9
1266
+ },
1267
+ {
1268
+ "type": "text",
1269
+ "text": "Bob Carpenter, Andrew Gelman, Matthew D Hoffman, Daniel Lee, Ben Goodrich, Michael Betancourt, Marcus Brubaker, Jiqiang Guo, Peter Li, and Allen Riddell. Stan: A probabilistic programming language. Journal of Statistical Software, 2016. ",
1270
+ "bbox": [
1271
+ 178,
1272
+ 592,
1273
+ 821,
1274
+ 635
1275
+ ],
1276
+ "page_idx": 9
1277
+ },
1278
+ {
1279
+ "type": "text",
1280
+ "text": "François Chollet. Keras. https://github.com/fchollet/keras, 2015. ",
1281
+ "bbox": [
1282
+ 176,
1283
+ 641,
1284
+ 710,
1285
+ 656
1286
+ ],
1287
+ "page_idx": 9
1288
+ },
1289
+ {
1290
+ "type": "text",
1291
+ "text": "David E Culler. Dataflow architectures. Technical report, DTIC Document, 1986. ",
1292
+ "bbox": [
1293
+ 173,
1294
+ 662,
1295
+ 709,
1296
+ 676
1297
+ ],
1298
+ "page_idx": 9
1299
+ },
1300
+ {
1301
+ "type": "text",
1302
+ "text": "Peter Dayan, Geoffrey E Hinton, Radford M Neal, and Richard S Zemel. The Helmholtz machine Neural computation, 7(5):889–904, 1995. ",
1303
+ "bbox": [
1304
+ 174,
1305
+ 684,
1306
+ 816,
1307
+ 712
1308
+ ],
1309
+ "page_idx": 9
1310
+ },
1311
+ {
1312
+ "type": "text",
1313
+ "text": "Emily L Denton, Soumith Chintala, Rob Fergus, et al. Deep generative image models using a Laplacian pyramid of adversarial networks. In Neural Information Processing Systems, 2015. ",
1314
+ "bbox": [
1315
+ 173,
1316
+ 719,
1317
+ 823,
1318
+ 748
1319
+ ],
1320
+ "page_idx": 9
1321
+ },
1322
+ {
1323
+ "type": "text",
1324
+ "text": "Adji B. Dieng, Dustin Tran, Rajesh Ranganath, John Paisley, and David M. Blei. $\\chi$ -divergence for approximate inference. In arXiv preprint arXiv:1611.00328, 2016. ",
1325
+ "bbox": [
1326
+ 173,
1327
+ 753,
1328
+ 821,
1329
+ 784
1330
+ ],
1331
+ "page_idx": 9
1332
+ },
1333
+ {
1334
+ "type": "text",
1335
+ "text": "Arnaud Doucet, Simon Godsill, and Christophe Andrieu. On sequential Monte Carlo sampling methods for Bayesian filtering. Statistics and Computing, 10(3):197–208, 2000. ",
1336
+ "bbox": [
1337
+ 174,
1338
+ 789,
1339
+ 821,
1340
+ 819
1341
+ ],
1342
+ "page_idx": 9
1343
+ },
1344
+ {
1345
+ "type": "text",
1346
+ "text": "Arnaud Doucet, Nando De Freitas, and Neil Gordon. An introduction to sequential monte carlo methods. In Sequential Monte Carlo methods in practice, pp. 3–14. Springer, 2001. ",
1347
+ "bbox": [
1348
+ 174,
1349
+ 824,
1350
+ 823,
1351
+ 853
1352
+ ],
1353
+ "page_idx": 9
1354
+ },
1355
+ {
1356
+ "type": "text",
1357
+ "text": "Nicholas Foti, Jason Xu, Dillon Laird, and Emily Fox. Stochastic variational inference for hidden Markov models. In Neural Information Processing Systems, 2014. ",
1358
+ "bbox": [
1359
+ 174,
1360
+ 859,
1361
+ 821,
1362
+ 888
1363
+ ],
1364
+ "page_idx": 9
1365
+ },
1366
+ {
1367
+ "type": "text",
1368
+ "text": "Alan E Gelfand and Adrian FM Smith. Sampling-based approaches to calculating marginal densities. Journal of the American statistical association, 85(410):398–409, 1990. ",
1369
+ "bbox": [
1370
+ 173,
1371
+ 895,
1372
+ 820,
1373
+ 924
1374
+ ],
1375
+ "page_idx": 9
1376
+ },
1377
+ {
1378
+ "type": "text",
1379
+ "text": "Zoubin Ghahramani. Probabilistic machine learning and artificial intelligence. Nature, 521(7553): 452–459, 2015. ",
1380
+ "bbox": [
1381
+ 171,
1382
+ 103,
1383
+ 823,
1384
+ 132
1385
+ ],
1386
+ "page_idx": 10
1387
+ },
1388
+ {
1389
+ "type": "text",
1390
+ "text": "Ian Goodfellow, Jean Pouget-Abadie, M Mirza, Bing Xu, David Warde-Farley, Sherjil Ozair, Aaron Courville, and Yoshua Bengio. Generative adversarial nets. In Neural Information Processing Systems, 2014. ",
1391
+ "bbox": [
1392
+ 178,
1393
+ 138,
1394
+ 823,
1395
+ 181
1396
+ ],
1397
+ "page_idx": 10
1398
+ },
1399
+ {
1400
+ "type": "text",
1401
+ "text": "Noah Goodman, Vikash Mansinghka, Daniel M Roy, Keith Bonawitz, and Joshua B Tenenbaum. Church: A language for generative models. In Uncertainty in Artificial Intelligence, 2012. ",
1402
+ "bbox": [
1403
+ 173,
1404
+ 188,
1405
+ 821,
1406
+ 218
1407
+ ],
1408
+ "page_idx": 10
1409
+ },
1410
+ {
1411
+ "type": "text",
1412
+ "text": "Karol Gregor, Ivo Danihelka, Alex Graves, Danilo J Rezende, and Daan Wierstra. DRAW: A recurrent neural network for image generation. In International Conference on Machine Learning, 2015. ",
1413
+ "bbox": [
1414
+ 174,
1415
+ 224,
1416
+ 823,
1417
+ 266
1418
+ ],
1419
+ "page_idx": 10
1420
+ },
1421
+ {
1422
+ "type": "text",
1423
+ "text": "M Gutmann and A Hyvärinen. Noise-contrastive estimation: A new estimation principle for unnormalized statistical models. Artificial Intelligence and Statistics, 2010. ",
1424
+ "bbox": [
1425
+ 173,
1426
+ 273,
1427
+ 823,
1428
+ 303
1429
+ ],
1430
+ "page_idx": 10
1431
+ },
1432
+ {
1433
+ "type": "text",
1434
+ "text": "Geoffrey E Hinton. Training products of experts by minimizing contrastive divergence. Neural computation, 14(8):1771–1800, 2002. ",
1435
+ "bbox": [
1436
+ 174,
1437
+ 309,
1438
+ 823,
1439
+ 338
1440
+ ],
1441
+ "page_idx": 10
1442
+ },
1443
+ {
1444
+ "type": "text",
1445
+ "text": "Geoffrey E Hinton, Simon Osindero, and Yee-Whye Teh. A fast learning algorithm for deep belief nets. Neural computation, 18(7):1527–1554, 2006. ",
1446
+ "bbox": [
1447
+ 173,
1448
+ 345,
1449
+ 821,
1450
+ 375
1451
+ ],
1452
+ "page_idx": 10
1453
+ },
1454
+ {
1455
+ "type": "text",
1456
+ "text": "Matthew Hoffman and David M. Blei. Structured stochastic variational inference. In Artificial Intelligence and Statistics, 2015. ",
1457
+ "bbox": [
1458
+ 171,
1459
+ 381,
1460
+ 823,
1461
+ 410
1462
+ ],
1463
+ "page_idx": 10
1464
+ },
1465
+ {
1466
+ "type": "text",
1467
+ "text": "Matthew D Hoffman, David M Blei, Chong Wang, and John Paisley. Stochastic variational inference. The Journal of Machine Learning Research, 14(1):1303–1347, 2013. ",
1468
+ "bbox": [
1469
+ 171,
1470
+ 416,
1471
+ 821,
1472
+ 445
1473
+ ],
1474
+ "page_idx": 10
1475
+ },
1476
+ {
1477
+ "type": "text",
1478
+ "text": "Yangqing Jia, Evan Shelhamer, Jeff Donahue, Sergey Karayev, Jonathan Long, Ross Girshick, Sergio Guadarrama, and Trevor Darrell. Caffe: Convolutional architecture for fast feature embedding. arXiv preprint arXiv:1408.5093, 2014. ",
1479
+ "bbox": [
1480
+ 176,
1481
+ 452,
1482
+ 820,
1483
+ 496
1484
+ ],
1485
+ "page_idx": 10
1486
+ },
1487
+ {
1488
+ "type": "text",
1489
+ "text": "Matthew Johnson and Alan S Willsky. Stochastic variational inference for Bayesian time series models. In International Conference on Machine Learning, 2014. ",
1490
+ "bbox": [
1491
+ 173,
1492
+ 501,
1493
+ 823,
1494
+ 531
1495
+ ],
1496
+ "page_idx": 10
1497
+ },
1498
+ {
1499
+ "type": "text",
1500
+ "text": "M. I. Jordan, Z. Ghahramani, T. S. Jaakkola, and L. K. Saul. An introduction to variational methods for graphical models. Machine Learning, 37(2):183–233, 1999. ",
1501
+ "bbox": [
1502
+ 174,
1503
+ 537,
1504
+ 821,
1505
+ 566
1506
+ ],
1507
+ "page_idx": 10
1508
+ },
1509
+ {
1510
+ "type": "text",
1511
+ "text": "Diederik P Kingma and Max Welling. Auto-encoding variational Bayes. In International Conference on Learning Representations, 2014. ",
1512
+ "bbox": [
1513
+ 174,
1514
+ 573,
1515
+ 823,
1516
+ 603
1517
+ ],
1518
+ "page_idx": 10
1519
+ },
1520
+ {
1521
+ "type": "text",
1522
+ "text": "Diederik P Kingma, Shakir Mohamed, Danilo Jimenez Rezende, and Max Welling. Semi-supervised learning with deep generative models. In Neural Information Processing Systems, 2014. ",
1523
+ "bbox": [
1524
+ 174,
1525
+ 608,
1526
+ 821,
1527
+ 638
1528
+ ],
1529
+ "page_idx": 10
1530
+ },
1531
+ {
1532
+ "type": "text",
1533
+ "text": "Diederik P Kingma, Tim Salimans, and Max Welling. Improving variational inference with inverse autoregressive flow. In Neural Information Processing Systems, 2016. ",
1534
+ "bbox": [
1535
+ 174,
1536
+ 645,
1537
+ 821,
1538
+ 674
1539
+ ],
1540
+ "page_idx": 10
1541
+ },
1542
+ {
1543
+ "type": "text",
1544
+ "text": "Oleg Kiselyov and Chung-Chieh Shan. Embedded probabilistic programming. In Domain-Specific Languages, pp. 360–384. Springer, 2009. ",
1545
+ "bbox": [
1546
+ 176,
1547
+ 680,
1548
+ 823,
1549
+ 710
1550
+ ],
1551
+ "page_idx": 10
1552
+ },
1553
+ {
1554
+ "type": "text",
1555
+ "text": "Daphne Koller and Nir Friedman. Probabilistic Graphical Models: Principles and Techniques. MIT press, 2009. ",
1556
+ "bbox": [
1557
+ 174,
1558
+ 715,
1559
+ 823,
1560
+ 746
1561
+ ],
1562
+ "page_idx": 10
1563
+ },
1564
+ {
1565
+ "type": "text",
1566
+ "text": "Brenden M Lake, Tomer D Ullman, Joshua B Tenenbaum, and Samuel J Gershman. Building machines that learn and think like people. arXiv preprint arXiv:1604.00289, 2016. ",
1567
+ "bbox": [
1568
+ 171,
1569
+ 752,
1570
+ 823,
1571
+ 781
1572
+ ],
1573
+ "page_idx": 10
1574
+ },
1575
+ {
1576
+ "type": "text",
1577
+ "text": "Yingzhen Li and Richard E Turner. Variational inference with Rényi divergence. In Neural Information Processing Systems, 2016. ",
1578
+ "bbox": [
1579
+ 174,
1580
+ 787,
1581
+ 823,
1582
+ 818
1583
+ ],
1584
+ "page_idx": 10
1585
+ },
1586
+ {
1587
+ "type": "text",
1588
+ "text": "Yujia Li, Kevin Swersky, and Richard Zemel. Generative moment matching networks. In International Conference on Machine Learning, 2015. ",
1589
+ "bbox": [
1590
+ 174,
1591
+ 823,
1592
+ 821,
1593
+ 853
1594
+ ],
1595
+ "page_idx": 10
1596
+ },
1597
+ {
1598
+ "type": "text",
1599
+ "text": "V Mansinghka, D Selsam, and Y Perov. Venture: A higher-order probabilistic programming platform with programmable inference. arXiv.org, 2014. ",
1600
+ "bbox": [
1601
+ 176,
1602
+ 859,
1603
+ 821,
1604
+ 888
1605
+ ],
1606
+ "page_idx": 10
1607
+ },
1608
+ {
1609
+ "type": "text",
1610
+ "text": "James McInerney, Rajesh Ranganath, and David M Blei. The Population Posterior and Bayesian Inference on Streams. In Neural Information Processing Systems, 2015. ",
1611
+ "bbox": [
1612
+ 174,
1613
+ 895,
1614
+ 821,
1615
+ 924
1616
+ ],
1617
+ "page_idx": 10
1618
+ },
1619
+ {
1620
+ "type": "text",
1621
+ "text": "Brian Milch, Bhaskara Marthi, Stuart Russell, David Sontag, Daniel L Ong, and Andrey Kolobov. Blog. In International Joint Conference on Artificial Intelligence, 2005. ",
1622
+ "bbox": [
1623
+ 173,
1624
+ 103,
1625
+ 823,
1626
+ 132
1627
+ ],
1628
+ "page_idx": 11
1629
+ },
1630
+ {
1631
+ "type": "text",
1632
+ "text": "T. Minka, J.M. Winn, J.P. Guiver, S. Webster, Y. Zaykov, B. Yangel, A. Spengler, and J. Bronskill. Infer.NET 2.6, 2014. Microsoft Research Cambridge. http://research.microsoft.com/infernet. ",
1633
+ "bbox": [
1634
+ 174,
1635
+ 138,
1636
+ 821,
1637
+ 169
1638
+ ],
1639
+ "page_idx": 11
1640
+ },
1641
+ {
1642
+ "type": "text",
1643
+ "text": "Thomas P Minka. Expectation propagation for approximate Bayesian inference. In Uncertainty in Artificial Intelligence, 2001. ",
1644
+ "bbox": [
1645
+ 173,
1646
+ 174,
1647
+ 823,
1648
+ 204
1649
+ ],
1650
+ "page_idx": 11
1651
+ },
1652
+ {
1653
+ "type": "text",
1654
+ "text": "Kevin Murphy. The Bayes net toolbox for Matlab. Computing Science and Statistics, 33(2):1024– 1034, 2001. ",
1655
+ "bbox": [
1656
+ 173,
1657
+ 209,
1658
+ 823,
1659
+ 239
1660
+ ],
1661
+ "page_idx": 11
1662
+ },
1663
+ {
1664
+ "type": "text",
1665
+ "text": "Radford M Neal. MCMC using Hamiltonian dynamics. Handbook of Markov Chain Monte Carlo, 2011. ",
1666
+ "bbox": [
1667
+ 173,
1668
+ 246,
1669
+ 823,
1670
+ 275
1671
+ ],
1672
+ "page_idx": 11
1673
+ },
1674
+ {
1675
+ "type": "text",
1676
+ "text": "Radford M. Neal and Geoffrey E. Hinton. A new view of the EM algorithm that justifies incremental and other variants. In Learning in Graphical Models, pp. 355–368. Kluwer Academic Publishers, 1993. ",
1677
+ "bbox": [
1678
+ 173,
1679
+ 281,
1680
+ 823,
1681
+ 324
1682
+ ],
1683
+ "page_idx": 11
1684
+ },
1685
+ {
1686
+ "type": "text",
1687
+ "text": "John Paisley, David M. Blei, and Michael Jordan. Variational Bayesian inference with stochastic search. In International Conference on Machine Learning, 2012. ",
1688
+ "bbox": [
1689
+ 174,
1690
+ 330,
1691
+ 820,
1692
+ 361
1693
+ ],
1694
+ "page_idx": 11
1695
+ },
1696
+ {
1697
+ "type": "text",
1698
+ "text": "Avi Pfeffer. IBAL: A probabilistic rational programming language. In International Joint Conference on Artificial Intelligence, pp. 733–740. Citeseer, 2001. ",
1699
+ "bbox": [
1700
+ 171,
1701
+ 367,
1702
+ 823,
1703
+ 396
1704
+ ],
1705
+ "page_idx": 11
1706
+ },
1707
+ {
1708
+ "type": "text",
1709
+ "text": "Avi Pfeffer. Figaro: An object-oriented probabilistic programming language. Charles River Analytics Technical Report, 137, 2009. ",
1710
+ "bbox": [
1711
+ 171,
1712
+ 401,
1713
+ 821,
1714
+ 431
1715
+ ],
1716
+ "page_idx": 11
1717
+ },
1718
+ {
1719
+ "type": "text",
1720
+ "text": "Martyn Plummer. JAGS: A program for analysis of Bayesian graphical models using Gibbs sampling. In International Workshop on Distributed Statistical Computing, 2003. ",
1721
+ "bbox": [
1722
+ 174,
1723
+ 438,
1724
+ 820,
1725
+ 468
1726
+ ],
1727
+ "page_idx": 11
1728
+ },
1729
+ {
1730
+ "type": "text",
1731
+ "text": "Rajesh Ranganath, Sean Gerrish, and David M. Blei. Black box variational inference. In Artificial Intelligence and Statistics, 2014. ",
1732
+ "bbox": [
1733
+ 173,
1734
+ 473,
1735
+ 823,
1736
+ 502
1737
+ ],
1738
+ "page_idx": 11
1739
+ },
1740
+ {
1741
+ "type": "text",
1742
+ "text": "Rajesh Ranganath, Jaan Altosaar, Dustin Tran, and David M. Blei. Operator variational inference. In Neural Information Processing Systems, 2016a. ",
1743
+ "bbox": [
1744
+ 173,
1745
+ 508,
1746
+ 823,
1747
+ 539
1748
+ ],
1749
+ "page_idx": 11
1750
+ },
1751
+ {
1752
+ "type": "text",
1753
+ "text": "Rajesh Ranganath, Dustin Tran, and David M Blei. Hierarchical variational models. In International Conference on Machine Learning, 2016b. ",
1754
+ "bbox": [
1755
+ 174,
1756
+ 545,
1757
+ 821,
1758
+ 574
1759
+ ],
1760
+ "page_idx": 11
1761
+ },
1762
+ {
1763
+ "type": "text",
1764
+ "text": "Danilo J Rezende and Shakir Mohamed. Variational inference with normalizing flows. In International Conference on Machine Learning, 2015. ",
1765
+ "bbox": [
1766
+ 171,
1767
+ 580,
1768
+ 823,
1769
+ 611
1770
+ ],
1771
+ "page_idx": 11
1772
+ },
1773
+ {
1774
+ "type": "text",
1775
+ "text": "Danilo J Rezende, Shakir Mohamed, and Daan Wierstra. Stochastic backpropagation and approximate inference in deep generative models. In International Conference on Machine Learning, 2014. ",
1776
+ "bbox": [
1777
+ 173,
1778
+ 616,
1779
+ 823,
1780
+ 659
1781
+ ],
1782
+ "page_idx": 11
1783
+ },
1784
+ {
1785
+ "type": "text",
1786
+ "text": "Danilo Jimenez Rezende, Shakir Mohamed, Ivo Danihelka, Karol Gregor, and Daan Wierstra. Oneshot generalization in deep generative models. In International Conference on Machine Learning, 2016. ",
1787
+ "bbox": [
1788
+ 176,
1789
+ 665,
1790
+ 823,
1791
+ 708
1792
+ ],
1793
+ "page_idx": 11
1794
+ },
1795
+ {
1796
+ "type": "text",
1797
+ "text": "Daniel Ritchie, Paul Horsfall, and Noah D Goodman. Deep amortized inference for probabilistic programs. arXiv preprint arXiv:1610.05735, 2016. ",
1798
+ "bbox": [
1799
+ 173,
1800
+ 715,
1801
+ 825,
1802
+ 744
1803
+ ],
1804
+ "page_idx": 11
1805
+ },
1806
+ {
1807
+ "type": "text",
1808
+ "text": "Christian P Robert and George Casella. Monte Carlo Statistical Methods. Springer, 1999. ",
1809
+ "bbox": [
1810
+ 171,
1811
+ 751,
1812
+ 766,
1813
+ 767
1814
+ ],
1815
+ "page_idx": 11
1816
+ },
1817
+ {
1818
+ "type": "text",
1819
+ "text": "Maja R Rudolph, Francisco J R Ruiz, Stephan Mandt, and David M Blei. Exponential family embeddings. In Neural Information Processing Systems, 2016. ",
1820
+ "bbox": [
1821
+ 173,
1822
+ 772,
1823
+ 823,
1824
+ 803
1825
+ ],
1826
+ "page_idx": 11
1827
+ },
1828
+ {
1829
+ "type": "text",
1830
+ "text": "Ruslan Salakhutdinov and Iain Murray. On the quantitative analysis of deep belief networks. In International Conference on Machine Learning, 2008. ",
1831
+ "bbox": [
1832
+ 173,
1833
+ 808,
1834
+ 821,
1835
+ 838
1836
+ ],
1837
+ "page_idx": 11
1838
+ },
1839
+ {
1840
+ "type": "text",
1841
+ "text": "John Salvatier, Thomas Wiecki, and Christopher Fonnesbeck. Probabilistic Programming in Python using PyMC. arXiv preprint arXiv:1507.08050, 2015. ",
1842
+ "bbox": [
1843
+ 173,
1844
+ 843,
1845
+ 821,
1846
+ 873
1847
+ ],
1848
+ "page_idx": 11
1849
+ },
1850
+ {
1851
+ "type": "text",
1852
+ "text": "Adam Scibior, Zoubin Ghahramani, and Andrew D Gordon. Practical probabilistic programming ´ with monads. In the 8th ACM SIGPLAN Symposium, pp. 165–176, New York, New York, USA, 2015. ACM Press. ",
1853
+ "bbox": [
1854
+ 174,
1855
+ 881,
1856
+ 825,
1857
+ 924
1858
+ ],
1859
+ "page_idx": 11
1860
+ },
1861
+ {
1862
+ "type": "text",
1863
+ "text": "David J Spiegelhalter, Andrew Thomas, Nicky G Best, and Wally R Gilks. BUGS: Bayesian inference using Gibbs sampling, version 0.50. MRC Biostatistics Unit, Cambridge, 1995. \nAndreas Stuhlmüller. Forest: A repository for generative models, 2012. URL http:// forestdb.org. \nDustin Tran, Alp Kucukelbir, Adji B. Dieng, Maja Rudolph, Dawen Liang, and David M. Blei. Edward: A library for probabilistic modeling, inference, and criticism. arXiv preprint arXiv:1610.09787, 2016a. \nDustin Tran, Rajesh Ranganath, and David M. Blei. The variational Gaussian process. In International Conference on Learning Representations, 2016b. \nDustin Tran, Rajesh Ranganath, and David M Blei. Deep and hierarchical implicit models. arXiv preprint arXiv:1702.08896, 2017. \nJean-Baptiste Tristan, Daniel Huang, Joseph Tassarotti, Adam C Pocock, Stephen Green, and Guy L Steele. Augur: Data-parallel probabilistic modeling. In Neural Information Processing Systems, 2014. \nChong Wang and David M Blei. Truncation-free online variational inference for Bayesian nonparametric models. In Neural Information Processing Systems, pp. 413–421, 2012. \nMax Welling and Yee Whye Teh. Bayesian learning via stochastic gradient Langevin dynamics. In International Conference on Machine Learning, 2011. \nFrank Wood, Jan Willem van de Meent, and Vikash Mansinghka. A new approach to probabilistic programming inference. In Artificial Intelligence and Statistics, 2014. \nYi Wu, Lei Li, Stuart Russell, and Rastislav Bodik. Swift: Compiled inference for probabilistic programming languages. arXiv preprint arXiv:1606.09242, 2016. \nRobert Zinkov and Chung-chieh Shan. Composing inference algorithms as program transformations. arXiv preprint arXiv:1603.01882, 2016. ",
1864
+ "bbox": [
1865
+ 169,
1866
+ 102,
1867
+ 826,
1868
+ 515
1869
+ ],
1870
+ "page_idx": 12
1871
+ },
1872
+ {
1873
+ "type": "image",
1874
+ "img_path": "images/1f9a5c95b89fa690dd8847410420418e081c99163a3bd4c1928add4be399c822.jpg",
1875
+ "image_caption": [
1876
+ "Figure 10: Bayesian neural network for classification. "
1877
+ ],
1878
+ "image_footnote": [],
1879
+ "bbox": [
1880
+ 397,
1881
+ 98,
1882
+ 598,
1883
+ 202
1884
+ ],
1885
+ "page_idx": 13
1886
+ },
1887
+ {
1888
+ "type": "text",
1889
+ "text": "1 W_0 $=$ Normal(mu=tf.zeros([D, H]), sigma=tf.ones([D, H])) \n2 W_1 $=$ Normal(mu=tf.zeros([H, 1]), sigma=tf.ones([H, 1])) \n3 b_0 $=$ Normal(mu=tf.zeros(H), sigma=tf.ones(H)) \n4 b_1 $=$ Normal(mu=tf.zeros(1), sigma=tf.ones(1)) \n5 \n6 $\\textrm { x } =$ tf.placeholder(tf.float32, [N, D]) \n7 $\\textrm { y } =$ Bernoulli(logits=tf.matmul(tf.nn.tanh(tf.matmul(x, W_0) + b_0), W_1) + b_1) ",
1890
+ "bbox": [
1891
+ 163,
1892
+ 208,
1893
+ 700,
1894
+ 282
1895
+ ],
1896
+ "page_idx": 13
1897
+ },
1898
+ {
1899
+ "type": "text",
1900
+ "text": "A MODEL EXAMPLES ",
1901
+ "text_level": 1,
1902
+ "bbox": [
1903
+ 176,
1904
+ 343,
1905
+ 372,
1906
+ 359
1907
+ ],
1908
+ "page_idx": 13
1909
+ },
1910
+ {
1911
+ "type": "text",
1912
+ "text": "There are many examples available at http://edwardlib.org, including models, inference methods, and complete scripts. Below we describe several model examples; Appendix B describes an inference example (stochastic variational inference); Appendix C describes complete scripts. All examples in this paper are comprehensive, only leaving out import statements and fixed values. See the companion webpage for this paper (http://edwardlib.org/iclr2017) for examples in a machine-readable format with runnable code. ",
1913
+ "bbox": [
1914
+ 173,
1915
+ 377,
1916
+ 825,
1917
+ 462
1918
+ ],
1919
+ "page_idx": 13
1920
+ },
1921
+ {
1922
+ "type": "text",
1923
+ "text": "A.1 BAYESIAN NEURAL NETWORK FOR CLASSIFICATION ",
1924
+ "bbox": [
1925
+ 173,
1926
+ 482,
1927
+ 586,
1928
+ 497
1929
+ ],
1930
+ "page_idx": 13
1931
+ },
1932
+ {
1933
+ "type": "text",
1934
+ "text": "A Bayesian neural network is a neural network with a prior distribution on its weights. ",
1935
+ "bbox": [
1936
+ 174,
1937
+ 508,
1938
+ 738,
1939
+ 525
1940
+ ],
1941
+ "page_idx": 13
1942
+ },
1943
+ {
1944
+ "type": "text",
1945
+ "text": "Define the likelihood of an observation $\\left( \\mathbf { x } _ { n } , y _ { n } \\right)$ with binary label $y _ { n } \\in \\{ 0 , 1 \\}$ as ",
1946
+ "bbox": [
1947
+ 174,
1948
+ 530,
1949
+ 705,
1950
+ 546
1951
+ ],
1952
+ "page_idx": 13
1953
+ },
1954
+ {
1955
+ "type": "equation",
1956
+ "img_path": "images/acf55de92de9eb142a440a982961e15be8094f729b738be9517740f4223b136d.jpg",
1957
+ "text": "$$\np ( y _ { n } \\mid \\mathbf { W } _ { 0 } , \\mathbf { b } _ { 0 } , \\mathbf { W } _ { 1 } , \\mathbf { b } _ { 1 } ; \\mathbf { x } _ { n } ) = \\operatorname { B e r n o u l l i } ( y _ { n } \\mid \\operatorname { N N } ( \\mathbf { x } _ { n } ; \\mathbf { W } _ { 0 } , \\mathbf { b } _ { 0 } , \\mathbf { W } _ { 1 } , \\mathbf { b } _ { 1 } ) ) ,\n$$",
1958
+ "text_format": "latex",
1959
+ "bbox": [
1960
+ 240,
1961
+ 555,
1962
+ 754,
1963
+ 573
1964
+ ],
1965
+ "page_idx": 13
1966
+ },
1967
+ {
1968
+ "type": "text",
1969
+ "text": "where NN is a 2-layer neural network whose weights and biases form the latent variables $\\mathbf { W } _ { 0 } , \\mathbf { b } _ { 0 } , \\mathbf { W } _ { 1 } , \\mathbf { b } _ { 1 }$ . Define the prior on the weights and biases to be the standard normal. See Figure 10. There are $N$ data points, $D$ features, and $H$ hidden units. ",
1970
+ "bbox": [
1971
+ 174,
1972
+ 582,
1973
+ 825,
1974
+ 625
1975
+ ],
1976
+ "page_idx": 13
1977
+ },
1978
+ {
1979
+ "type": "text",
1980
+ "text": "A.2 LATENT DIRICHLET ALLOCATION ",
1981
+ "text_level": 1,
1982
+ "bbox": [
1983
+ 176,
1984
+ 646,
1985
+ 454,
1986
+ 660
1987
+ ],
1988
+ "page_idx": 13
1989
+ },
1990
+ {
1991
+ "type": "text",
1992
+ "text": "See Figure 11. Note that the program is written for illustration. We recommend vectorization in practice: instead of storing scalar random variables in lists of lists, one should prefer to represent few random variables, each which have many dimensions. ",
1993
+ "bbox": [
1994
+ 174,
1995
+ 672,
1996
+ 825,
1997
+ 715
1998
+ ],
1999
+ "page_idx": 13
2000
+ },
2001
+ {
2002
+ "type": "image",
2003
+ "img_path": "images/2df841142a489bcb2eae8c5ef939033f74b58e6e19946744fcb7188e655b4c36.jpg",
2004
+ "image_caption": [
2005
+ "Figure 11: Latent Dirichlet allocation (Blei et al., 2003). "
2006
+ ],
2007
+ "image_footnote": [],
2008
+ "bbox": [
2009
+ 197,
2010
+ 738,
2011
+ 784,
2012
+ 877
2013
+ ],
2014
+ "page_idx": 13
2015
+ },
2016
+ {
2017
+ "type": "text",
2018
+ "text": "A.3 GAUSSIAN MATRIX FACTORIZATIONN ",
2019
+ "text_level": 1,
2020
+ "bbox": [
2021
+ 176,
2022
+ 103,
2023
+ 482,
2024
+ 118
2025
+ ],
2026
+ "page_idx": 14
2027
+ },
2028
+ {
2029
+ "type": "text",
2030
+ "text": "See Figure 12. ",
2031
+ "text_level": 1,
2032
+ "bbox": [
2033
+ 174,
2034
+ 131,
2035
+ 269,
2036
+ 145
2037
+ ],
2038
+ "page_idx": 14
2039
+ },
2040
+ {
2041
+ "type": "image",
2042
+ "img_path": "images/8528ea4eb39870132d285ca7536d210157adc55341c3529dfd678b643158a318.jpg",
2043
+ "image_caption": [
2044
+ "Figure 12: Gaussian matrix factorization. "
2045
+ ],
2046
+ "image_footnote": [],
2047
+ "bbox": [
2048
+ 192,
2049
+ 161,
2050
+ 844,
2051
+ 268
2052
+ ],
2053
+ "page_idx": 14
2054
+ },
2055
+ {
2056
+ "type": "text",
2057
+ "text": "A.4 DIRICHLET PROCESS MIXTURE MODEL ",
2058
+ "text_level": 1,
2059
+ "bbox": [
2060
+ 176,
2061
+ 327,
2062
+ 493,
2063
+ 342
2064
+ ],
2065
+ "page_idx": 14
2066
+ },
2067
+ {
2068
+ "type": "text",
2069
+ "text": "See Figure 13. ",
2070
+ "text_level": 1,
2071
+ "bbox": [
2072
+ 173,
2073
+ 354,
2074
+ 269,
2075
+ 369
2076
+ ],
2077
+ "page_idx": 14
2078
+ },
2079
+ {
2080
+ "type": "text",
2081
+ "text": "A Dirichlet process mixture model is written as follows: ",
2082
+ "bbox": [
2083
+ 173,
2084
+ 383,
2085
+ 542,
2086
+ 398
2087
+ ],
2088
+ "page_idx": 14
2089
+ },
2090
+ {
2091
+ "type": "text",
2092
+ "text": "1 mu $=$ DirichletProcess(alpha $\\mathord { \\mathrm { 1 2 0 . 1 } }$ , base_cls=Normal, mu=tf.zeros(D), sigma=tf.ones(D), sample_n=N) \n2 $\\textrm { x } =$ Normal(mu=mu, sigma=tf.ones([N, D])) ",
2093
+ "bbox": [
2094
+ 165,
2095
+ 405,
2096
+ 803,
2097
+ 426
2098
+ ],
2099
+ "page_idx": 14
2100
+ },
2101
+ {
2102
+ "type": "text",
2103
+ "text": "where mu has shape (N, D). The DirichletProcess random variable returns sample_n ${ = } \\mathrm { N }$ draws, each with shape given by the base distribution Normal(mu, sigma). The essential component defining the DirichletProcess random variable is a stochastic while loop. We define it below. See Edward’s code base for a more involved version with a base distribution. ",
2104
+ "bbox": [
2105
+ 173,
2106
+ 434,
2107
+ 825,
2108
+ 489
2109
+ ],
2110
+ "page_idx": 14
2111
+ },
2112
+ {
2113
+ "type": "image",
2114
+ "img_path": "images/344f296b31ce5a3afef956fe884fb59425106d5a5f364670d77ec6b01e98b05e.jpg",
2115
+ "image_caption": [
2116
+ "Figure 13: Dirichlet process mixture model. "
2117
+ ],
2118
+ "image_footnote": [],
2119
+ "bbox": [
2120
+ 161,
2121
+ 496,
2122
+ 669,
2123
+ 632
2124
+ ],
2125
+ "page_idx": 14
2126
+ },
2127
+ {
2128
+ "type": "text",
2129
+ "text": "B INFERENCE EXAMPLE: STOCHASTIC VARIATIONAL INFERENCE ",
2130
+ "text_level": 1,
2131
+ "bbox": [
2132
+ 171,
2133
+ 700,
2134
+ 736,
2135
+ 717
2136
+ ],
2137
+ "page_idx": 14
2138
+ },
2139
+ {
2140
+ "type": "text",
2141
+ "text": "In the subgraph setting, we do data subsampling while working with a subgraph of the full model. This setting is necessary when the data and model do not fit in memory. It is scalable in that both the algorithm’s computational complexity (per iteration) and memory complexity are independent of the data set size. ",
2142
+ "bbox": [
2143
+ 173,
2144
+ 733,
2145
+ 823,
2146
+ 790
2147
+ ],
2148
+ "page_idx": 14
2149
+ },
2150
+ {
2151
+ "type": "text",
2152
+ "text": "For the code, we use the running example, a mixture model described in Figure 5. ",
2153
+ "bbox": [
2154
+ 173,
2155
+ 796,
2156
+ 709,
2157
+ 813
2158
+ ],
2159
+ "page_idx": 14
2160
+ },
2161
+ {
2162
+ "type": "text",
2163
+ "text": "1 $\\mathrm { ~ N ~ } = \\mathrm { ~ 1 0 0 0 0 0 0 0 }$ # data set size \n2 $\\Sigma = 2$ # data dimension \n3 $\\mathtt { K } = 5$ # number of clusters ",
2164
+ "bbox": [
2165
+ 165,
2166
+ 820,
2167
+ 377,
2168
+ 853
2169
+ ],
2170
+ "page_idx": 14
2171
+ },
2172
+ {
2173
+ "type": "text",
2174
+ "text": "The model is ",
2175
+ "bbox": [
2176
+ 174,
2177
+ 871,
2178
+ 261,
2179
+ 885
2180
+ ],
2181
+ "page_idx": 14
2182
+ },
2183
+ {
2184
+ "type": "equation",
2185
+ "img_path": "images/87e4eb10f413dc3d7f1a45f161c23e1ab0494a345b38f1931b826cc116b80cbd.jpg",
2186
+ "text": "$$\np ( \\mathbf { x } , \\mathbf { z } , \\beta ) = p ( \\beta ) \\prod _ { n = 1 } ^ { N } p ( z _ { n } \\mid \\beta ) p ( x _ { n } \\mid z _ { n } , \\beta ) .\n$$",
2187
+ "text_format": "latex",
2188
+ "bbox": [
2189
+ 348,
2190
+ 886,
2191
+ 650,
2192
+ 928
2193
+ ],
2194
+ "page_idx": 14
2195
+ },
2196
+ {
2197
+ "type": "text",
2198
+ "text": "To avoid memory issues, we work on only a subgraph of the model, ",
2199
+ "bbox": [
2200
+ 173,
2201
+ 103,
2202
+ 617,
2203
+ 119
2204
+ ],
2205
+ "page_idx": 15
2206
+ },
2207
+ {
2208
+ "type": "equation",
2209
+ "img_path": "images/6a1bda7c9da8764ff6a8c7e05f6f9a827f1b8f1332a12efeb41841cd5eb12a34.jpg",
2210
+ "text": "$$\np ( \\mathbf { x } , \\mathbf { z } , \\beta ) = p ( \\beta ) \\prod _ { m = 1 } ^ { M } p ( z _ { m } \\mid \\beta ) p ( x _ { m } \\mid z _ { m } , \\beta )\n$$",
2211
+ "text_format": "latex",
2212
+ "bbox": [
2213
+ 343,
2214
+ 123,
2215
+ 655,
2216
+ 166
2217
+ ],
2218
+ "page_idx": 15
2219
+ },
2220
+ {
2221
+ "type": "text",
2222
+ "text": "1 $\\mathrm { ~ M ~ } = \\ 1 2 8$ # mini-batch size \n2 \n3 beta $=$ Normal(mu=tf.zeros([K, D]), sigma=tf.ones([K, D])) \n4 $z =$ Categorical(logits=tf.zeros([M, K])) \n5 $\\textrm { x } =$ Normal(mu=tf.gather(beta, z), sigma=tf.ones([M, D])) ",
2223
+ "bbox": [
2224
+ 163,
2225
+ 179,
2226
+ 558,
2227
+ 233
2228
+ ],
2229
+ "page_idx": 15
2230
+ },
2231
+ {
2232
+ "type": "text",
2233
+ "text": "Assume the variational model is ",
2234
+ "bbox": [
2235
+ 174,
2236
+ 247,
2237
+ 387,
2238
+ 261
2239
+ ],
2240
+ "page_idx": 15
2241
+ },
2242
+ {
2243
+ "type": "equation",
2244
+ "img_path": "images/bc8deca8d823d2e6d5fb655ec73deb020264c379cbd81e7d056697ba71290a69.jpg",
2245
+ "text": "$$\nq ( \\mathbf { z } , \\beta ) = q ( \\beta ; \\lambda ) \\prod _ { n = 1 } ^ { N } q ( z _ { n } \\mid \\beta ; \\gamma _ { n } ) ,\n$$",
2246
+ "text_format": "latex",
2247
+ "bbox": [
2248
+ 379,
2249
+ 265,
2250
+ 617,
2251
+ 308
2252
+ ],
2253
+ "page_idx": 15
2254
+ },
2255
+ {
2256
+ "type": "text",
2257
+ "text": "parameterized by $\\{ \\lambda , \\{ \\gamma _ { n } \\} \\}$ . Again, we work on only a subgraph of the model, ",
2258
+ "bbox": [
2259
+ 169,
2260
+ 313,
2261
+ 692,
2262
+ 329
2263
+ ],
2264
+ "page_idx": 15
2265
+ },
2266
+ {
2267
+ "type": "equation",
2268
+ "img_path": "images/bf3fcb4e17460a0ea6a27a5fe9d1bdc451829e5db7a8b4ade0aaf9df6a3c3f2e.jpg",
2269
+ "text": "$$\nq ( \\mathbf { z } , \\beta ) = q ( \\beta ; \\lambda ) \\prod _ { m = 1 } ^ { M } q ( z _ { m } \\mid \\beta ; \\gamma _ { m } ) .\n$$",
2270
+ "text_format": "latex",
2271
+ "bbox": [
2272
+ 374,
2273
+ 333,
2274
+ 622,
2275
+ 377
2276
+ ],
2277
+ "page_idx": 15
2278
+ },
2279
+ {
2280
+ "type": "text",
2281
+ "text": "parameterized by $\\{ \\lambda , \\{ \\gamma _ { m } \\} \\}$ . Importantly, only $M$ parameters are stored in memory for $\\{ \\gamma _ { m } \\}$ rather than $N$ . ",
2282
+ "bbox": [
2283
+ 171,
2284
+ 382,
2285
+ 820,
2286
+ 410
2287
+ ],
2288
+ "page_idx": 15
2289
+ },
2290
+ {
2291
+ "type": "text",
2292
+ "text": "1 qbeta $=$ Normal(mu=tf.Variable(tf.zeros([K, D])), \n2 sigma=tf.nn.softplus(tf.Variable(tf.zeros[K, D]))) \n3 qz_variables $=$ tf.Variable(tf.zeros([M, K])) \n4 ${ \\tt q z } = { \\tt }$ Categorical(logits=qz_variables) ",
2293
+ "bbox": [
2294
+ 163,
2295
+ 416,
2296
+ 611,
2297
+ 459
2298
+ ],
2299
+ "page_idx": 15
2300
+ },
2301
+ {
2302
+ "type": "text",
2303
+ "text": "We use KLqp, a variational method that minimizes the divergence measure $\\mathrm { K L } ( q \\parallel p )$ (Jordan et al., 1999). We instantiate two algorithms: a global inference over $\\beta$ given the subset of $\\mathbf { z }$ and a local inference over the subset of $\\mathbf { z }$ given $\\beta$ . We also pass in a TensorFlow placeholder $\\tt { x \\_ p h }$ for the data, so we can change the data at each step. ",
2304
+ "bbox": [
2305
+ 171,
2306
+ 473,
2307
+ 825,
2308
+ 530
2309
+ ],
2310
+ "page_idx": 15
2311
+ },
2312
+ {
2313
+ "type": "text",
2314
+ "text": "1 x_ph $=$ tf.placeholder(tf.float32, [M]) \n2 inference_global $=$ ed.KLqp({beta: qbeta}, data={x: x_ph, z: qz}) \n3 inference_local $=$ ed.KLqp({z: qz}, data={x: x_ph, beta: qbeta}) ",
2315
+ "bbox": [
2316
+ 165,
2317
+ 535,
2318
+ 602,
2319
+ 568
2320
+ ],
2321
+ "page_idx": 15
2322
+ },
2323
+ {
2324
+ "type": "text",
2325
+ "text": "We initialize the algorithms with the scale argument, so that computation on $_ { \\textrm { z } }$ and $_ \\textrm { x }$ will be scaled appropriately. This enables unbiased estimates for stochastic gradients. ",
2326
+ "bbox": [
2327
+ 165,
2328
+ 582,
2329
+ 823,
2330
+ 609
2331
+ ],
2332
+ "page_idx": 15
2333
+ },
2334
+ {
2335
+ "type": "text",
2336
+ "text": "1 inference_global.initialize(scale={x: float(N) / M, z: float(N) / M}) \n2 inference_local.initialize(scale={x: float(N) / M, z: float(N) / M})",
2337
+ "bbox": [
2338
+ 165,
2339
+ 614,
2340
+ 633,
2341
+ 637
2342
+ ],
2343
+ "page_idx": 15
2344
+ },
2345
+ {
2346
+ "type": "text",
2347
+ "text": "We now run the algorithm, assuming there is a next_batch function which provides the next batch of data. ",
2348
+ "bbox": [
2349
+ 168,
2350
+ 651,
2351
+ 825,
2352
+ 679
2353
+ ],
2354
+ "page_idx": 15
2355
+ },
2356
+ {
2357
+ "type": "text",
2358
+ "text": "1 qz_init $=$ tf.initialize_variables([qz_variables]) \n2 for _ in range(1000): \n3 x_batch $=$ next_batch(size=M) \n4 for _ in range(10): # make local inferences \n5 inference_local.update(feed_dict {x_ph: x_batch}) \n7 # update global parameters \n8 inference_global.update(feed_dict={x_ph: x_batch}) \n9 # reinitialize the local factors \n10 qz_init.run() ",
2359
+ "bbox": [
2360
+ 163,
2361
+ 685,
2362
+ 531,
2363
+ 738
2364
+ ],
2365
+ "page_idx": 15
2366
+ },
2367
+ {
2368
+ "type": "text",
2369
+ "text": "",
2370
+ "bbox": [
2371
+ 161,
2372
+ 748,
2373
+ 526,
2374
+ 790
2375
+ ],
2376
+ "page_idx": 15
2377
+ },
2378
+ {
2379
+ "type": "text",
2380
+ "text": "After each iteration, we also reinitialize the parameters for $q ( \\mathbf { z } \\mid \\boldsymbol { \\beta } )$ ; this is because we do inference on a new set of local variational factors for each batch. This demo readily applies to other inference algorithms such as SGLD (stochastic gradient Langevin dynamics): simply replace qbeta and $\\mathtt { q z }$ with Empirical random variables; then call ed.SGLD instead of $\\mathtt { e d . K L 9 p }$ . ",
2381
+ "bbox": [
2382
+ 173,
2383
+ 805,
2384
+ 825,
2385
+ 861
2386
+ ],
2387
+ "page_idx": 15
2388
+ },
2389
+ {
2390
+ "type": "text",
2391
+ "text": "Note that if the data and model fit in memory but you’d still like to perform data subsampling for fast inference, we recommend not defining subgraphs. You can reify the full model, and simply index the local variables with a placeholder. The placeholder is fed at runtime to determine which of the local variables to update at a time. (For more details, see the website’s API.) ",
2392
+ "bbox": [
2393
+ 174,
2394
+ 867,
2395
+ 825,
2396
+ 924
2397
+ ],
2398
+ "page_idx": 15
2399
+ },
2400
+ {
2401
+ "type": "text",
2402
+ "text": "C COMPLETE EXAMPLES ",
2403
+ "text_level": 1,
2404
+ "bbox": [
2405
+ 174,
2406
+ 102,
2407
+ 400,
2408
+ 118
2409
+ ],
2410
+ "page_idx": 16
2411
+ },
2412
+ {
2413
+ "type": "text",
2414
+ "text": "C.1 VARIATIONAL AUTO-ENCODER ",
2415
+ "text_level": 1,
2416
+ "bbox": [
2417
+ 176,
2418
+ 133,
2419
+ 433,
2420
+ 147
2421
+ ],
2422
+ "page_idx": 16
2423
+ },
2424
+ {
2425
+ "type": "text",
2426
+ "text": "See Figure 14. ",
2427
+ "text_level": 1,
2428
+ "bbox": [
2429
+ 174,
2430
+ 160,
2431
+ 269,
2432
+ 174
2433
+ ],
2434
+ "page_idx": 16
2435
+ },
2436
+ {
2437
+ "type": "image",
2438
+ "img_path": "images/be84ecad7ceedfa52c141d52ee5e1ea97057eab028a7c42d70ab23ef244dee05.jpg",
2439
+ "image_caption": [
2440
+ "Figure 14: Complete script for a VAE (Kingma & Welling, 2014) with batch training. It generates MNIST digits after every 1000 updates. "
2441
+ ],
2442
+ "image_footnote": [],
2443
+ "bbox": [
2444
+ 156,
2445
+ 191,
2446
+ 637,
2447
+ 646
2448
+ ],
2449
+ "page_idx": 16
2450
+ },
2451
+ {
2452
+ "type": "text",
2453
+ "text": "C.2 PROBABILISTIC MODEL FOR WORD EMBEDDINGS ",
2454
+ "text_level": 1,
2455
+ "bbox": [
2456
+ 176,
2457
+ 717,
2458
+ 560,
2459
+ 731
2460
+ ],
2461
+ "page_idx": 16
2462
+ },
2463
+ {
2464
+ "type": "text",
2465
+ "text": "See Figure 15. This example uses data subsampling (Section 4.4). The priors and conditional likelihoods are defined only for a minibatch of data. Similarly the variational model only models the embeddings used in a given minibatch. TensorFlow variables contain the embedding vectors for the entire vocabulary. TensorFlow placeholders ensure that the correct embedding vectors are used as variational parameters for a given minibatch. ",
2466
+ "bbox": [
2467
+ 174,
2468
+ 742,
2469
+ 825,
2470
+ 813
2471
+ ],
2472
+ "page_idx": 16
2473
+ },
2474
+ {
2475
+ "type": "text",
2476
+ "text": "The Bernoulli variables $\\tt Y \\mathrm { \\_ p o s }$ and $\\mathtt { Y \\_ n e g }$ are fixed to be 1’s and 0’s respectively. They model whether a word is indeed the target word for a given context window or has been drawn as a negative sample. Without regularization (via priors), the objective we optimize is identical to negative sampling. ",
2477
+ "bbox": [
2478
+ 174,
2479
+ 819,
2480
+ 823,
2481
+ 876
2482
+ ],
2483
+ "page_idx": 16
2484
+ },
2485
+ {
2486
+ "type": "image",
2487
+ "img_path": "images/fc61c670455aac17eff5730b67f88fa5c7af0873c4342bbf195ef1b02580c0f4.jpg",
2488
+ "image_caption": [
2489
+ "Figure 15: Exponential family embedding for binary data (Rudolph et al., 2016). Here, MAP is used to maximize the total sum of conditional log-likelihoods and log-priors. "
2490
+ ],
2491
+ "image_footnote": [],
2492
+ "bbox": [
2493
+ 156,
2494
+ 207,
2495
+ 797,
2496
+ 781
2497
+ ],
2498
+ "page_idx": 17
2499
+ }
2500
+ ]
parse/train/Hy6b4Pqee/Hy6b4Pqee_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/Hy6b4Pqee/Hy6b4Pqee_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/UFWnZn2v0bV/UFWnZn2v0bV.md ADDED
@@ -0,0 +1,364 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # LAYER SPARSITY IN NEURAL NETWORKS
2
+
3
+ Anonymous authors Paper under double-blind review
4
+
5
+ # ABSTRACT
6
+
7
+ Sparsity has become popular in machine learning, because it can save computational resources, facilitate interpretations, and prevent overfitting. In this paper, we discuss sparsity in the framework of neural networks. In particular, we formulate a new notion of sparsity that concerns the networks’ layers and, therefore, aligns particularly well with the current trend toward deep networks. We call this notion layer sparsity. We then introduce corresponding regularization and refitting schemes that can complement standard deep-learning pipelines to generate more compact and accurate networks.
8
+
9
+ # 1 INTRODUCTION
10
+
11
+ The number of layers and the number of nodes in each layer are arguably among the most fundamental parameters of neural networks. But specifying these parameters can be challenging: deep and wide networks, that is, networks with many layers and nodes, can describe data in astounding detail, but they are also prone to overfitting and require large memory, CPU, energy, and so forth. The resource requirements can be particularly problematic for real-time applications or applications on fitness trackers and other wearables, whose popularity has surged in recent years. A promising approach to meet these challenges is to fit networks sizes adaptively, that is, to allow for many layers and nodes in principle, but to ensure that the final network is “simple” in that it has a small number of connections, nodes, or layers (Changpinyo et al., 2017; Han et al., 2016; Kim et al., 2016; Liu et al., 2015; Wen et al., 2016).
12
+
13
+ Popular ways to fit such simple and compact networks include successively augmenting small networks (Ash, 1989; Bello, 1992), pruning large networks (Simonyan & Zisserman, 2015), or explicit sparsity-inducing regularization of the weight matrices, which we focus on here. An example is the $\ell _ { 1 }$ -norm, which can reduce the number of connections. Another example is the $\ell _ { 1 }$ -norm grouped over the rows of the weight matrices, which can reduce the number of nodes. It has been shown that such regularizers can indeed produce networks that are both accurate and yet have a small number of nodes and connections either in the first layer (Feng & Simon, 2017) or overall (Alvarez & Salzmann, 2016; Liu et al., 2015; Scardapane et al., 2017). Such sparsity-inducing regularizers also have a long-standing tradition and thorough theoretical underpinning in statistics (Hastie et al., 2015).
14
+
15
+ But while sparsity on the level of connections and nodes has been studied in some detail, sparsity on the level of layers is much less understood. This lack of understanding contrasts the current trend to deep network architectures, which is supported by state-of-the-art performances of deep networks (LeCun et al., 2015; Schmidhuber, 2015), recent approximation theory for ReLU activation networks (Liang & Srikant, 2016; Telgarsky, 2016; Yarotsky, 2017), and recent statistical theory (Golowich et al., 2017; Kohler & Langer, 2019; Taheri et al., 2020). Hence, a better understanding of sparsity on the level of layers seems to be in order.
16
+
17
+ Therefore, we discuss in this paper sparsity with a special emphasis on the networks’ layers. Our key observation is that for typical activation functions such as ReLU, a layer can be removed if all its parameter values are non-negative. We leverage this observation in the development of a new regularizer that specifically targets sparsity on the level of layers, and we show that this regularizer can lead to more compact and more accurate networks.
18
+
19
+ Our three main contributions are:
20
+
21
+ 1. We introduce a new notion of sparsity that we call layer sparsity.
22
+ 2. We introduce a corresponding regularizer that can reduce network sizes.
23
+ 3. We introduce an additional refitting step that can further improve prediction accuracies.
24
+
25
+ In Section 2, we specify our framework, discuss different notions of sparsity, and introduce our refitting scheme. In Section 3, we establish a numerical proof of concept. In Section 4, we conclude with a discussion.
26
+
27
+ # 2 SPARSITY IN NEURAL NETWORKS
28
+
29
+ We first state our framework, then discuss different notions of sparsity, and finally introduce a refitting scheme.
30
+
31
+ # 2.1 MATHEMATICAL FRAMEWORK
32
+
33
+ To fix ideas, we first consider fully-connected neural networks that model data according to
34
+
35
+ $$
36
+ y _ { i } = f ^ { 1 } \Bigl [ W ^ { 1 } f ^ { 2 } \bigl [ . . . f ^ { l } [ W ^ { l } x _ { i } ] \bigr ] \Bigr ] + u _ { i } \ ,
37
+ $$
38
+
39
+ where $i \in \{ 1 , \ldots , n \}$ indexes the $n$ different samples, $y _ { i } ~ \in ~ \mathbb R$ is the output, $\pmb { x } _ { i } \in \mathbb { R } ^ { d }$ is the corresponding input with $d$ the input dimension, $l$ is the number of layers, $W ^ { j } \in \mathbb { R } ^ { p _ { j } \times p _ { j + 1 } }$ for $j \in$ $\{ 1 , \ldots , l \}$ are the weight matrices with $p _ { 1 } = 1$ and $p _ { l + 1 } = d$ , $f ^ { j } : \dot { \mathbb { R } ^ { p _ { j } } } \mathbb { R } ^ { p _ { j } }$ for $j \in \{ 1 , \ldots , l \}$ are the activation functions, and $u _ { i } \in \mathbb { R }$ is the random noise. Extensions beyond fully-connected networks are straightforward—see Section 2.5.
40
+
41
+ We summarize the parameters in $\pmb { W } : = ( W ^ { 1 } , \ldots , W ^ { l } ) \in \mathscr { V } : = \{ \pmb { V } = ( V ^ { 1 } , \ldots , V ^ { l } ) : V ^ { j } \in \mathscr { V }$ $\mathbb { R } ^ { p _ { j } \times p _ { j + 1 } } \}$ , and we write for ease of notation
42
+
43
+ $$
44
+ f _ { V } [ \pmb { x } _ { i } ] : = \pmb { f } ^ { 1 } \left[ V ^ { 1 } \pmb { f } ^ { 2 } \left[ . . . \pmb { f } ^ { l } ( V ^ { l } \pmb { x } _ { i } ] \right] \right]
45
+ $$
46
+
47
+ for $V \in \mathcal V$ .
48
+
49
+ Neural networks are usually fitted based on regularized estimators in Lagrange
50
+
51
+ $$
52
+ \widehat { W } \in \mathop { \mathrm { a r g m i n } } _ { V \in \mathcal { V } } \bigl \{ \mathop { \mathrm { D a t a F i t } } [ y _ { 1 } , \dots , y _ { n } , \pmb { x } _ { 1 } , \dots , \pmb { x } _ { n } ] + h [ \pmb { V } ] \bigr \}
53
+ $$
54
+
55
+ or constraint form
56
+
57
+ $$
58
+ \widehat { \cal W } \in \underset { h \left[ V \right] \leq 1 } { \mathrm { a r g m i n } } \big \{ \operatorname { D a t a F i t } [ y _ { 1 } , \dots , y _ { n } , \pmb { x } _ { 1 } , \dots , \pmb { x } _ { n } ] \big \} ,
59
+ $$
60
+
61
+ where DataFit : $\mathbb { R } ^ { n } \times \mathbb { R } ^ { n \times d }$ is a data-fitting function such as least-squares $\textstyle \sum _ { i = 1 } ^ { n } ( y _ { i } - f _ { V } [ { \pmb x } _ { i } ] ) ^ { 2 }$ and $h : \mathcal { V } \to [ 0 , \infty )$ is a regularizer such as the elementwise $\ell _ { 1 }$ -norm $\textstyle \sum _ { j , k , l } | ( V ^ { j } ) _ { k l } |$ . We are particularly interested in regularizers that induce sparsity.
62
+
63
+ # 2.2 STANDARD NOTIONS OF SPARSITY
64
+
65
+ We first state two regularizers that are known in deep learning and the corresponding notions of sparsity.
66
+
67
+ Connection sparsity Consider the vanilla $\ell _ { 1 }$ -regularizer
68
+
69
+ $$
70
+ h ^ { \mathrm { C } } [ { \pmb V } ] : = \sum _ { j = 1 } ^ { l } ( r ^ { \mathrm { C } } ) _ { j } \| { \pmb V } ^ { j } \| _ { 1 } : = \sum _ { j = 1 } ^ { l } ( r ^ { \mathrm { C } } ) _ { j } \sum _ { v = 1 } ^ { p _ { j } } \sum _ { w = 1 } ^ { p _ { j + 1 } } | ( V ^ { j } ) _ { v w } | ~ ,
71
+ $$
72
+
73
+ where $r ^ { \mathrm { C } } \in [ 0 , \infty ) ^ { l }$ is a vector of tuning parameters. This regularizer is the deep learning equivalent of the lasso regularizer in linear regression (Tibshirani, 1996) and has received considerable attention recently (Barron & Klusowski, 2018; 2019; Kim et al., 2016). The regularizer acts on each individual connection, pruning a full network (first network from the left in Figure 1) to a more sparsely connected network (second network in Figure 1). We, therefore, propose to speak of connection sparsity.
74
+
75
+ ![](images/ba45d87a3f0aeb747ed6e1fd3ebd33a857b8d7457056e6a4e51598e4d4c85604.jpg)
76
+ Figure 1: feedforward neural networks with different types of sparsity
77
+
78
+ Node sparsity Consider a grouped version of the above regularizer
79
+
80
+ $$
81
+ h ^ { \mathrm { N } } [ V ] : = \sum _ { j = 1 } ^ { l } ( r ^ { \mathrm { N } } ) _ { j } \| V ^ { j } \| _ { 2 , 1 } : = \sum _ { j = 1 } ^ { l } ( r ^ { \mathrm { N } } ) _ { j } \sum _ { v = 1 } ^ { p _ { j } } \sqrt { \sum _ { w = 1 } ^ { p _ { j + 1 } } | ( V ^ { j } ) _ { v w } | ^ { 2 } } ,
82
+ $$
83
+
84
+ where $r ^ { \mathrm { N } } \in [ 0 , \infty ) ^ { l }$ is again a vector of tuning parameters. This regularizer is the deep learning equivalent of the group lasso regularizer in linear regression (Bakin, 1999) and has received some attention recently (Alvarez & Salzmann, 2016; Feng & Simon, 2017; Scardapane et al., 2017). The regularizer acts on all connections that go into a node simultaneously, rendering entire nodes inactive (third network in Figure 1). We, therefore, propose to speak of node sparsity.
85
+
86
+ # 2.3 LAYER SPARSITY
87
+
88
+ We now complement the two existing regularizers and notions of sparsity with a new, third notion.
89
+
90
+ Layer sparsity Consider the regularizer
91
+
92
+ $$
93
+ h ^ { \mathrm { L } } [ { \pmb V } ] : = \sum _ { j = 1 } ^ { l - 1 } ( r ^ { \mathrm { L } } ) _ { j } \| { \pmb V } ^ { j } \| _ { 2 , + } : = \sum _ { j = 1 } ^ { l - 1 } ( r ^ { \mathrm { L } } ) _ { j } \sqrt { \sum _ { v = 1 } ^ { p _ { j } } \sum _ { w = 1 } ^ { p _ { j + 1 } } \left( \mathrm { n e g } [ ( V ^ { j } ) _ { v w } ] \right) ^ { 2 } } \enspace ,
94
+ $$
95
+
96
+ where $r ^ { \mathrm { L } } \in [ 0 , \infty ) ^ { l - 1 }$ is a vector of tuning parameters, and $\mathrm { n e g } [ a ] : = \mathrm { m i n } \{ a , 0 \}$ is the negative part of a real value $a \in \mathbb { R }$ . This regularizers does not have an equivalent in linear regression, and it is also new in deep learning.
97
+
98
+ We argue that the regularizer can give rise to a new type of sparsity. The regularizer can be disentangled along the layers according to
99
+
100
+ $$
101
+ h ^ { \mathrm { L } } [ \boldsymbol { V } ] = \sum _ { j = 1 } ^ { l - 1 } ( r ^ { \mathrm { L } } ) _ { j } h ^ { \mathrm { L } , j } [ \boldsymbol { V } ^ { j } ]
102
+ $$
103
+
104
+ with
105
+
106
+ $$
107
+ h ^ { \mathrm { L } , j } [ V ^ { j } ] : = \sqrt { \sum _ { v = 1 } ^ { p _ { j } } \sum _ { w = 1 } ^ { p _ { j + 1 } } \bigl ( \mathrm { n e g } [ ( V ^ { j } ) _ { v w } ] \bigr ) ^ { 2 } } \qquad \mathrm { f o r } \ j \in \{ 1 , \ldots , l - 1 \} \ .
108
+ $$
109
+
110
+ We then focus on an individual inner layer, that is, a layer that corresponds to an index $j \in \{ 2 , \ldots , l -$ $1 \}$ . To fix ideas, we consider the popular ReLU activation (Glorot et al., 2011; Hahnloser, 1998; Hahnloser et al., 2000; Salinas & Abbott, 1996); in other words, we consider $( \pmb { f } ^ { j } ) _ { q } [ t ] : = f _ { \mathrm { R e L U } } [ t ] : =$ $\operatorname* { m a x } \{ t , 0 \}$ for all $j \in \{ 2 , \dots , l \}$ , $q \in \{ 1 , \ldots , p _ { j } \}$ , and $t \in \mathbb { R }$ (the activation of the output layer can be arbitrary). It is now easy to show that the regularizer $h ^ { \mathrm { L } }$ indeed induces sparsity on the level of layers.
111
+
112
+ Theorem 1 (Layer Sparsity). Consider $j \in \{ 2 , \dots , l - 1 \}$ , and define a merged weight matrix as $V ^ { j - 1 , j } : = \dot { V } ^ { j - \bar { 1 } } V ^ { j } \stackrel { \bullet } { \in } \mathbb { R } ^ { p _ { j - 1 } \times p _ { j + 1 } }$ . It holds that
113
+
114
+ $$
115
+ \begin{array} { r } { h ^ { \mathrm { L } , j } [ V ^ { j } ] = 0 \quad \Rightarrow \quad f ^ { j - 1 } \big [ V ^ { j - 1 } f ^ { j } [ V ^ { j } z ] \big ] = f ^ { j - 1 } \big [ V ^ { j - 1 , j } z \big ] \qquad f o r \ a l l \ z \in [ 0 , \infty ) ^ { p _ { j + 1 } } \ . } \end{array}
116
+ $$
117
+
118
+ Proof of Theorem $^ { l }$ . If $h ^ { \mathrm { L } , j } [ V ^ { j } ] = 0$ , then $( V ^ { j } ) _ { q m } \ge 0$ for all $q \in \{ 1 , \ldots , p _ { j } \}$ , $m \in \{ 1 , \ldots , p _ { j + 1 } \}$ . Hence, it holds for all $q \in \{ 1 , \ldots , p _ { j } \}$ that $( V ^ { j } z ) _ { q } \ge 0$ and, therefore, that $f ^ { j } [ V ^ { j } z ] = V ^ { j } z$ . The theorem follows then by the fact that $V ^ { j - 1 , j } = V ^ { j - 1 } V ^ { j }$ . □
119
+
120
+ A key property of the ReLU function is positive homogeneity. That positive homogeneity can allow for moving weights between layers had been observed in Barron & Klusowski (2018); here, we use the positive homogeneity to merge layers. The idea is as follows: $h ^ { \mathrm { L } , j } [ V ^ { j } ] = 0$ means in view of the stated theorem that we can redefine the network of depth $l$ as a network of depth $l - 1$ by removing the function $f ^ { j }$ , replacing the weights $V ^ { j - 1 }$ by $V ^ { j - 1 , j }$ , and then removing the $j$ th layer altogether.
121
+
122
+ Theorem 1 can be applied sequentially to neighboring layers; hence, the regularization can merge not only one but many layers into one. In conclusion, our new regularizer $h ^ { \mathrm { \check { L } } }$ acts on all nodes and connections of each layer simultaneously, rendering entire layers inactive (fourth network in Figure 1). We, therefore, propose to speak of layer sparsity.
123
+
124
+ The concept of layer sparsity and Theorem 1 in particular do not hinge on the exact choice of the regularizer in (5): one can take any function $h ^ { \mathrm { L } }$ that can be disentangled along the layers as described and that ensures the fact that $h ^ { \mathrm { L } , \bar { j } } [ V ^ { j } ] = 0$ implies $\mathrm { m i n } _ { k , l } ( V ^ { j } ) _ { k l } \geq 0$ .
125
+
126
+ We illustrate layer sparsity with two examples.
127
+
128
+ Example 1 (Identity Activation). We first highlight the meaning of layer sparsity in a simplistic setting that does not rely on Theorem $^ { l }$ . We consider identity activation, that is, $( \dot { f ^ { j } } ) _ { q } [ t ] = t$ for all $j \in \{ 2 , \ldots , l \}$ , $q \in \{ 1 , \ldots , p _ { j } \}$ , and $t \in \mathbb { R } .$ . The networks in (2) can then be written as
129
+
130
+ $$
131
+ f _ { V } [ { \pmb x } _ { i } ] = { \pmb f } ^ { 1 } [ V ^ { 1 } \cdot \cdot \cdot V ^ { l } { \pmb x } _ { i } ] \enspace .
132
+ $$
133
+
134
+ In other words, the initial $l$ -layer network can be compressed into a one-layer network with activation function $f ^ { 1 }$ and parameter matrix $V ^ { 1 } \cdot \cdot \cdot V ^ { l } \in \mathbb { R } ^ { \hat { 1 } \times d }$ . This setting with identity activation is, of course, purely academic, but it motivates an important question: can parts of networks be compressed similarly in the case of ReLU?
135
+
136
+ Theorem 1 gives an answer to this question: if $h ^ { \mathrm { L } , j } [ V ^ { j } ] = 0 ;$ , then the jth and $( j - 1 ) t h$ layers can be combined. In the extreme case $h ^ { \mathrm { L } , 2 } [ V ^ { 2 } ] = \cdot \cdot \cdot = \dot { h } ^ { \mathrm { L } , l } [ V ^ { l } ] = 0$ and non-negative input, the network can be condensed into a one-layer network just as in the linear case. In this sense, one can understand our layer regularizer is as a measure for the networks’ “distance to linearity.” We detail this further in the following example.
137
+
138
+ Example 2 (ReLU Activation). We now illustrate how layer sparsity compresses and, therefore, simplifies networks in the case of ReLU activation. We fix an initial network $f _ { N }$ parameterized by $N \in \nu$ . We identify the active layers of the network by
139
+
140
+ $$
141
+ { \mathcal { S } } \equiv S [ N ] : = \left\{ j \in \{ 2 , \dots , l - 1 \} : h ^ { \mathrm { L } , j } [ N ^ { j } ] \neq 0 \right\} \cup \{ 1 , l \} \ .
142
+ $$
143
+
144
+ Thus, $s$ and $\{ 1 , \ldots , l \} \setminus S$ contain the indexes of the relevant and irrelevant layers, respectively. (We always consider the input and output layers as active.) The level of sparsity, that is, the number of active layers, is $s : = | S | \leq l$ .
145
+
146
+ Observe first that the theorem’s restriction to $_ z$ ’s that have non-negative elements makes sense: by the definition of $f _ { \mathrm { R e L U } }$ , the outputs of every ReLU layer are non-negative. We now denote the indexes in $s$ in an orderly fashion: $j _ { 1 } , \dots , j _ { s } \in \mathcal { S }$ such that $j _ { 1 } < \cdots < j _ { s } = l$ . We then define scaled
147
+
148
+ versions of the corresponding merged matrices: if $j _ { i } - 1 \in \mathcal S$ or $j _ { i } \in \{ 1 , l \}$ , we do the “trivial merge” $M ^ { j _ { i } } : = \dot { N } ^ { j _ { i } } \in \mathbb { R } ^ { p _ { j _ { i } } \times p _ { j _ { i } + 1 } }$ ; otherwise, we do the “non-trivial merge”
149
+
150
+ $$
151
+ M ^ { j _ { i } } : = N ^ { j _ { i - 1 } + 1 } \cdot \cdot \cdot N ^ { j _ { i } } \in \mathbb { R } ^ { p _ { j _ { i - 1 } + 1 } \times p _ { j _ { i } + 1 } } \mathrm { ~ . ~ }
152
+ $$
153
+
154
+ In other words, we merge all irrelevant layers between the $j _ { i - 1 } t h$ and $j _ { i } t h$ layers into the $j _ { i } t h$ layer. We can then compress the data-generating model in (1) into
155
+
156
+ $$
157
+ y _ { i } = f ^ { j _ { 1 } } \Big [ M ^ { j _ { 1 } } { \pmb f } ^ { j _ { 2 } } \big [ . . . { \pmb f } ^ { j _ { s } } [ M ^ { j _ { s } } { \pmb x } _ { i } ] ] \Big ] + u _ { i }
158
+ $$
159
+
160
+ with $M : = ( M ^ { j _ { 1 } } , \ldots , M ^ { j _ { s } } ) \in \mathcal { V } _ { S } : = \{ V = ( V ^ { 1 } , \ldots , V ^ { s } ) : V ^ { i } \in \mathbb { R } ^ { p _ { j _ { i - 1 } + 1 } \times p _ { j _ { i } + 1 } } \} .$ Formulated differently, we can condense the original network according to
161
+
162
+ $$
163
+ f _ { N } [ { \pmb x } _ { i } ] = f _ { M } [ { \pmb x } _ { i } ] = { \pmb f } ^ { j _ { 1 } } \left[ M ^ { j _ { 1 } } { \pmb f } ^ { j _ { 2 } } \left[ . . . { \pmb f } ^ { j _ { s } } [ M ^ { j _ { s } } { \pmb x } _ { i } ] \right] \right] ,
164
+ $$
165
+
166
+ that is, we can formulate the initial ReLU activation network with $l$ layers as a new ReLU activation network with s layers.
167
+
168
+ The new network is still a ReLU activation network but has a smaller number of layers if $s < l$ and, consequently, a smaller number of parameters in total: the total number of parameters in the initial network is $\textstyle \sum _ { j = 1 } ^ { l } ( p _ { j } \times p _ { j + 1 } )$ , while the total number of parameters in the transformed network is only $\begin{array} { r } { \sum _ { i = 1 } ^ { s } ( p _ { j _ { i - 1 } + 1 } \times p _ { j _ { i } + 1 } ) } \end{array}$ .
169
+
170
+ Our concept for regularizing layers is substantially different from existing ones: our layer-wise regularizer induces weights to be non-negative, whereas existing layer-wise regularizers induce weights to be zero (Wen et al., 2016, Section 3.3). The two main advantages of our approach are that it (i) does not require shortcuts to avoid trivial networks and (ii) does not implicitly enforce connection or node sparsity. We thus argue that our layer sparsity is a much more natural and appropriate way to capture and regularize network depths.
171
+
172
+ Layer sparsity more closely relates to ResNets (He et al., 2016). The recent popularity of ResNets is motivated by two observations: 1. Solvers seem to struggle with finding good minima of deep networks; even training accuracies can deteriorate when increasing the number of layers. 2. Allowing for linear mappings that short-circuit parts of the network seem to help solvers in finding better minima. From our viewpoint here, one can argue that ResNets use these linear mappings to regulate network depths adaptively and, therefore, are related to layer sparsity. But importantly, ResNets are even more complex than the networks they are based on, while our notion simplifies networks.
173
+
174
+ Since, as one can verify again readily, all three regularizers are convex, any combination of them is also convex. Such combinations can be used to obtain networks that are sparse in two or all three aspects (last network in Figure 1). In this sense, the different notions of sparsity are not competing but rather complementing each other.
175
+
176
+ # 2.4 REFITTING
177
+
178
+ Sparse networks can be used directly, but they can also be a basis for further optimization: one can adjust the network architecture according to the non-zero pattern of the sparse network and then re-estimate the parameters of this smaller network. Such strategies are well-known in statistics and machine learning under the name refitting (Lederer, 2013; Chzhen et al., 2019). The theoretical underpinning of these strategies is the insight that regularization creates a bias that—in certain cases—can be alleviated by a subsequent “unbiasing” step. In deep learning, refitting has been studied recently under the name lottery-ticket hypothesis (Frankle & Carbin, 2019).
179
+
180
+ We now formulate a version of refitting for layer sparsity. We stay in the framework of Example 2 to keep the notation light.
181
+
182
+ Example 3 (ReLU Activation Cont.). Consider the model in (1) with the specifications of Example 2, and consider a corresponding layer-sparse estimator $\widehat { W }$ of the parameters such as (3) with $h = h ^ { \mathrm { L } }$ . In line with (6), we denote the set of the active layers by
183
+
184
+ $$
185
+ { \mathcal { S } } = { \mathcal { S } } [ \widehat { W } ] = \left\{ j \in \{ 1 , \dots , l - 1 \} : h ^ { \mathrm { L } , j } [ \widehat { W } ^ { j } ] \neq 0 \right\} \cup \{ 1 , l \}
186
+ $$
187
+
188
+ and the corresponding parameter space of the condensed network by $\mathcal { V } _ { S } \equiv \mathcal { V } _ { S } [ \widehat { W } ] = \{ V =$ $( V ^ { 1 } , \dots , V ^ { s } ) : V ^ { i } \in \mathbb { R } ^ { p _ { j _ { i - 1 } + 1 } \times p _ { j _ { i } + 1 } } \Big \}$ , where $s : = | S |$ . The least-squares refitted estimator for the parameters in the condensed network is then
189
+
190
+ $$
191
+ \widehat { W } _ { \cal S } \in \mathop { \mathrm { a r g m i n } } _ { V \in \mathcal { V } _ { \cal S } } \biggl \{ \sum _ { i = 1 } ^ { n } \bigl ( y _ { i } - f _ { { \cal V } } [ { \pmb x } _ { i } ] \bigr ) ^ { 2 } \biggr \} .
192
+ $$
193
+
194
+ Hence, the estimator $\widehat { W }$ complemented with least-squares refitting yields the network
195
+
196
+ $$
197
+ f _ { \widehat { W } _ { S } } [ { \pmb x } _ { i } ] = { \pmb f } ^ { j _ { 1 } } \left[ \widehat { W } _ { S } ^ { j _ { 1 } } { \pmb f } ^ { j _ { 2 } } \left[ . . . { \pmb f } ^ { j _ { s } } [ \widehat { W } _ { S } ^ { j _ { s } } { \pmb x } _ { i } ] \right] \right] \mathrm { ~ . ~ }
198
+ $$
199
+
200
+ This strategy corresponds to the “one-shot approach” in Frankle & Carbin (2019); one could extend it along the lines of their iterative approach, but the numerical results indicate that this is not necessary. Also, in contrast to the results in Frankle & Carbin (2019), our results indicate that keeping the initialization is not necessary either.
201
+
202
+ # 2.5 EXTENSIONS BEYOND FULLY-CONNECTED NETWORKS
203
+
204
+ We have illustrated our ideas with feedforward networks that have fully connected layers, but the principles of layer sparsity apply much more generally. Consider a fixed hidden layer with index $j \in \{ 2 , \ldots , l - 1 \}$ . In the fully-connected networks (2), this layer corresponds to a function $z \mapsto \mathbf { \mathcal { f } } ^ { j } [ V ^ { j } z ]$ with weights $V ^ { j } \in \mathbf { \bar { \mathbb { R } } } ^ { p _ { j } \times p _ { j + 1 } }$ . We now generalize these functions to
205
+
206
+ $$
207
+ z \mapsto { \pmb f } ^ { j } \left[ \sum _ { k = 1 } ^ { m } V ^ { j , k } z + b ^ { j } \right]
208
+ $$
209
+
210
+ with weights $\pmb { V } ^ { j } : = ( V ^ { j , 1 } , \ldots , V ^ { j , m } ) \in \mathcal { M } ^ { j , 1 } \times \cdots \times \mathcal { M } ^ { j , m }$ and bias $\boldsymbol { b } ^ { j } \in \boldsymbol { B } ^ { j }$ , and with arbitrary nonempty subsets $\mathcal { M } ^ { j , 1 } \times \cdot \cdot \cdot \times \mathcal { M } ^ { j , m } \subset \mathbb { R } ^ { p _ { j } \times p _ { j + 1 } }$ and $B ^ { j } \subset \mathbb { R } ^ { p _ { j } }$ . The corresponding layer-sparse regularizer is then
211
+
212
+ $$
213
+ h ^ { \mathrm { L } , j } [ V ^ { j } ] : = \sqrt { \sum _ { v = 1 } ^ { p _ { j } } \sum _ { w = 1 } ^ { p _ { j + 1 } } \sum _ { k = 1 } ^ { m } \left( \mathrm { n e g } [ \left( V ^ { j , k } \right) _ { v w } ] \right) ^ { 2 } + \sum _ { u = 1 } ^ { p _ { j } } \left( \mathrm { n e g } [ \left( b ^ { j } \right) _ { u } ] \right) ^ { 2 } } \enspace .
214
+ $$
215
+
216
+ We can confirm immediately that this regularizer has the same effect as its analog in the fullyconnected case. Indeed, under the assumptions of Theorem 1, it holds that
217
+
218
+ $$
219
+ \begin{array} { r l } & { h ^ { \mathrm { L } , j } [ V ^ { j } ] = 0 } \\ { \Rightarrow } & { f ^ { j - 1 } \left[ V ^ { j - 1 } f ^ { j } \left[ \displaystyle \sum _ { k = 1 } ^ { m } V ^ { j , k } z + b ^ { j } \right] \right] = f ^ { j - 1 } [ V ^ { j - 1 , j } z + b ^ { j - 1 , j } ] \mathrm { f o r } \mathrm { a l l } z \in [ 0 , \infty ) ^ { p _ { j } + 1 } , } \end{array}
220
+ $$
221
+
222
+ where $\begin{array} { r } { V ^ { j - 1 , j } : = \sum _ { k = 1 } ^ { m } V ^ { j - 1 } V ^ { j , k } \in \mathbb { R } ^ { p _ { j - 1 } \times p _ { j + 1 } } } \end{array}$ and $b ^ { j - 1 , j } : = V ^ { j - 1 } b ^ { j } \in \mathbb { R } ^ { p _ { j - 1 } }$ . In other words, if the value of the regularizer is zero, the $j$ th layer can be merged into the $( j - 1 )$ th layer as before.
223
+
224
+ These observations highlight the fact that layer sparsity applies very generally: it only requires the properties of ReLU-type activations and the linearities that exist within most types of layers. As a concrete application, layer sparsity can compress networks that have convolutional layers, where $m$ specifies the number of feature maps and $\bar { \mathcal { M } } ^ { j , m }$ the non-zero patterns of the filters.
225
+
226
+ # 3 EMPIRICAL STUDY
227
+
228
+ We now confirm in a brief empirical study the fact that layer regularization can 1. improve prediction accuracies and 2. reduce the number of active layers.
229
+
230
+ # 3.1 ARTIFICIAL DATA
231
+
232
+ We start with artificial data.
233
+
234
+ <table><tr><td></td><td colspan="10">d=2,n=100</td></tr><tr><td></td><td colspan="5">l-1=10</td><td colspan="4">l-1=25</td></tr><tr><td></td><td>sw=0.1</td><td>sw=0.3</td><td></td><td></td><td colspan="2">sw=0.9</td><td>sw=0.1</td><td colspan="2">sw=0.3</td></tr><tr><td>Method</td><td>mse</td><td>s</td><td>mse</td><td>S</td><td>mse</td><td>S</td><td>mse</td><td>S</td><td>mse S</td></tr><tr><td>LS</td><td>1.123(1.396)</td><td>10(0)</td><td>1.112 (1.448)</td><td></td><td>10(0)1.060(1.349)</td><td>10(0)</td><td>0.989 (1.263)</td><td>25 (0)0.988(1.260)</td><td></td></tr><tr><td>SLS</td><td>0.018 (0.023)</td><td></td><td>10 (0)0.035 (0.616)</td><td></td><td>10 (0)0.203 (0.830)</td><td>10(0) 0.142 (1.020)</td><td></td><td>25 (0)0.147(0.985)</td><td>25(0) 25(0)</td></tr><tr><td>ILS</td><td>0.006 (0.011)</td><td></td><td>1(2)0.008 (0.023)</td><td></td><td>3(4)0.907 (1.272)</td><td>9(10)</td><td>)0.003 (0.024)</td><td>2(4) 0.050 (1.012)</td><td>7(9)</td></tr><tr><td>FLS</td><td>0.007(0.013)</td><td></td><td>1(1)0.008(0.128)</td><td></td><td>2(4)0.364(1.137)</td><td>8(9)</td><td>0.009 (0.985)</td><td>2(5)0.021(1.120)</td><td>4(13)</td></tr></table>
235
+
236
+ Table 1: encouraging layer sparsity can reduce the prediction error and the model complexity
237
+
238
+ # 3.1.1 SIMULATION FRAMEWORK
239
+
240
+ We generate data according to the model in (2). The most outside activation function $f ^ { 1 }$ is the identity function, and the coordinates of all other activation functions $f ^ { 2 } , \ldots , f ^ { l }$ are ReLU functions. The input vectors $\pmb { x } _ { 1 } , \ldots , \pmb { x } _ { n }$ are jointly independent and standard normally distributed in $d$ dimensions; the noise random variables $u _ { 1 } , \ldots , u _ { n }$ are independent of the input, jointly independent, and standard normally distributed in one dimension. For a given sparsity level $s _ { W } ~ \in ~ [ 0 , 1 ]$ , a vector ${ \textbf { \textit { s } } } \in$ $\{ 0 , 1 \} ^ { l - \mathrm { { 1 } } }$ with independent Bernoulli distributed entries that have success parameter $s w$ is generated. The entries of the parameter matrix $W ^ { 1 }$ are sampled independently from the uniform distribution on $( - 2 , 2 )$ , and the entries of the parameter matrices $W ^ { 2 } , \ldots , W ^ { l }$ are sampled independently from the uniform distribution on $( 0 , 2 )$ if $s _ { j } = 0$ and on $( - 2 , 2 )$ otherwise. Hence, the parameter $s w$ controls the level of the layer sparsity: the smaller $s w$ , the higher the network’s layer sparsity.
241
+
242
+ In concrete numbers, the input dimension is $d = 2$ , the network widths are $p _ { 2 } = \cdot \cdot \cdot = p _ { l } = 5$ the number of hidden layers is $l - 1 \in \{ 1 0 , 2 5 \}$ , and the sparsity level is $s \in \{ 0 . 1 , 0 . 3 , 0 . 9 \}$ . Our settings and values represent, of course, only a very small part of possible networks in practice, but given the generality of our concepts, any attempt of an exhaustive simulation study must fail, and the simulations at least allow us (i) to corroborate our theoretical insights and (ii) to indicate that our concepts can be very useful in practice.
243
+
244
+ Datasets of 150 samples are generated; $n = 1 0 0$ of the samples are assigned to training and the rest to testing. The relevant measures for an estimate $\widehat { W }$ of the network’s parameters are the empirical mean squared error
245
+
246
+ $$
247
+ { \widehat { \mathrm { m s e } } } \equiv { \widehat { \mathrm { m s e } } } [ { \widehat W } ] : = { \frac { 1 } { | T | } } \sum _ { ( y , { \pmb x } ) \in { \mathcal T } } \left( y - f _ { \widehat { { \pmb W } } } [ { \pmb x } ] \right) ^ { 2 } ~ ,
248
+ $$
249
+
250
+ over the test set $\tau$ with cardinality $| \tau | = 5 0$ and the level of sparsity among the hidden layers
251
+
252
+ $$
253
+ \hat { \mathrm { s } } \equiv \hat { \mathrm { s } } [ \widehat { W } ] : = \left| \left\{ j \in \{ 1 , \dots , l - 1 \} : h ^ { \mathrm { L } , j } [ \widehat { W } ^ { j } ] \neq 0 \right\} \right| .
254
+ $$
255
+
256
+ Reported are the medians (and third quantiles in paranthesis) over 30 simulation runs for each setting.
257
+
258
+ # 3.1.2 METHODS
259
+
260
+ Our first method (SLS) is a standard least-squares complemented with the layer regularizer (5) in Lagrange form $\widehat { W }$ . The baseline for this estimator is vanilla least-squares (LS). Since our estimator— in contrast to least-squares—allows for merging layers, we can also complement it with our refitting scheme of Section 2.4 (FLS). The baseline for our refitted estimator is the least-squares estimator that “knows” the relevant layers beforehand (ILS), that is, a least-squares on the relevant layers $\gamma _ { s \left[ W \right] }$ with $W$ the true parameter—see Example 2. The latter estimator cannot be used in practice, but it can serve as a benchmark here in the simulations.
261
+
262
+ The objective functions are optimized by using mini-batch gradient descent with batch size 10, learning rate $1 0 ^ { - 2 }$ , and number of epochs 200 (for $l = 1 0$ , $\mathrm { s } _ { \mathrm { W } } ~ = ~ 0 . 1$ , 0.3), 300 (for $l ~ = ~ 1 0$ $\mathrm { s } _ { \mathrm { W } } = 0 . 9 )$ , 400 (for $l = 2 5$ , $\mathrm { s } _ { \mathrm { W } } = 0 . 1 $ ), and 500 (otherwise). The tuning parameters $( r ^ { \mathrm { L } } ) _ { j }$ are 0.2 (for $l = 1 0$ , $\mathrm { s } _ { \mathrm { W } } = 0 . 1$ ), 0.12 (for $l = 1 0$ , $\mathrm { s w } = 0 . 3$ ), 0.07 (for $l = 1 0$ , $\mathrm { s } _ { \mathrm { W } } = 0 . 9 $ ), and 0.05 (for $l = 2 5$ ).
263
+
264
+ # 3.1.3 RESULTS
265
+
266
+ The numerical results show that our layer-regularized version SLS can improve on the prediction accuracy of the standard least-squares LS considerably (mse -columns of the first and second rows din Table 1). The results also show that the refitting in FLS can improve the prediction accuracy further, and that refitted estimator can rival the infeasible ILS in terms of prediction (mse -columns dof the third and fourth rows). The results finally show that the layer regularization can detect the correct number of layers (ˆs-columns of the third and fourth rows). In summary, our layer-regularized estimator outmatches the standard least-squares, and the refitted version of our estimator rivals the infeasible least-squares that knows which are the relevant layers beforehand—both in terms of prediction accuracy and sparsity. Hence, layer regularization can condense networks effectively.
267
+
268
+ The results also reveal that the prediction accuracies of our estimators increase with sW decreasing (mse -columns across different sW). This trend is expected: the higher the layer sparsity, the more dlayer-regularization can condense the networks. This behavior is confirmed in the sparsities (ˆscolumns across different sW). In other words, the layer regularization is adaptive to the true layer sparsity.
269
+
270
+ The tuning parameters $( r ^ { \mathrm { L } } ) _ { j }$ have been calibrated very roughly by hand. We expect that a more careful calibration of $r ^ { \mathrm { L } }$ based on cross-validation, for example, accentuates the positive effects of layer sparsity even further. But since our goal in this section is a general proof of concept for layer sparsity rather than the optimization of a specific deep learning pipeline, we do not pursue this further here.
271
+
272
+ The tuning parameters of the descent algorithm, such as the batch size, number of epochs, learning rate, and so forth, have also been calibrated very roughly by hand. An observation is the fact that all methods can sometimes provide accurate prediction if the number of epochs is extremely large, but our layer-regularized methods SLS and FLS generally lead to accurate prediction after much less epochs than their unregularized counterpart LS. This observation indicates that layer regularization also impacts the algorithmic aspects of deep learning beneficially.
273
+
274
+ # 3.2 REAL DATA
275
+
276
+ We now turn to real data. Specifically, we consider subsamples of MNIST (LeCun et al., 1998), FashionMNIST (Xiao et al., 2017), and KMNIST (Clanuwat et al., 2018).
277
+
278
+ # 3.2.1 SETUP
279
+
280
+ For each of the three data examples, the training data consists of $n = 1 0 0 0 0$ images sampled uniformly at random; the test data also consists of 10 000 images. The network consists of $l = 1 0$ fullyconnected layers; the hidden layers have width $p _ { 2 } = \cdot \cdot \cdot = p _ { l } = 5 0$ . While fully-connected networks have been outperformed image classification by other, more intricate pipelines, they still provide decent results (even on the subsetted data) and are perfectly suited for illustrating our ideas.
281
+
282
+ The baseline is cross-entropy (CE), which is LS but with the least-squares loss replaced by the cross-entropy loss. Our layer-sparse method is refitted cross-entropy (FCE), which is the pendant of FLS, that is, cross-entropy with additional layer-sparse regularization and refitting.
283
+
284
+ The objective functions are optimized by using mini-batch gradient descent with batch size 100, learning rate $1 0 ^ { - 3 }$ , and number of epochs 100. In line with theoretical considerations (Lederer &√ Vogt, 2020), the tuning parameters are set to $( r ^ { \mathrm { L } } ) _ { j } = \ln [ \overline { { p } } ] / \sqrt { n }$ with $\overline { { p } }$ the total number of network parameters. The performances are measured in terms of average classification accuracies (denoted those by $\widehat { A C }$ ) and level of sparsity among the hidden layers ˆs.
285
+
286
+ # 3.2.2 RESULTS
287
+
288
+ The results are summarized in Table 2. Similarly as before, we find that layer-sparse regularization can reduce the number of layers while retaining the classification accuracy or even improving it.
289
+
290
+ To highlight the features of layer sparsity more, we also look at the training losses and testing accuracies over the course of the optimization; Figure 2 contains these data averaged over 20 draws of the MNIST data. We find that both the initial estimator as well as the refitted version eventually
291
+
292
+ Table 2: layer sparsity can reduce model complexity without sacrificing classification accuracy
293
+
294
+ <table><tr><td></td><td colspan="2">MNIST</td><td colspan="2">FashionMNIST</td><td colspan="2">KMNIST</td></tr><tr><td>Method</td><td>AC</td><td>s</td><td>AC</td><td>s</td><td>AC</td><td>s</td></tr><tr><td>CE</td><td>0.92</td><td>10</td><td>0.84</td><td>10</td><td>0.76</td><td>10</td></tr><tr><td>FCE</td><td>0.92</td><td>3</td><td>0.84</td><td>3</td><td>0.78</td><td>3</td></tr></table>
295
+
296
+ achieve the same accuracies, but the refitted version can be trained much faster. These observations are commensurate with the observations in (Frankle & Carbin, 2019), who study refitting of connectionsparse networks.
297
+
298
+ In contrast to (Frankle & Carbin, 2019), however, we could not find any benefits of keeping the initializations of the original network: both the training and the accuracy curves remain virtually the same. This observation might indicate that layer sparsity might be particularly robust under refitting.
299
+
300
+ ![](images/bb57cb830e3f27fa5934069ef7c984f82c3bd8f531eef9214db9319055dc2e7d.jpg)
301
+ Figure 2: compressed layer-sparse networks can be trained faster than the original networks
302
+
303
+ # 4 DISCUSSION
304
+
305
+ We have shown that layer sparsity can compress layered networks effectively both in theory (Section 2) and practice (Section 3).
306
+
307
+ We have also shown that refitting with respect to layer sparsity can facilitate the optimization of the network. Refitting has a long-standing tradition in high-dimension statistics—see Lederer (2013), for example—but has been applied in deep learning only recently (Frankle & Carbin, 2019). Our research supports the usefulness of refitting in general, and it demonstrates that layer sparsity is particularly suited for refitting.
308
+
309
+ Related concepts such as ResNets add complexity to the network descriptions. This makes these networks not only unfit for refitting but also very hard to analyze statistically. Layer sparsity, in contrast, simplify network architectures and seem amenable to statistical analyses via recent techniques for regularized deep learning (Taheri et al., 2020). Statistical theory for layer sparsity, therefore, seems a feasible goal for further research.
310
+
311
+ In summary, layer sparsity complements other notions of sparsity that concern individual connections or nodes. All of these concepts can help to fit networks that are efficient in terms of memory and computations and easy to interpret.
312
+
313
+ # REFERENCES
314
+
315
+ J. Alvarez and M. Salzmann. Learning the number of neurons in deep networks. In Adv. Neural Inf. Process Syst., pp. 2270–2278, 2016.
316
+ T. Ash. Dynamic node creation in backpropagation networks. Connect. Sci., 1(4):365–375, 1989.
317
+ S. Bakin. Adaptive regression and model selection in data mining problems. PhD thesis, The Australian National University, 1999.
318
+ A. Barron and J. Klusowski. Approximation and estimation for high-dimensional deep learning networks. arXiv:1809.03090, 2018.
319
+ A. Barron and J. Klusowski. Complexity, statistical risk, and metric entropy of deep nets using total path variation. arXiv:1902.00800, 2019.
320
+ M. Bello. Enhanced training algorithms, and integrated training/architecture selection for multilayer perceptron networks. IEEE Trans. Neural Netw., 3(6):864–875, 1992.
321
+ J. Bien, I. Gaynanova, J. Lederer, and C. Müller. Prediction error bounds for linear regression with the TREX. Test, 28(2):451–474, 2019.
322
+ S. Changpinyo, M. Sandler, and A. Zhmoginov. The power of sparsity in convolutional neural networks. arXiv:1702.06257, 2017.
323
+ M. Chichignoud, J. Lederer, and M. Wainwright. A practical scheme and fast algorithm to tune the lasso with optimality guarantees. J. Mach. Learn. Res., 17(1):1–20, 2016.
324
+ E. Chzhen, M. Hebiri, and J. Salmon. On Lasso refitting strategies. Bernoulli, 25(4A):3175–3200, 2019.
325
+ T. Clanuwat, M. Bober-Irizar, A. Kitamoto, A. Lamb, K. Yamamoto, and D. Ha. Deep learning for classical Japanese literature. arXiv:1812.01718, 2018.
326
+ J. Feng and N. Simon. Sparse-input neural networks for high-dimensional nonparametric regression and classification. arXiv:1711.07592, 2017.
327
+ J. Frankle and M. Carbin. The lottery ticket hypothesis: finding sparse, trainable neural networks. In International Conference on Learning Representations, 2019.
328
+ X. Glorot, A. Bordes, and Y. Bengio. Deep sparse rectifier neural networks. In International Conference on Artificial Intelligence and Statistics, volume 15 of Proc. Mach. Learn. Res., pp. 315–323, 2011.
329
+ N. Golowich, A. Rakhlin, and O. Shamir. Size-independent sample complexity of neural networks. arXiv:1712.06541, 2017.
330
+ R. Hahnloser. On the piecewise analysis of networks of linear threshold neurons. Neural Networks, 11(14):691–697, 1998.
331
+ R. Hahnloser, R. Sarpeshkar, M. Mahowald, R. Douglas, and H. Seung. Digital selection and analogue amplification coexist in a cortex-inspired silicon circuit. Nature, 405:947–951, 2000.
332
+ S. Han, H. Mao, and W. Dally. Deep compression: Compressing deep neural networks with pruning, trained quantization and huffman coding. In International Conference on Learning Representations, 2016.
333
+ T. Hastie, R. Tibshirani, and M. Wainwright. Statistical learning with sparsity: The lasso and generalizations. CRC press, 2015.
334
+ K. He, X. Zhang, S. Ren, and J. Sun. Deep residual learning for image recognition. In IEEE Int. Conf. Comput. Vis. Pattern Recognit., pp. 770–778, 2016.
335
+ J. Kim, V. Calhoun, E. Shim, and J.-H. Lee. Deep neural network with weight sparsity control and pre-training extracts hierarchical features and enhances classification performance: Evidence from whole-brain resting-state functional connectivity patterns of schizophrenia. Neuroimage, 124: 127–146, 2016.
336
+ M. Kohler and S. Langer. On the rate of convergence of fully connected very deep neural network regression estimates. arXiv:1908.11133, 2019.
337
+ Y. LeCun, L. Bottou, Y. Bengio, and P. Haffner. Gradient-based learning applied to document recognition. Proc. IEEE, 86(11):2278–2324, 1998.
338
+ Y. LeCun, Y. Bengio, and G. Hinton. Deep learning. Nature, 521:436–444, 2015.
339
+ J. Lederer. Trust, but verify: benefits and pitfalls of least-squares refitting in high dimensions. arXiv:1306.0113, 2013.
340
+ J. Lederer and M. Vogt. Estimating the lasso’s effective noise. arXiv:2004.11554, 2020.
341
+ S. Liang and R. Srikant. Why deep neural networks for function approximation? arXiv:1610.04161, 2016.
342
+ B. Liu, M. Wang, H. Foroosh, M. Tappen, and M. Pensky. Sparse convolutional neural networks. In IEEE Int. Conf. Comput. Vis. Pattern Recognit., pp. 806–814, 2015.
343
+ E. Salinas and L. Abbott. A model of multiplicative neural responses in parietal cortex. Proc. Natl. Acad. Sci. USA, 93(21):11956–11961, 1996.
344
+ S. Scardapane, D. Comminiello, A. Hussain, and A. Uncini. Group sparse regularization for deep neural networks. Neurocomputing, 241:81–89, 2017.
345
+ J. Schmidhuber. Deep learning in neural networks: An overview. Neural Networks, 61:85–117, 2015.
346
+ K. Simonyan and A. Zisserman. Very deep convolutional networks for large-scale image recognition. In International Conference on Learning Representations, 2015.
347
+ M. Taheri, N. Lim, and J. Lederer. Balancing statistical and computational precision and applications to penalized linear regression with group sparsity. arXiv:1609.07195, 2016.
348
+ M. Taheri, F. Xie, and J. Lederer. Statistical guarantees for regularized networks. arXiv:2006.00294, 2020.
349
+ M. Telgarsky. Benefits of depth in neural networks. In Annual Conference on Learning Theory, volume 49 of Proc. Mach. Learn. Res., pp. 1517–1539, 2016.
350
+ R. Tibshirani. Regression shrinkage and selection via the lasso. J. R. Stat. Soc. Ser. B. Stat. Methodol., 58(1):267–288, 1996.
351
+ W. Wen, C. Wu, Y. Wang, Y. Chen, and H. Li. Learning structured sparsity in deep neural networks. In Adv. Neural Inf. Process Syst., pp. 2082–2090, 2016.
352
+ H. Xiao, K. Rasul, and R. Vollgraf. Fashion-MNIST: a novel image dataset for benchmarking machine learning algorithms. arXiv:1708.07747, 2017.
353
+ D. Yarotsky. Error bounds for approximations with deep ReLU networks. Neural Networks, 94: 103–114, 2017.
354
+
355
+ # A TUNING-PARAMETER CALIBRATION
356
+
357
+ Regularizing layer sparsity involves the tuning parameters $( r ^ { \mathrm { L } } ) _ { j }$ . Such tuning parameters are integral to regularization in deep learning and in machine learning more generally. In sparse linear regression, there has been some progress for developing theories for calibrating these parameters (Bien et al., 2019; Chichignoud et al., 2016; Taheri et al., 2016). In sparse deep learning, however, theories for tuning-parameter calibration are missing completely.
358
+
359
+ In the real-data analysis of Section 3.2, we have used a theory-inspired tuning parameter. The goal of this section here is to give more insights into the calibration of the tuning parameter. Figure 3 shows the accuracies of refitting with different number of hidden layers and locates the tuning parameters selected by our approach and by cross-validation, that is, training/validation based on 10 000 training and validation samples. The results are averaged over 20 draws of MNIST data as described earlier but only over 5 epochs each for illustration. The plot shows the expected upside-down-U-shape of the accuracies, which reflects the trade-off between variance (many layers/small tuning parameters) and bias (few layers/large tuning parameters). The plot shows that cross-validation can even improve the impact of layer sparsity further for a small number of epochs. (As illustrated in the right panel of Figure 2, tuning parameters become—as far as accuracy is concerned—less important for large number of epochs.)
360
+
361
+ Tuning-parameter calibration remains a challenge not only here but in deep learning much more generally. But our observations in this section and the main body of the paper demonstrate that layer-sparse regularization can improve deep-learning pipelines substantially with data-adaptive schemes such as cross-validation as well as with a simple, theory-inspired choice of the tuning parameter.
362
+
363
+ ![](images/8b5c51c3ddc10b71064cdc3019c8b483dacdd5313256132d55593d37b3f85757.jpg)
364
+ Figure 3: the accuracy as a function of the number of hidden layers has a typical upside-down-Ushape; the cross-validated tuning parameters (blue) improve the theory-inspired tuning parameters (red) further
parse/train/UFWnZn2v0bV/UFWnZn2v0bV_content_list.json ADDED
@@ -0,0 +1,1628 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "type": "text",
4
+ "text": "LAYER SPARSITY IN NEURAL NETWORKS ",
5
+ "text_level": 1,
6
+ "bbox": [
7
+ 176,
8
+ 98,
9
+ 674,
10
+ 121
11
+ ],
12
+ "page_idx": 0
13
+ },
14
+ {
15
+ "type": "text",
16
+ "text": "Anonymous authors Paper under double-blind review ",
17
+ "bbox": [
18
+ 183,
19
+ 145,
20
+ 400,
21
+ 172
22
+ ],
23
+ "page_idx": 0
24
+ },
25
+ {
26
+ "type": "text",
27
+ "text": "ABSTRACT ",
28
+ "text_level": 1,
29
+ "bbox": [
30
+ 454,
31
+ 210,
32
+ 544,
33
+ 226
34
+ ],
35
+ "page_idx": 0
36
+ },
37
+ {
38
+ "type": "text",
39
+ "text": "Sparsity has become popular in machine learning, because it can save computational resources, facilitate interpretations, and prevent overfitting. In this paper, we discuss sparsity in the framework of neural networks. In particular, we formulate a new notion of sparsity that concerns the networks’ layers and, therefore, aligns particularly well with the current trend toward deep networks. We call this notion layer sparsity. We then introduce corresponding regularization and refitting schemes that can complement standard deep-learning pipelines to generate more compact and accurate networks. ",
40
+ "bbox": [
41
+ 233,
42
+ 255,
43
+ 764,
44
+ 366
45
+ ],
46
+ "page_idx": 0
47
+ },
48
+ {
49
+ "type": "text",
50
+ "text": "1 INTRODUCTION ",
51
+ "text_level": 1,
52
+ "bbox": [
53
+ 176,
54
+ 428,
55
+ 336,
56
+ 443
57
+ ],
58
+ "page_idx": 0
59
+ },
60
+ {
61
+ "type": "text",
62
+ "text": "The number of layers and the number of nodes in each layer are arguably among the most fundamental parameters of neural networks. But specifying these parameters can be challenging: deep and wide networks, that is, networks with many layers and nodes, can describe data in astounding detail, but they are also prone to overfitting and require large memory, CPU, energy, and so forth. The resource requirements can be particularly problematic for real-time applications or applications on fitness trackers and other wearables, whose popularity has surged in recent years. A promising approach to meet these challenges is to fit networks sizes adaptively, that is, to allow for many layers and nodes in principle, but to ensure that the final network is “simple” in that it has a small number of connections, nodes, or layers (Changpinyo et al., 2017; Han et al., 2016; Kim et al., 2016; Liu et al., 2015; Wen et al., 2016). ",
63
+ "bbox": [
64
+ 174,
65
+ 470,
66
+ 825,
67
+ 609
68
+ ],
69
+ "page_idx": 0
70
+ },
71
+ {
72
+ "type": "text",
73
+ "text": "Popular ways to fit such simple and compact networks include successively augmenting small networks (Ash, 1989; Bello, 1992), pruning large networks (Simonyan & Zisserman, 2015), or explicit sparsity-inducing regularization of the weight matrices, which we focus on here. An example is the $\\ell _ { 1 }$ -norm, which can reduce the number of connections. Another example is the $\\ell _ { 1 }$ -norm grouped over the rows of the weight matrices, which can reduce the number of nodes. It has been shown that such regularizers can indeed produce networks that are both accurate and yet have a small number of nodes and connections either in the first layer (Feng & Simon, 2017) or overall (Alvarez & Salzmann, 2016; Liu et al., 2015; Scardapane et al., 2017). Such sparsity-inducing regularizers also have a long-standing tradition and thorough theoretical underpinning in statistics (Hastie et al., 2015). ",
74
+ "bbox": [
75
+ 174,
76
+ 617,
77
+ 825,
78
+ 742
79
+ ],
80
+ "page_idx": 0
81
+ },
82
+ {
83
+ "type": "text",
84
+ "text": "But while sparsity on the level of connections and nodes has been studied in some detail, sparsity on the level of layers is much less understood. This lack of understanding contrasts the current trend to deep network architectures, which is supported by state-of-the-art performances of deep networks (LeCun et al., 2015; Schmidhuber, 2015), recent approximation theory for ReLU activation networks (Liang & Srikant, 2016; Telgarsky, 2016; Yarotsky, 2017), and recent statistical theory (Golowich et al., 2017; Kohler & Langer, 2019; Taheri et al., 2020). Hence, a better understanding of sparsity on the level of layers seems to be in order. ",
85
+ "bbox": [
86
+ 174,
87
+ 750,
88
+ 825,
89
+ 847
90
+ ],
91
+ "page_idx": 0
92
+ },
93
+ {
94
+ "type": "text",
95
+ "text": "Therefore, we discuss in this paper sparsity with a special emphasis on the networks’ layers. Our key observation is that for typical activation functions such as ReLU, a layer can be removed if all its parameter values are non-negative. We leverage this observation in the development of a new regularizer that specifically targets sparsity on the level of layers, and we show that this regularizer can lead to more compact and more accurate networks. ",
96
+ "bbox": [
97
+ 174,
98
+ 854,
99
+ 823,
100
+ 922
101
+ ],
102
+ "page_idx": 0
103
+ },
104
+ {
105
+ "type": "text",
106
+ "text": "Our three main contributions are: ",
107
+ "bbox": [
108
+ 173,
109
+ 116,
110
+ 393,
111
+ 131
112
+ ],
113
+ "page_idx": 1
114
+ },
115
+ {
116
+ "type": "text",
117
+ "text": "1. We introduce a new notion of sparsity that we call layer sparsity. \n2. We introduce a corresponding regularizer that can reduce network sizes. \n3. We introduce an additional refitting step that can further improve prediction accuracies. ",
118
+ "bbox": [
119
+ 212,
120
+ 142,
121
+ 805,
122
+ 194
123
+ ],
124
+ "page_idx": 1
125
+ },
126
+ {
127
+ "type": "text",
128
+ "text": "In Section 2, we specify our framework, discuss different notions of sparsity, and introduce our refitting scheme. In Section 3, we establish a numerical proof of concept. In Section 4, we conclude with a discussion. ",
129
+ "bbox": [
130
+ 174,
131
+ 204,
132
+ 823,
133
+ 247
134
+ ],
135
+ "page_idx": 1
136
+ },
137
+ {
138
+ "type": "text",
139
+ "text": "2 SPARSITY IN NEURAL NETWORKS ",
140
+ "text_level": 1,
141
+ "bbox": [
142
+ 174,
143
+ 267,
144
+ 491,
145
+ 284
146
+ ],
147
+ "page_idx": 1
148
+ },
149
+ {
150
+ "type": "text",
151
+ "text": "We first state our framework, then discuss different notions of sparsity, and finally introduce a refitting scheme. ",
152
+ "bbox": [
153
+ 174,
154
+ 297,
155
+ 825,
156
+ 327
157
+ ],
158
+ "page_idx": 1
159
+ },
160
+ {
161
+ "type": "text",
162
+ "text": "2.1 MATHEMATICAL FRAMEWORK ",
163
+ "text_level": 1,
164
+ "bbox": [
165
+ 174,
166
+ 343,
167
+ 428,
168
+ 358
169
+ ],
170
+ "page_idx": 1
171
+ },
172
+ {
173
+ "type": "text",
174
+ "text": "To fix ideas, we first consider fully-connected neural networks that model data according to ",
175
+ "bbox": [
176
+ 169,
177
+ 369,
178
+ 772,
179
+ 385
180
+ ],
181
+ "page_idx": 1
182
+ },
183
+ {
184
+ "type": "equation",
185
+ "img_path": "images/a9a3d4ac6fb030858337896e557d6c5fb7b0360c2853843acf5a052d4962ac4f.jpg",
186
+ "text": "$$\ny _ { i } = f ^ { 1 } \\Bigl [ W ^ { 1 } f ^ { 2 } \\bigl [ . . . f ^ { l } [ W ^ { l } x _ { i } ] \\bigr ] \\Bigr ] + u _ { i } \\ ,\n$$",
187
+ "text_format": "latex",
188
+ "bbox": [
189
+ 370,
190
+ 388,
191
+ 625,
192
+ 416
193
+ ],
194
+ "page_idx": 1
195
+ },
196
+ {
197
+ "type": "text",
198
+ "text": "where $i \\in \\{ 1 , \\ldots , n \\}$ indexes the $n$ different samples, $y _ { i } ~ \\in ~ \\mathbb R$ is the output, $\\pmb { x } _ { i } \\in \\mathbb { R } ^ { d }$ is the corresponding input with $d$ the input dimension, $l$ is the number of layers, $W ^ { j } \\in \\mathbb { R } ^ { p _ { j } \\times p _ { j + 1 } }$ for $j \\in$ $\\{ 1 , \\ldots , l \\}$ are the weight matrices with $p _ { 1 } = 1$ and $p _ { l + 1 } = d$ , $f ^ { j } : \\dot { \\mathbb { R } ^ { p _ { j } } } \\mathbb { R } ^ { p _ { j } }$ for $j \\in \\{ 1 , \\ldots , l \\}$ are the activation functions, and $u _ { i } \\in \\mathbb { R }$ is the random noise. Extensions beyond fully-connected networks are straightforward—see Section 2.5. ",
199
+ "bbox": [
200
+ 173,
201
+ 421,
202
+ 825,
203
+ 492
204
+ ],
205
+ "page_idx": 1
206
+ },
207
+ {
208
+ "type": "text",
209
+ "text": "We summarize the parameters in $\\pmb { W } : = ( W ^ { 1 } , \\ldots , W ^ { l } ) \\in \\mathscr { V } : = \\{ \\pmb { V } = ( V ^ { 1 } , \\ldots , V ^ { l } ) : V ^ { j } \\in \\mathscr { V }$ $\\mathbb { R } ^ { p _ { j } \\times p _ { j + 1 } } \\}$ , and we write for ease of notation ",
210
+ "bbox": [
211
+ 174,
212
+ 497,
213
+ 823,
214
+ 529
215
+ ],
216
+ "page_idx": 1
217
+ },
218
+ {
219
+ "type": "equation",
220
+ "img_path": "images/6a8bce57351acfd7b4ed8c8b069ef8c0035502d17675b8169f3c7d7f4896b4a2.jpg",
221
+ "text": "$$\nf _ { V } [ \\pmb { x } _ { i } ] : = \\pmb { f } ^ { 1 } \\left[ V ^ { 1 } \\pmb { f } ^ { 2 } \\left[ . . . \\pmb { f } ^ { l } ( V ^ { l } \\pmb { x } _ { i } ] \\right] \\right]\n$$",
222
+ "text_format": "latex",
223
+ "bbox": [
224
+ 380,
225
+ 532,
226
+ 617,
227
+ 560
228
+ ],
229
+ "page_idx": 1
230
+ },
231
+ {
232
+ "type": "text",
233
+ "text": "for $V \\in \\mathcal V$ . ",
234
+ "bbox": [
235
+ 173,
236
+ 564,
237
+ 250,
238
+ 579
239
+ ],
240
+ "page_idx": 1
241
+ },
242
+ {
243
+ "type": "text",
244
+ "text": "Neural networks are usually fitted based on regularized estimators in Lagrange ",
245
+ "bbox": [
246
+ 173,
247
+ 585,
248
+ 689,
249
+ 602
250
+ ],
251
+ "page_idx": 1
252
+ },
253
+ {
254
+ "type": "equation",
255
+ "img_path": "images/6e2ded64c5f3909d063e4c0ebcaf0a581cdf20ddad012ee5924131719cd930a8.jpg",
256
+ "text": "$$\n\\widehat { W } \\in \\mathop { \\mathrm { a r g m i n } } _ { V \\in \\mathcal { V } } \\bigl \\{ \\mathop { \\mathrm { D a t a F i t } } [ y _ { 1 } , \\dots , y _ { n } , \\pmb { x } _ { 1 } , \\dots , \\pmb { x } _ { n } ] + h [ \\pmb { V } ] \\bigr \\}\n$$",
257
+ "text_format": "latex",
258
+ "bbox": [
259
+ 307,
260
+ 606,
261
+ 691,
262
+ 635
263
+ ],
264
+ "page_idx": 1
265
+ },
266
+ {
267
+ "type": "text",
268
+ "text": "or constraint form ",
269
+ "bbox": [
270
+ 173,
271
+ 640,
272
+ 295,
273
+ 654
274
+ ],
275
+ "page_idx": 1
276
+ },
277
+ {
278
+ "type": "equation",
279
+ "img_path": "images/12cc4e926a87a1960a78c274c95f55c6f1cc50318e340f293945faef0db44859.jpg",
280
+ "text": "$$\n\\widehat { \\cal W } \\in \\underset { h \\left[ V \\right] \\leq 1 } { \\mathrm { a r g m i n } } \\big \\{ \\operatorname { D a t a F i t } [ y _ { 1 } , \\dots , y _ { n } , \\pmb { x } _ { 1 } , \\dots , \\pmb { x } _ { n } ] \\big \\} ,\n$$",
281
+ "text_format": "latex",
282
+ "bbox": [
283
+ 326,
284
+ 648,
285
+ 668,
286
+ 689
287
+ ],
288
+ "page_idx": 1
289
+ },
290
+ {
291
+ "type": "text",
292
+ "text": "where DataFit : $\\mathbb { R } ^ { n } \\times \\mathbb { R } ^ { n \\times d }$ is a data-fitting function such as least-squares $\\textstyle \\sum _ { i = 1 } ^ { n } ( y _ { i } - f _ { V } [ { \\pmb x } _ { i } ] ) ^ { 2 }$ and $h : \\mathcal { V } \\to [ 0 , \\infty )$ is a regularizer such as the elementwise $\\ell _ { 1 }$ -norm $\\textstyle \\sum _ { j , k , l } | ( V ^ { j } ) _ { k l } |$ . We are particularly interested in regularizers that induce sparsity. ",
293
+ "bbox": [
294
+ 173,
295
+ 691,
296
+ 825,
297
+ 738
298
+ ],
299
+ "page_idx": 1
300
+ },
301
+ {
302
+ "type": "text",
303
+ "text": "2.2 STANDARD NOTIONS OF SPARSITY ",
304
+ "text_level": 1,
305
+ "bbox": [
306
+ 176,
307
+ 753,
308
+ 455,
309
+ 768
310
+ ],
311
+ "page_idx": 1
312
+ },
313
+ {
314
+ "type": "text",
315
+ "text": "We first state two regularizers that are known in deep learning and the corresponding notions of sparsity. ",
316
+ "bbox": [
317
+ 173,
318
+ 780,
319
+ 825,
320
+ 810
321
+ ],
322
+ "page_idx": 1
323
+ },
324
+ {
325
+ "type": "text",
326
+ "text": "Connection sparsity Consider the vanilla $\\ell _ { 1 }$ -regularizer ",
327
+ "bbox": [
328
+ 173,
329
+ 823,
330
+ 557,
331
+ 839
332
+ ],
333
+ "page_idx": 1
334
+ },
335
+ {
336
+ "type": "equation",
337
+ "img_path": "images/089add6afcc5f9f1435cd36fe6e241f0ec6ff8253623afe4427340b2a1d0135c.jpg",
338
+ "text": "$$\nh ^ { \\mathrm { C } } [ { \\pmb V } ] : = \\sum _ { j = 1 } ^ { l } ( r ^ { \\mathrm { C } } ) _ { j } \\| { \\pmb V } ^ { j } \\| _ { 1 } : = \\sum _ { j = 1 } ^ { l } ( r ^ { \\mathrm { C } } ) _ { j } \\sum _ { v = 1 } ^ { p _ { j } } \\sum _ { w = 1 } ^ { p _ { j + 1 } } | ( V ^ { j } ) _ { v w } | ~ ,\n$$",
339
+ "text_format": "latex",
340
+ "bbox": [
341
+ 300,
342
+ 844,
343
+ 696,
344
+ 888
345
+ ],
346
+ "page_idx": 1
347
+ },
348
+ {
349
+ "type": "text",
350
+ "text": "where $r ^ { \\mathrm { C } } \\in [ 0 , \\infty ) ^ { l }$ is a vector of tuning parameters. This regularizer is the deep learning equivalent of the lasso regularizer in linear regression (Tibshirani, 1996) and has received considerable attention recently (Barron & Klusowski, 2018; 2019; Kim et al., 2016). The regularizer acts on each individual connection, pruning a full network (first network from the left in Figure 1) to a more sparsely connected network (second network in Figure 1). We, therefore, propose to speak of connection sparsity. ",
351
+ "bbox": [
352
+ 173,
353
+ 895,
354
+ 821,
355
+ 924
356
+ ],
357
+ "page_idx": 1
358
+ },
359
+ {
360
+ "type": "image",
361
+ "img_path": "images/ba45d87a3f0aeb747ed6e1fd3ebd33a857b8d7457056e6a4e51598e4d4c85604.jpg",
362
+ "image_caption": [
363
+ "Figure 1: feedforward neural networks with different types of sparsity "
364
+ ],
365
+ "image_footnote": [],
366
+ "bbox": [
367
+ 179,
368
+ 101,
369
+ 805,
370
+ 334
371
+ ],
372
+ "page_idx": 2
373
+ },
374
+ {
375
+ "type": "text",
376
+ "text": "",
377
+ "bbox": [
378
+ 173,
379
+ 388,
380
+ 826,
381
+ 446
382
+ ],
383
+ "page_idx": 2
384
+ },
385
+ {
386
+ "type": "text",
387
+ "text": "Node sparsity Consider a grouped version of the above regularizer ",
388
+ "bbox": [
389
+ 173,
390
+ 460,
391
+ 625,
392
+ 476
393
+ ],
394
+ "page_idx": 2
395
+ },
396
+ {
397
+ "type": "equation",
398
+ "img_path": "images/590ba8b9ffebe95b5d9fd30ec3e94bbabe3e45d6b374d952075778ed318d8e76.jpg",
399
+ "text": "$$\nh ^ { \\mathrm { N } } [ V ] : = \\sum _ { j = 1 } ^ { l } ( r ^ { \\mathrm { N } } ) _ { j } \\| V ^ { j } \\| _ { 2 , 1 } : = \\sum _ { j = 1 } ^ { l } ( r ^ { \\mathrm { N } } ) _ { j } \\sum _ { v = 1 } ^ { p _ { j } } \\sqrt { \\sum _ { w = 1 } ^ { p _ { j + 1 } } | ( V ^ { j } ) _ { v w } | ^ { 2 } } ,\n$$",
400
+ "text_format": "latex",
401
+ "bbox": [
402
+ 282,
403
+ 481,
404
+ 715,
405
+ 530
406
+ ],
407
+ "page_idx": 2
408
+ },
409
+ {
410
+ "type": "text",
411
+ "text": "where $r ^ { \\mathrm { N } } \\in [ 0 , \\infty ) ^ { l }$ is again a vector of tuning parameters. This regularizer is the deep learning equivalent of the group lasso regularizer in linear regression (Bakin, 1999) and has received some attention recently (Alvarez & Salzmann, 2016; Feng & Simon, 2017; Scardapane et al., 2017). The regularizer acts on all connections that go into a node simultaneously, rendering entire nodes inactive (third network in Figure 1). We, therefore, propose to speak of node sparsity. ",
412
+ "bbox": [
413
+ 173,
414
+ 534,
415
+ 825,
416
+ 606
417
+ ],
418
+ "page_idx": 2
419
+ },
420
+ {
421
+ "type": "text",
422
+ "text": "2.3 LAYER SPARSITY ",
423
+ "text_level": 1,
424
+ "bbox": [
425
+ 174,
426
+ 621,
427
+ 334,
428
+ 636
429
+ ],
430
+ "page_idx": 2
431
+ },
432
+ {
433
+ "type": "text",
434
+ "text": "We now complement the two existing regularizers and notions of sparsity with a new, third notion. ",
435
+ "bbox": [
436
+ 171,
437
+ 647,
438
+ 816,
439
+ 662
440
+ ],
441
+ "page_idx": 2
442
+ },
443
+ {
444
+ "type": "text",
445
+ "text": "Layer sparsity Consider the regularizer ",
446
+ "bbox": [
447
+ 174,
448
+ 675,
449
+ 450,
450
+ 691
451
+ ],
452
+ "page_idx": 2
453
+ },
454
+ {
455
+ "type": "equation",
456
+ "img_path": "images/fee758fcab3faabe20579e1d125782fa35560e9ea89f341e9fe80c811157cb2b.jpg",
457
+ "text": "$$\nh ^ { \\mathrm { L } } [ { \\pmb V } ] : = \\sum _ { j = 1 } ^ { l - 1 } ( r ^ { \\mathrm { L } } ) _ { j } \\| { \\pmb V } ^ { j } \\| _ { 2 , + } : = \\sum _ { j = 1 } ^ { l - 1 } ( r ^ { \\mathrm { L } } ) _ { j } \\sqrt { \\sum _ { v = 1 } ^ { p _ { j } } \\sum _ { w = 1 } ^ { p _ { j + 1 } } \\left( \\mathrm { n e g } [ ( V ^ { j } ) _ { v w } ] \\right) ^ { 2 } } \\enspace ,\n$$",
458
+ "text_format": "latex",
459
+ "bbox": [
460
+ 266,
461
+ 696,
462
+ 732,
463
+ 746
464
+ ],
465
+ "page_idx": 2
466
+ },
467
+ {
468
+ "type": "text",
469
+ "text": "where $r ^ { \\mathrm { L } } \\in [ 0 , \\infty ) ^ { l - 1 }$ is a vector of tuning parameters, and $\\mathrm { n e g } [ a ] : = \\mathrm { m i n } \\{ a , 0 \\}$ is the negative part of a real value $a \\in \\mathbb { R }$ . This regularizers does not have an equivalent in linear regression, and it is also new in deep learning. ",
470
+ "bbox": [
471
+ 174,
472
+ 750,
473
+ 825,
474
+ 792
475
+ ],
476
+ "page_idx": 2
477
+ },
478
+ {
479
+ "type": "text",
480
+ "text": "We argue that the regularizer can give rise to a new type of sparsity. The regularizer can be disentangled along the layers according to ",
481
+ "bbox": [
482
+ 173,
483
+ 799,
484
+ 825,
485
+ 829
486
+ ],
487
+ "page_idx": 2
488
+ },
489
+ {
490
+ "type": "equation",
491
+ "img_path": "images/b23c22484824ec5bf79198c282065e440ae4c6fdab9bfac23bb82f5c691a150b.jpg",
492
+ "text": "$$\nh ^ { \\mathrm { L } } [ \\boldsymbol { V } ] = \\sum _ { j = 1 } ^ { l - 1 } ( r ^ { \\mathrm { L } } ) _ { j } h ^ { \\mathrm { L } , j } [ \\boldsymbol { V } ^ { j } ]\n$$",
493
+ "text_format": "latex",
494
+ "bbox": [
495
+ 405,
496
+ 832,
497
+ 593,
498
+ 877
499
+ ],
500
+ "page_idx": 2
501
+ },
502
+ {
503
+ "type": "text",
504
+ "text": "with ",
505
+ "bbox": [
506
+ 173,
507
+ 881,
508
+ 205,
509
+ 895
510
+ ],
511
+ "page_idx": 2
512
+ },
513
+ {
514
+ "type": "equation",
515
+ "img_path": "images/d805a9d3910aaf04cdf126e68f8101251476488e805f0acfc86cf4191166913a.jpg",
516
+ "text": "$$\nh ^ { \\mathrm { L } , j } [ V ^ { j } ] : = \\sqrt { \\sum _ { v = 1 } ^ { p _ { j } } \\sum _ { w = 1 } ^ { p _ { j + 1 } } \\bigl ( \\mathrm { n e g } [ ( V ^ { j } ) _ { v w } ] \\bigr ) ^ { 2 } } \\qquad \\mathrm { f o r } \\ j \\in \\{ 1 , \\ldots , l - 1 \\} \\ .\n$$",
517
+ "text_format": "latex",
518
+ "bbox": [
519
+ 269,
520
+ 891,
521
+ 727,
522
+ 940
523
+ ],
524
+ "page_idx": 2
525
+ },
526
+ {
527
+ "type": "text",
528
+ "text": "We then focus on an individual inner layer, that is, a layer that corresponds to an index $j \\in \\{ 2 , \\ldots , l -$ $1 \\}$ . To fix ideas, we consider the popular ReLU activation (Glorot et al., 2011; Hahnloser, 1998; Hahnloser et al., 2000; Salinas & Abbott, 1996); in other words, we consider $( \\pmb { f } ^ { j } ) _ { q } [ t ] : = f _ { \\mathrm { R e L U } } [ t ] : =$ $\\operatorname* { m a x } \\{ t , 0 \\}$ for all $j \\in \\{ 2 , \\dots , l \\}$ , $q \\in \\{ 1 , \\ldots , p _ { j } \\}$ , and $t \\in \\mathbb { R }$ (the activation of the output layer can be arbitrary). It is now easy to show that the regularizer $h ^ { \\mathrm { L } }$ indeed induces sparsity on the level of layers. ",
529
+ "bbox": [
530
+ 173,
531
+ 102,
532
+ 826,
533
+ 189
534
+ ],
535
+ "page_idx": 3
536
+ },
537
+ {
538
+ "type": "text",
539
+ "text": "Theorem 1 (Layer Sparsity). Consider $j \\in \\{ 2 , \\dots , l - 1 \\}$ , and define a merged weight matrix as $V ^ { j - 1 , j } : = \\dot { V } ^ { j - \\bar { 1 } } V ^ { j } \\stackrel { \\bullet } { \\in } \\mathbb { R } ^ { p _ { j - 1 } \\times p _ { j + 1 } }$ . It holds that ",
540
+ "bbox": [
541
+ 171,
542
+ 193,
543
+ 823,
544
+ 222
545
+ ],
546
+ "page_idx": 3
547
+ },
548
+ {
549
+ "type": "equation",
550
+ "img_path": "images/1e26fc67422bce14832b33d165906168a0b852e3108e253f1d94076a377bcf75.jpg",
551
+ "text": "$$\n\\begin{array} { r } { h ^ { \\mathrm { L } , j } [ V ^ { j } ] = 0 \\quad \\Rightarrow \\quad f ^ { j - 1 } \\big [ V ^ { j - 1 } f ^ { j } [ V ^ { j } z ] \\big ] = f ^ { j - 1 } \\big [ V ^ { j - 1 , j } z \\big ] \\qquad f o r \\ a l l \\ z \\in [ 0 , \\infty ) ^ { p _ { j + 1 } } \\ . } \\end{array}\n$$",
552
+ "text_format": "latex",
553
+ "bbox": [
554
+ 199,
555
+ 228,
556
+ 795,
557
+ 250
558
+ ],
559
+ "page_idx": 3
560
+ },
561
+ {
562
+ "type": "text",
563
+ "text": "Proof of Theorem $^ { l }$ . If $h ^ { \\mathrm { L } , j } [ V ^ { j } ] = 0$ , then $( V ^ { j } ) _ { q m } \\ge 0$ for all $q \\in \\{ 1 , \\ldots , p _ { j } \\}$ , $m \\in \\{ 1 , \\ldots , p _ { j + 1 } \\}$ . Hence, it holds for all $q \\in \\{ 1 , \\ldots , p _ { j } \\}$ that $( V ^ { j } z ) _ { q } \\ge 0$ and, therefore, that $f ^ { j } [ V ^ { j } z ] = V ^ { j } z$ . The theorem follows then by the fact that $V ^ { j - 1 , j } = V ^ { j - 1 } V ^ { j }$ . □ ",
564
+ "bbox": [
565
+ 173,
566
+ 266,
567
+ 826,
568
+ 313
569
+ ],
570
+ "page_idx": 3
571
+ },
572
+ {
573
+ "type": "text",
574
+ "text": "A key property of the ReLU function is positive homogeneity. That positive homogeneity can allow for moving weights between layers had been observed in Barron & Klusowski (2018); here, we use the positive homogeneity to merge layers. The idea is as follows: $h ^ { \\mathrm { L } , j } [ V ^ { j } ] = 0$ means in view of the stated theorem that we can redefine the network of depth $l$ as a network of depth $l - 1$ by removing the function $f ^ { j }$ , replacing the weights $V ^ { j - 1 }$ by $V ^ { j - 1 , j }$ , and then removing the $j$ th layer altogether. ",
575
+ "bbox": [
576
+ 173,
577
+ 332,
578
+ 825,
579
+ 404
580
+ ],
581
+ "page_idx": 3
582
+ },
583
+ {
584
+ "type": "text",
585
+ "text": "Theorem 1 can be applied sequentially to neighboring layers; hence, the regularization can merge not only one but many layers into one. In conclusion, our new regularizer $h ^ { \\mathrm { \\check { L } } }$ acts on all nodes and connections of each layer simultaneously, rendering entire layers inactive (fourth network in Figure 1). We, therefore, propose to speak of layer sparsity. ",
586
+ "bbox": [
587
+ 174,
588
+ 409,
589
+ 825,
590
+ 465
591
+ ],
592
+ "page_idx": 3
593
+ },
594
+ {
595
+ "type": "text",
596
+ "text": "The concept of layer sparsity and Theorem 1 in particular do not hinge on the exact choice of the regularizer in (5): one can take any function $h ^ { \\mathrm { L } }$ that can be disentangled along the layers as described and that ensures the fact that $h ^ { \\mathrm { L } , \\bar { j } } [ V ^ { j } ] = 0$ implies $\\mathrm { m i n } _ { k , l } ( V ^ { j } ) _ { k l } \\geq 0$ . ",
597
+ "bbox": [
598
+ 174,
599
+ 472,
600
+ 825,
601
+ 515
602
+ ],
603
+ "page_idx": 3
604
+ },
605
+ {
606
+ "type": "text",
607
+ "text": "We illustrate layer sparsity with two examples. ",
608
+ "bbox": [
609
+ 174,
610
+ 521,
611
+ 478,
612
+ 536
613
+ ],
614
+ "page_idx": 3
615
+ },
616
+ {
617
+ "type": "text",
618
+ "text": "Example 1 (Identity Activation). We first highlight the meaning of layer sparsity in a simplistic setting that does not rely on Theorem $^ { l }$ . We consider identity activation, that is, $( \\dot { f ^ { j } } ) _ { q } [ t ] = t$ for all $j \\in \\{ 2 , \\ldots , l \\}$ , $q \\in \\{ 1 , \\ldots , p _ { j } \\}$ , and $t \\in \\mathbb { R } .$ . The networks in (2) can then be written as ",
619
+ "bbox": [
620
+ 173,
621
+ 540,
622
+ 825,
623
+ 583
624
+ ],
625
+ "page_idx": 3
626
+ },
627
+ {
628
+ "type": "equation",
629
+ "img_path": "images/a5ec9e0fcf95fe330147bd55650246a24f81d3ff35e5337ca231c62ef4d28584.jpg",
630
+ "text": "$$\nf _ { V } [ { \\pmb x } _ { i } ] = { \\pmb f } ^ { 1 } [ V ^ { 1 } \\cdot \\cdot \\cdot V ^ { l } { \\pmb x } _ { i } ] \\enspace .\n$$",
631
+ "text_format": "latex",
632
+ "bbox": [
633
+ 403,
634
+ 592,
635
+ 594,
636
+ 611
637
+ ],
638
+ "page_idx": 3
639
+ },
640
+ {
641
+ "type": "text",
642
+ "text": "In other words, the initial $l$ -layer network can be compressed into a one-layer network with activation function $f ^ { 1 }$ and parameter matrix $V ^ { 1 } \\cdot \\cdot \\cdot V ^ { l } \\in \\mathbb { R } ^ { \\hat { 1 } \\times d }$ . This setting with identity activation is, of course, purely academic, but it motivates an important question: can parts of networks be compressed similarly in the case of ReLU? ",
643
+ "bbox": [
644
+ 173,
645
+ 617,
646
+ 826,
647
+ 674
648
+ ],
649
+ "page_idx": 3
650
+ },
651
+ {
652
+ "type": "text",
653
+ "text": "Theorem 1 gives an answer to this question: if $h ^ { \\mathrm { L } , j } [ V ^ { j } ] = 0 ;$ , then the jth and $( j - 1 ) t h$ layers can be combined. In the extreme case $h ^ { \\mathrm { L } , 2 } [ V ^ { 2 } ] = \\cdot \\cdot \\cdot = \\dot { h } ^ { \\mathrm { L } , l } [ V ^ { l } ] = 0$ and non-negative input, the network can be condensed into a one-layer network just as in the linear case. In this sense, one can understand our layer regularizer is as a measure for the networks’ “distance to linearity.” We detail this further in the following example. ",
654
+ "bbox": [
655
+ 173,
656
+ 679,
657
+ 825,
658
+ 752
659
+ ],
660
+ "page_idx": 3
661
+ },
662
+ {
663
+ "type": "text",
664
+ "text": "Example 2 (ReLU Activation). We now illustrate how layer sparsity compresses and, therefore, simplifies networks in the case of ReLU activation. We fix an initial network $f _ { N }$ parameterized by $N \\in \\nu$ . We identify the active layers of the network by ",
665
+ "bbox": [
666
+ 173,
667
+ 756,
668
+ 825,
669
+ 799
670
+ ],
671
+ "page_idx": 3
672
+ },
673
+ {
674
+ "type": "equation",
675
+ "img_path": "images/c23caa173cef8b87c281257762e50b8f4c72f03abb5ba3968c598c349a891c02.jpg",
676
+ "text": "$$\n{ \\mathcal { S } } \\equiv S [ N ] : = \\left\\{ j \\in \\{ 2 , \\dots , l - 1 \\} : h ^ { \\mathrm { L } , j } [ N ^ { j } ] \\neq 0 \\right\\} \\cup \\{ 1 , l \\} \\ .\n$$",
677
+ "text_format": "latex",
678
+ "bbox": [
679
+ 290,
680
+ 805,
681
+ 707,
682
+ 825
683
+ ],
684
+ "page_idx": 3
685
+ },
686
+ {
687
+ "type": "text",
688
+ "text": "Thus, $s$ and $\\{ 1 , \\ldots , l \\} \\setminus S$ contain the indexes of the relevant and irrelevant layers, respectively. (We always consider the input and output layers as active.) The level of sparsity, that is, the number of active layers, is $s : = | S | \\leq l$ . ",
689
+ "bbox": [
690
+ 174,
691
+ 832,
692
+ 826,
693
+ 876
694
+ ],
695
+ "page_idx": 3
696
+ },
697
+ {
698
+ "type": "text",
699
+ "text": "Observe first that the theorem’s restriction to $_ z$ ’s that have non-negative elements makes sense: by the definition of $f _ { \\mathrm { R e L U } }$ , the outputs of every ReLU layer are non-negative. We now denote the indexes in $s$ in an orderly fashion: $j _ { 1 } , \\dots , j _ { s } \\in \\mathcal { S }$ such that $j _ { 1 } < \\cdots < j _ { s } = l$ . We then define scaled ",
700
+ "bbox": [
701
+ 174,
702
+ 881,
703
+ 825,
704
+ 925
705
+ ],
706
+ "page_idx": 3
707
+ },
708
+ {
709
+ "type": "text",
710
+ "text": "versions of the corresponding merged matrices: if $j _ { i } - 1 \\in \\mathcal S$ or $j _ { i } \\in \\{ 1 , l \\}$ , we do the “trivial merge” $M ^ { j _ { i } } : = \\dot { N } ^ { j _ { i } } \\in \\mathbb { R } ^ { p _ { j _ { i } } \\times p _ { j _ { i } + 1 } }$ ; otherwise, we do the “non-trivial merge” ",
711
+ "bbox": [
712
+ 169,
713
+ 103,
714
+ 826,
715
+ 132
716
+ ],
717
+ "page_idx": 4
718
+ },
719
+ {
720
+ "type": "equation",
721
+ "img_path": "images/02c7e41f18a074e1f53d44c8a417a8f545b8a9e2cbb767aa6d350f9d4d03d917.jpg",
722
+ "text": "$$\nM ^ { j _ { i } } : = N ^ { j _ { i - 1 } + 1 } \\cdot \\cdot \\cdot N ^ { j _ { i } } \\in \\mathbb { R } ^ { p _ { j _ { i - 1 } + 1 } \\times p _ { j _ { i } + 1 } } \\mathrm { ~ . ~ }\n$$",
723
+ "text_format": "latex",
724
+ "bbox": [
725
+ 349,
726
+ 138,
727
+ 647,
728
+ 155
729
+ ],
730
+ "page_idx": 4
731
+ },
732
+ {
733
+ "type": "text",
734
+ "text": "In other words, we merge all irrelevant layers between the $j _ { i - 1 } t h$ and $j _ { i } t h$ layers into the $j _ { i } t h$ layer. We can then compress the data-generating model in (1) into ",
735
+ "bbox": [
736
+ 169,
737
+ 164,
738
+ 826,
739
+ 200
740
+ ],
741
+ "page_idx": 4
742
+ },
743
+ {
744
+ "type": "equation",
745
+ "img_path": "images/54d8abd3b4a30cb943d1b8b4eea605087f9d1eeea2a4aefafb1478b53f6d9786.jpg",
746
+ "text": "$$\ny _ { i } = f ^ { j _ { 1 } } \\Big [ M ^ { j _ { 1 } } { \\pmb f } ^ { j _ { 2 } } \\big [ . . . { \\pmb f } ^ { j _ { s } } [ M ^ { j _ { s } } { \\pmb x } _ { i } ] ] \\Big ] + u _ { i }\n$$",
747
+ "text_format": "latex",
748
+ "bbox": [
749
+ 362,
750
+ 207,
751
+ 635,
752
+ 234
753
+ ],
754
+ "page_idx": 4
755
+ },
756
+ {
757
+ "type": "text",
758
+ "text": "with $M : = ( M ^ { j _ { 1 } } , \\ldots , M ^ { j _ { s } } ) \\in \\mathcal { V } _ { S } : = \\{ V = ( V ^ { 1 } , \\ldots , V ^ { s } ) : V ^ { i } \\in \\mathbb { R } ^ { p _ { j _ { i - 1 } + 1 } \\times p _ { j _ { i } + 1 } } \\} .$ Formulated differently, we can condense the original network according to ",
759
+ "bbox": [
760
+ 171,
761
+ 241,
762
+ 825,
763
+ 272
764
+ ],
765
+ "page_idx": 4
766
+ },
767
+ {
768
+ "type": "equation",
769
+ "img_path": "images/90a06bb9748c1b04b9bf40415e29673f78f27b0f899f72517d2d42ddf526fc68.jpg",
770
+ "text": "$$\nf _ { N } [ { \\pmb x } _ { i } ] = f _ { M } [ { \\pmb x } _ { i } ] = { \\pmb f } ^ { j _ { 1 } } \\left[ M ^ { j _ { 1 } } { \\pmb f } ^ { j _ { 2 } } \\left[ . . . { \\pmb f } ^ { j _ { s } } [ M ^ { j _ { s } } { \\pmb x } _ { i } ] \\right] \\right] ,\n$$",
771
+ "text_format": "latex",
772
+ "bbox": [
773
+ 321,
774
+ 279,
775
+ 674,
776
+ 305
777
+ ],
778
+ "page_idx": 4
779
+ },
780
+ {
781
+ "type": "text",
782
+ "text": "that is, we can formulate the initial ReLU activation network with $l$ layers as a new ReLU activation network with s layers. ",
783
+ "bbox": [
784
+ 174,
785
+ 311,
786
+ 823,
787
+ 340
788
+ ],
789
+ "page_idx": 4
790
+ },
791
+ {
792
+ "type": "text",
793
+ "text": "The new network is still a ReLU activation network but has a smaller number of layers if $s < l$ and, consequently, a smaller number of parameters in total: the total number of parameters in the initial network is $\\textstyle \\sum _ { j = 1 } ^ { l } ( p _ { j } \\times p _ { j + 1 } )$ , while the total number of parameters in the transformed network is only $\\begin{array} { r } { \\sum _ { i = 1 } ^ { s } ( p _ { j _ { i - 1 } + 1 } \\times p _ { j _ { i } + 1 } ) } \\end{array}$ . ",
794
+ "bbox": [
795
+ 173,
796
+ 347,
797
+ 825,
798
+ 410
799
+ ],
800
+ "page_idx": 4
801
+ },
802
+ {
803
+ "type": "text",
804
+ "text": "Our concept for regularizing layers is substantially different from existing ones: our layer-wise regularizer induces weights to be non-negative, whereas existing layer-wise regularizers induce weights to be zero (Wen et al., 2016, Section 3.3). The two main advantages of our approach are that it (i) does not require shortcuts to avoid trivial networks and (ii) does not implicitly enforce connection or node sparsity. We thus argue that our layer sparsity is a much more natural and appropriate way to capture and regularize network depths. ",
805
+ "bbox": [
806
+ 173,
807
+ 420,
808
+ 825,
809
+ 505
810
+ ],
811
+ "page_idx": 4
812
+ },
813
+ {
814
+ "type": "text",
815
+ "text": "Layer sparsity more closely relates to ResNets (He et al., 2016). The recent popularity of ResNets is motivated by two observations: 1. Solvers seem to struggle with finding good minima of deep networks; even training accuracies can deteriorate when increasing the number of layers. 2. Allowing for linear mappings that short-circuit parts of the network seem to help solvers in finding better minima. From our viewpoint here, one can argue that ResNets use these linear mappings to regulate network depths adaptively and, therefore, are related to layer sparsity. But importantly, ResNets are even more complex than the networks they are based on, while our notion simplifies networks. ",
816
+ "bbox": [
817
+ 173,
818
+ 511,
819
+ 825,
820
+ 609
821
+ ],
822
+ "page_idx": 4
823
+ },
824
+ {
825
+ "type": "text",
826
+ "text": "Since, as one can verify again readily, all three regularizers are convex, any combination of them is also convex. Such combinations can be used to obtain networks that are sparse in two or all three aspects (last network in Figure 1). In this sense, the different notions of sparsity are not competing but rather complementing each other. ",
827
+ "bbox": [
828
+ 174,
829
+ 616,
830
+ 825,
831
+ 671
832
+ ],
833
+ "page_idx": 4
834
+ },
835
+ {
836
+ "type": "text",
837
+ "text": "2.4 REFITTING ",
838
+ "text_level": 1,
839
+ "bbox": [
840
+ 174,
841
+ 689,
842
+ 290,
843
+ 704
844
+ ],
845
+ "page_idx": 4
846
+ },
847
+ {
848
+ "type": "text",
849
+ "text": "Sparse networks can be used directly, but they can also be a basis for further optimization: one can adjust the network architecture according to the non-zero pattern of the sparse network and then re-estimate the parameters of this smaller network. Such strategies are well-known in statistics and machine learning under the name refitting (Lederer, 2013; Chzhen et al., 2019). The theoretical underpinning of these strategies is the insight that regularization creates a bias that—in certain cases—can be alleviated by a subsequent “unbiasing” step. In deep learning, refitting has been studied recently under the name lottery-ticket hypothesis (Frankle & Carbin, 2019). ",
850
+ "bbox": [
851
+ 174,
852
+ 715,
853
+ 825,
854
+ 814
855
+ ],
856
+ "page_idx": 4
857
+ },
858
+ {
859
+ "type": "text",
860
+ "text": "We now formulate a version of refitting for layer sparsity. We stay in the framework of Example 2 to keep the notation light. ",
861
+ "bbox": [
862
+ 174,
863
+ 819,
864
+ 821,
865
+ 849
866
+ ],
867
+ "page_idx": 4
868
+ },
869
+ {
870
+ "type": "text",
871
+ "text": "Example 3 (ReLU Activation Cont.). Consider the model in (1) with the specifications of Example 2, and consider a corresponding layer-sparse estimator $\\widehat { W }$ of the parameters such as (3) with $h = h ^ { \\mathrm { L } }$ . In line with (6), we denote the set of the active layers by ",
872
+ "bbox": [
873
+ 174,
874
+ 853,
875
+ 826,
876
+ 898
877
+ ],
878
+ "page_idx": 4
879
+ },
880
+ {
881
+ "type": "equation",
882
+ "img_path": "images/0e90cb0148b183e021d0941721a684500d4e87146048650f27bb8445a43ccbe6.jpg",
883
+ "text": "$$\n{ \\mathcal { S } } = { \\mathcal { S } } [ \\widehat { W } ] = \\left\\{ j \\in \\{ 1 , \\dots , l - 1 \\} : h ^ { \\mathrm { L } , j } [ \\widehat { W } ^ { j } ] \\neq 0 \\right\\} \\cup \\{ 1 , l \\}\n$$",
884
+ "text_format": "latex",
885
+ "bbox": [
886
+ 295,
887
+ 905,
888
+ 700,
889
+ 926
890
+ ],
891
+ "page_idx": 4
892
+ },
893
+ {
894
+ "type": "text",
895
+ "text": "and the corresponding parameter space of the condensed network by $\\mathcal { V } _ { S } \\equiv \\mathcal { V } _ { S } [ \\widehat { W } ] = \\{ V =$ $( V ^ { 1 } , \\dots , V ^ { s } ) : V ^ { i } \\in \\mathbb { R } ^ { p _ { j _ { i - 1 } + 1 } \\times p _ { j _ { i } + 1 } } \\Big \\}$ , where $s : = | S |$ . The least-squares refitted estimator for the parameters in the condensed network is then ",
896
+ "bbox": [
897
+ 173,
898
+ 101,
899
+ 825,
900
+ 147
901
+ ],
902
+ "page_idx": 5
903
+ },
904
+ {
905
+ "type": "equation",
906
+ "img_path": "images/9be4698b15cd77ad434fd3c17cc8ac56163a2911311c5474df754310aed3fc41.jpg",
907
+ "text": "$$\n\\widehat { W } _ { \\cal S } \\in \\mathop { \\mathrm { a r g m i n } } _ { V \\in \\mathcal { V } _ { \\cal S } } \\biggl \\{ \\sum _ { i = 1 } ^ { n } \\bigl ( y _ { i } - f _ { { \\cal V } } [ { \\pmb x } _ { i } ] \\bigr ) ^ { 2 } \\biggr \\} .\n$$",
908
+ "text_format": "latex",
909
+ "bbox": [
910
+ 367,
911
+ 154,
912
+ 630,
913
+ 194
914
+ ],
915
+ "page_idx": 5
916
+ },
917
+ {
918
+ "type": "text",
919
+ "text": "Hence, the estimator $\\widehat { W }$ complemented with least-squares refitting yields the network ",
920
+ "bbox": [
921
+ 173,
922
+ 202,
923
+ 733,
924
+ 219
925
+ ],
926
+ "page_idx": 5
927
+ },
928
+ {
929
+ "type": "equation",
930
+ "img_path": "images/f967aca54d94f7eb2d9307202cc9ba380a39a79a5bf5cd2969d155623e50c01a.jpg",
931
+ "text": "$$\nf _ { \\widehat { W } _ { S } } [ { \\pmb x } _ { i } ] = { \\pmb f } ^ { j _ { 1 } } \\left[ \\widehat { W } _ { S } ^ { j _ { 1 } } { \\pmb f } ^ { j _ { 2 } } \\left[ . . . { \\pmb f } ^ { j _ { s } } [ \\widehat { W } _ { S } ^ { j _ { s } } { \\pmb x } _ { i } ] \\right] \\right] \\mathrm { ~ . ~ }\n$$",
932
+ "text_format": "latex",
933
+ "bbox": [
934
+ 352,
935
+ 224,
936
+ 645,
937
+ 251
938
+ ],
939
+ "page_idx": 5
940
+ },
941
+ {
942
+ "type": "text",
943
+ "text": "This strategy corresponds to the “one-shot approach” in Frankle & Carbin (2019); one could extend it along the lines of their iterative approach, but the numerical results indicate that this is not necessary. Also, in contrast to the results in Frankle & Carbin (2019), our results indicate that keeping the initialization is not necessary either. ",
944
+ "bbox": [
945
+ 173,
946
+ 263,
947
+ 826,
948
+ 320
949
+ ],
950
+ "page_idx": 5
951
+ },
952
+ {
953
+ "type": "text",
954
+ "text": "2.5 EXTENSIONS BEYOND FULLY-CONNECTED NETWORKS ",
955
+ "text_level": 1,
956
+ "bbox": [
957
+ 174,
958
+ 337,
959
+ 599,
960
+ 352
961
+ ],
962
+ "page_idx": 5
963
+ },
964
+ {
965
+ "type": "text",
966
+ "text": "We have illustrated our ideas with feedforward networks that have fully connected layers, but the principles of layer sparsity apply much more generally. Consider a fixed hidden layer with index $j \\in \\{ 2 , \\ldots , l - 1 \\}$ . In the fully-connected networks (2), this layer corresponds to a function $z \\mapsto \\mathbf { \\mathcal { f } } ^ { j } [ V ^ { j } z ]$ with weights $V ^ { j } \\in \\mathbf { \\bar { \\mathbb { R } } } ^ { p _ { j } \\times p _ { j + 1 } }$ . We now generalize these functions to ",
967
+ "bbox": [
968
+ 173,
969
+ 363,
970
+ 825,
971
+ 420
972
+ ],
973
+ "page_idx": 5
974
+ },
975
+ {
976
+ "type": "equation",
977
+ "img_path": "images/ddcdb5e49dd06f10c2fe504cd2417bb83285e93f63bcfd2666b1f2f50a329ad4.jpg",
978
+ "text": "$$\nz \\mapsto { \\pmb f } ^ { j } \\left[ \\sum _ { k = 1 } ^ { m } V ^ { j , k } z + b ^ { j } \\right]\n$$",
979
+ "text_format": "latex",
980
+ "bbox": [
981
+ 410,
982
+ 424,
983
+ 588,
984
+ 468
985
+ ],
986
+ "page_idx": 5
987
+ },
988
+ {
989
+ "type": "text",
990
+ "text": "with weights $\\pmb { V } ^ { j } : = ( V ^ { j , 1 } , \\ldots , V ^ { j , m } ) \\in \\mathcal { M } ^ { j , 1 } \\times \\cdots \\times \\mathcal { M } ^ { j , m }$ and bias $\\boldsymbol { b } ^ { j } \\in \\boldsymbol { B } ^ { j }$ , and with arbitrary nonempty subsets $\\mathcal { M } ^ { j , 1 } \\times \\cdot \\cdot \\cdot \\times \\mathcal { M } ^ { j , m } \\subset \\mathbb { R } ^ { p _ { j } \\times p _ { j + 1 } }$ and $B ^ { j } \\subset \\mathbb { R } ^ { p _ { j } }$ . The corresponding layer-sparse regularizer is then ",
991
+ "bbox": [
992
+ 173,
993
+ 473,
994
+ 826,
995
+ 518
996
+ ],
997
+ "page_idx": 5
998
+ },
999
+ {
1000
+ "type": "equation",
1001
+ "img_path": "images/8b2f95c8e19583e9c7feb02ef07fa65604c87370a8f5d3e0ec44fea56405c3a5.jpg",
1002
+ "text": "$$\nh ^ { \\mathrm { L } , j } [ V ^ { j } ] : = \\sqrt { \\sum _ { v = 1 } ^ { p _ { j } } \\sum _ { w = 1 } ^ { p _ { j + 1 } } \\sum _ { k = 1 } ^ { m } \\left( \\mathrm { n e g } [ \\left( V ^ { j , k } \\right) _ { v w } ] \\right) ^ { 2 } + \\sum _ { u = 1 } ^ { p _ { j } } \\left( \\mathrm { n e g } [ \\left( b ^ { j } \\right) _ { u } ] \\right) ^ { 2 } } \\enspace .\n$$",
1003
+ "text_format": "latex",
1004
+ "bbox": [
1005
+ 271,
1006
+ 525,
1007
+ 725,
1008
+ 574
1009
+ ],
1010
+ "page_idx": 5
1011
+ },
1012
+ {
1013
+ "type": "text",
1014
+ "text": "We can confirm immediately that this regularizer has the same effect as its analog in the fullyconnected case. Indeed, under the assumptions of Theorem 1, it holds that ",
1015
+ "bbox": [
1016
+ 173,
1017
+ 585,
1018
+ 826,
1019
+ 616
1020
+ ],
1021
+ "page_idx": 5
1022
+ },
1023
+ {
1024
+ "type": "equation",
1025
+ "img_path": "images/85dca8add4d8d49fe331d016cbed89c11d223c223c696a8550497a2553c0c055.jpg",
1026
+ "text": "$$\n\\begin{array} { r l } & { h ^ { \\mathrm { L } , j } [ V ^ { j } ] = 0 } \\\\ { \\Rightarrow } & { f ^ { j - 1 } \\left[ V ^ { j - 1 } f ^ { j } \\left[ \\displaystyle \\sum _ { k = 1 } ^ { m } V ^ { j , k } z + b ^ { j } \\right] \\right] = f ^ { j - 1 } [ V ^ { j - 1 , j } z + b ^ { j - 1 , j } ] \\mathrm { f o r } \\mathrm { a l l } z \\in [ 0 , \\infty ) ^ { p _ { j } + 1 } , } \\end{array}\n$$",
1027
+ "text_format": "latex",
1028
+ "bbox": [
1029
+ 186,
1030
+ 622,
1031
+ 808,
1032
+ 688
1033
+ ],
1034
+ "page_idx": 5
1035
+ },
1036
+ {
1037
+ "type": "text",
1038
+ "text": "where $\\begin{array} { r } { V ^ { j - 1 , j } : = \\sum _ { k = 1 } ^ { m } V ^ { j - 1 } V ^ { j , k } \\in \\mathbb { R } ^ { p _ { j - 1 } \\times p _ { j + 1 } } } \\end{array}$ and $b ^ { j - 1 , j } : = V ^ { j - 1 } b ^ { j } \\in \\mathbb { R } ^ { p _ { j - 1 } }$ . In other words, if the value of the regularizer is zero, the $j$ th layer can be merged into the $( j - 1 )$ th layer as before. ",
1039
+ "bbox": [
1040
+ 176,
1041
+ 693,
1042
+ 821,
1043
+ 724
1044
+ ],
1045
+ "page_idx": 5
1046
+ },
1047
+ {
1048
+ "type": "text",
1049
+ "text": "These observations highlight the fact that layer sparsity applies very generally: it only requires the properties of ReLU-type activations and the linearities that exist within most types of layers. As a concrete application, layer sparsity can compress networks that have convolutional layers, where $m$ specifies the number of feature maps and $\\bar { \\mathcal { M } } ^ { j , m }$ the non-zero patterns of the filters. ",
1050
+ "bbox": [
1051
+ 173,
1052
+ 729,
1053
+ 825,
1054
+ 786
1055
+ ],
1056
+ "page_idx": 5
1057
+ },
1058
+ {
1059
+ "type": "text",
1060
+ "text": "3 EMPIRICAL STUDY ",
1061
+ "text_level": 1,
1062
+ "bbox": [
1063
+ 174,
1064
+ 806,
1065
+ 364,
1066
+ 821
1067
+ ],
1068
+ "page_idx": 5
1069
+ },
1070
+ {
1071
+ "type": "text",
1072
+ "text": "We now confirm in a brief empirical study the fact that layer regularization can 1. improve prediction accuracies and 2. reduce the number of active layers. ",
1073
+ "bbox": [
1074
+ 173,
1075
+ 838,
1076
+ 825,
1077
+ 867
1078
+ ],
1079
+ "page_idx": 5
1080
+ },
1081
+ {
1082
+ "type": "text",
1083
+ "text": "3.1 ARTIFICIAL DATA ",
1084
+ "text_level": 1,
1085
+ "bbox": [
1086
+ 174,
1087
+ 882,
1088
+ 338,
1089
+ 897
1090
+ ],
1091
+ "page_idx": 5
1092
+ },
1093
+ {
1094
+ "type": "text",
1095
+ "text": "We start with artificial data. ",
1096
+ "bbox": [
1097
+ 174,
1098
+ 909,
1099
+ 354,
1100
+ 924
1101
+ ],
1102
+ "page_idx": 5
1103
+ },
1104
+ {
1105
+ "type": "table",
1106
+ "img_path": "images/32a988323f7cdc663953f8148bc7900079f31779e07a0831a46d5fb4470589cf.jpg",
1107
+ "table_caption": [],
1108
+ "table_footnote": [],
1109
+ "table_body": "<table><tr><td></td><td colspan=\"10\">d=2,n=100</td></tr><tr><td></td><td colspan=\"5\">l-1=10</td><td colspan=\"4\">l-1=25</td></tr><tr><td></td><td>sw=0.1</td><td>sw=0.3</td><td></td><td></td><td colspan=\"2\">sw=0.9</td><td>sw=0.1</td><td colspan=\"2\">sw=0.3</td></tr><tr><td>Method</td><td>mse</td><td>s</td><td>mse</td><td>S</td><td>mse</td><td>S</td><td>mse</td><td>S</td><td>mse S</td></tr><tr><td>LS</td><td>1.123(1.396)</td><td>10(0)</td><td>1.112 (1.448)</td><td></td><td>10(0)1.060(1.349)</td><td>10(0)</td><td>0.989 (1.263)</td><td>25 (0)0.988(1.260)</td><td></td></tr><tr><td>SLS</td><td>0.018 (0.023)</td><td></td><td>10 (0)0.035 (0.616)</td><td></td><td>10 (0)0.203 (0.830)</td><td>10(0) 0.142 (1.020)</td><td></td><td>25 (0)0.147(0.985)</td><td>25(0) 25(0)</td></tr><tr><td>ILS</td><td>0.006 (0.011)</td><td></td><td>1(2)0.008 (0.023)</td><td></td><td>3(4)0.907 (1.272)</td><td>9(10)</td><td>)0.003 (0.024)</td><td>2(4) 0.050 (1.012)</td><td>7(9)</td></tr><tr><td>FLS</td><td>0.007(0.013)</td><td></td><td>1(1)0.008(0.128)</td><td></td><td>2(4)0.364(1.137)</td><td>8(9)</td><td>0.009 (0.985)</td><td>2(5)0.021(1.120)</td><td>4(13)</td></tr></table>",
1110
+ "bbox": [
1111
+ 183,
1112
+ 101,
1113
+ 815,
1114
+ 190
1115
+ ],
1116
+ "page_idx": 6
1117
+ },
1118
+ {
1119
+ "type": "text",
1120
+ "text": "Table 1: encouraging layer sparsity can reduce the prediction error and the model complexity ",
1121
+ "bbox": [
1122
+ 187,
1123
+ 200,
1124
+ 803,
1125
+ 215
1126
+ ],
1127
+ "page_idx": 6
1128
+ },
1129
+ {
1130
+ "type": "text",
1131
+ "text": "3.1.1 SIMULATION FRAMEWORK ",
1132
+ "text_level": 1,
1133
+ "bbox": [
1134
+ 176,
1135
+ 258,
1136
+ 416,
1137
+ 273
1138
+ ],
1139
+ "page_idx": 6
1140
+ },
1141
+ {
1142
+ "type": "text",
1143
+ "text": "We generate data according to the model in (2). The most outside activation function $f ^ { 1 }$ is the identity function, and the coordinates of all other activation functions $f ^ { 2 } , \\ldots , f ^ { l }$ are ReLU functions. The input vectors $\\pmb { x } _ { 1 } , \\ldots , \\pmb { x } _ { n }$ are jointly independent and standard normally distributed in $d$ dimensions; the noise random variables $u _ { 1 } , \\ldots , u _ { n }$ are independent of the input, jointly independent, and standard normally distributed in one dimension. For a given sparsity level $s _ { W } ~ \\in ~ [ 0 , 1 ]$ , a vector ${ \\textbf { \\textit { s } } } \\in$ $\\{ 0 , 1 \\} ^ { l - \\mathrm { { 1 } } }$ with independent Bernoulli distributed entries that have success parameter $s w$ is generated. The entries of the parameter matrix $W ^ { 1 }$ are sampled independently from the uniform distribution on $( - 2 , 2 )$ , and the entries of the parameter matrices $W ^ { 2 } , \\ldots , W ^ { l }$ are sampled independently from the uniform distribution on $( 0 , 2 )$ if $s _ { j } = 0$ and on $( - 2 , 2 )$ otherwise. Hence, the parameter $s w$ controls the level of the layer sparsity: the smaller $s w$ , the higher the network’s layer sparsity. ",
1144
+ "bbox": [
1145
+ 173,
1146
+ 284,
1147
+ 825,
1148
+ 425
1149
+ ],
1150
+ "page_idx": 6
1151
+ },
1152
+ {
1153
+ "type": "text",
1154
+ "text": "In concrete numbers, the input dimension is $d = 2$ , the network widths are $p _ { 2 } = \\cdot \\cdot \\cdot = p _ { l } = 5$ the number of hidden layers is $l - 1 \\in \\{ 1 0 , 2 5 \\}$ , and the sparsity level is $s \\in \\{ 0 . 1 , 0 . 3 , 0 . 9 \\}$ . Our settings and values represent, of course, only a very small part of possible networks in practice, but given the generality of our concepts, any attempt of an exhaustive simulation study must fail, and the simulations at least allow us (i) to corroborate our theoretical insights and (ii) to indicate that our concepts can be very useful in practice. ",
1155
+ "bbox": [
1156
+ 174,
1157
+ 430,
1158
+ 825,
1159
+ 515
1160
+ ],
1161
+ "page_idx": 6
1162
+ },
1163
+ {
1164
+ "type": "text",
1165
+ "text": "Datasets of 150 samples are generated; $n = 1 0 0$ of the samples are assigned to training and the rest to testing. The relevant measures for an estimate $\\widehat { W }$ of the network’s parameters are the empirical mean squared error ",
1166
+ "bbox": [
1167
+ 174,
1168
+ 521,
1169
+ 825,
1170
+ 566
1171
+ ],
1172
+ "page_idx": 6
1173
+ },
1174
+ {
1175
+ "type": "equation",
1176
+ "img_path": "images/f1c94745ce1d7fcbeaf5b24e14c1d5f9ed9d6755e0e900f50ad9b0d2925e08e6.jpg",
1177
+ "text": "$$\n{ \\widehat { \\mathrm { m s e } } } \\equiv { \\widehat { \\mathrm { m s e } } } [ { \\widehat W } ] : = { \\frac { 1 } { | T | } } \\sum _ { ( y , { \\pmb x } ) \\in { \\mathcal T } } \\left( y - f _ { \\widehat { { \\pmb W } } } [ { \\pmb x } ] \\right) ^ { 2 } ~ ,\n$$",
1178
+ "text_format": "latex",
1179
+ "bbox": [
1180
+ 336,
1181
+ 571,
1182
+ 658,
1183
+ 613
1184
+ ],
1185
+ "page_idx": 6
1186
+ },
1187
+ {
1188
+ "type": "text",
1189
+ "text": "over the test set $\\tau$ with cardinality $| \\tau | = 5 0$ and the level of sparsity among the hidden layers ",
1190
+ "bbox": [
1191
+ 173,
1192
+ 623,
1193
+ 789,
1194
+ 640
1195
+ ],
1196
+ "page_idx": 6
1197
+ },
1198
+ {
1199
+ "type": "equation",
1200
+ "img_path": "images/dfe2d76b2d016f12c7d67506e66e87953a1f3a469a612dd947a620200a15d428.jpg",
1201
+ "text": "$$\n\\hat { \\mathrm { s } } \\equiv \\hat { \\mathrm { s } } [ \\widehat { W } ] : = \\left| \\left\\{ j \\in \\{ 1 , \\dots , l - 1 \\} : h ^ { \\mathrm { L } , j } [ \\widehat { W } ^ { j } ] \\neq 0 \\right\\} \\right| .\n$$",
1202
+ "text_format": "latex",
1203
+ "bbox": [
1204
+ 313,
1205
+ 650,
1206
+ 683,
1207
+ 674
1208
+ ],
1209
+ "page_idx": 6
1210
+ },
1211
+ {
1212
+ "type": "text",
1213
+ "text": "Reported are the medians (and third quantiles in paranthesis) over 30 simulation runs for each setting. ",
1214
+ "bbox": [
1215
+ 173,
1216
+ 683,
1217
+ 823,
1218
+ 699
1219
+ ],
1220
+ "page_idx": 6
1221
+ },
1222
+ {
1223
+ "type": "text",
1224
+ "text": "3.1.2 METHODS ",
1225
+ "text_level": 1,
1226
+ "bbox": [
1227
+ 176,
1228
+ 719,
1229
+ 302,
1230
+ 734
1231
+ ],
1232
+ "page_idx": 6
1233
+ },
1234
+ {
1235
+ "type": "text",
1236
+ "text": "Our first method (SLS) is a standard least-squares complemented with the layer regularizer (5) in Lagrange form $\\widehat { W }$ . The baseline for this estimator is vanilla least-squares (LS). Since our estimator— in contrast to least-squares—allows for merging layers, we can also complement it with our refitting scheme of Section 2.4 (FLS). The baseline for our refitted estimator is the least-squares estimator that “knows” the relevant layers beforehand (ILS), that is, a least-squares on the relevant layers $\\gamma _ { s \\left[ W \\right] }$ with $W$ the true parameter—see Example 2. The latter estimator cannot be used in practice, but it can serve as a benchmark here in the simulations. ",
1237
+ "bbox": [
1238
+ 173,
1239
+ 746,
1240
+ 826,
1241
+ 848
1242
+ ],
1243
+ "page_idx": 6
1244
+ },
1245
+ {
1246
+ "type": "text",
1247
+ "text": "The objective functions are optimized by using mini-batch gradient descent with batch size 10, learning rate $1 0 ^ { - 2 }$ , and number of epochs 200 (for $l = 1 0$ , $\\mathrm { s } _ { \\mathrm { W } } ~ = ~ 0 . 1$ , 0.3), 300 (for $l ~ = ~ 1 0$ $\\mathrm { s } _ { \\mathrm { W } } = 0 . 9 )$ , 400 (for $l = 2 5$ , $\\mathrm { s } _ { \\mathrm { W } } = 0 . 1 $ ), and 500 (otherwise). The tuning parameters $( r ^ { \\mathrm { L } } ) _ { j }$ are 0.2 (for $l = 1 0$ , $\\mathrm { s } _ { \\mathrm { W } } = 0 . 1$ ), 0.12 (for $l = 1 0$ , $\\mathrm { s w } = 0 . 3$ ), 0.07 (for $l = 1 0$ , $\\mathrm { s } _ { \\mathrm { W } } = 0 . 9 $ ), and 0.05 (for $l = 2 5$ ). ",
1248
+ "bbox": [
1249
+ 173,
1250
+ 853,
1251
+ 825,
1252
+ 924
1253
+ ],
1254
+ "page_idx": 6
1255
+ },
1256
+ {
1257
+ "type": "text",
1258
+ "text": "3.1.3 RESULTS ",
1259
+ "text_level": 1,
1260
+ "bbox": [
1261
+ 174,
1262
+ 103,
1263
+ 292,
1264
+ 117
1265
+ ],
1266
+ "page_idx": 7
1267
+ },
1268
+ {
1269
+ "type": "text",
1270
+ "text": "The numerical results show that our layer-regularized version SLS can improve on the prediction accuracy of the standard least-squares LS considerably (mse -columns of the first and second rows din Table 1). The results also show that the refitting in FLS can improve the prediction accuracy further, and that refitted estimator can rival the infeasible ILS in terms of prediction (mse -columns dof the third and fourth rows). The results finally show that the layer regularization can detect the correct number of layers (ˆs-columns of the third and fourth rows). In summary, our layer-regularized estimator outmatches the standard least-squares, and the refitted version of our estimator rivals the infeasible least-squares that knows which are the relevant layers beforehand—both in terms of prediction accuracy and sparsity. Hence, layer regularization can condense networks effectively. ",
1271
+ "bbox": [
1272
+ 174,
1273
+ 127,
1274
+ 825,
1275
+ 253
1276
+ ],
1277
+ "page_idx": 7
1278
+ },
1279
+ {
1280
+ "type": "text",
1281
+ "text": "The results also reveal that the prediction accuracies of our estimators increase with sW decreasing (mse -columns across different sW). This trend is expected: the higher the layer sparsity, the more dlayer-regularization can condense the networks. This behavior is confirmed in the sparsities (ˆscolumns across different sW). In other words, the layer regularization is adaptive to the true layer sparsity. ",
1282
+ "bbox": [
1283
+ 174,
1284
+ 260,
1285
+ 825,
1286
+ 330
1287
+ ],
1288
+ "page_idx": 7
1289
+ },
1290
+ {
1291
+ "type": "text",
1292
+ "text": "The tuning parameters $( r ^ { \\mathrm { L } } ) _ { j }$ have been calibrated very roughly by hand. We expect that a more careful calibration of $r ^ { \\mathrm { L } }$ based on cross-validation, for example, accentuates the positive effects of layer sparsity even further. But since our goal in this section is a general proof of concept for layer sparsity rather than the optimization of a specific deep learning pipeline, we do not pursue this further here. ",
1293
+ "bbox": [
1294
+ 174,
1295
+ 335,
1296
+ 825,
1297
+ 407
1298
+ ],
1299
+ "page_idx": 7
1300
+ },
1301
+ {
1302
+ "type": "text",
1303
+ "text": "The tuning parameters of the descent algorithm, such as the batch size, number of epochs, learning rate, and so forth, have also been calibrated very roughly by hand. An observation is the fact that all methods can sometimes provide accurate prediction if the number of epochs is extremely large, but our layer-regularized methods SLS and FLS generally lead to accurate prediction after much less epochs than their unregularized counterpart LS. This observation indicates that layer regularization also impacts the algorithmic aspects of deep learning beneficially. ",
1304
+ "bbox": [
1305
+ 174,
1306
+ 415,
1307
+ 825,
1308
+ 498
1309
+ ],
1310
+ "page_idx": 7
1311
+ },
1312
+ {
1313
+ "type": "text",
1314
+ "text": "3.2 REAL DATA ",
1315
+ "text_level": 1,
1316
+ "bbox": [
1317
+ 174,
1318
+ 515,
1319
+ 295,
1320
+ 530
1321
+ ],
1322
+ "page_idx": 7
1323
+ },
1324
+ {
1325
+ "type": "text",
1326
+ "text": "We now turn to real data. Specifically, we consider subsamples of MNIST (LeCun et al., 1998), FashionMNIST (Xiao et al., 2017), and KMNIST (Clanuwat et al., 2018). ",
1327
+ "bbox": [
1328
+ 174,
1329
+ 541,
1330
+ 825,
1331
+ 569
1332
+ ],
1333
+ "page_idx": 7
1334
+ },
1335
+ {
1336
+ "type": "text",
1337
+ "text": "3.2.1 SETUP ",
1338
+ "text_level": 1,
1339
+ "bbox": [
1340
+ 174,
1341
+ 584,
1342
+ 274,
1343
+ 598
1344
+ ],
1345
+ "page_idx": 7
1346
+ },
1347
+ {
1348
+ "type": "text",
1349
+ "text": "For each of the three data examples, the training data consists of $n = 1 0 0 0 0$ images sampled uniformly at random; the test data also consists of 10 000 images. The network consists of $l = 1 0$ fullyconnected layers; the hidden layers have width $p _ { 2 } = \\cdot \\cdot \\cdot = p _ { l } = 5 0$ . While fully-connected networks have been outperformed image classification by other, more intricate pipelines, they still provide decent results (even on the subsetted data) and are perfectly suited for illustrating our ideas. ",
1350
+ "bbox": [
1351
+ 174,
1352
+ 608,
1353
+ 825,
1354
+ 679
1355
+ ],
1356
+ "page_idx": 7
1357
+ },
1358
+ {
1359
+ "type": "text",
1360
+ "text": "The baseline is cross-entropy (CE), which is LS but with the least-squares loss replaced by the cross-entropy loss. Our layer-sparse method is refitted cross-entropy (FCE), which is the pendant of FLS, that is, cross-entropy with additional layer-sparse regularization and refitting. ",
1361
+ "bbox": [
1362
+ 174,
1363
+ 685,
1364
+ 825,
1365
+ 728
1366
+ ],
1367
+ "page_idx": 7
1368
+ },
1369
+ {
1370
+ "type": "text",
1371
+ "text": "The objective functions are optimized by using mini-batch gradient descent with batch size 100, learning rate $1 0 ^ { - 3 }$ , and number of epochs 100. In line with theoretical considerations (Lederer &√ Vogt, 2020), the tuning parameters are set to $( r ^ { \\mathrm { L } } ) _ { j } = \\ln [ \\overline { { p } } ] / \\sqrt { n }$ with $\\overline { { p } }$ the total number of network parameters. The performances are measured in terms of average classification accuracies (denoted those by $\\widehat { A C }$ ) and level of sparsity among the hidden layers ˆs. ",
1372
+ "bbox": [
1373
+ 174,
1374
+ 734,
1375
+ 825,
1376
+ 808
1377
+ ],
1378
+ "page_idx": 7
1379
+ },
1380
+ {
1381
+ "type": "text",
1382
+ "text": "3.2.2 RESULTS ",
1383
+ "text_level": 1,
1384
+ "bbox": [
1385
+ 174,
1386
+ 821,
1387
+ 292,
1388
+ 837
1389
+ ],
1390
+ "page_idx": 7
1391
+ },
1392
+ {
1393
+ "type": "text",
1394
+ "text": "The results are summarized in Table 2. Similarly as before, we find that layer-sparse regularization can reduce the number of layers while retaining the classification accuracy or even improving it. ",
1395
+ "bbox": [
1396
+ 174,
1397
+ 845,
1398
+ 823,
1399
+ 875
1400
+ ],
1401
+ "page_idx": 7
1402
+ },
1403
+ {
1404
+ "type": "text",
1405
+ "text": "To highlight the features of layer sparsity more, we also look at the training losses and testing accuracies over the course of the optimization; Figure 2 contains these data averaged over 20 draws of the MNIST data. We find that both the initial estimator as well as the refitted version eventually ",
1406
+ "bbox": [
1407
+ 176,
1408
+ 882,
1409
+ 823,
1410
+ 922
1411
+ ],
1412
+ "page_idx": 7
1413
+ },
1414
+ {
1415
+ "type": "table",
1416
+ "img_path": "images/5116f37a55feddf64e2fcb1c115671f465c2a1b896ee6e7f5fd4b60bdd2eff76.jpg",
1417
+ "table_caption": [
1418
+ "Table 2: layer sparsity can reduce model complexity without sacrificing classification accuracy "
1419
+ ],
1420
+ "table_footnote": [],
1421
+ "table_body": "<table><tr><td></td><td colspan=\"2\">MNIST</td><td colspan=\"2\">FashionMNIST</td><td colspan=\"2\">KMNIST</td></tr><tr><td>Method</td><td>AC</td><td>s</td><td>AC</td><td>s</td><td>AC</td><td>s</td></tr><tr><td>CE</td><td>0.92</td><td>10</td><td>0.84</td><td>10</td><td>0.76</td><td>10</td></tr><tr><td>FCE</td><td>0.92</td><td>3</td><td>0.84</td><td>3</td><td>0.78</td><td>3</td></tr></table>",
1422
+ "bbox": [
1423
+ 331,
1424
+ 101,
1425
+ 666,
1426
+ 166
1427
+ ],
1428
+ "page_idx": 8
1429
+ },
1430
+ {
1431
+ "type": "text",
1432
+ "text": "achieve the same accuracies, but the refitted version can be trained much faster. These observations are commensurate with the observations in (Frankle & Carbin, 2019), who study refitting of connectionsparse networks. ",
1433
+ "bbox": [
1434
+ 176,
1435
+ 239,
1436
+ 825,
1437
+ 281
1438
+ ],
1439
+ "page_idx": 8
1440
+ },
1441
+ {
1442
+ "type": "text",
1443
+ "text": "In contrast to (Frankle & Carbin, 2019), however, we could not find any benefits of keeping the initializations of the original network: both the training and the accuracy curves remain virtually the same. This observation might indicate that layer sparsity might be particularly robust under refitting. ",
1444
+ "bbox": [
1445
+ 176,
1446
+ 287,
1447
+ 825,
1448
+ 330
1449
+ ],
1450
+ "page_idx": 8
1451
+ },
1452
+ {
1453
+ "type": "image",
1454
+ "img_path": "images/bb57cb830e3f27fa5934069ef7c984f82c3bd8f531eef9214db9319055dc2e7d.jpg",
1455
+ "image_caption": [
1456
+ "Figure 2: compressed layer-sparse networks can be trained faster than the original networks "
1457
+ ],
1458
+ "image_footnote": [],
1459
+ "bbox": [
1460
+ 240,
1461
+ 356,
1462
+ 736,
1463
+ 477
1464
+ ],
1465
+ "page_idx": 8
1466
+ },
1467
+ {
1468
+ "type": "text",
1469
+ "text": "4 DISCUSSION ",
1470
+ "text_level": 1,
1471
+ "bbox": [
1472
+ 174,
1473
+ 531,
1474
+ 310,
1475
+ 547
1476
+ ],
1477
+ "page_idx": 8
1478
+ },
1479
+ {
1480
+ "type": "text",
1481
+ "text": "We have shown that layer sparsity can compress layered networks effectively both in theory (Section 2) and practice (Section 3). ",
1482
+ "bbox": [
1483
+ 174,
1484
+ 563,
1485
+ 821,
1486
+ 592
1487
+ ],
1488
+ "page_idx": 8
1489
+ },
1490
+ {
1491
+ "type": "text",
1492
+ "text": "We have also shown that refitting with respect to layer sparsity can facilitate the optimization of the network. Refitting has a long-standing tradition in high-dimension statistics—see Lederer (2013), for example—but has been applied in deep learning only recently (Frankle & Carbin, 2019). Our research supports the usefulness of refitting in general, and it demonstrates that layer sparsity is particularly suited for refitting. ",
1493
+ "bbox": [
1494
+ 174,
1495
+ 598,
1496
+ 825,
1497
+ 667
1498
+ ],
1499
+ "page_idx": 8
1500
+ },
1501
+ {
1502
+ "type": "text",
1503
+ "text": "Related concepts such as ResNets add complexity to the network descriptions. This makes these networks not only unfit for refitting but also very hard to analyze statistically. Layer sparsity, in contrast, simplify network architectures and seem amenable to statistical analyses via recent techniques for regularized deep learning (Taheri et al., 2020). Statistical theory for layer sparsity, therefore, seems a feasible goal for further research. ",
1504
+ "bbox": [
1505
+ 174,
1506
+ 675,
1507
+ 825,
1508
+ 744
1509
+ ],
1510
+ "page_idx": 8
1511
+ },
1512
+ {
1513
+ "type": "text",
1514
+ "text": "In summary, layer sparsity complements other notions of sparsity that concern individual connections or nodes. All of these concepts can help to fit networks that are efficient in terms of memory and computations and easy to interpret. ",
1515
+ "bbox": [
1516
+ 174,
1517
+ 752,
1518
+ 823,
1519
+ 795
1520
+ ],
1521
+ "page_idx": 8
1522
+ },
1523
+ {
1524
+ "type": "text",
1525
+ "text": "REFERENCES ",
1526
+ "text_level": 1,
1527
+ "bbox": [
1528
+ 174,
1529
+ 814,
1530
+ 285,
1531
+ 829
1532
+ ],
1533
+ "page_idx": 8
1534
+ },
1535
+ {
1536
+ "type": "text",
1537
+ "text": "J. Alvarez and M. Salzmann. Learning the number of neurons in deep networks. In Adv. Neural Inf. Process Syst., pp. 2270–2278, 2016. \nT. Ash. Dynamic node creation in backpropagation networks. Connect. Sci., 1(4):365–375, 1989. \nS. Bakin. Adaptive regression and model selection in data mining problems. PhD thesis, The Australian National University, 1999. \nA. Barron and J. Klusowski. Approximation and estimation for high-dimensional deep learning networks. arXiv:1809.03090, 2018. \nA. Barron and J. Klusowski. Complexity, statistical risk, and metric entropy of deep nets using total path variation. arXiv:1902.00800, 2019. \nM. Bello. Enhanced training algorithms, and integrated training/architecture selection for multilayer perceptron networks. IEEE Trans. Neural Netw., 3(6):864–875, 1992. \nJ. Bien, I. Gaynanova, J. Lederer, and C. Müller. Prediction error bounds for linear regression with the TREX. Test, 28(2):451–474, 2019. \nS. Changpinyo, M. Sandler, and A. Zhmoginov. The power of sparsity in convolutional neural networks. arXiv:1702.06257, 2017. \nM. Chichignoud, J. Lederer, and M. Wainwright. A practical scheme and fast algorithm to tune the lasso with optimality guarantees. J. Mach. Learn. Res., 17(1):1–20, 2016. \nE. Chzhen, M. Hebiri, and J. Salmon. On Lasso refitting strategies. Bernoulli, 25(4A):3175–3200, 2019. \nT. Clanuwat, M. Bober-Irizar, A. Kitamoto, A. Lamb, K. Yamamoto, and D. Ha. Deep learning for classical Japanese literature. arXiv:1812.01718, 2018. \nJ. Feng and N. Simon. Sparse-input neural networks for high-dimensional nonparametric regression and classification. arXiv:1711.07592, 2017. \nJ. Frankle and M. Carbin. The lottery ticket hypothesis: finding sparse, trainable neural networks. In International Conference on Learning Representations, 2019. \nX. Glorot, A. Bordes, and Y. Bengio. Deep sparse rectifier neural networks. In International Conference on Artificial Intelligence and Statistics, volume 15 of Proc. Mach. Learn. Res., pp. 315–323, 2011. \nN. Golowich, A. Rakhlin, and O. Shamir. Size-independent sample complexity of neural networks. arXiv:1712.06541, 2017. \nR. Hahnloser. On the piecewise analysis of networks of linear threshold neurons. Neural Networks, 11(14):691–697, 1998. \nR. Hahnloser, R. Sarpeshkar, M. Mahowald, R. Douglas, and H. Seung. Digital selection and analogue amplification coexist in a cortex-inspired silicon circuit. Nature, 405:947–951, 2000. \nS. Han, H. Mao, and W. Dally. Deep compression: Compressing deep neural networks with pruning, trained quantization and huffman coding. In International Conference on Learning Representations, 2016. \nT. Hastie, R. Tibshirani, and M. Wainwright. Statistical learning with sparsity: The lasso and generalizations. CRC press, 2015. \nK. He, X. Zhang, S. Ren, and J. Sun. Deep residual learning for image recognition. In IEEE Int. Conf. Comput. Vis. Pattern Recognit., pp. 770–778, 2016. \nJ. Kim, V. Calhoun, E. Shim, and J.-H. Lee. Deep neural network with weight sparsity control and pre-training extracts hierarchical features and enhances classification performance: Evidence from whole-brain resting-state functional connectivity patterns of schizophrenia. Neuroimage, 124: 127–146, 2016. \nM. Kohler and S. Langer. On the rate of convergence of fully connected very deep neural network regression estimates. arXiv:1908.11133, 2019. \nY. LeCun, L. Bottou, Y. Bengio, and P. Haffner. Gradient-based learning applied to document recognition. Proc. IEEE, 86(11):2278–2324, 1998. \nY. LeCun, Y. Bengio, and G. Hinton. Deep learning. Nature, 521:436–444, 2015. \nJ. Lederer. Trust, but verify: benefits and pitfalls of least-squares refitting in high dimensions. arXiv:1306.0113, 2013. \nJ. Lederer and M. Vogt. Estimating the lasso’s effective noise. arXiv:2004.11554, 2020. \nS. Liang and R. Srikant. Why deep neural networks for function approximation? arXiv:1610.04161, 2016. \nB. Liu, M. Wang, H. Foroosh, M. Tappen, and M. Pensky. Sparse convolutional neural networks. In IEEE Int. Conf. Comput. Vis. Pattern Recognit., pp. 806–814, 2015. \nE. Salinas and L. Abbott. A model of multiplicative neural responses in parietal cortex. Proc. Natl. Acad. Sci. USA, 93(21):11956–11961, 1996. \nS. Scardapane, D. Comminiello, A. Hussain, and A. Uncini. Group sparse regularization for deep neural networks. Neurocomputing, 241:81–89, 2017. \nJ. Schmidhuber. Deep learning in neural networks: An overview. Neural Networks, 61:85–117, 2015. \nK. Simonyan and A. Zisserman. Very deep convolutional networks for large-scale image recognition. In International Conference on Learning Representations, 2015. \nM. Taheri, N. Lim, and J. Lederer. Balancing statistical and computational precision and applications to penalized linear regression with group sparsity. arXiv:1609.07195, 2016. \nM. Taheri, F. Xie, and J. Lederer. Statistical guarantees for regularized networks. arXiv:2006.00294, 2020. \nM. Telgarsky. Benefits of depth in neural networks. In Annual Conference on Learning Theory, volume 49 of Proc. Mach. Learn. Res., pp. 1517–1539, 2016. \nR. Tibshirani. Regression shrinkage and selection via the lasso. J. R. Stat. Soc. Ser. B. Stat. Methodol., 58(1):267–288, 1996. \nW. Wen, C. Wu, Y. Wang, Y. Chen, and H. Li. Learning structured sparsity in deep neural networks. In Adv. Neural Inf. Process Syst., pp. 2082–2090, 2016. \nH. Xiao, K. Rasul, and R. Vollgraf. Fashion-MNIST: a novel image dataset for benchmarking machine learning algorithms. arXiv:1708.07747, 2017. \nD. Yarotsky. Error bounds for approximations with deep ReLU networks. Neural Networks, 94: 103–114, 2017. ",
1538
+ "bbox": [
1539
+ 173,
1540
+ 837,
1541
+ 826,
1542
+ 924
1543
+ ],
1544
+ "page_idx": 8
1545
+ },
1546
+ {
1547
+ "type": "text",
1548
+ "text": "",
1549
+ "bbox": [
1550
+ 169,
1551
+ 71,
1552
+ 830,
1553
+ 926
1554
+ ],
1555
+ "page_idx": 9
1556
+ },
1557
+ {
1558
+ "type": "text",
1559
+ "text": "",
1560
+ "bbox": [
1561
+ 169,
1562
+ 102,
1563
+ 828,
1564
+ 642
1565
+ ],
1566
+ "page_idx": 10
1567
+ },
1568
+ {
1569
+ "type": "text",
1570
+ "text": "A TUNING-PARAMETER CALIBRATION ",
1571
+ "text_level": 1,
1572
+ "bbox": [
1573
+ 174,
1574
+ 114,
1575
+ 513,
1576
+ 131
1577
+ ],
1578
+ "page_idx": 11
1579
+ },
1580
+ {
1581
+ "type": "text",
1582
+ "text": "Regularizing layer sparsity involves the tuning parameters $( r ^ { \\mathrm { L } } ) _ { j }$ . Such tuning parameters are integral to regularization in deep learning and in machine learning more generally. In sparse linear regression, there has been some progress for developing theories for calibrating these parameters (Bien et al., 2019; Chichignoud et al., 2016; Taheri et al., 2016). In sparse deep learning, however, theories for tuning-parameter calibration are missing completely. ",
1583
+ "bbox": [
1584
+ 174,
1585
+ 145,
1586
+ 826,
1587
+ 215
1588
+ ],
1589
+ "page_idx": 11
1590
+ },
1591
+ {
1592
+ "type": "text",
1593
+ "text": "In the real-data analysis of Section 3.2, we have used a theory-inspired tuning parameter. The goal of this section here is to give more insights into the calibration of the tuning parameter. Figure 3 shows the accuracies of refitting with different number of hidden layers and locates the tuning parameters selected by our approach and by cross-validation, that is, training/validation based on 10 000 training and validation samples. The results are averaged over 20 draws of MNIST data as described earlier but only over 5 epochs each for illustration. The plot shows the expected upside-down-U-shape of the accuracies, which reflects the trade-off between variance (many layers/small tuning parameters) and bias (few layers/large tuning parameters). The plot shows that cross-validation can even improve the impact of layer sparsity further for a small number of epochs. (As illustrated in the right panel of Figure 2, tuning parameters become—as far as accuracy is concerned—less important for large number of epochs.) ",
1594
+ "bbox": [
1595
+ 174,
1596
+ 222,
1597
+ 825,
1598
+ 376
1599
+ ],
1600
+ "page_idx": 11
1601
+ },
1602
+ {
1603
+ "type": "text",
1604
+ "text": "Tuning-parameter calibration remains a challenge not only here but in deep learning much more generally. But our observations in this section and the main body of the paper demonstrate that layer-sparse regularization can improve deep-learning pipelines substantially with data-adaptive schemes such as cross-validation as well as with a simple, theory-inspired choice of the tuning parameter. ",
1605
+ "bbox": [
1606
+ 174,
1607
+ 382,
1608
+ 825,
1609
+ 452
1610
+ ],
1611
+ "page_idx": 11
1612
+ },
1613
+ {
1614
+ "type": "image",
1615
+ "img_path": "images/8b5c51c3ddc10b71064cdc3019c8b483dacdd5313256132d55593d37b3f85757.jpg",
1616
+ "image_caption": [
1617
+ "Figure 3: the accuracy as a function of the number of hidden layers has a typical upside-down-Ushape; the cross-validated tuning parameters (blue) improve the theory-inspired tuning parameters (red) further "
1618
+ ],
1619
+ "image_footnote": [],
1620
+ "bbox": [
1621
+ 379,
1622
+ 479,
1623
+ 606,
1624
+ 598
1625
+ ],
1626
+ "page_idx": 11
1627
+ }
1628
+ ]
parse/train/UFWnZn2v0bV/UFWnZn2v0bV_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/UFWnZn2v0bV/UFWnZn2v0bV_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/dUEpGV2mhf/dUEpGV2mhf.md ADDED
@@ -0,0 +1,272 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # COMBO: Conservative Offline Model-Based Policy Optimization
2
+
3
+ Tianhe $\mathbf { V } \mathbf { u } ^ { * , 1 }$ , Aviral Kumar∗,2, Rafael Rafailov1, Aravind Rajeswaran3, Sergey Levine2, Chelsea Finn1
4
+
5
+ 1Stanford University, 2UC Berkeley, 3Facebook AI Research (∗Equal Contribution) tianheyu@cs.stanford.edu, aviralk@berkeley.edu
6
+
7
+ # Abstract
8
+
9
+ Model-based reinforcement learning (RL) algorithms, which learn a dynamics model from logged experience and perform conservative planning under the learned model, have emerged as a promising paradigm for offline reinforcement learning (offline RL). However, practical variants of such model-based algorithms rely on explicit uncertainty quantification for incorporating conservatism. Uncertainty estimation with complex models, such as deep neural networks, can be difficult and unreliable. We empirically find that uncertainty estimation is not accurate and leads to poor performance in certain scenarios in offline model-based RL. We overcome this limitation by developing a new model-based offline RL algorithm, COMBO, that trains a value function using both the offline dataset and data generated using rollouts under the model while also additionally regularizing the value function on out-of-support state-action tuples generated via model rollouts. This results in a conservative estimate of the value function for out-of-support state-action tuples, without requiring explicit uncertainty estimation. Theoretically, we show that COMBO satisfies a policy improvement guarantee in the offline setting. Through extensive experiments, we find that COMBO attains greater performance compared to prior offline RL on problems that demand generalization to related but previously unseen tasks, and also consistently matches or outperforms prior offline RL methods on widely studied offline RL benchmarks, including image-based tasks.
10
+
11
+ # 1 Introduction
12
+
13
+ Offline reinforcement learning (offline RL) [30, 34] refers to the setting where policies are trained using static, previously collected datasets. This presents an attractive paradigm for data reuse and safe policy learning in many applications, such as healthcare [62], autonomous driving [65], robotics [25, 48], and personalized recommendation systems [59]. Recent studies have observed that RL algorithms originally developed for the online or interactive paradigm perform poorly in the offline case [14, 28, 26]. This is primarily attributed to the distribution shift that arises over the course of learning between the offline dataset and the learned policy. Thus, development of algorithms specialized for offline RL is of paramount importance to benefit from the offline data available in aformentioned applications. In this work, we develop a principled model-based offline RL algorithm that matches or exceeds the performance of prior offline RL algorithms in benchmark tasks.
14
+
15
+ A major paradigm for algorithm design in offline RL is to incorporate conservatism or regularization into online RL algorithms. Model-free offline RL algorithms [15, 28, 63, 21, 29, 27] directly incorporate conservatism into the policy or value function training and do not require learning a dynamics model. However, model-free algorithms learn only on the states in the offline dataset, which can lead to overly conservative algorithms. In contrast, model-based algorithms [26, 67] learn a pessimistic dynamics model, which in turn induces a conservative estimate of the value function. By generating and training on additional synthetic data, model-based algorithms have the potential for broader generalization and solving new tasks using the offline dataset [67]. However, these methods rely on some sort of strong assumption about uncertainty estimation, typically assuming access to a model error oracle that can estimate upper bounds on model error for any state-action tuple. In practice, such methods use more heuristic uncertainty estimation methods, which can be difficult or unreliable for complex datasets or deep network models. It then remains an open question as to whether we can formulate principled model-based offline RL algorithms with concrete theoretical guarantees on performance without assuming access to an uncertainty or model error oracle. In this work, we propose precisely such a method, by eschewing direct uncertainty estimation, which we argue is not necessary for offline RL.
16
+
17
+ Our main contribution is the development of conservative offline model-based policy optimization (COMBO), a new model-based algorithm for offline RL. COMBO learns a dynamics model using the offline dataset. Subsequently, it employs an actor-critic method where the value function is learned using both the offline dataset as well as synthetically generated data from the model, similar to Dyna [57] and a number of recent methods [20, 67, 7, 48]. However, in contrast to Dyna, COMBO learns a conservative critic function by penalizing the value function in state-action tuples that are not in the support of the offline dataset, obtained by simulating the learned model. We theoretically show that for any policy, the Q-function learned by COMBO is a lower-bound on the true Q-function. While
18
+
19
+ ![](images/01edc032e72a6dbf0a6dd127a1244e056cb78e420620e0d1dd28bcee69304163.jpg)
20
+ Statess Figure 1: COMBO learns a conservative value function by utilizing both the offline dataset as well as simulated data from the model. Crucially, COMBO does not require uncertainty quantification, and the value function learned by COMBO is less conservative on the transitions seen in the dataset than CQL. This enables COMBO to steer the agent towards higher value states compared to CQL, which may steer towards more optimal states, as illustrated in the figure.
21
+
22
+ the approach of optimizing a performance lower-bound is similar in spirit to prior model-based algorithms [26, 67], COMBO crucially does not assume access to a model error or uncertainty oracle. In addition, we show theoretically that the Q-function learned by COMBO is less conservative than model-free counterparts such as CQL [29], and quantify conditions under which the this lower bound is tighter than the one derived in CQL. This is illustrated through an example in Figure 1. Following prior works [31], we show that COMBO enjoys a safe policy improvement guarantee. By interpolating model-free and model-based components, this guarantee can utilize the best of both guarantees in certain cases. Finally, in our experiments, we find that COMBO achieves the best performance on tasks that require out-of-distribution generalization and outperforms previous latent-space offline model-based RL methods on image-based robotic manipulation benchmarks. We also test COMBO on commonly studied benchmarks for offline RL and find that COMBO generally performs well on the benchmarks, achieving the highest score in 9 out of 12 MuJoCo domains from the D4RL [12] benchmark suite.
23
+
24
+ # 2 Preliminaries
25
+
26
+ Markov Decision Processes and Offline RL. We study RL in the framework of Markov decision processes (MDPs) specified by the tuple $\mathcal { M } = ( S , A , T , r , \mu _ { 0 } , \gamma ) . S , \mathcal { L }$ denote the state and action spaces. $T ( \mathbf { s } ^ { \prime } | \mathbf { s } , \mathbf { a } )$ and $\bar { r ( \mathbf { s } , \mathbf { a } ) } \in [ - R _ { \operatorname* { m a x } } , R _ { \operatorname* { m a x } } ]$ represent the dynamics and reward function respectively. $\mu _ { 0 } ( s )$ denotes the initial state distribution, and $\gamma \in ( 0 , 1 )$ denotes the discount factor. We denote the discounted state visitation distribution of a policy $\pi$ using $\begin{array} { r } { d _ { \mathcal { M } } ^ { \pi } ( \mathbf { s } ) : = ( 1 - \gamma ) \sum _ { t = 0 } ^ { \infty } \gamma ^ { t } \mathcal { P } ( s _ { t } = \mathbf { s } | \pi ) } \end{array}$ where $\mathcal { P } ( s _ { t } = \mathbf { s } | \boldsymbol { \pi } )$ is the probability of reaching state s at time $t$ by rolling out $\pi$ in $\mathcal { M }$ . Similarly, we denote the state-action visitation distribution with $d _ { \mathcal { M } } ^ { \pi } ( \mathbf { s } , \mathbf { a } ) : = d _ { \mathcal { M } } ^ { \pi } ( \mathbf { s } ) \pi ( \mathbf { a } | \mathbf { s } )$ . The goal of RL is to learn a policy that maximizes the return, or long term cumulative rewards: $\begin{array} { r } { \operatorname* { m a x } _ { \boldsymbol { \pi } } J ( \mathcal { M } , \boldsymbol { \pi } ) : = \frac { 1 } { 1 - \gamma } \mathbb { E } _ { ( \mathbf { s } , \mathbf { a } ) \sim d _ { \mathcal { M } } ^ { \boldsymbol { \pi } } ( \mathbf { s } , \mathbf { a } ) } \big [ r ( \mathbf { s } , \mathbf { a } ) \big ] } \end{array}$ .
27
+
28
+ Offline RL is the setting where we have access only to a fixed dataset $\boldsymbol { \mathcal { D } } = \{ ( \mathbf { s } , \mathbf { a } , r , \mathbf { s } ^ { \prime } ) \}$ , which consists of transition tuples from trajectories collected using a behavior policy $\pi _ { \beta }$ . In other words, the dataset $\mathcal { D }$ is sampled from $d ^ { \pi _ { \beta } } ( \mathbf { s } , \mathbf { a } ) : = d ^ { \pi _ { \beta } } ( \mathbf { s } ) \pi _ { \beta } ( \mathbf { a } | \mathbf { s } )$ . We define $\overline { { \mathcal { M } } }$ as the empirical MDP induced by the dataset $\mathcal { D }$ and $d ( \mathbf { s } , \mathbf { a } )$ as sampled-based version of $d ^ { \pi _ { \beta } } ( \mathbf { s } , \mathbf { a } )$ . In the offline setting, the goal is to find the best possible policy using the fixed offline dataset.
29
+
30
+ Model-Free Offline RL Algorithms. One class of approaches for solving MDPs involves the use of dynamic programming and actor-critic schemes [56, 5], which do not explicitly require the learning of a dynamics model. To capture the long term behavior of a policy without a model, we define the action value function as $\begin{array} { r } { Q ^ { \hat { \boldsymbol { \pi } } } ( \mathbf { s } , \mathbf { a } ) : = \mathbb { E } \left[ \sum _ { t = 0 } ^ { \infty } \gamma ^ { t } r ( \mathbf { s } _ { t } , \mathbf { a } _ { t } ) \mathbf { \nabla } \vert \ \hat { \mathbf { s } _ { 0 } } = \mathbf { \bar { s } } , \mathbf { a } _ { 0 } = \mathbf { a } \right] } \end{array}$ , where future actions are sampled from $\pi ( \cdot | \mathbf { s } )$ and state transitions happen according to the MDP dynamics. Consider the following Bellman operator: $\begin{array} { r } { B ^ { \pi } Q ( \mathbf { s } , \mathbf { a } ) : = r ( \mathbf { s } , \mathbf { a } ) + \gamma \mathbb { E } _ { \mathbf { \mathbf { \lambda s } ^ { \prime } } \sim T ( \cdot | \mathbf { s } , \mathbf { a } ) , \mathbf { a } ^ { \prime } \sim \pi ( \cdot | \mathbf { s } ^ { \prime } ) } \left[ Q ( \mathbf { s } ^ { \prime } , \mathbf { a } ^ { \prime } ) \right] } \end{array}$ , and its sample based counterpart: $\widehat { B } ^ { \pi } Q ( \mathbf { s } , \mathbf { a } ) : = r ( \mathbf { s } , \mathbf { a } ) + \gamma Q ( \mathbf { s } ^ { \prime } , \mathbf { a } ^ { \prime } )$ , associated with a single transition $( \mathbf { s } , \mathbf { a } , \mathbf { s } ^ { \prime } )$ and $\mathbf { a } ^ { \prime } \sim \pi ( \mathbf { \bar { \cdot } } | \mathbf { s } ^ { \prime } )$ . The action-value function satisfies the Bellman consistency criterion given by $B ^ { \pi } Q ^ { \pi } ( \mathbf { s } , \mathbf { a } ) = Q ^ { \pi } ( \mathbf { s } , \mathbf { a } ) \forall ( \mathbf { s } , \mathbf { a } )$ . When given an offline dataset $\mathcal { D }$ , standard approximate dynamic programming (ADP) and actor-critic methods use this criterion to alternate between policy evaluation [40] and policy improvement. A number of prior works have observed that such a direct extension of ADP and actor-critic schemes to offline RL leads to poor results due to distribution shift over the course of learning and over-estimation bias in the $Q$ function [14, 28, 63]. To address these drawbacks, prior works have proposed a number of modifications aimed towards regularizing the policy or value function (see Section 6). In this work, we primarily focus on CQL [29], which alternates between:
31
+
32
+ Policy Evaluation: The $Q$ function associated with the current policy $\pi$ is approximated conservatively by repeating the following optimization:
33
+
34
+ $Q ^ { k + 1 } \arg \operatorname* { m i n } _ { Q } \beta ( \mathbb { E } _ { \mathbf { s } \sim \mathcal { D } , \mathbf { a } \sim \boldsymbol { \mu } ( \cdot \vert \mathbf { s } ) } [ Q ( \mathbf { s } , \mathbf { a } ) ] - \mathbb { E } _ { \mathbf { s } , \mathbf { a } \sim \mathcal { D } } [ Q ( \mathbf { s } , \mathbf { a } ) ] ) + \frac { 1 } { 2 } \mathbb { E } _ { \mathbf { s } , \mathbf { a } , \mathbf { s } ^ { \prime } \sim \mathcal { D } } \Big [ \Big ( Q ( \mathbf { s } , \mathbf { a } ) - \widehat { B ^ { \pi } } Q ^ { k } ( \mathbf { s } , \mathbf { a } ) \Big ) ^ { 2 } \Big ] ,$ (1) where $\mu ( \cdot | s )$ is a wide sampling distribution such as the uniform distribution over action bounds. CQL effectively penalizes the $Q$ function at states in the dataset for actions not observed in the dataset. This enables a conservative estimation of the value function for any policy [29], mitigating the challenges of over-estimation bias and distribution shift.
35
+
36
+ Policy Improvement: After approximating the Q function as ${ \hat { Q } } ^ { \pi }$ , the policy is improved as $\begin{array} { r } { \pi \arg \operatorname* { m a x } _ { \pi ^ { \prime } } \mathbb { E } _ { \mathbf { s } \sim \mathcal { D } , \mathbf { a } \sim \pi ^ { \prime } ( \cdot | \mathbf { s } ) } \Big [ \hat { Q } ^ { \pi } ( \mathbf { s } , \mathbf { a } ) \Big ] . } \end{array}$ . Actor-critic methods with parameterized policies and $Q$ functions approximate arg max and arg min in above equations with a few gradient descent steps.
37
+
38
+ Model-Based Offline RL Algorithms. A second class of algorithms for solving MDPs involve the learning of the dynamics function, and using the learned model to aid policy search. Using the given dataset $\mathcal { D }$ , a dynamics model $\widehat { T }$ is typically trained using maximum likelihood estimation as: $\begin{array} { r } { \operatorname* { m i n } _ { \widehat { T } } \ \mathbb { E } _ { ( \mathbf { s } , \mathbf { a } , \mathbf { s } ^ { \prime } ) \sim \mathcal { D } } \left[ \log \widehat { T } ( \mathbf { s } ^ { \prime } | \mathbf { s } , \mathbf { a } ) \right] } \end{array}$ . A reward model ${ \hat { r } } ( \mathbf { s } , \mathbf { a } )$ can also be learned similarly if it is unknown. Once a model has been learned, we can construct the learned MDP $\widehat { \mathcal { M } } = ( S , \mathcal { A } , \widehat { T } , \widehat { r } , \mu _ { 0 } , \gamma )$ , which has the same state and action spaces, but uses the learned dynamics and reward function. Subsequently, any policy learning or planning algorithm can be used to recover the optimal policy in the model as $\hat { \pi } = \arg \operatorname* { m a x } _ { \pi } J ( \bar { \mathcal { M } } , \pi )$ .
39
+
40
+ This straightforward approach is known to fail in the offline RL setting, both in theory and practice, due to distribution shift and model-bias [51, 26]. In order to overcome these challenges, offline model-based algorithms like MOReL [26] and MOPO [67] use uncertainty quantification to construct a lower bound for policy performance and optimize this lower bound by assuming a model error oracle $u ( \mathbf { s } , \mathbf { a } )$ . By using an uncertainty estimation algorithm like bootstrap ensembles [43, 4, 37], we can estimate $u ( \mathbf { s } , \mathbf { a } )$ . By constructing and optimizing such a lower bound, offline model-based RL algorithms avoid the aforementioned pitfalls like model-bias and distribution shift. While any RL or planning algorithm can be used to learn the optimal policy for $\widehat { \mathcal { M } }$ , we focus specifically on MBPO [20, 57] which was used in MOPO. MBPO follows the standard structure of actor-critic algorithms, but in each iteration uses an augmented dataset $\mathcal { D } \cup \mathcal { D } _ { \mathrm { m o d e l } }$ for policy evaluation. Here, $\mathcal { D }$ is the offline dataset and $\mathcal { D } _ { \mathrm { m o d e l } }$ is a dataset obtained by simulating the current policy using the learned dynamics model. Specifically, at each iteration, MBPO performs $k$ -step rollouts using $\widehat { T }$ starting from state $\mathbf { s } \in \mathcal { D }$ with a particular rollout policy $\mu ( \mathbf { a } | \mathbf { s } )$ , adds the model-generated data to $\mathcal { D } _ { \mathrm { m o d e l } }$ , and optimizes the policy with a batch of data sampled from $\mathcal { D } \cup \mathcal { D } _ { \mathrm { m o d e l } }$ where each datapoint in the batch is drawn from $\mathcal { D }$ with probability $f \in [ 0 , 1 ]$ and $\mathcal { D } _ { \mathrm { m o d e l } }$ with probability $1 - f$ .
41
+
42
+ # 3 Conservative Offline Model-Based Policy Optimization
43
+
44
+ The principal limitation of prior offline model-based algorithms (discussed in Section 2) is the assumption of having access to a model error oracle for uncertainty estimation and strong reliance on heuristics of quantifying the uncertainty. In practice, such heuristics could be challenging for complex datasets or deep neural network models [44]. We argue that uncertainty estimation is not imperative for offline model-based RL and empirically show that uncertainty estimation could be inaccurate in offline RL problems especially when generalization to unknown behaviors is required in Section 5.1.1. Our goal is to develop a model-based offline RL algorithm that enables optimizing a lower bound on the policy performance, but without requiring uncertainty quantification. We achieve this by extending conservative Q-learning [29], which does not require explicit uncertainty quantification, into the model-based setting. Our algorithm COMBO, summarized in Algorithm 1, alternates between a conservative policy evaluation step and a policy improvement step, which we outline below.
45
+
46
+ <table><tr><td>Require:Offine datasetD,rollout distribution μ(*ls),learned dynamics model Te,initialized policyand critic</td></tr><tr><td>T and Q. 1: Train the probabilistic dynamics model Te(s&#x27;,r|s,a) =N(μe(s,a),∑θ(s,a)) on D.</td></tr><tr><td>2:Initialize the replay buffer Dmodel ←@.</td></tr><tr><td>3:fori=1,2,3,,do</td></tr><tr><td>4: Collect model rollouts by sampling from μ and Tθ starting from states in D.Add model rollouts to Dmodel.</td></tr><tr><td>5: Conservatively evaluate π by repeatedly solving eq.2 to obtain ( using samples from DUDmodel.·</td></tr><tr><td>6: Improve policy under state marginal of df by solving eq. 3 to obtain π i+1 $ 7: end for</td></tr></table>
47
+
48
+ Conservative Policy Evaluation: Given a policy $\pi$ , an offline dataset $\mathcal { D }$ , and a learned model of the MDP $\hat { \mathcal { M } }$ , the goal in this step is to obtain a conservative estimate of $Q ^ { \pi }$ . To achieve this, we penalize the Q-values evaluated on data drawn from a particular state-action distribution that is more likely to be out-of-support while pushing up the Q-values on state-action pairs that are trustworthy, which is implemented by repeating the following recursion:
49
+
50
+ $$
51
+ \hat { Q } ^ { k + 1 } \gets \arg \operatorname* { m i n } _ { Q } \beta \left( \mathbb { E } _ { { \mathbf { s } } , { \mathbf { a } } \sim { \boldsymbol { \rho } } ( { \mathbf { s } } , { \mathbf { a } } ) } [ Q ( { \mathbf { s } } , { \mathbf { a } } ) ] - \mathbb { E } _ { { \mathbf { s } } , { \mathbf { a } } \sim { \mathcal { D } } } [ Q ( { \mathbf { s } } , { \mathbf { a } } ) ] \right) + \frac { 1 } { 2 } \mathbb { E } _ { { \mathbf { s } } , { \mathbf { a } } , { \mathbf { s } } ^ { \prime } \sim d _ { f } } \bigg [ \Big ( Q ( { \mathbf { s } } , { \mathbf { a } } ) - \widehat { B ^ { \pi } } \hat { Q } ^ { k } ( { \mathbf { s } } , { \mathbf { a } } ) \Big ) ^ { 2 } \bigg ] .
52
+ $$
53
+
54
+ Here, $\rho ( \mathbf { s } , \mathbf { a } )$ and $d _ { f }$ are sampling distributions that we can choose. Model-based algorithms allow ample flexibility for these choices while providing the ability to control the bias introduced by these choices. For $\rho ( \mathbf { s } , \mathbf { a } )$ , we make the following choice: $\rho ( \mathbf { s } , \bar { \mathbf { a } } ) = d _ { \widehat { \mathcal { M } } } ^ { \pi } ( \mathbf { s } ) \pi ( \mathbf { a } | \mathbf { s } )$ , where $d _ { \widehat { \mathcal { M } } } ^ { \pi } ( \mathbf { s } )$ is the discounted marginal state distribution when executing $\pi$ in the learned model $\widehat { \mathcal { M } }$ . Samples from $d _ { \widehat { \mathcal { M } } } ^ { \pi } ( \mathbf { s } )$ can be obtained by rolling out $\pi$ in $\widehat { \mathcal { M } }$ . Similarly, $d _ { f }$ is an $f$ −interpolation between the coffline dataset and synthetic rollouts from the model: $d _ { f } ^ { \mu } ( \mathbf { s } , \mathbf { a } ) : = f d ( \mathbf { s } , \mathbf { a } ) + ( 1 - f ) d _ { \widehat { \mathcal { M } } } ^ { \mu } ( \mathbf { s } , \mathbf { a } )$ , where $f \in [ 0 , 1 ]$ is the ratio of the datapoints drawn from the offline dataset as defined in Section 2 and $\mu ( \cdot | \mathbf { s } )$ is the rollout distribution used with the model, which can be modeled as $\pi$ or a uniform distribution. To avoid notation clutter, we also denote $d _ { f } : = d _ { f } ^ { \mu }$ .
55
+
56
+ Under such choices of $\rho$ and $d _ { f }$ , we push down (or conservatively estimate) $\mathrm { Q }$ -values on state-action tuples from model rollouts and push up Q-values on the real state-action pairs from the offline dataset. When updating Q-values with the Bellman backup, we use a mixture of both the model-generated data and the real data, similar to Dyna [57]. Note that in comparison to CQL and other model-free algorithms, COMBO learns the Q-function over a richer set of states beyond the states in the offline dataset. This is made possible by performing rollouts under the learned dynamics model, denoted by $d _ { \widehat { \mathcal { M } } } ^ { \mu } ( \mathbf { s } , \mathbf { a } )$ . We will show in Section 4 that the Q function learned by repeating the recursion in Eq. 2 cprovides a lower bound on the true Q function, without the need for explicit uncertainty estimation. Furthermore, we will theoretically study the advantages of using synthetic data from the learned model, and characterize the impacts of model bias.
57
+
58
+ Policy Improvement Using a Conservative Critic: After learning a conservative critic ${ \hat { Q } } ^ { \pi }$ , we improve the policy as:
59
+
60
+ $$
61
+ \pi ^ { \prime } \gets \arg \operatorname* { m a x } _ { \pi } \mathbb { E } _ { \mathbf { s } \sim \rho , \mathbf { a } \sim \pi ( \cdot | \mathbf { s } ) } \left[ \hat { Q } ^ { \pi } ( \mathbf { s } , \mathbf { a } ) \right]
62
+ $$
63
+
64
+ where $\rho ( \mathbf { s } )$ is the state marginal of $\rho ( \mathbf { s } , \mathbf { a } )$ . When policies are parameterized with neural networks, we approximate the arg max with a few steps of gradient descent. In addition, entropy regularization can also be used to prevent the policy from becoming degenerate if required [17]. In Section 4.2, we show that the resulting policy is guaranteed to improve over the behavior policy.
65
+
66
+ Practical Implementation Details. Our practical implementation largely follows MOPO, with the key exception that we perform conservative policy evaluation as outlined in this section, rather than using uncertainty-based reward penalties. Following MOPO, we represent the probabilistic dynamics model using a neural network, with parameters $\theta$ , that produces a Gaussian distribution over the next state and reward: $\widehat { T } _ { \theta } ( \mathbf { s } _ { t + 1 } , r | \mathbf { s } , \mathbf { a } ) = \mathcal { N } ( \mu _ { \theta } ( \mathbf { s } _ { t } , \mathbf { a } _ { t } ) , \boldsymbol { \Sigma } _ { \theta } ( \mathbf { s } _ { t } , \mathbf { a } _ { t } ) )$ . The model is trained via maximum likelihood. For conservative policy evaluation (eq. 2) and policy improvement (eq. 3), we augment $\rho$ with states sampled from the offline dataset, which shows more stable improvement in practice. It is relatively common in prior work on model-based offline RL to select various hyperparameters using online policy rollouts [67, 26, 3, 33]. However, we would like to avoid this with our method, since requiring online rollouts to tune hyperparameters contradicts the main aim of offline RL, which is to learn entirely from offline data. Therefore, we do not use online rollouts for tuning $C O M B O$ , and instead devise an automated rule for tuning important hyperparameters such as $\beta$ and $f$ in a fully offline manner. We search over a small discrete set of hyperparameters for each task, and use the value of the regularization term $\mathbb { E } _ { { \mathbf { s } } , { \mathbf { a } } \sim \rho ( { \mathbf { s } } , { \mathbf { a } } ) } [ Q ( { \mathbf { s } } , { \mathbf { a } } ) ] - \mathbb { E } _ { { \mathbf { s } } , { \mathbf { a } } \sim \mathcal { D } } [ Q ( { \mathbf { s } } , { \mathbf { s } } ) ]$ (shown in Eq. 2) to pick hyperparameters in an entirely offline fashion. We select the hyperparameter setting that achieves the lowest regularization objective, which indicates that the Q-values on unseen model-predicted state-action tuples are not overestimated. Additional details about the practical implementation and the hyperparameter selection rule are provided in Appendix B.1 and Appendix B.2 respectively.
67
+
68
+ # 4 Theoretical Analysis of COMBO
69
+
70
+ In this section, we theoretically analyze our method and show that it optimizes a lower-bound on the expected return of the learned policy. This lower bound is close to the actual policy performance (modulo sampling error) when the policy’s state-action marginal distribution is in support of the state-action marginal of the behavior policy and conservatively estimates the performance of a policy otherwise. By optimizing the policy against this lower bound, COMBO guarantees policy improvement beyond the behavior policy. Furthermore, we use these insights to discuss cases when COMBO is less conservative compared to model-free counterparts.
71
+
72
+ # 4.1 COMBO Optimizes a Lower Bound
73
+
74
+ We first show that training the Q-function using Eq. 2 produces a Q-function such that the expected off-policy policy improvement objective [8] computed using this learned Q-function lower-bounds its actual value. We will reuse notation for $d _ { f }$ and $d$ from Sections 2 and 3. Assuming that the Q-function is tabular, the Q-function found by approximate dynamic programming in iteration $k$ , can be obtained by differentiating Eq. 2 with respect to $Q ^ { k }$ (see App. A for details):
75
+
76
+ $$
77
+ \hat { Q } ^ { k + 1 } ( \mathbf { s } , \mathbf { a } ) = ( \widehat { \mathcal { B } } ^ { \pi } Q ^ { k } ) ( \mathbf { s } , \mathbf { a } ) - \beta \frac { \rho ( \mathbf { s } , \mathbf { a } ) - d ( \mathbf { s } , \mathbf { a } ) } { d _ { f } ( \mathbf { s } , \mathbf { a } ) } .
78
+ $$
79
+
80
+ Eq. 4 effectively applies a penalty that depends on the three distributions appearing in the COMBO critic training objective (Eq. 2), of which $\rho$ and $d _ { f }$ are free variables that we choose in practice as discussed in Section 3. For a given iteration $k$ of Eq. 4, we further define the expected penalty under $\rho ( \mathbf { s } , \mathbf { a } )$ as:
81
+
82
+ $$
83
+ \nu ( { \boldsymbol \rho } , f ) : = \mathbb { E } _ { { \mathbf s } , { \mathbf a } \sim { \boldsymbol \rho } ( { \mathbf s } , { \mathbf a } ) } \left[ \frac { { \boldsymbol \rho } ( { \mathbf s } , { \mathbf a } ) - d ( { \mathbf s } , { \mathbf a } ) } { d _ { f } ( { \mathbf s } , { \mathbf a } ) } \right] .
84
+ $$
85
+
86
+ Next, we will show that the Q-function learned by COMBO lower-bounds the actual Q-function under the initial state distribution $\mu _ { 0 }$ and any policy $\pi$ . We also show that the asymptotic Q-function learned by COMBO lower-bounds the actual Q-function of any policy $\pi$ with high probability for a large enough $\beta \geq 0$ , which we include in Appendix A.2. Let $\overline { { \mathcal { M } } }$ represent the empirical MDP which uses the empirical transition model based on raw data counts. The Bellman backups over the dataset distribution $d _ { f }$ in Eq. 2 that we analyze is an $f -$ interpolation of the backup operator in the empirical MDP (denoted by $B _ { \mathcal { M } } ^ { \pi } )$ ) and the backup operator under the learned model $\widehat { \mathcal { M } }$ (denoted by $B _ { \widehat { \mathcal { M } } } ^ { \pi } .$ ). The cempirical backup operator suffers from sampling error, but is unbiased in expectation, whereas the model backup operator induces bias but no sampling error. We assume that all of these backups enjoy concentration properties with concentration coefficient $C _ { r , T , \delta }$ , dependent on the desired confidence value $\delta$ (details in Appendix A.2). This is a standard assumption in literature [31]. Now, we state our main results below.
87
+
88
+ Proposition 4.1. For large enough $\beta$ , we have $\mathbb { E } _ { { \mathbf { s } } \sim \mu _ { 0 } , { \mathbf { a } } \sim \pi ( \cdot | { \mathbf { s } } ) } [ \hat { Q } ^ { \pi } ( { \mathbf { s } } , { \mathbf { a } } ) ] \leq \mathbb { E } _ { { \mathbf { s } } \sim \mu _ { 0 } , { \mathbf { a } } \sim \pi ( \cdot | { \mathbf { s } } ) } [ Q ^ { \pi } ( { \mathbf { s } } , { \mathbf { a } } ) ] ,$ where $\mu _ { 0 } ( \mathbf { s } )$ is the initial state distribution. Furthermore, when $\epsilon _ { s }$ is small, such as in the large sample regime, or when the model bias $\epsilon _ { m }$ is small, a small $\beta$ is sufficient to guarantee this condition along with an appropriate choice of $f$ .
89
+
90
+ The proof for Proposition 4.1 can be found in Appendix A.2. Finally, while Kumar et al. [29] also analyze how regularized value function training can provide lower bounds on the value function at each state in the dataset [29] (Proposition 3.1-3.2), our result shows that COMBO is less conservative in that it does not underestimate the value function at every state in the dataset like CQL (Remark 1) and might even overestimate these values. Instead COMBO penalizes Q-values at states generated via model rollouts from $\rho ( \mathbf { s } , \mathbf { a } )$ . Note that in general, the required value of $\beta$ may be quite large similar to prior works, which typically utilize a large constant $\beta$ , which may be in the form of a penalty on a regularizer [36, 29] or as constants in theoretically optimal algorithms [23, 49]. While it is challenging to argue that that either COMBO or CQL attains the tightest possible lower-bound on return, in our final result of this section, we discuss a sufficient condition for the COMBO lower-bound to be tighter than CQL.
91
+
92
+ Proposition 4.2. Assuming previous notation, let $\Delta _ { C O M B O } ^ { \pi } : = \mathbb { E } _ { \mathbf { s } , \mathbf { a } \sim d _ { \overline { { \mathcal { M } } } } ( \mathbf { s } ) , \pi ( \mathbf { a } | \mathbf { s } ) } \left[ \hat { Q } ^ { \pi } ( \mathbf { s } , \mathbf { a } ) \right]$ and $\Delta _ { C Q L } ^ { \pi } : = \mathbb { E } _ { \mathbf { s } , \mathbf { a } \sim d _ { \overline { { \mathcal { M } } } } ( \mathbf { s } ) , \pi ( \mathbf { a } | \mathbf { s } ) } \left[ \hat { Q } _ { C Q L } ^ { \pi } ( \mathbf { s } , \mathbf { a } ) \right]$ denote the average values on the dataset under the $Q$ - functions learned by COMBO and CQL respectively. Then, $\Delta _ { C O M B O } ^ { \pi } \geq \Delta _ { C Q L } ^ { \pi } , i$ f:
93
+
94
+ $$
95
+ \mathbb { E } _ { \mathbf { s } , \mathbf { a } \sim \rho ( \mathbf { s } , \mathbf { a } ) } \left[ \frac { \pi ( \mathbf { a } | \mathbf { s } ) } { \pi _ { \beta } ( \mathbf { a } | \mathbf { s } ) } \right] - \mathbb { E } _ { \mathbf { s } , \mathbf { a } \sim d _ { \overline { { \mathcal { M } } } } ( \mathbf { s } ) , \pi ( \mathbf { a } | \mathbf { s } ) } \left[ \frac { \pi ( \mathbf { a } | \mathbf { s } ) } { \pi _ { \beta } ( \mathbf { a } | \mathbf { s } ) } \right] \leq 0 .
96
+ $$
97
+
98
+ Proposition 4.2 indicates that COMBO will be less conservative than CQL when the action probabilities under learned policy $\pi ( \mathbf { a } | \mathbf { s } )$ and the probabilities under the behavior policy $\pi _ { \beta } ( \mathbf { a } | \mathbf { s } )$ are closer together on state-action tuples drawn from $\rho ( \mathbf { s } , \mathbf { a } )$ (i.e., sampled from the model using the policy $\pi ( \mathbf { a } | \mathbf { s } ) )$ ), than they are on states from the dataset and actions from the policy, $d _ { \overline { { \mathcal { M } } } } ( \mathbf { s } ) \pi ( \mathbf { a } | \mathbf { s } )$ . COMBO’s objective (Eq. 2) only penalizes $\mathrm { Q }$ -values under $\rho ( \mathbf { s } , \mathbf { a } )$ , which, in practice, are expected to primarily consist of out-of-distribution states generated from model rollouts, and does not penalize the Q-value at states drawn from $d _ { \overline { { \mathcal { M } } } } ( \mathbf { s } )$ . As a result, the expression $( * )$ is likely to be negative, making COMBO less conservative than CQL.
99
+
100
+ # 4.2 Safe Policy Improvement Guarantees
101
+
102
+ Now that we have shown various aspects of the lower-bound on the Q-function induced by COMBO, we provide policy improvement guarantees for the COMBO algorithm. Formally, Proposition 4.3 discuss safe improvement guarantees over the behavior policy. building on prior work [46, 31, 29].
103
+
104
+ Proposition 4.3 ( $\zeta$ -safe policy improvement). Let ${ \hat { \pi } } _ { o u t } ( \mathbf { a } | \mathbf { s } )$ be the policy obtained by COMBO. Then, $i f \beta$ is sufficiently large and $\nu ( \rho ^ { \pi } , f ) - \nu ( \rho ^ { \beta } , f ) \ge C$ for a positive constant $C$ , the policy ${ \hat { \pi } } _ { o u t } ( \mathbf { a } | \mathbf { s } )$ is a $\zeta$ -safe policy improvement over $\pi _ { \beta }$ in the actual MDP $\mathcal { M }$ , i.e., $J ( \hat { \pi } _ { o u t } , \mathcal { M } ) \ge \bar { J } ( \pi _ { \beta } , \mathcal { M } ) - \zeta$ , with probability at least $1 - \delta$ , where $\boldsymbol { \zeta }$ is given by,
105
+
106
+ $$
107
+ \mathcal { O } \left( \frac { \gamma f } { ( 1 - \gamma ) ^ { 2 } } \right) \underbrace { \mathbb { E } _ { \mathbb { s } \sim d _ { \mathcal { A } ^ { d } } ^ { \widehat { \pi } _ { o u t } } } \left[ \sqrt \frac { | A | } { | \mathcal { D } ( \mathbf { s } ) | } \mathrm { D } c \varrho L ( \widehat { \pi } _ { o u t } , \pi _ { \beta } ) \right] } _ { : = ( I ) } + \mathcal { O } \left( \frac { \gamma ( 1 - f ) } { ( 1 - \gamma ) ^ { 2 } } \right) \underbrace { \mathrm { D } _ { \mathrm { T V } } ( \overline { { \mathcal { M } } } , \widehat { \mathcal { M } } ) } _ { : = ( \varOmega ) } - \underbrace { \beta \frac { C } { ( 1 - \gamma ) } } _ { : = ( \varDelta ) } .
108
+ $$
109
+
110
+ The complete statement (with constants and terms that grow smaller than quadratic in the horizon) and proof for Proposition 4.3 is provided in Appendix A.4. $D _ { \mathrm { C Q L } }$ denotes a notion of probabilistic distance between policies [29] which we discuss further in Appendix A.4. The expression for $\zeta$ in Proposition 4.3 consists of three terms: term (1) captures the decrease in the policy performance due to limited data, and decays as the size of $\mathcal { D }$ increases. The second term (2) captures the suboptimality induced by the bias in the learned model. Finally, as we show in Appendix A.4, the third term (3) comes from $\nu ( \rho ^ { \pi } , f ) - \nu ( \rho ^ { \beta } , f )$ , which is equivalent to the improvement in policy performance as a result of running COMBO in the empirical and model MDPs. Since the learned model is trained on the dataset $\mathcal { D }$ with transitions generated from the behavior policy $\pi _ { \beta }$ , the marginal distribution $\rho ^ { \beta } ( \mathbf { s } , \mathbf { a } )$ is expected to be closer to $d ( \mathbf { s } , \mathbf { a } )$ for $\pi _ { \beta }$ as compared to the counterpart for the learned policy, $\rho ^ { \pi }$ . Thus, the assumption that $\nu ( \rho ^ { \pi } , f ) - \nu ( \rho ^ { \beta } , f )$ is positive is reasonable, and in such cases, an appropriate (large) choice of $\beta$ will make term (3) large enough to counteract terms (1) and (2) that reduce policy performance. We discuss this elaborately in Appendix A.4 (Remark 3).
111
+
112
+ Further note that in contrast to Proposition 3.6 in Kumar et al. [29], note that our result indicates the sampling error (term (1)) is reduced (multiplied by a fraction $f$ ) when a near-accurate model is used to augment data for training the Q-function, and similarity, it can avoid the bias of model-based methods by relying more on the model-free component. This allows COMBO to attain the best-of-both model-free and model-based methods, via a suitable choice of the fraction $f$ .
113
+
114
+ To summarize, through an appropriate choice of $f$ , Proposition 4.3 guarantees safe improvement over the behavior policy without requiring access to an oracle uncertainty estimation algorithm.
115
+
116
+ # 5 Experiments
117
+
118
+ In our experiments, we aim to answer the follow questions: (1) Can COMBO generalize better than previous offline model-free and model-based approaches in a setting that requires generalization to tasks that are different from what the behavior policy solves? (2) How does COMBO compare with prior work in tasks with high-dimensional image observations? (3) How does COMBO compare to prior offline model-free and model-based methods in standard offline RL benchmarks?
119
+
120
+ To answer those questions, we compare COMBO to several prior methods. In the domains with compact state spaces, we compare with recent model-free algorithms like BEAR [28], BRAC [63], and CQL [29]; as well as MOPO [67] and MOReL [26] which are two recent model-based algorithms. In addition, we also compare with an offline version of SAC [17] (denoted as SAC-off), and behavioral cloning (BC). In high-dimensional image-based domains, which we use to answer question (3), we compare to LOMPO [48], which is a latent space offline model-based RL method that handles image inputs, latent space MBPO (denoted LMBPO), similar to Janner et al. [20] which uses the model to generate additional synthetic data, the fully offline version of SLAC [32] (denoted SLAC-off), which only uses a variational model for state representation purposes, and CQL from image inputs. To our knowledge, CQL, MOPO, and LOMPO are representative of state-of-the-art model-free and model-based offline RL methods. Hence we choose them as comparisons to COMBO. To highlight the distinction between COMBO and a naïve combination of CQL and MBPO, we perform such a comparison in Table 8 in Appendix C. For more details of our experimental set-up, comparisons, and hyperparameters, see Appendix B.
121
+
122
+ # 5.1 Results on tasks that require generalization
123
+
124
+ To answer question (1), we use two environments halfcheetah-jump and ant-angle constructed in Yu et al. [67], which requires the agent to solve a task that is different from what the behavior policy solved. In both environments, the offline dataset is
125
+
126
+ <table><tr><td>Environment</td><td>Batch Mean</td><td>Batch Max</td><td>COMBO (Ours)</td><td>MOPO</td><td>MOReL</td><td>CQL</td></tr><tr><td>halfcheetah-jump</td><td>-1022.6</td><td>1808.6</td><td>5308.7±575.5</td><td>4016.6</td><td>3228.7</td><td>741.1</td></tr><tr><td>ant-angle</td><td>866.7</td><td>2311.9</td><td>2776.9±43.6</td><td>2530.9</td><td>2660.3</td><td>2473.4</td></tr><tr><td>sawyer-door-close</td><td>5%</td><td>100%</td><td>98.3%±3.0%</td><td>65.8%</td><td>42.9%</td><td>36.7%</td></tr><tr><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr></table>
127
+
128
+ Table 1: Average returns of halfcheetah-jump and ant-angle and average success rate of sawyer-door-close that require out-of-distribution generalization. All results are averaged over 6 random seeds. We include the mean and max return / success rate of episodes in the batch data (under Batch Mean and Batch Max, respectively) for comparison. We also include the $9 5 \%$ -confidence interval for COMBO.
129
+
130
+ collected by policies trained with original reward functions of halfcheetah and ant, which reward the robots to run as fast as possible. The behavior policies are trained with SAC with 1M steps and we take the full replay buffer as the offline dataset. Following Yu et al. [67], we relabel rewards in the offline datasets to reward the halfcheetah to jump as high as possible and the ant to run to the top corner with a 30 degree angle as fast as possible. Following the same manner, we construct a third task sawyer-door-close based on the environment in Yu et al. [66], Rafailov et al. [48]. In this task, we collect the offline data with SAC policies trained with a sparse reward function that only gives a reward of 1 when the door is opened by the sawyer robot and 0 otherwise. The offline dataset is similar to the “medium-expert“ dataset in the D4RL benchmark since we mix equal amounts of data collected by a fully-trained SAC policy and a partially-trained SAC policy. We relabel the reward such that it is 1 when the door is closed and 0 otherwise. Therefore, in these datasets, the offline RL methods must generalize beyond behaviors in the offline data in order to learn the intended behaviors. We visualize the sawyer-door-close environment in the right image in Figure 3 in Appendix B.4.
131
+
132
+ We present the results on the three tasks in Table 1. COMBO significantly outperforms MOPO, MOReL and CQL, two representative model-based methods and one representative model-free methods respectively, in the halfcheetah-jump and sawyer-door-close tasks, and achieves an approximately $8 \%$ , $4 \%$ and $12 \%$ improvement over MOPO, MOReL and CQL respectively on the ant-angle task. These results validate that COMBO achieves better generalization results in practice by behaving less conservatively than prior model-free offline methods (compare to CQL, which doesn’t improve much), and does so more robustly than prior model-based offline methods (compare to MOReL and MOPO).
133
+
134
+ # 5.1.1 Empirical analysis on uncertainty estimation in offline model-based RL
135
+
136
+ To further understand why COMBO outperforms prior model-based methods in tasks that require generalization, we argue that one of the main reasons could be that uncertainty estimation is hard in these tasks where the agent is required to go further away from the data distribution. To test this intuition, we perform empirical evaluations to study whether uncertainty quantification with deep neural networks, especially in the setting of dynamics model learning, is challenging and could cause problems with uncertainty-based model-based offline RL methods such as
137
+
138
+ ![](images/8dbb6241c386cd847d4468ef095cef1f50bfcae3b15481b0d5dd4f2991a5d91d.jpg)
139
+ Figure 2: We visualize the fitted linear regression line between the model error and two uncertainty quantification methods maximum learned variance over the ensemble (denoted as Max Var) on two tasks that test the generalization abilities of offline RL algorithms (halfcheetah-jump and ant-angle). We show that Max Var struggles to predict the true model error. Such visualizations indicates that uncertainty quantification is challenging with deep neural networks and could lead to poor performance in model-based offline RL in settings where out-of-distribution generalization is needed. In the meantime, COMBO addresses this issue by removing the burden of performing uncertainty quantification.
140
+
141
+ MOReL [26] and MOPO [67]. In our evaluations, we consider maximum learned variance over the ensemble (denoted as Max Var) $\begin{array} { r } { \operatorname* { m a x } _ { i = 1 , \dots , N } \| \Sigma _ { \theta } ^ { i } ( \mathbf { s } , \mathbf { a } ) \| _ { \mathrm { F } } } \end{array}$ (used in MOPO).
142
+
143
+ We consider two tasks halfcheetah-jump and ant-angle. We normalize both the model error and the uncertainty estimates to be within scale $[ 0 , 1 ]$ and performs linear regression that learns the mapping between the uncertainty estimates and the true model error. As shown in Figure 2, on both tasks, Max Var is unable to accurately predict the true model error, suggesting that uncertainty estimation used by offline model-based methods is not accurate and might be the major factor that results in its poor performance. Meanwhile, COMBO circumvents challenging uncertainty quantification problem and achieves better performances on those tasks, indicating the effectiveness and the robustness of the method.
144
+
145
+ # 5.2 Results on image-based tasks
146
+
147
+ To answer question (2), we evaluate COMBO on two image-based environments: the standard walker (walker-walk) task from the the DeepMind Control suite [61] and a visual door opening environment with a Sawyer robotic arm (sawyer-door) as used in Section 5.1.
148
+
149
+ For the walker task we construct 4 datasets: medium-replay (M-R), medium (M), medium-expert (ME), and expert, similar to Fu et al. [12], each consisting of 200 trajectories. For sawyer-door task we use only the medium-expert and the expert datasets, due to the sparse reward – the agent is rewarded only when it successfully opens the door. Both environments are visulized in Figure 3 in Appendix B.4. To extend
150
+
151
+ <table><tr><td>Dataset</td><td>Environment</td><td>COMBO (Ours)</td><td>LOMPO</td><td>LMBPO</td><td>SLAC -Off</td><td>CQL</td></tr><tr><td>M-R</td><td>walker_walk</td><td>69.2</td><td>66.9</td><td>59.8</td><td>45.1</td><td>15.6</td></tr><tr><td>M</td><td>walker_walk</td><td>57.7</td><td>60.2</td><td>61.7</td><td>41.5</td><td>38.9</td></tr><tr><td>M-E</td><td>walker_walk</td><td>76.4</td><td>78.9</td><td>47.3</td><td>34.9</td><td>36.3</td></tr><tr><td>expert</td><td>walker_walk</td><td>61.1</td><td>55.6</td><td>13.2</td><td>12.6</td><td>43.3</td></tr><tr><td>M-E</td><td>sawyer-door</td><td>100.0%</td><td>100.0%</td><td>0.0%</td><td>0.0%</td><td>0.0%</td></tr><tr><td>expert</td><td>sawyer-door</td><td>96.7%</td><td>0.0%</td><td>0.0%</td><td>0.0%</td><td>0.0%</td></tr></table>
152
+
153
+ Table 2: Results for vision experiments. For the Walker task each number is the normalized score proposed in [12] of the policy at the last iteration of training, averaged over 3 random seeds. For the Sawyer task, we report success rates over the last 100 evaluation runs of training. For the dataset, M refers to medium, M-R refers to medium-replay, and M-E refers to medium expert.
154
+
155
+ COMBO to the image-based setting, we follow Rafailov et al. [48] and train a recurrent variational model using the offline data and use train COMBO in the latent space of this model. We present
156
+
157
+ <table><tr><td>Dataset type</td><td>Environment</td><td>BC</td><td>COMBO (Ours)</td><td>MOPO</td><td>MOReL</td><td>CQL</td><td>SAC-off</td><td>BEAR</td><td>BRAC-p</td><td>BRAC-v</td></tr><tr><td>random</td><td>halfcheetah</td><td>2.1</td><td>38.8±3.7</td><td>35.4</td><td>25.6</td><td>35.4</td><td>30.5</td><td>25.1</td><td>24.1</td><td>31.2</td></tr><tr><td>random</td><td>hopper</td><td>1.6</td><td>17.9±1.4</td><td>11.7</td><td>53.6</td><td>10.8</td><td>11.3</td><td>11.4</td><td>11.0</td><td>12.2</td></tr><tr><td>random</td><td>walker2d</td><td>9.8</td><td>7.0±3.6</td><td>13.6</td><td>37.3</td><td>7.0</td><td>4.1</td><td>7.3</td><td>-0.2</td><td>1.9</td></tr><tr><td>medium</td><td>halfcheetah</td><td>36.1</td><td>54.2±1.5</td><td>42.3</td><td>42.1</td><td>44.4</td><td>-4.3</td><td>41.7</td><td>43.8</td><td>46.3</td></tr><tr><td>medium</td><td>hopper</td><td>29.0</td><td>97.2±2.2</td><td>28.0</td><td>95.4</td><td>86.6</td><td>0.8</td><td>52.1</td><td>32.7</td><td>31.1</td></tr><tr><td>medium</td><td>walker2d</td><td>6.6</td><td>81.9±2.8</td><td>17.8</td><td>77.8</td><td>74.5</td><td>0.9</td><td>59.1</td><td>77.5</td><td>81.1</td></tr><tr><td>medium-replay</td><td>halfcheetah</td><td>38.4</td><td>55.1±1.0</td><td>53.1</td><td>40.2</td><td>46.2</td><td>-2.4</td><td>38.6</td><td>45.4</td><td>47.7</td></tr><tr><td>medium-replay</td><td>hopper</td><td>11.8</td><td>89.5±1.8</td><td>67.5</td><td>93.6</td><td>48.6</td><td>3.5</td><td>33.7</td><td>0.6</td><td>0.6</td></tr><tr><td>medium-replay</td><td>walker2d</td><td>11.3</td><td>56.0±8.6</td><td>39.0</td><td>49.8</td><td>32.6</td><td>1.9</td><td>19.2</td><td>-0.3</td><td>0.9</td></tr><tr><td>med-expert</td><td>halfcheetah</td><td>35.8</td><td>90.0±5.6</td><td>63.3</td><td>53.3</td><td>62.4</td><td>1.8</td><td>53.4</td><td>44.2</td><td>41.9</td></tr><tr><td>med-expert</td><td>hopper</td><td>111.9</td><td>111.1±2.9</td><td>23.7</td><td>108.7</td><td>111.0</td><td>1.6</td><td>96.3</td><td>1.9</td><td>0.8</td></tr><tr><td>med-expert</td><td>walker2d</td><td>6.4</td><td>103.3±5.6</td><td>44.6</td><td>95.6</td><td>98.7</td><td>-0.1</td><td>40.1</td><td>76.9</td><td>81.6</td></tr></table>
158
+
159
+ Table 3: Results for D4RL datasets. Each number is the normalized score proposed in [12] of the policy at the last iteration of training, averaged over 6 random seeds. We take results of MOPO, MOReL and CQL from their original papers and results of other model-free methods from [12]. We include the performance of behavior cloning (BC) for comparison. We include the $9 5 \%$ -confidence interval for COMBO. We bold the highest score across all methods.
160
+
161
+ results in Table 2. On the walker-walk task, COMBO performs in line with LOMPO and previous methods. On the more challenging Sawyer task, COMBO matches LOMPO and achieves $100 \%$ success rate on the medium-expert dataset, and substantially outperforms all other methods on the narrow expert dataset, achieving an average success rate of $9 6 . 7 \%$ , when all other model-based and model-free methods fail.
162
+
163
+ # 5.3 Results on the D4RL tasks
164
+
165
+ Finally, to answer the question (3), we evaluate COMBO on the OpenAI Gym [6] domains in the D4RL benchmark [12], which contains three environments (halfcheetah, hopper, and walker2d) and four dataset types (random, medium, medium-replay, and medium-expert). We include the results in Table 3. The numbers of BC, SAC-off, BEAR, BRAC-P and BRAC-v are taken from the D4RL paper, while the results for MOPO, MOReL and CQL are based on their respective papers [67, 29]. COMBO achieves the best performance in 9 out of 12 settings and comparable result in 1 out of the remaining 3 settings (hopper medium-replay). As noted by Yu et al. [67] and Rafailov et al. [48], model-based offline methods are generally more performant on datasets that are collected by a wide range of policies and have diverse state-action distributions (random, medium-replay datasets) while model-free approaches do better on datasets with narrow distributions (medium, medium-expert datasets). However, in these results, COMBO generally performs well across dataset types compared to existing model-free and model-based approaches, suggesting that COMBO is robust to different dataset types.
166
+
167
+ # 6 Related Work
168
+
169
+ Offline RL [10, 50, 30, 34] is the task of learning policies from a static dataset of past interactions with the environment. It has found applications in domains including robotic manipulation [25, 38, 48, 54], NLP [21, 22] and healthcare [52, 62]. Similar to interactive RL, both model-free and model-based algorithms have been studied for offline RL, with explicit or implicit regularization of the learning algorithm playing a major role.
170
+
171
+ Model-free offline RL. Prior model-free offline RL algorithms have been designed to regularize the learned policy to be “close“ to the behavioral policy either implicitly via regularized variants of importance sampling based algorithms [47, 58, 35, 59, 41], offline actor-critic methods [53, 45, 27, 16, 64], applying uncertainty quantification to the predictions of the Q-values [2, 28, 63, 34], and learning conservative Q-values [29, 55] or explicitly measured by direct state or action constraints [14, 36], KL divergence [21, 63, 69], Wasserstein distance, MMD [28] and auxiliary imitation loss [13]. Different from these works, COMBO uses both the offline dataset as well as model-generated data.
172
+
173
+ Model-based offline RL. Model-based offline RL methods [11, 9, 24, 26, 67, 39, 3, 60, 48, 33, 68] provide an alternative approach to policy learning that involves the learning of a dynamics model using techniques from supervised learning and generative modeling. Such methods however rely either on uncertainty quantification of the learned dynamics model which can be difficult for deep network models [44], or on directly constraining the policy towards the behavioral policy similar to model-free algorithms [39]. In contrast, COMBO conservatively estimates the value function by penalizing it in out-of-support states generated through model rollouts. This allows COMBO to retain all benefits of model-based algorithms such as broad generalization, without the constraints of explicit policy regularization or uncertainty quantification.
174
+
175
+ # 7 Conclusion
176
+
177
+ In the paper, we present conservative offline model-based policy optimization (COMBO), a modelbased offline RL algorithm that penalizes the Q-values evaluated on out-of-support state-action pairs. In particular, COMBO removes the need of uncertainty quantification as widely used in previous model-based offline RL works [26, 67], which can be challenging and unreliable with deep neural networks [44]. Theoretically, we show that COMBO achieves less conservative Q values compared to prior model-free offline RL methods [29] and guarantees a safe policy improvement. In our empirical study, COMBO achieves the best generalization performances in 3 tasks that require adaptation to unseen behaviors. Moreover, COMBO is able scale to vision-based tasks and outperforms or obtain comparable results in vision-based locomotion and robotic manipulation tasks. Finlly, on standard D4RL benchmark, COMBO generally performs well across dataset types compared to prior methods Despite the advantages of COMBO, there are few challenges left such as the lack of an offline hyperparameter selection scheme that can yield a uniform hyperparameter across different datasets and an automatically selected $f$ conditioned on the model error. We leave them for future work.
178
+
179
+ # Acknowledgments and Disclosure of Funding
180
+
181
+ We thank members of RAIL and IRIS for their support and feedback. This work was supported in part by ONR grants N00014-20-1-2675 and N00014-21-1-2685 as well as Intel Corporation. AK and SL are supported by the DARPA Assured Autonomy program. AR was supported by the J.P. Morgan PhD Fellowship in AI.
182
+
183
+ # References
184
+
185
+ [1] Alekh Agarwal, Nan Jiang, and Sham M Kakade. Reinforcement learning: Theory and algorithms. CS Dept., UW Seattle, Seattle, WA, USA, Tech. Rep, 2019.
186
+ [2] Rishabh Agarwal, Dale Schuurmans, and Mohammad Norouzi. An optimistic perspective on offline reinforcement learning. In International Conference on Machine Learning, pages 104–114. PMLR, 2020.
187
+ [3] Arthur Argenson and Gabriel Dulac-Arnold. Model-based offline planning. arXiv preprint arXiv:2008.05556, 2020.
188
+ [4] Kamyar Azizzadenesheli, Emma Brunskill, and Animashree Anandkumar. Efficient exploration through bayesian deep q-networks. In ITA, pages 1–9. IEEE, 2018.
189
+ [5] Dimitri P. Bertsekas and John N. Tsitsiklis. Neuro-Dynamic Programming. Athena Scientific, Belmont, MA, 1996.
190
+ [6] Greg Brockman, Vicki Cheung, Ludwig Pettersson, Jonas Schneider, John Schulman, Jie Tang, and Wojciech Zaremba. Openai gym. arXiv preprint arXiv:1606.01540, 2016.
191
+ [7] Ignasi Clavera, Violet Fu, and Pieter Abbeel. Model-augmented actor-critic: Backpropagating through paths. arXiv preprint arXiv:2005.08068, 2020.
192
+ [8] Thomas Degris, Martha White, and Richard S Sutton. Off-policy actor-critic. arXiv preprint arXiv:1205.4839, 2012.
193
+ [9] Frederik Ebert, Chelsea Finn, Sudeep Dasari, Annie Xie, Alex Lee, and Sergey Levine. Visual foresight: Model-based deep reinforcement learning for vision-based robotic control. arXiv preprint arXiv:1812.00568, 2018.
194
+ [10] Damien Ernst, Pierre Geurts, and Louis Wehenkel. Tree-based batch mode reinforcement learning. Journal of Machine Learning Research, 6:503–556, 2005.
195
+ [11] Chelsea Finn and Sergey Levine. Deep visual foresight for planning robot motion. In 2017 IEEE International Conference on Robotics and Automation (ICRA), pages 2786–2793. IEEE, 2017.
196
+ [12] Justin Fu, Aviral Kumar, Ofir Nachum, George Tucker, and Sergey Levine. D4rl: Datasets for deep data-driven reinforcement learning, 2020.
197
+ [13] Scott Fujimoto and Shixiang Shane Gu. A minimalist approach to offline reinforcement learning. arXiv preprint arXiv:2106.06860, 2021.
198
+ [14] Scott Fujimoto, David Meger, and Doina Precup. Off-policy deep reinforcement learning without exploration. arXiv preprint arXiv:1812.02900, 2018.
199
+ [15] Scott Fujimoto, Herke Van Hoof, and David Meger. Addressing function approximation error in actor-critic methods. arXiv preprint arXiv:1802.09477, 2018.
200
+ [16] Seyed Kamyar Seyed Ghasemipour, Dale Schuurmans, and Shixiang Shane Gu. Emaq: Expected-max q-learning operator for simple yet effective offline and online rl. In International Conference on Machine Learning, pages 3682–3691. PMLR, 2021.
201
+ [17] Tuomas Haarnoja, Aurick Zhou, Pieter Abbeel, and Sergey Levine. Soft actor-critic: Offpolicy maximum entropy deep reinforcement learning with a stochastic actor. arXiv preprint arXiv:1801.01290, 2018.
202
+ [18] Danijar Hafner, Timothy Lillicrap, Ian Fischer, Ruben Villegas, David Ha, Honglak Lee, and James Davidson. International conference on machine learning. In International Conference on Machine Learning, 2019.
203
+ [19] Thomas Jaksch, Ronald Ortner, and Peter Auer. Near-optimal regret bounds for reinforcement learning. Journal of Machine Learning Research, 11(4), 2010.
204
+ [20] Michael Janner, Justin Fu, Marvin Zhang, and Sergey Levine. When to trust your model: Model-based policy optimization. In Advances in Neural Information Processing Systems, pages 12498–12509, 2019.
205
+ [21] Natasha Jaques, Asma Ghandeharioun, Judy Hanwen Shen, Craig Ferguson, Agata Lapedriza, Noah Jones, Shixiang Gu, and Rosalind Picard. Way off-policy batch deep reinforcement learning of implicit human preferences in dialog. arXiv preprint arXiv:1907.00456, 2019.
206
+ [22] Natasha Jaques, Judy Hanwen Shen, Asma Ghandeharioun, Craig Ferguson, Agata Lapedriza, Noah Jones, Shixiang Shane Gu, and Rosalind Picard. Human-centric dialog training via offline reinforcement learning. arXiv preprint arXiv:2010.05848, 2020.
207
+ [23] Ying Jin, Zhuoran Yang, and Zhaoran Wang. Is pessimism provably efficient for offline rl? In International Conference on Machine Learning, pages 5084–5096. PMLR, 2021.
208
+ [24] Gregory Kahn, Adam Villaflor, Pieter Abbeel, and Sergey Levine. Composable actionconditioned predictors: Flexible off-policy learning for robot navigation. In Conference on Robot Learning, pages 806–816. PMLR, 2018.
209
+ [25] Dmitry Kalashnikov, Alex Irpan, Peter Pastor, Julian Ibarz, Alexander Herzog, Eric Jang, Deirdre Quillen, Ethan Holly, Mrinal Kalakrishnan, Vincent Vanhoucke, et al. Scalable deep reinforcement learning for vision-based robotic manipulation. In Conference on Robot Learning, pages 651–673. PMLR, 2018.
210
+ [26] Rahul Kidambi, Aravind Rajeswaran, Praneeth Netrapalli, and Thorsten Joachims. Morel: Model-based offline reinforcement learning. arXiv preprint arXiv:2005.05951, 2020.
211
+ [27] Ilya Kostrikov, Rob Fergus, Jonathan Tompson, and Ofir Nachum. Offline reinforcement learning with fisher divergence critic regularization. In International Conference on Machine Learning, pages 5774–5783. PMLR, 2021.
212
+ [28] Aviral Kumar, Justin Fu, Matthew Soh, George Tucker, and Sergey Levine. Stabilizing off-policy q-learning via bootstrapping error reduction. In Advances in Neural Information Processing Systems, pages 11761–11771, 2019.
213
+ [29] Aviral Kumar, Aurick Zhou, George Tucker, and Sergey Levine. Conservative q-learning for offline reinforcement learning. arXiv preprint arXiv:2006.04779, 2020.
214
+
215
+ [30] Sascha Lange, Thomas Gabel, and Martin A. Riedmiller. Batch reinforcement learning. In Reinforcement Learning, volume 12. Springer, 2012.
216
+
217
+ [31] Romain Laroche, Paul Trichelair, and Remi Tachet Des Combes. Safe policy improvement with baseline bootstrapping. In International Conference on Machine Learning, pages 3652–3661. PMLR, 2019.
218
+
219
+ [32] Alex X. Lee, Anusha Nagabandi, Pieter Abbeel, and Sergey Levine. Stochastic latent actor-critic: Deep reinforcement learning with a latent variable model. In Advances in Neural Information Processing Systems, 2020.
220
+
221
+ [33] Byung-Jun Lee, Jongmin Lee, and Kee-Eung Kim. Representation balancing offline modelbased reinforcement learning. In International Conference on Learning Representations, 2021. URL https://openreview.net/forum?id=QpNz8r_Ri2Y.
222
+
223
+ [34] Sergey Levine, Aviral Kumar, George Tucker, and Justin Fu. Offline reinforcement learning: Tutorial, review, and perspectives on open problems. arXiv preprint arXiv:2005.01643, 2020.
224
+
225
+ [35] Yao Liu, Adith Swaminathan, Alekh Agarwal, and Emma Brunskill. Off-policy policy gradient with state distribution correction. CoRR, abs/1904.08473, 2019.
226
+
227
+ [36] Yao Liu, Adith Swaminathan, Alekh Agarwal, and Emma Brunskill. Provably good batch reinforcement learning without great exploration. arXiv preprint arXiv:2007.08202, 2020.
228
+
229
+ [37] Kendall Lowrey, Aravind Rajeswaran, Sham Kakade, Emanuel Todorov, and Igor Mordatch. Plan Online, Learn Offline: Efficient Learning and Exploration via Model-Based Control. In International Conference on Learning Representations (ICLR), 2019.
230
+
231
+ [38] Ajay Mandlekar, Fabio Ramos, Byron Boots, Silvio Savarese, Li Fei-Fei, Animesh Garg, and Dieter Fox. Iris: Implicit reinforcement without interaction at scale for learning control from offline robot manipulation data. In 2020 IEEE International Conference on Robotics and Automation (ICRA), pages 4414–4420. IEEE, 2020.
232
+
233
+ [39] Tatsuya Matsushima, Hiroki Furuta, Yutaka Matsuo, Ofir Nachum, and Shixiang Gu. Deployment-efficient reinforcement learning via model-based offline optimization. arXiv preprint arXiv:2006.03647, 2020.
234
+
235
+ [40] Rémi Munos and Csaba Szepesvari. Finite-time bounds for fitted value iteration. J. Mach. Learn. Res., 9:815–857, 2008.
236
+
237
+ [41] Ofir Nachum, Bo Dai, Ilya Kostrikov, Yinlam Chow, Lihong Li, and Dale Schuurmans. Algaedice: Policy gradient from arbitrary experience. arXiv preprint arXiv:1912.02074, 2019.
238
+
239
+ [42] Ian Osband and Benjamin Van Roy. Why is posterior sampling better than optimism for reinforcement learning? In International Conference on Machine Learning, pages 2701–2710. PMLR, 2017.
240
+
241
+ [43] Ian Osband, John Aslanides, and Albin Cassirer. Randomized prior functions for deep reinforcement learning. CoRR, abs/1806.03335, 2018.
242
+
243
+ [44] Yaniv Ovadia, Emily Fertig, Jie Ren, Zachary Nado, David Sculley, Sebastian Nowozin, Joshua V Dillon, Balaji Lakshminarayanan, and Jasper Snoek. Can you trust your model’s uncertainty? evaluating predictive uncertainty under dataset shift. arXiv preprint arXiv:1906.02530, 2019.
244
+
245
+ [45] Xue Bin Peng, Aviral Kumar, Grace Zhang, and Sergey Levine. Advantage-weighted regression: Simple and scalable off-policy reinforcement learning. arXiv preprint arXiv:1910.00177, 2019.
246
+
247
+ [46] Marek Petrik, Yinlam Chow, and Mohammad Ghavamzadeh. Safe policy improvement by minimizing robust baseline regret. arXiv preprint arXiv:1607.03842, 2016.
248
+
249
+ [47] Doina Precup, Richard S Sutton, and Sanjoy Dasgupta. Off-policy temporal-difference learning with function approximation. In ICML, pages 417–424, 2001.
250
+
251
+ [48] Rafael Rafailov, Tianhe Yu, A. Rajeswaran, and Chelsea Finn. Offline reinforcement learning from images with latent space models. ArXiv, abs/2012.11547, 2020.
252
+ [49] Paria Rashidinejad, Banghua Zhu, Cong Ma, Jiantao Jiao, and Stuart Russell. Bridging offline reinforcement learning and imitation learning: A tale of pessimism. arXiv preprint arXiv:2103.12021, 2021.
253
+ [50] Martin Riedmiller. Neural fitted q iteration–first experiences with a data efficient neural reinforcement learning method. In European Conference on Machine Learning, pages 317–328. Springer, 2005.
254
+ [51] Stephane Ross and Drew Bagnell. Agnostic system identification for model-based reinforcement learning. In ICML, 2012.
255
+ [52] Susan M Shortreed, Eric Laber, Daniel J Lizotte, T Scott Stroup, Joelle Pineau, and Susan A Murphy. Informing sequential clinical decision-making through reinforcement learning: an empirical study. Machine learning, 84(1-2):109–136, 2011.
256
+ [53] Noah Y Siegel, Jost Tobias Springenberg, Felix Berkenkamp, Abbas Abdolmaleki, Michael Neunert, Thomas Lampe, Roland Hafner, and Martin Riedmiller. Keep doing what worked: Behavioral modelling priors for offline reinforcement learning. arXiv preprint arXiv:2002.08396, 2020.
257
+ [54] Avi Singh, Albert Yu, Jonathan Yang, Jesse Zhang, Aviral Kumar, and Sergey Levine. Cog: Connecting new skills to past experience with offline reinforcement learning. arXiv preprint arXiv:2010.14500, 2020.
258
+ [55] Samarth Sinha and Animesh Garg. S4rl: Surprisingly simple self-supervision for offline reinforcement learning. arXiv preprint arXiv:2103.06326, 2021.
259
+ [56] R. S. Sutton and A. G. Barto. Reinforcement Learning: An Introduction. MIT Press, Cambridge, MA, 1998.
260
+ [57] Richard S Sutton. Dyna, an integrated architecture for learning, planning, and reacting. ACM Sigart Bulletin, 2(4):160–163, 1991.
261
+ [58] Richard S Sutton, A Rupam Mahmood, and Martha White. An emphatic approach to the problem of off-policy temporal-difference learning. The Journal of Machine Learning Research, 17(1):2603–2631, 2016.
262
+ [59] Adith Swaminathan and Thorsten Joachims. Batch learning from logged bandit feedback through counterfactual risk minimization. J. Mach. Learn. Res, 16:1731–1755, 2015.
263
+ [60] Phillip Swazinna, Steffen Udluft, and Thomas Runkler. Overcoming model bias for robust offline deep reinforcement learning. arXiv preprint arXiv:2008.05533, 2020.
264
+ [61] Yuval Tassa, Yotam Doron, Alistair Muldal, Tom Erez, Yazhe Li, Diego de Las Casas, David Budden, Abbas Abdolmaleki, Josh Merel, Andrew Lefrancq, et al. Deepmind control suite. arXiv preprint arXiv:1801.00690, 2018.
265
+ [62] L. Wang, Wei Zhang, Xiaofeng He, and H. Zha. Supervised reinforcement learning with recurrent neural network for dynamic treatment recommendation. Proceedings of the 24th ACM SIGKDD International Conference on Knowledge Discovery & Data Mining, 2018.
266
+ [63] Yifan Wu, George Tucker, and Ofir Nachum. Behavior regularized offline reinforcement learning. arXiv preprint arXiv:1911.11361, 2019.
267
+ [64] Yue Wu, Shuangfei Zhai, Nitish Srivastava, Joshua Susskind, Jian Zhang, Ruslan Salakhutdinov, and Hanlin Goh. Uncertainty weighted actor-critic for offline reinforcement learning. arXiv preprint arXiv:2105.08140, 2021.
268
+ [65] F. Yu, H. Chen, X. Wang, Wenqi Xian, Yingying Chen, Fangchen Liu, V. Madhavan, and Trevor Darrell. Bdd100k: A diverse driving dataset for heterogeneous multitask learning. 2020 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pages 2633–2642, 2020.
269
+ [66] Tianhe Yu, Deirdre Quillen, Zhanpeng He, Ryan Julian, Karol Hausman, Chelsea Finn, and Sergey Levine. Meta-world: A benchmark and evaluation for multi-task and meta reinforcement learning. In Conference on Robot Learning, pages 1094–1100. PMLR, 2020.
270
+ [67] Tianhe Yu, Garrett Thomas, Lantao Yu, Stefano Ermon, James Zou, Sergey Levine, Chelsea Finn, and Tengyu Ma. Mopo: Model-based offline policy optimization. arXiv preprint arXiv:2005.13239, 2020.
271
+ [68] Xianyuan Zhan, Xiangyu Zhu, and Haoran Xu. Model-based offline planning with trajectory pruning. arXiv preprint arXiv:2105.07351, 2021.
272
+ [69] Wenxuan Zhou, Sujay Bajracharya, and David Held. Plas: Latent action space for offline reinforcement learning. arXiv preprint arXiv:2011.07213, 2020.
parse/train/dUEpGV2mhf/dUEpGV2mhf_content_list.json ADDED
@@ -0,0 +1,1283 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "type": "text",
4
+ "text": "COMBO: Conservative Offline Model-Based Policy Optimization ",
5
+ "text_level": 1,
6
+ "bbox": [
7
+ 228,
8
+ 122,
9
+ 769,
10
+ 172
11
+ ],
12
+ "page_idx": 0
13
+ },
14
+ {
15
+ "type": "text",
16
+ "text": "Tianhe $\\mathbf { V } \\mathbf { u } ^ { * , 1 }$ , Aviral Kumar∗,2, Rafael Rafailov1, Aravind Rajeswaran3, Sergey Levine2, Chelsea Finn1 ",
17
+ "bbox": [
18
+ 243,
19
+ 224,
20
+ 750,
21
+ 256
22
+ ],
23
+ "page_idx": 0
24
+ },
25
+ {
26
+ "type": "text",
27
+ "text": "1Stanford University, 2UC Berkeley, 3Facebook AI Research (∗Equal Contribution) tianheyu@cs.stanford.edu, aviralk@berkeley.edu ",
28
+ "bbox": [
29
+ 202,
30
+ 258,
31
+ 785,
32
+ 291
33
+ ],
34
+ "page_idx": 0
35
+ },
36
+ {
37
+ "type": "text",
38
+ "text": "Abstract ",
39
+ "text_level": 1,
40
+ "bbox": [
41
+ 462,
42
+ 327,
43
+ 535,
44
+ 344
45
+ ],
46
+ "page_idx": 0
47
+ },
48
+ {
49
+ "type": "text",
50
+ "text": "Model-based reinforcement learning (RL) algorithms, which learn a dynamics model from logged experience and perform conservative planning under the learned model, have emerged as a promising paradigm for offline reinforcement learning (offline RL). However, practical variants of such model-based algorithms rely on explicit uncertainty quantification for incorporating conservatism. Uncertainty estimation with complex models, such as deep neural networks, can be difficult and unreliable. We empirically find that uncertainty estimation is not accurate and leads to poor performance in certain scenarios in offline model-based RL. We overcome this limitation by developing a new model-based offline RL algorithm, COMBO, that trains a value function using both the offline dataset and data generated using rollouts under the model while also additionally regularizing the value function on out-of-support state-action tuples generated via model rollouts. This results in a conservative estimate of the value function for out-of-support state-action tuples, without requiring explicit uncertainty estimation. Theoretically, we show that COMBO satisfies a policy improvement guarantee in the offline setting. Through extensive experiments, we find that COMBO attains greater performance compared to prior offline RL on problems that demand generalization to related but previously unseen tasks, and also consistently matches or outperforms prior offline RL methods on widely studied offline RL benchmarks, including image-based tasks. ",
51
+ "bbox": [
52
+ 233,
53
+ 358,
54
+ 766,
55
+ 619
56
+ ],
57
+ "page_idx": 0
58
+ },
59
+ {
60
+ "type": "text",
61
+ "text": "1 Introduction ",
62
+ "text_level": 1,
63
+ "bbox": [
64
+ 174,
65
+ 638,
66
+ 310,
67
+ 655
68
+ ],
69
+ "page_idx": 0
70
+ },
71
+ {
72
+ "type": "text",
73
+ "text": "Offline reinforcement learning (offline RL) [30, 34] refers to the setting where policies are trained using static, previously collected datasets. This presents an attractive paradigm for data reuse and safe policy learning in many applications, such as healthcare [62], autonomous driving [65], robotics [25, 48], and personalized recommendation systems [59]. Recent studies have observed that RL algorithms originally developed for the online or interactive paradigm perform poorly in the offline case [14, 28, 26]. This is primarily attributed to the distribution shift that arises over the course of learning between the offline dataset and the learned policy. Thus, development of algorithms specialized for offline RL is of paramount importance to benefit from the offline data available in aformentioned applications. In this work, we develop a principled model-based offline RL algorithm that matches or exceeds the performance of prior offline RL algorithms in benchmark tasks. ",
74
+ "bbox": [
75
+ 174,
76
+ 661,
77
+ 825,
78
+ 799
79
+ ],
80
+ "page_idx": 0
81
+ },
82
+ {
83
+ "type": "text",
84
+ "text": "A major paradigm for algorithm design in offline RL is to incorporate conservatism or regularization into online RL algorithms. Model-free offline RL algorithms [15, 28, 63, 21, 29, 27] directly incorporate conservatism into the policy or value function training and do not require learning a dynamics model. However, model-free algorithms learn only on the states in the offline dataset, which can lead to overly conservative algorithms. In contrast, model-based algorithms [26, 67] learn a pessimistic dynamics model, which in turn induces a conservative estimate of the value function. By generating and training on additional synthetic data, model-based algorithms have the potential for broader generalization and solving new tasks using the offline dataset [67]. However, these methods rely on some sort of strong assumption about uncertainty estimation, typically assuming access to a model error oracle that can estimate upper bounds on model error for any state-action tuple. In practice, such methods use more heuristic uncertainty estimation methods, which can be difficult or unreliable for complex datasets or deep network models. It then remains an open question as to whether we can formulate principled model-based offline RL algorithms with concrete theoretical guarantees on performance without assuming access to an uncertainty or model error oracle. In this work, we propose precisely such a method, by eschewing direct uncertainty estimation, which we argue is not necessary for offline RL. ",
85
+ "bbox": [
86
+ 174,
87
+ 806,
88
+ 825,
89
+ 902
90
+ ],
91
+ "page_idx": 0
92
+ },
93
+ {
94
+ "type": "text",
95
+ "text": "",
96
+ "bbox": [
97
+ 173,
98
+ 90,
99
+ 825,
100
+ 215
101
+ ],
102
+ "page_idx": 1
103
+ },
104
+ {
105
+ "type": "text",
106
+ "text": "Our main contribution is the development of conservative offline model-based policy optimization (COMBO), a new model-based algorithm for offline RL. COMBO learns a dynamics model using the offline dataset. Subsequently, it employs an actor-critic method where the value function is learned using both the offline dataset as well as synthetically generated data from the model, similar to Dyna [57] and a number of recent methods [20, 67, 7, 48]. However, in contrast to Dyna, COMBO learns a conservative critic function by penalizing the value function in state-action tuples that are not in the support of the offline dataset, obtained by simulating the learned model. We theoretically show that for any policy, the Q-function learned by COMBO is a lower-bound on the true Q-function. While ",
107
+ "bbox": [
108
+ 174,
109
+ 223,
110
+ 485,
111
+ 455
112
+ ],
113
+ "page_idx": 1
114
+ },
115
+ {
116
+ "type": "image",
117
+ "img_path": "images/01edc032e72a6dbf0a6dd127a1244e056cb78e420620e0d1dd28bcee69304163.jpg",
118
+ "image_caption": [
119
+ "Statess Figure 1: COMBO learns a conservative value function by utilizing both the offline dataset as well as simulated data from the model. Crucially, COMBO does not require uncertainty quantification, and the value function learned by COMBO is less conservative on the transitions seen in the dataset than CQL. This enables COMBO to steer the agent towards higher value states compared to CQL, which may steer towards more optimal states, as illustrated in the figure. "
120
+ ],
121
+ "image_footnote": [],
122
+ "bbox": [
123
+ 511,
124
+ 232,
125
+ 803,
126
+ 338
127
+ ],
128
+ "page_idx": 1
129
+ },
130
+ {
131
+ "type": "text",
132
+ "text": "the approach of optimizing a performance lower-bound is similar in spirit to prior model-based algorithms [26, 67], COMBO crucially does not assume access to a model error or uncertainty oracle. In addition, we show theoretically that the Q-function learned by COMBO is less conservative than model-free counterparts such as CQL [29], and quantify conditions under which the this lower bound is tighter than the one derived in CQL. This is illustrated through an example in Figure 1. Following prior works [31], we show that COMBO enjoys a safe policy improvement guarantee. By interpolating model-free and model-based components, this guarantee can utilize the best of both guarantees in certain cases. Finally, in our experiments, we find that COMBO achieves the best performance on tasks that require out-of-distribution generalization and outperforms previous latent-space offline model-based RL methods on image-based robotic manipulation benchmarks. We also test COMBO on commonly studied benchmarks for offline RL and find that COMBO generally performs well on the benchmarks, achieving the highest score in 9 out of 12 MuJoCo domains from the D4RL [12] benchmark suite. ",
133
+ "bbox": [
134
+ 174,
135
+ 457,
136
+ 826,
137
+ 636
138
+ ],
139
+ "page_idx": 1
140
+ },
141
+ {
142
+ "type": "text",
143
+ "text": "2 Preliminaries ",
144
+ "text_level": 1,
145
+ "bbox": [
146
+ 174,
147
+ 645,
148
+ 318,
149
+ 662
150
+ ],
151
+ "page_idx": 1
152
+ },
153
+ {
154
+ "type": "text",
155
+ "text": "Markov Decision Processes and Offline RL. We study RL in the framework of Markov decision processes (MDPs) specified by the tuple $\\mathcal { M } = ( S , A , T , r , \\mu _ { 0 } , \\gamma ) . S , \\mathcal { L }$ denote the state and action spaces. $T ( \\mathbf { s } ^ { \\prime } | \\mathbf { s } , \\mathbf { a } )$ and $\\bar { r ( \\mathbf { s } , \\mathbf { a } ) } \\in [ - R _ { \\operatorname* { m a x } } , R _ { \\operatorname* { m a x } } ]$ represent the dynamics and reward function respectively. $\\mu _ { 0 } ( s )$ denotes the initial state distribution, and $\\gamma \\in ( 0 , 1 )$ denotes the discount factor. We denote the discounted state visitation distribution of a policy $\\pi$ using $\\begin{array} { r } { d _ { \\mathcal { M } } ^ { \\pi } ( \\mathbf { s } ) : = ( 1 - \\gamma ) \\sum _ { t = 0 } ^ { \\infty } \\gamma ^ { t } \\mathcal { P } ( s _ { t } = \\mathbf { s } | \\pi ) } \\end{array}$ where $\\mathcal { P } ( s _ { t } = \\mathbf { s } | \\boldsymbol { \\pi } )$ is the probability of reaching state s at time $t$ by rolling out $\\pi$ in $\\mathcal { M }$ . Similarly, we denote the state-action visitation distribution with $d _ { \\mathcal { M } } ^ { \\pi } ( \\mathbf { s } , \\mathbf { a } ) : = d _ { \\mathcal { M } } ^ { \\pi } ( \\mathbf { s } ) \\pi ( \\mathbf { a } | \\mathbf { s } )$ . The goal of RL is to learn a policy that maximizes the return, or long term cumulative rewards: $\\begin{array} { r } { \\operatorname* { m a x } _ { \\boldsymbol { \\pi } } J ( \\mathcal { M } , \\boldsymbol { \\pi } ) : = \\frac { 1 } { 1 - \\gamma } \\mathbb { E } _ { ( \\mathbf { s } , \\mathbf { a } ) \\sim d _ { \\mathcal { M } } ^ { \\boldsymbol { \\pi } } ( \\mathbf { s } , \\mathbf { a } ) } \\big [ r ( \\mathbf { s } , \\mathbf { a } ) \\big ] } \\end{array}$ . ",
156
+ "bbox": [
157
+ 173,
158
+ 670,
159
+ 826,
160
+ 799
161
+ ],
162
+ "page_idx": 1
163
+ },
164
+ {
165
+ "type": "text",
166
+ "text": "Offline RL is the setting where we have access only to a fixed dataset $\\boldsymbol { \\mathcal { D } } = \\{ ( \\mathbf { s } , \\mathbf { a } , r , \\mathbf { s } ^ { \\prime } ) \\}$ , which consists of transition tuples from trajectories collected using a behavior policy $\\pi _ { \\beta }$ . In other words, the dataset $\\mathcal { D }$ is sampled from $d ^ { \\pi _ { \\beta } } ( \\mathbf { s } , \\mathbf { a } ) : = d ^ { \\pi _ { \\beta } } ( \\mathbf { s } ) \\pi _ { \\beta } ( \\mathbf { a } | \\mathbf { s } )$ . We define $\\overline { { \\mathcal { M } } }$ as the empirical MDP induced by the dataset $\\mathcal { D }$ and $d ( \\mathbf { s } , \\mathbf { a } )$ as sampled-based version of $d ^ { \\pi _ { \\beta } } ( \\mathbf { s } , \\mathbf { a } )$ . In the offline setting, the goal is to find the best possible policy using the fixed offline dataset. ",
167
+ "bbox": [
168
+ 174,
169
+ 805,
170
+ 825,
171
+ 877
172
+ ],
173
+ "page_idx": 1
174
+ },
175
+ {
176
+ "type": "text",
177
+ "text": "Model-Free Offline RL Algorithms. One class of approaches for solving MDPs involves the use of dynamic programming and actor-critic schemes [56, 5], which do not explicitly require the learning of a dynamics model. To capture the long term behavior of a policy without a model, we define the action value function as $\\begin{array} { r } { Q ^ { \\hat { \\boldsymbol { \\pi } } } ( \\mathbf { s } , \\mathbf { a } ) : = \\mathbb { E } \\left[ \\sum _ { t = 0 } ^ { \\infty } \\gamma ^ { t } r ( \\mathbf { s } _ { t } , \\mathbf { a } _ { t } ) \\mathbf { \\nabla } \\vert \\ \\hat { \\mathbf { s } _ { 0 } } = \\mathbf { \\bar { s } } , \\mathbf { a } _ { 0 } = \\mathbf { a } \\right] } \\end{array}$ , where future actions are sampled from $\\pi ( \\cdot | \\mathbf { s } )$ and state transitions happen according to the MDP dynamics. Consider the following Bellman operator: $\\begin{array} { r } { B ^ { \\pi } Q ( \\mathbf { s } , \\mathbf { a } ) : = r ( \\mathbf { s } , \\mathbf { a } ) + \\gamma \\mathbb { E } _ { \\mathbf { \\mathbf { \\lambda s } ^ { \\prime } } \\sim T ( \\cdot | \\mathbf { s } , \\mathbf { a } ) , \\mathbf { a } ^ { \\prime } \\sim \\pi ( \\cdot | \\mathbf { s } ^ { \\prime } ) } \\left[ Q ( \\mathbf { s } ^ { \\prime } , \\mathbf { a } ^ { \\prime } ) \\right] } \\end{array}$ , and its sample based counterpart: $\\widehat { B } ^ { \\pi } Q ( \\mathbf { s } , \\mathbf { a } ) : = r ( \\mathbf { s } , \\mathbf { a } ) + \\gamma Q ( \\mathbf { s } ^ { \\prime } , \\mathbf { a } ^ { \\prime } )$ , associated with a single transition $( \\mathbf { s } , \\mathbf { a } , \\mathbf { s } ^ { \\prime } )$ and $\\mathbf { a } ^ { \\prime } \\sim \\pi ( \\mathbf { \\bar { \\cdot } } | \\mathbf { s } ^ { \\prime } )$ . The action-value function satisfies the Bellman consistency criterion given by $B ^ { \\pi } Q ^ { \\pi } ( \\mathbf { s } , \\mathbf { a } ) = Q ^ { \\pi } ( \\mathbf { s } , \\mathbf { a } ) \\forall ( \\mathbf { s } , \\mathbf { a } )$ . When given an offline dataset $\\mathcal { D }$ , standard approximate dynamic programming (ADP) and actor-critic methods use this criterion to alternate between policy evaluation [40] and policy improvement. A number of prior works have observed that such a direct extension of ADP and actor-critic schemes to offline RL leads to poor results due to distribution shift over the course of learning and over-estimation bias in the $Q$ function [14, 28, 63]. To address these drawbacks, prior works have proposed a number of modifications aimed towards regularizing the policy or value function (see Section 6). In this work, we primarily focus on CQL [29], which alternates between: ",
178
+ "bbox": [
179
+ 174,
180
+ 882,
181
+ 821,
182
+ 911
183
+ ],
184
+ "page_idx": 1
185
+ },
186
+ {
187
+ "type": "text",
188
+ "text": "",
189
+ "bbox": [
190
+ 173,
191
+ 90,
192
+ 825,
193
+ 289
194
+ ],
195
+ "page_idx": 2
196
+ },
197
+ {
198
+ "type": "text",
199
+ "text": "Policy Evaluation: The $Q$ function associated with the current policy $\\pi$ is approximated conservatively by repeating the following optimization: ",
200
+ "bbox": [
201
+ 174,
202
+ 295,
203
+ 823,
204
+ 324
205
+ ],
206
+ "page_idx": 2
207
+ },
208
+ {
209
+ "type": "text",
210
+ "text": "$Q ^ { k + 1 } \\arg \\operatorname* { m i n } _ { Q } \\beta ( \\mathbb { E } _ { \\mathbf { s } \\sim \\mathcal { D } , \\mathbf { a } \\sim \\boldsymbol { \\mu } ( \\cdot \\vert \\mathbf { s } ) } [ Q ( \\mathbf { s } , \\mathbf { a } ) ] - \\mathbb { E } _ { \\mathbf { s } , \\mathbf { a } \\sim \\mathcal { D } } [ Q ( \\mathbf { s } , \\mathbf { a } ) ] ) + \\frac { 1 } { 2 } \\mathbb { E } _ { \\mathbf { s } , \\mathbf { a } , \\mathbf { s } ^ { \\prime } \\sim \\mathcal { D } } \\Big [ \\Big ( Q ( \\mathbf { s } , \\mathbf { a } ) - \\widehat { B ^ { \\pi } } Q ^ { k } ( \\mathbf { s } , \\mathbf { a } ) \\Big ) ^ { 2 } \\Big ] ,$ (1) where $\\mu ( \\cdot | s )$ is a wide sampling distribution such as the uniform distribution over action bounds. CQL effectively penalizes the $Q$ function at states in the dataset for actions not observed in the dataset. This enables a conservative estimation of the value function for any policy [29], mitigating the challenges of over-estimation bias and distribution shift. ",
211
+ "bbox": [
212
+ 169,
213
+ 325,
214
+ 825,
215
+ 411
216
+ ],
217
+ "page_idx": 2
218
+ },
219
+ {
220
+ "type": "text",
221
+ "text": "Policy Improvement: After approximating the Q function as ${ \\hat { Q } } ^ { \\pi }$ , the policy is improved as $\\begin{array} { r } { \\pi \\arg \\operatorname* { m a x } _ { \\pi ^ { \\prime } } \\mathbb { E } _ { \\mathbf { s } \\sim \\mathcal { D } , \\mathbf { a } \\sim \\pi ^ { \\prime } ( \\cdot | \\mathbf { s } ) } \\Big [ \\hat { Q } ^ { \\pi } ( \\mathbf { s } , \\mathbf { a } ) \\Big ] . } \\end{array}$ . Actor-critic methods with parameterized policies and $Q$ functions approximate arg max and arg min in above equations with a few gradient descent steps. ",
222
+ "bbox": [
223
+ 173,
224
+ 417,
225
+ 825,
226
+ 470
227
+ ],
228
+ "page_idx": 2
229
+ },
230
+ {
231
+ "type": "text",
232
+ "text": "Model-Based Offline RL Algorithms. A second class of algorithms for solving MDPs involve the learning of the dynamics function, and using the learned model to aid policy search. Using the given dataset $\\mathcal { D }$ , a dynamics model $\\widehat { T }$ is typically trained using maximum likelihood estimation as: $\\begin{array} { r } { \\operatorname* { m i n } _ { \\widehat { T } } \\ \\mathbb { E } _ { ( \\mathbf { s } , \\mathbf { a } , \\mathbf { s } ^ { \\prime } ) \\sim \\mathcal { D } } \\left[ \\log \\widehat { T } ( \\mathbf { s } ^ { \\prime } | \\mathbf { s } , \\mathbf { a } ) \\right] } \\end{array}$ . A reward model ${ \\hat { r } } ( \\mathbf { s } , \\mathbf { a } )$ can also be learned similarly if it is unknown. Once a model has been learned, we can construct the learned MDP $\\widehat { \\mathcal { M } } = ( S , \\mathcal { A } , \\widehat { T } , \\widehat { r } , \\mu _ { 0 } , \\gamma )$ , which has the same state and action spaces, but uses the learned dynamics and reward function. Subsequently, any policy learning or planning algorithm can be used to recover the optimal policy in the model as $\\hat { \\pi } = \\arg \\operatorname* { m a x } _ { \\pi } J ( \\bar { \\mathcal { M } } , \\pi )$ . ",
233
+ "bbox": [
234
+ 173,
235
+ 474,
236
+ 826,
237
+ 606
238
+ ],
239
+ "page_idx": 2
240
+ },
241
+ {
242
+ "type": "text",
243
+ "text": "This straightforward approach is known to fail in the offline RL setting, both in theory and practice, due to distribution shift and model-bias [51, 26]. In order to overcome these challenges, offline model-based algorithms like MOReL [26] and MOPO [67] use uncertainty quantification to construct a lower bound for policy performance and optimize this lower bound by assuming a model error oracle $u ( \\mathbf { s } , \\mathbf { a } )$ . By using an uncertainty estimation algorithm like bootstrap ensembles [43, 4, 37], we can estimate $u ( \\mathbf { s } , \\mathbf { a } )$ . By constructing and optimizing such a lower bound, offline model-based RL algorithms avoid the aforementioned pitfalls like model-bias and distribution shift. While any RL or planning algorithm can be used to learn the optimal policy for $\\widehat { \\mathcal { M } }$ , we focus specifically on MBPO [20, 57] which was used in MOPO. MBPO follows the standard structure of actor-critic algorithms, but in each iteration uses an augmented dataset $\\mathcal { D } \\cup \\mathcal { D } _ { \\mathrm { m o d e l } }$ for policy evaluation. Here, $\\mathcal { D }$ is the offline dataset and $\\mathcal { D } _ { \\mathrm { m o d e l } }$ is a dataset obtained by simulating the current policy using the learned dynamics model. Specifically, at each iteration, MBPO performs $k$ -step rollouts using $\\widehat { T }$ starting from state $\\mathbf { s } \\in \\mathcal { D }$ with a particular rollout policy $\\mu ( \\mathbf { a } | \\mathbf { s } )$ , adds the model-generated data to $\\mathcal { D } _ { \\mathrm { m o d e l } }$ , and optimizes the policy with a batch of data sampled from $\\mathcal { D } \\cup \\mathcal { D } _ { \\mathrm { m o d e l } }$ where each datapoint in the batch is drawn from $\\mathcal { D }$ with probability $f \\in [ 0 , 1 ]$ and $\\mathcal { D } _ { \\mathrm { m o d e l } }$ with probability $1 - f$ . ",
244
+ "bbox": [
245
+ 173,
246
+ 611,
247
+ 826,
248
+ 824
249
+ ],
250
+ "page_idx": 2
251
+ },
252
+ {
253
+ "type": "text",
254
+ "text": "3 Conservative Offline Model-Based Policy Optimization ",
255
+ "text_level": 1,
256
+ "bbox": [
257
+ 176,
258
+ 830,
259
+ 663,
260
+ 849
261
+ ],
262
+ "page_idx": 2
263
+ },
264
+ {
265
+ "type": "text",
266
+ "text": "The principal limitation of prior offline model-based algorithms (discussed in Section 2) is the assumption of having access to a model error oracle for uncertainty estimation and strong reliance on heuristics of quantifying the uncertainty. In practice, such heuristics could be challenging for complex datasets or deep neural network models [44]. We argue that uncertainty estimation is not imperative for offline model-based RL and empirically show that uncertainty estimation could be inaccurate in offline RL problems especially when generalization to unknown behaviors is required in Section 5.1.1. Our goal is to develop a model-based offline RL algorithm that enables optimizing a lower bound on the policy performance, but without requiring uncertainty quantification. We achieve this by extending conservative Q-learning [29], which does not require explicit uncertainty quantification, into the model-based setting. Our algorithm COMBO, summarized in Algorithm 1, alternates between a conservative policy evaluation step and a policy improvement step, which we outline below. ",
267
+ "bbox": [
268
+ 174,
269
+ 856,
270
+ 825,
271
+ 911
272
+ ],
273
+ "page_idx": 2
274
+ },
275
+ {
276
+ "type": "table",
277
+ "img_path": "images/0cb97dfe0981cf5755c5a55c746d1686d576390c2345b639cb100adfcdc6c156.jpg",
278
+ "table_caption": [],
279
+ "table_footnote": [],
280
+ "table_body": "<table><tr><td>Require:Offine datasetD,rollout distribution μ(*ls),learned dynamics model Te,initialized policyand critic</td></tr><tr><td>T and Q. 1: Train the probabilistic dynamics model Te(s&#x27;,r|s,a) =N(μe(s,a),∑θ(s,a)) on D.</td></tr><tr><td>2:Initialize the replay buffer Dmodel ←@.</td></tr><tr><td>3:fori=1,2,3,,do</td></tr><tr><td>4: Collect model rollouts by sampling from μ and Tθ starting from states in D.Add model rollouts to Dmodel.</td></tr><tr><td>5: Conservatively evaluate π by repeatedly solving eq.2 to obtain ( using samples from DUDmodel.·</td></tr><tr><td>6: Improve policy under state marginal of df by solving eq. 3 to obtain π i+1 $ 7: end for</td></tr></table>",
281
+ "bbox": [
282
+ 176,
283
+ 109,
284
+ 826,
285
+ 241
286
+ ],
287
+ "page_idx": 3
288
+ },
289
+ {
290
+ "type": "text",
291
+ "text": "",
292
+ "bbox": [
293
+ 173,
294
+ 267,
295
+ 825,
296
+ 378
297
+ ],
298
+ "page_idx": 3
299
+ },
300
+ {
301
+ "type": "text",
302
+ "text": "Conservative Policy Evaluation: Given a policy $\\pi$ , an offline dataset $\\mathcal { D }$ , and a learned model of the MDP $\\hat { \\mathcal { M } }$ , the goal in this step is to obtain a conservative estimate of $Q ^ { \\pi }$ . To achieve this, we penalize the Q-values evaluated on data drawn from a particular state-action distribution that is more likely to be out-of-support while pushing up the Q-values on state-action pairs that are trustworthy, which is implemented by repeating the following recursion: ",
303
+ "bbox": [
304
+ 173,
305
+ 383,
306
+ 825,
307
+ 457
308
+ ],
309
+ "page_idx": 3
310
+ },
311
+ {
312
+ "type": "equation",
313
+ "img_path": "images/7395d8adf86f1e41506be1b3e2eb9e4d633699aac8afdef26b8dc7e78b6ac3db.jpg",
314
+ "text": "$$\n\\hat { Q } ^ { k + 1 } \\gets \\arg \\operatorname* { m i n } _ { Q } \\beta \\left( \\mathbb { E } _ { { \\mathbf { s } } , { \\mathbf { a } } \\sim { \\boldsymbol { \\rho } } ( { \\mathbf { s } } , { \\mathbf { a } } ) } [ Q ( { \\mathbf { s } } , { \\mathbf { a } } ) ] - \\mathbb { E } _ { { \\mathbf { s } } , { \\mathbf { a } } \\sim { \\mathcal { D } } } [ Q ( { \\mathbf { s } } , { \\mathbf { a } } ) ] \\right) + \\frac { 1 } { 2 } \\mathbb { E } _ { { \\mathbf { s } } , { \\mathbf { a } } , { \\mathbf { s } } ^ { \\prime } \\sim d _ { f } } \\bigg [ \\Big ( Q ( { \\mathbf { s } } , { \\mathbf { a } } ) - \\widehat { B ^ { \\pi } } \\hat { Q } ^ { k } ( { \\mathbf { s } } , { \\mathbf { a } } ) \\Big ) ^ { 2 } \\bigg ] .\n$$",
315
+ "text_format": "latex",
316
+ "bbox": [
317
+ 174,
318
+ 465,
319
+ 799,
320
+ 496
321
+ ],
322
+ "page_idx": 3
323
+ },
324
+ {
325
+ "type": "text",
326
+ "text": "Here, $\\rho ( \\mathbf { s } , \\mathbf { a } )$ and $d _ { f }$ are sampling distributions that we can choose. Model-based algorithms allow ample flexibility for these choices while providing the ability to control the bias introduced by these choices. For $\\rho ( \\mathbf { s } , \\mathbf { a } )$ , we make the following choice: $\\rho ( \\mathbf { s } , \\bar { \\mathbf { a } } ) = d _ { \\widehat { \\mathcal { M } } } ^ { \\pi } ( \\mathbf { s } ) \\pi ( \\mathbf { a } | \\mathbf { s } )$ , where $d _ { \\widehat { \\mathcal { M } } } ^ { \\pi } ( \\mathbf { s } )$ is the discounted marginal state distribution when executing $\\pi$ in the learned model $\\widehat { \\mathcal { M } }$ . Samples from $d _ { \\widehat { \\mathcal { M } } } ^ { \\pi } ( \\mathbf { s } )$ can be obtained by rolling out $\\pi$ in $\\widehat { \\mathcal { M } }$ . Similarly, $d _ { f }$ is an $f$ −interpolation between the coffline dataset and synthetic rollouts from the model: $d _ { f } ^ { \\mu } ( \\mathbf { s } , \\mathbf { a } ) : = f d ( \\mathbf { s } , \\mathbf { a } ) + ( 1 - f ) d _ { \\widehat { \\mathcal { M } } } ^ { \\mu } ( \\mathbf { s } , \\mathbf { a } )$ , where $f \\in [ 0 , 1 ]$ is the ratio of the datapoints drawn from the offline dataset as defined in Section 2 and $\\mu ( \\cdot | \\mathbf { s } )$ is the rollout distribution used with the model, which can be modeled as $\\pi$ or a uniform distribution. To avoid notation clutter, we also denote $d _ { f } : = d _ { f } ^ { \\mu }$ . ",
327
+ "bbox": [
328
+ 173,
329
+ 501,
330
+ 825,
331
+ 643
332
+ ],
333
+ "page_idx": 3
334
+ },
335
+ {
336
+ "type": "text",
337
+ "text": "Under such choices of $\\rho$ and $d _ { f }$ , we push down (or conservatively estimate) $\\mathrm { Q }$ -values on state-action tuples from model rollouts and push up Q-values on the real state-action pairs from the offline dataset. When updating Q-values with the Bellman backup, we use a mixture of both the model-generated data and the real data, similar to Dyna [57]. Note that in comparison to CQL and other model-free algorithms, COMBO learns the Q-function over a richer set of states beyond the states in the offline dataset. This is made possible by performing rollouts under the learned dynamics model, denoted by $d _ { \\widehat { \\mathcal { M } } } ^ { \\mu } ( \\mathbf { s } , \\mathbf { a } )$ . We will show in Section 4 that the Q function learned by repeating the recursion in Eq. 2 cprovides a lower bound on the true Q function, without the need for explicit uncertainty estimation. Furthermore, we will theoretically study the advantages of using synthetic data from the learned model, and characterize the impacts of model bias. ",
338
+ "bbox": [
339
+ 173,
340
+ 648,
341
+ 826,
342
+ 791
343
+ ],
344
+ "page_idx": 3
345
+ },
346
+ {
347
+ "type": "text",
348
+ "text": "Policy Improvement Using a Conservative Critic: After learning a conservative critic ${ \\hat { Q } } ^ { \\pi }$ , we improve the policy as: ",
349
+ "bbox": [
350
+ 173,
351
+ 799,
352
+ 823,
353
+ 827
354
+ ],
355
+ "page_idx": 3
356
+ },
357
+ {
358
+ "type": "equation",
359
+ "img_path": "images/3eb88a1621e0a26eff98fb484728901f255f8ecfc8939ed1a0f754920ebe547b.jpg",
360
+ "text": "$$\n\\pi ^ { \\prime } \\gets \\arg \\operatorname* { m a x } _ { \\pi } \\mathbb { E } _ { \\mathbf { s } \\sim \\rho , \\mathbf { a } \\sim \\pi ( \\cdot | \\mathbf { s } ) } \\left[ \\hat { Q } ^ { \\pi } ( \\mathbf { s } , \\mathbf { a } ) \\right]\n$$",
361
+ "text_format": "latex",
362
+ "bbox": [
363
+ 364,
364
+ 825,
365
+ 633,
366
+ 852
367
+ ],
368
+ "page_idx": 3
369
+ },
370
+ {
371
+ "type": "text",
372
+ "text": "where $\\rho ( \\mathbf { s } )$ is the state marginal of $\\rho ( \\mathbf { s } , \\mathbf { a } )$ . When policies are parameterized with neural networks, we approximate the arg max with a few steps of gradient descent. In addition, entropy regularization can also be used to prevent the policy from becoming degenerate if required [17]. In Section 4.2, we show that the resulting policy is guaranteed to improve over the behavior policy. ",
373
+ "bbox": [
374
+ 174,
375
+ 854,
376
+ 825,
377
+ 911
378
+ ],
379
+ "page_idx": 3
380
+ },
381
+ {
382
+ "type": "text",
383
+ "text": "Practical Implementation Details. Our practical implementation largely follows MOPO, with the key exception that we perform conservative policy evaluation as outlined in this section, rather than using uncertainty-based reward penalties. Following MOPO, we represent the probabilistic dynamics model using a neural network, with parameters $\\theta$ , that produces a Gaussian distribution over the next state and reward: $\\widehat { T } _ { \\theta } ( \\mathbf { s } _ { t + 1 } , r | \\mathbf { s } , \\mathbf { a } ) = \\mathcal { N } ( \\mu _ { \\theta } ( \\mathbf { s } _ { t } , \\mathbf { a } _ { t } ) , \\boldsymbol { \\Sigma } _ { \\theta } ( \\mathbf { s } _ { t } , \\mathbf { a } _ { t } ) )$ . The model is trained via maximum likelihood. For conservative policy evaluation (eq. 2) and policy improvement (eq. 3), we augment $\\rho$ with states sampled from the offline dataset, which shows more stable improvement in practice. It is relatively common in prior work on model-based offline RL to select various hyperparameters using online policy rollouts [67, 26, 3, 33]. However, we would like to avoid this with our method, since requiring online rollouts to tune hyperparameters contradicts the main aim of offline RL, which is to learn entirely from offline data. Therefore, we do not use online rollouts for tuning $C O M B O$ , and instead devise an automated rule for tuning important hyperparameters such as $\\beta$ and $f$ in a fully offline manner. We search over a small discrete set of hyperparameters for each task, and use the value of the regularization term $\\mathbb { E } _ { { \\mathbf { s } } , { \\mathbf { a } } \\sim \\rho ( { \\mathbf { s } } , { \\mathbf { a } } ) } [ Q ( { \\mathbf { s } } , { \\mathbf { a } } ) ] - \\mathbb { E } _ { { \\mathbf { s } } , { \\mathbf { a } } \\sim \\mathcal { D } } [ Q ( { \\mathbf { s } } , { \\mathbf { s } } ) ]$ (shown in Eq. 2) to pick hyperparameters in an entirely offline fashion. We select the hyperparameter setting that achieves the lowest regularization objective, which indicates that the Q-values on unseen model-predicted state-action tuples are not overestimated. Additional details about the practical implementation and the hyperparameter selection rule are provided in Appendix B.1 and Appendix B.2 respectively. ",
384
+ "bbox": [
385
+ 173,
386
+ 89,
387
+ 826,
388
+ 343
389
+ ],
390
+ "page_idx": 4
391
+ },
392
+ {
393
+ "type": "text",
394
+ "text": "4 Theoretical Analysis of COMBO ",
395
+ "text_level": 1,
396
+ "bbox": [
397
+ 174,
398
+ 349,
399
+ 478,
400
+ 366
401
+ ],
402
+ "page_idx": 4
403
+ },
404
+ {
405
+ "type": "text",
406
+ "text": "In this section, we theoretically analyze our method and show that it optimizes a lower-bound on the expected return of the learned policy. This lower bound is close to the actual policy performance (modulo sampling error) when the policy’s state-action marginal distribution is in support of the state-action marginal of the behavior policy and conservatively estimates the performance of a policy otherwise. By optimizing the policy against this lower bound, COMBO guarantees policy improvement beyond the behavior policy. Furthermore, we use these insights to discuss cases when COMBO is less conservative compared to model-free counterparts. ",
407
+ "bbox": [
408
+ 173,
409
+ 372,
410
+ 825,
411
+ 469
412
+ ],
413
+ "page_idx": 4
414
+ },
415
+ {
416
+ "type": "text",
417
+ "text": "4.1 COMBO Optimizes a Lower Bound ",
418
+ "text_level": 1,
419
+ "bbox": [
420
+ 176,
421
+ 478,
422
+ 462,
423
+ 493
424
+ ],
425
+ "page_idx": 4
426
+ },
427
+ {
428
+ "type": "text",
429
+ "text": "We first show that training the Q-function using Eq. 2 produces a Q-function such that the expected off-policy policy improvement objective [8] computed using this learned Q-function lower-bounds its actual value. We will reuse notation for $d _ { f }$ and $d$ from Sections 2 and 3. Assuming that the Q-function is tabular, the Q-function found by approximate dynamic programming in iteration $k$ , can be obtained by differentiating Eq. 2 with respect to $Q ^ { k }$ (see App. A for details): ",
430
+ "bbox": [
431
+ 173,
432
+ 497,
433
+ 825,
434
+ 568
435
+ ],
436
+ "page_idx": 4
437
+ },
438
+ {
439
+ "type": "equation",
440
+ "img_path": "images/db9922d86100624369b5aaf6fd4d10b276af83c38c79232aad7e0c4cc24383f5.jpg",
441
+ "text": "$$\n\\hat { Q } ^ { k + 1 } ( \\mathbf { s } , \\mathbf { a } ) = ( \\widehat { \\mathcal { B } } ^ { \\pi } Q ^ { k } ) ( \\mathbf { s } , \\mathbf { a } ) - \\beta \\frac { \\rho ( \\mathbf { s } , \\mathbf { a } ) - d ( \\mathbf { s } , \\mathbf { a } ) } { d _ { f } ( \\mathbf { s } , \\mathbf { a } ) } .\n$$",
442
+ "text_format": "latex",
443
+ "bbox": [
444
+ 330,
445
+ 571,
446
+ 666,
447
+ 606
448
+ ],
449
+ "page_idx": 4
450
+ },
451
+ {
452
+ "type": "text",
453
+ "text": "Eq. 4 effectively applies a penalty that depends on the three distributions appearing in the COMBO critic training objective (Eq. 2), of which $\\rho$ and $d _ { f }$ are free variables that we choose in practice as discussed in Section 3. For a given iteration $k$ of Eq. 4, we further define the expected penalty under $\\rho ( \\mathbf { s } , \\mathbf { a } )$ as: ",
454
+ "bbox": [
455
+ 173,
456
+ 608,
457
+ 825,
458
+ 664
459
+ ],
460
+ "page_idx": 4
461
+ },
462
+ {
463
+ "type": "equation",
464
+ "img_path": "images/96bd9ce8dfec23d9b674c50005c6fe7e531c44a0e1cfa946ae56b1d09687f3fa.jpg",
465
+ "text": "$$\n\\nu ( { \\boldsymbol \\rho } , f ) : = \\mathbb { E } _ { { \\mathbf s } , { \\mathbf a } \\sim { \\boldsymbol \\rho } ( { \\mathbf s } , { \\mathbf a } ) } \\left[ \\frac { { \\boldsymbol \\rho } ( { \\mathbf s } , { \\mathbf a } ) - d ( { \\mathbf s } , { \\mathbf a } ) } { d _ { f } ( { \\mathbf s } , { \\mathbf a } ) } \\right] .\n$$",
466
+ "text_format": "latex",
467
+ "bbox": [
468
+ 352,
469
+ 662,
470
+ 643,
471
+ 698
472
+ ],
473
+ "page_idx": 4
474
+ },
475
+ {
476
+ "type": "text",
477
+ "text": "Next, we will show that the Q-function learned by COMBO lower-bounds the actual Q-function under the initial state distribution $\\mu _ { 0 }$ and any policy $\\pi$ . We also show that the asymptotic Q-function learned by COMBO lower-bounds the actual Q-function of any policy $\\pi$ with high probability for a large enough $\\beta \\geq 0$ , which we include in Appendix A.2. Let $\\overline { { \\mathcal { M } } }$ represent the empirical MDP which uses the empirical transition model based on raw data counts. The Bellman backups over the dataset distribution $d _ { f }$ in Eq. 2 that we analyze is an $f -$ interpolation of the backup operator in the empirical MDP (denoted by $B _ { \\mathcal { M } } ^ { \\pi } )$ ) and the backup operator under the learned model $\\widehat { \\mathcal { M } }$ (denoted by $B _ { \\widehat { \\mathcal { M } } } ^ { \\pi } .$ ). The cempirical backup operator suffers from sampling error, but is unbiased in expectation, whereas the model backup operator induces bias but no sampling error. We assume that all of these backups enjoy concentration properties with concentration coefficient $C _ { r , T , \\delta }$ , dependent on the desired confidence value $\\delta$ (details in Appendix A.2). This is a standard assumption in literature [31]. Now, we state our main results below. ",
478
+ "bbox": [
479
+ 173,
480
+ 704,
481
+ 825,
482
+ 878
483
+ ],
484
+ "page_idx": 4
485
+ },
486
+ {
487
+ "type": "text",
488
+ "text": "Proposition 4.1. For large enough $\\beta$ , we have $\\mathbb { E } _ { { \\mathbf { s } } \\sim \\mu _ { 0 } , { \\mathbf { a } } \\sim \\pi ( \\cdot | { \\mathbf { s } } ) } [ \\hat { Q } ^ { \\pi } ( { \\mathbf { s } } , { \\mathbf { a } } ) ] \\leq \\mathbb { E } _ { { \\mathbf { s } } \\sim \\mu _ { 0 } , { \\mathbf { a } } \\sim \\pi ( \\cdot | { \\mathbf { s } } ) } [ Q ^ { \\pi } ( { \\mathbf { s } } , { \\mathbf { a } } ) ] ,$ where $\\mu _ { 0 } ( \\mathbf { s } )$ is the initial state distribution. Furthermore, when $\\epsilon _ { s }$ is small, such as in the large sample regime, or when the model bias $\\epsilon _ { m }$ is small, a small $\\beta$ is sufficient to guarantee this condition along with an appropriate choice of $f$ . ",
489
+ "bbox": [
490
+ 173,
491
+ 881,
492
+ 823,
493
+ 911
494
+ ],
495
+ "page_idx": 4
496
+ },
497
+ {
498
+ "type": "text",
499
+ "text": "",
500
+ "bbox": [
501
+ 174,
502
+ 92,
503
+ 823,
504
+ 121
505
+ ],
506
+ "page_idx": 5
507
+ },
508
+ {
509
+ "type": "text",
510
+ "text": "The proof for Proposition 4.1 can be found in Appendix A.2. Finally, while Kumar et al. [29] also analyze how regularized value function training can provide lower bounds on the value function at each state in the dataset [29] (Proposition 3.1-3.2), our result shows that COMBO is less conservative in that it does not underestimate the value function at every state in the dataset like CQL (Remark 1) and might even overestimate these values. Instead COMBO penalizes Q-values at states generated via model rollouts from $\\rho ( \\mathbf { s } , \\mathbf { a } )$ . Note that in general, the required value of $\\beta$ may be quite large similar to prior works, which typically utilize a large constant $\\beta$ , which may be in the form of a penalty on a regularizer [36, 29] or as constants in theoretically optimal algorithms [23, 49]. While it is challenging to argue that that either COMBO or CQL attains the tightest possible lower-bound on return, in our final result of this section, we discuss a sufficient condition for the COMBO lower-bound to be tighter than CQL. ",
511
+ "bbox": [
512
+ 173,
513
+ 131,
514
+ 825,
515
+ 284
516
+ ],
517
+ "page_idx": 5
518
+ },
519
+ {
520
+ "type": "text",
521
+ "text": "Proposition 4.2. Assuming previous notation, let $\\Delta _ { C O M B O } ^ { \\pi } : = \\mathbb { E } _ { \\mathbf { s } , \\mathbf { a } \\sim d _ { \\overline { { \\mathcal { M } } } } ( \\mathbf { s } ) , \\pi ( \\mathbf { a } | \\mathbf { s } ) } \\left[ \\hat { Q } ^ { \\pi } ( \\mathbf { s } , \\mathbf { a } ) \\right]$ and $\\Delta _ { C Q L } ^ { \\pi } : = \\mathbb { E } _ { \\mathbf { s } , \\mathbf { a } \\sim d _ { \\overline { { \\mathcal { M } } } } ( \\mathbf { s } ) , \\pi ( \\mathbf { a } | \\mathbf { s } ) } \\left[ \\hat { Q } _ { C Q L } ^ { \\pi } ( \\mathbf { s } , \\mathbf { a } ) \\right]$ denote the average values on the dataset under the $Q$ - functions learned by COMBO and CQL respectively. Then, $\\Delta _ { C O M B O } ^ { \\pi } \\geq \\Delta _ { C Q L } ^ { \\pi } , i$ f: ",
522
+ "bbox": [
523
+ 173,
524
+ 289,
525
+ 826,
526
+ 352
527
+ ],
528
+ "page_idx": 5
529
+ },
530
+ {
531
+ "type": "equation",
532
+ "img_path": "images/db9be7cee285cfa2a2a9c66e5e6118d67ac4282b59ec73a411f862fb8d1e29b5.jpg",
533
+ "text": "$$\n\\mathbb { E } _ { \\mathbf { s } , \\mathbf { a } \\sim \\rho ( \\mathbf { s } , \\mathbf { a } ) } \\left[ \\frac { \\pi ( \\mathbf { a } | \\mathbf { s } ) } { \\pi _ { \\beta } ( \\mathbf { a } | \\mathbf { s } ) } \\right] - \\mathbb { E } _ { \\mathbf { s } , \\mathbf { a } \\sim d _ { \\overline { { \\mathcal { M } } } } ( \\mathbf { s } ) , \\pi ( \\mathbf { a } | \\mathbf { s } ) } \\left[ \\frac { \\pi ( \\mathbf { a } | \\mathbf { s } ) } { \\pi _ { \\beta } ( \\mathbf { a } | \\mathbf { s } ) } \\right] \\leq 0 .\n$$",
534
+ "text_format": "latex",
535
+ "bbox": [
536
+ 266,
537
+ 358,
538
+ 683,
539
+ 393
540
+ ],
541
+ "page_idx": 5
542
+ },
543
+ {
544
+ "type": "text",
545
+ "text": "Proposition 4.2 indicates that COMBO will be less conservative than CQL when the action probabilities under learned policy $\\pi ( \\mathbf { a } | \\mathbf { s } )$ and the probabilities under the behavior policy $\\pi _ { \\beta } ( \\mathbf { a } | \\mathbf { s } )$ are closer together on state-action tuples drawn from $\\rho ( \\mathbf { s } , \\mathbf { a } )$ (i.e., sampled from the model using the policy $\\pi ( \\mathbf { a } | \\mathbf { s } ) )$ ), than they are on states from the dataset and actions from the policy, $d _ { \\overline { { \\mathcal { M } } } } ( \\mathbf { s } ) \\pi ( \\mathbf { a } | \\mathbf { s } )$ . COMBO’s objective (Eq. 2) only penalizes $\\mathrm { Q }$ -values under $\\rho ( \\mathbf { s } , \\mathbf { a } )$ , which, in practice, are expected to primarily consist of out-of-distribution states generated from model rollouts, and does not penalize the Q-value at states drawn from $d _ { \\overline { { \\mathcal { M } } } } ( \\mathbf { s } )$ . As a result, the expression $( * )$ is likely to be negative, making COMBO less conservative than CQL. ",
546
+ "bbox": [
547
+ 173,
548
+ 406,
549
+ 826,
550
+ 520
551
+ ],
552
+ "page_idx": 5
553
+ },
554
+ {
555
+ "type": "text",
556
+ "text": "4.2 Safe Policy Improvement Guarantees ",
557
+ "text_level": 1,
558
+ "bbox": [
559
+ 174,
560
+ 530,
561
+ 472,
562
+ 546
563
+ ],
564
+ "page_idx": 5
565
+ },
566
+ {
567
+ "type": "text",
568
+ "text": "Now that we have shown various aspects of the lower-bound on the Q-function induced by COMBO, we provide policy improvement guarantees for the COMBO algorithm. Formally, Proposition 4.3 discuss safe improvement guarantees over the behavior policy. building on prior work [46, 31, 29]. ",
569
+ "bbox": [
570
+ 176,
571
+ 553,
572
+ 825,
573
+ 594
574
+ ],
575
+ "page_idx": 5
576
+ },
577
+ {
578
+ "type": "text",
579
+ "text": "Proposition 4.3 ( $\\zeta$ -safe policy improvement). Let ${ \\hat { \\pi } } _ { o u t } ( \\mathbf { a } | \\mathbf { s } )$ be the policy obtained by COMBO. Then, $i f \\beta$ is sufficiently large and $\\nu ( \\rho ^ { \\pi } , f ) - \\nu ( \\rho ^ { \\beta } , f ) \\ge C$ for a positive constant $C$ , the policy ${ \\hat { \\pi } } _ { o u t } ( \\mathbf { a } | \\mathbf { s } )$ is a $\\zeta$ -safe policy improvement over $\\pi _ { \\beta }$ in the actual MDP $\\mathcal { M }$ , i.e., $J ( \\hat { \\pi } _ { o u t } , \\mathcal { M } ) \\ge \\bar { J } ( \\pi _ { \\beta } , \\mathcal { M } ) - \\zeta$ , with probability at least $1 - \\delta$ , where $\\boldsymbol { \\zeta }$ is given by, ",
580
+ "bbox": [
581
+ 176,
582
+ 597,
583
+ 826,
584
+ 654
585
+ ],
586
+ "page_idx": 5
587
+ },
588
+ {
589
+ "type": "equation",
590
+ "img_path": "images/b7625d53b8444b411eca62f1817ed73b89116d4184ec94ec75f0b10a3ead4e94.jpg",
591
+ "text": "$$\n\\mathcal { O } \\left( \\frac { \\gamma f } { ( 1 - \\gamma ) ^ { 2 } } \\right) \\underbrace { \\mathbb { E } _ { \\mathbb { s } \\sim d _ { \\mathcal { A } ^ { d } } ^ { \\widehat { \\pi } _ { o u t } } } \\left[ \\sqrt \\frac { | A | } { | \\mathcal { D } ( \\mathbf { s } ) | } \\mathrm { D } c \\varrho L ( \\widehat { \\pi } _ { o u t } , \\pi _ { \\beta } ) \\right] } _ { : = ( I ) } + \\mathcal { O } \\left( \\frac { \\gamma ( 1 - f ) } { ( 1 - \\gamma ) ^ { 2 } } \\right) \\underbrace { \\mathrm { D } _ { \\mathrm { T V } } ( \\overline { { \\mathcal { M } } } , \\widehat { \\mathcal { M } } ) } _ { : = ( \\varOmega ) } - \\underbrace { \\beta \\frac { C } { ( 1 - \\gamma ) } } _ { : = ( \\varDelta ) } .\n$$",
592
+ "text_format": "latex",
593
+ "bbox": [
594
+ 199,
595
+ 660,
596
+ 799,
597
+ 715
598
+ ],
599
+ "page_idx": 5
600
+ },
601
+ {
602
+ "type": "text",
603
+ "text": "The complete statement (with constants and terms that grow smaller than quadratic in the horizon) and proof for Proposition 4.3 is provided in Appendix A.4. $D _ { \\mathrm { C Q L } }$ denotes a notion of probabilistic distance between policies [29] which we discuss further in Appendix A.4. The expression for $\\zeta$ in Proposition 4.3 consists of three terms: term (1) captures the decrease in the policy performance due to limited data, and decays as the size of $\\mathcal { D }$ increases. The second term (2) captures the suboptimality induced by the bias in the learned model. Finally, as we show in Appendix A.4, the third term (3) comes from $\\nu ( \\rho ^ { \\pi } , f ) - \\nu ( \\rho ^ { \\beta } , f )$ , which is equivalent to the improvement in policy performance as a result of running COMBO in the empirical and model MDPs. Since the learned model is trained on the dataset $\\mathcal { D }$ with transitions generated from the behavior policy $\\pi _ { \\beta }$ , the marginal distribution $\\rho ^ { \\beta } ( \\mathbf { s } , \\mathbf { a } )$ is expected to be closer to $d ( \\mathbf { s } , \\mathbf { a } )$ for $\\pi _ { \\beta }$ as compared to the counterpart for the learned policy, $\\rho ^ { \\pi }$ . Thus, the assumption that $\\nu ( \\rho ^ { \\pi } , f ) - \\nu ( \\rho ^ { \\beta } , f )$ is positive is reasonable, and in such cases, an appropriate (large) choice of $\\beta$ will make term (3) large enough to counteract terms (1) and (2) that reduce policy performance. We discuss this elaborately in Appendix A.4 (Remark 3). ",
604
+ "bbox": [
605
+ 173,
606
+ 727,
607
+ 826,
608
+ 912
609
+ ],
610
+ "page_idx": 5
611
+ },
612
+ {
613
+ "type": "text",
614
+ "text": "Further note that in contrast to Proposition 3.6 in Kumar et al. [29], note that our result indicates the sampling error (term (1)) is reduced (multiplied by a fraction $f$ ) when a near-accurate model is used to augment data for training the Q-function, and similarity, it can avoid the bias of model-based methods by relying more on the model-free component. This allows COMBO to attain the best-of-both model-free and model-based methods, via a suitable choice of the fraction $f$ . ",
615
+ "bbox": [
616
+ 174,
617
+ 92,
618
+ 825,
619
+ 161
620
+ ],
621
+ "page_idx": 6
622
+ },
623
+ {
624
+ "type": "text",
625
+ "text": "To summarize, through an appropriate choice of $f$ , Proposition 4.3 guarantees safe improvement over the behavior policy without requiring access to an oracle uncertainty estimation algorithm. ",
626
+ "bbox": [
627
+ 173,
628
+ 166,
629
+ 823,
630
+ 195
631
+ ],
632
+ "page_idx": 6
633
+ },
634
+ {
635
+ "type": "text",
636
+ "text": "5 Experiments ",
637
+ "text_level": 1,
638
+ "bbox": [
639
+ 174,
640
+ 205,
641
+ 313,
642
+ 223
643
+ ],
644
+ "page_idx": 6
645
+ },
646
+ {
647
+ "type": "text",
648
+ "text": "In our experiments, we aim to answer the follow questions: (1) Can COMBO generalize better than previous offline model-free and model-based approaches in a setting that requires generalization to tasks that are different from what the behavior policy solves? (2) How does COMBO compare with prior work in tasks with high-dimensional image observations? (3) How does COMBO compare to prior offline model-free and model-based methods in standard offline RL benchmarks? ",
649
+ "bbox": [
650
+ 174,
651
+ 232,
652
+ 825,
653
+ 301
654
+ ],
655
+ "page_idx": 6
656
+ },
657
+ {
658
+ "type": "text",
659
+ "text": "To answer those questions, we compare COMBO to several prior methods. In the domains with compact state spaces, we compare with recent model-free algorithms like BEAR [28], BRAC [63], and CQL [29]; as well as MOPO [67] and MOReL [26] which are two recent model-based algorithms. In addition, we also compare with an offline version of SAC [17] (denoted as SAC-off), and behavioral cloning (BC). In high-dimensional image-based domains, which we use to answer question (3), we compare to LOMPO [48], which is a latent space offline model-based RL method that handles image inputs, latent space MBPO (denoted LMBPO), similar to Janner et al. [20] which uses the model to generate additional synthetic data, the fully offline version of SLAC [32] (denoted SLAC-off), which only uses a variational model for state representation purposes, and CQL from image inputs. To our knowledge, CQL, MOPO, and LOMPO are representative of state-of-the-art model-free and model-based offline RL methods. Hence we choose them as comparisons to COMBO. To highlight the distinction between COMBO and a naïve combination of CQL and MBPO, we perform such a comparison in Table 8 in Appendix C. For more details of our experimental set-up, comparisons, and hyperparameters, see Appendix B. ",
660
+ "bbox": [
661
+ 174,
662
+ 308,
663
+ 825,
664
+ 501
665
+ ],
666
+ "page_idx": 6
667
+ },
668
+ {
669
+ "type": "text",
670
+ "text": "5.1 Results on tasks that require generalization ",
671
+ "text_level": 1,
672
+ "bbox": [
673
+ 176,
674
+ 516,
675
+ 513,
676
+ 531
677
+ ],
678
+ "page_idx": 6
679
+ },
680
+ {
681
+ "type": "text",
682
+ "text": "To answer question (1), we use two environments halfcheetah-jump and ant-angle constructed in Yu et al. [67], which requires the agent to solve a task that is different from what the behavior policy solved. In both environments, the offline dataset is ",
683
+ "bbox": [
684
+ 173,
685
+ 539,
686
+ 323,
687
+ 718
688
+ ],
689
+ "page_idx": 6
690
+ },
691
+ {
692
+ "type": "table",
693
+ "img_path": "images/35e3553e98ce4c34eacb1364e53b75b567aa02a747447b41fbc20f118695df6e.jpg",
694
+ "table_caption": [],
695
+ "table_footnote": [],
696
+ "table_body": "<table><tr><td>Environment</td><td>Batch Mean</td><td>Batch Max</td><td>COMBO (Ours)</td><td>MOPO</td><td>MOReL</td><td>CQL</td></tr><tr><td>halfcheetah-jump</td><td>-1022.6</td><td>1808.6</td><td>5308.7±575.5</td><td>4016.6</td><td>3228.7</td><td>741.1</td></tr><tr><td>ant-angle</td><td>866.7</td><td>2311.9</td><td>2776.9±43.6</td><td>2530.9</td><td>2660.3</td><td>2473.4</td></tr><tr><td>sawyer-door-close</td><td>5%</td><td>100%</td><td>98.3%±3.0%</td><td>65.8%</td><td>42.9%</td><td>36.7%</td></tr><tr><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr></table>",
697
+ "bbox": [
698
+ 343,
699
+ 556,
700
+ 810,
701
+ 619
702
+ ],
703
+ "page_idx": 6
704
+ },
705
+ {
706
+ "type": "text",
707
+ "text": "Table 1: Average returns of halfcheetah-jump and ant-angle and average success rate of sawyer-door-close that require out-of-distribution generalization. All results are averaged over 6 random seeds. We include the mean and max return / success rate of episodes in the batch data (under Batch Mean and Batch Max, respectively) for comparison. We also include the $9 5 \\%$ -confidence interval for COMBO. ",
708
+ "bbox": [
709
+ 334,
710
+ 621,
711
+ 825,
712
+ 695
713
+ ],
714
+ "page_idx": 6
715
+ },
716
+ {
717
+ "type": "text",
718
+ "text": "collected by policies trained with original reward functions of halfcheetah and ant, which reward the robots to run as fast as possible. The behavior policies are trained with SAC with 1M steps and we take the full replay buffer as the offline dataset. Following Yu et al. [67], we relabel rewards in the offline datasets to reward the halfcheetah to jump as high as possible and the ant to run to the top corner with a 30 degree angle as fast as possible. Following the same manner, we construct a third task sawyer-door-close based on the environment in Yu et al. [66], Rafailov et al. [48]. In this task, we collect the offline data with SAC policies trained with a sparse reward function that only gives a reward of 1 when the door is opened by the sawyer robot and 0 otherwise. The offline dataset is similar to the “medium-expert“ dataset in the D4RL benchmark since we mix equal amounts of data collected by a fully-trained SAC policy and a partially-trained SAC policy. We relabel the reward such that it is 1 when the door is closed and 0 otherwise. Therefore, in these datasets, the offline RL methods must generalize beyond behaviors in the offline data in order to learn the intended behaviors. We visualize the sawyer-door-close environment in the right image in Figure 3 in Appendix B.4. ",
719
+ "bbox": [
720
+ 173,
721
+ 718,
722
+ 825,
723
+ 911
724
+ ],
725
+ "page_idx": 6
726
+ },
727
+ {
728
+ "type": "text",
729
+ "text": "We present the results on the three tasks in Table 1. COMBO significantly outperforms MOPO, MOReL and CQL, two representative model-based methods and one representative model-free methods respectively, in the halfcheetah-jump and sawyer-door-close tasks, and achieves an approximately $8 \\%$ , $4 \\%$ and $12 \\%$ improvement over MOPO, MOReL and CQL respectively on the ant-angle task. These results validate that COMBO achieves better generalization results in practice by behaving less conservatively than prior model-free offline methods (compare to CQL, which doesn’t improve much), and does so more robustly than prior model-based offline methods (compare to MOReL and MOPO). ",
730
+ "bbox": [
731
+ 173,
732
+ 90,
733
+ 826,
734
+ 202
735
+ ],
736
+ "page_idx": 7
737
+ },
738
+ {
739
+ "type": "text",
740
+ "text": "5.1.1 Empirical analysis on uncertainty estimation in offline model-based RL ",
741
+ "text_level": 1,
742
+ "bbox": [
743
+ 171,
744
+ 210,
745
+ 718,
746
+ 226
747
+ ],
748
+ "page_idx": 7
749
+ },
750
+ {
751
+ "type": "text",
752
+ "text": "To further understand why COMBO outperforms prior model-based methods in tasks that require generalization, we argue that one of the main reasons could be that uncertainty estimation is hard in these tasks where the agent is required to go further away from the data distribution. To test this intuition, we perform empirical evaluations to study whether uncertainty quantification with deep neural networks, especially in the setting of dynamics model learning, is challenging and could cause problems with uncertainty-based model-based offline RL methods such as ",
753
+ "bbox": [
754
+ 174,
755
+ 231,
756
+ 387,
757
+ 492
758
+ ],
759
+ "page_idx": 7
760
+ },
761
+ {
762
+ "type": "image",
763
+ "img_path": "images/8dbb6241c386cd847d4468ef095cef1f50bfcae3b15481b0d5dd4f2991a5d91d.jpg",
764
+ "image_caption": [
765
+ "Figure 2: We visualize the fitted linear regression line between the model error and two uncertainty quantification methods maximum learned variance over the ensemble (denoted as Max Var) on two tasks that test the generalization abilities of offline RL algorithms (halfcheetah-jump and ant-angle). We show that Max Var struggles to predict the true model error. Such visualizations indicates that uncertainty quantification is challenging with deep neural networks and could lead to poor performance in model-based offline RL in settings where out-of-distribution generalization is needed. In the meantime, COMBO addresses this issue by removing the burden of performing uncertainty quantification. "
766
+ ],
767
+ "image_footnote": [],
768
+ "bbox": [
769
+ 410,
770
+ 236,
771
+ 803,
772
+ 349
773
+ ],
774
+ "page_idx": 7
775
+ },
776
+ {
777
+ "type": "text",
778
+ "text": "MOReL [26] and MOPO [67]. In our evaluations, we consider maximum learned variance over the ensemble (denoted as Max Var) $\\begin{array} { r } { \\operatorname* { m a x } _ { i = 1 , \\dots , N } \\| \\Sigma _ { \\theta } ^ { i } ( \\mathbf { s } , \\mathbf { a } ) \\| _ { \\mathrm { F } } } \\end{array}$ (used in MOPO). ",
779
+ "bbox": [
780
+ 178,
781
+ 492,
782
+ 823,
783
+ 522
784
+ ],
785
+ "page_idx": 7
786
+ },
787
+ {
788
+ "type": "text",
789
+ "text": "We consider two tasks halfcheetah-jump and ant-angle. We normalize both the model error and the uncertainty estimates to be within scale $[ 0 , 1 ]$ and performs linear regression that learns the mapping between the uncertainty estimates and the true model error. As shown in Figure 2, on both tasks, Max Var is unable to accurately predict the true model error, suggesting that uncertainty estimation used by offline model-based methods is not accurate and might be the major factor that results in its poor performance. Meanwhile, COMBO circumvents challenging uncertainty quantification problem and achieves better performances on those tasks, indicating the effectiveness and the robustness of the method. ",
790
+ "bbox": [
791
+ 173,
792
+ 527,
793
+ 825,
794
+ 637
795
+ ],
796
+ "page_idx": 7
797
+ },
798
+ {
799
+ "type": "text",
800
+ "text": "5.2 Results on image-based tasks ",
801
+ "text_level": 1,
802
+ "bbox": [
803
+ 174,
804
+ 647,
805
+ 415,
806
+ 661
807
+ ],
808
+ "page_idx": 7
809
+ },
810
+ {
811
+ "type": "text",
812
+ "text": "To answer question (2), we evaluate COMBO on two image-based environments: the standard walker (walker-walk) task from the the DeepMind Control suite [61] and a visual door opening environment with a Sawyer robotic arm (sawyer-door) as used in Section 5.1. ",
813
+ "bbox": [
814
+ 176,
815
+ 662,
816
+ 825,
817
+ 704
818
+ ],
819
+ "page_idx": 7
820
+ },
821
+ {
822
+ "type": "text",
823
+ "text": "For the walker task we construct 4 datasets: medium-replay (M-R), medium (M), medium-expert (ME), and expert, similar to Fu et al. [12], each consisting of 200 trajectories. For sawyer-door task we use only the medium-expert and the expert datasets, due to the sparse reward – the agent is rewarded only when it successfully opens the door. Both environments are visulized in Figure 3 in Appendix B.4. To extend ",
824
+ "bbox": [
825
+ 174,
826
+ 705,
827
+ 392,
828
+ 882
829
+ ],
830
+ "page_idx": 7
831
+ },
832
+ {
833
+ "type": "table",
834
+ "img_path": "images/19b5e096e591db146ae61410851aab7d135c0fe4fa80559f77d49b0bcf0898e1.jpg",
835
+ "table_caption": [],
836
+ "table_footnote": [],
837
+ "table_body": "<table><tr><td>Dataset</td><td>Environment</td><td>COMBO (Ours)</td><td>LOMPO</td><td>LMBPO</td><td>SLAC -Off</td><td>CQL</td></tr><tr><td>M-R</td><td>walker_walk</td><td>69.2</td><td>66.9</td><td>59.8</td><td>45.1</td><td>15.6</td></tr><tr><td>M</td><td>walker_walk</td><td>57.7</td><td>60.2</td><td>61.7</td><td>41.5</td><td>38.9</td></tr><tr><td>M-E</td><td>walker_walk</td><td>76.4</td><td>78.9</td><td>47.3</td><td>34.9</td><td>36.3</td></tr><tr><td>expert</td><td>walker_walk</td><td>61.1</td><td>55.6</td><td>13.2</td><td>12.6</td><td>43.3</td></tr><tr><td>M-E</td><td>sawyer-door</td><td>100.0%</td><td>100.0%</td><td>0.0%</td><td>0.0%</td><td>0.0%</td></tr><tr><td>expert</td><td>sawyer-door</td><td>96.7%</td><td>0.0%</td><td>0.0%</td><td>0.0%</td><td>0.0%</td></tr></table>",
838
+ "bbox": [
839
+ 405,
840
+ 707,
841
+ 820,
842
+ 803
843
+ ],
844
+ "page_idx": 7
845
+ },
846
+ {
847
+ "type": "text",
848
+ "text": "Table 2: Results for vision experiments. For the Walker task each number is the normalized score proposed in [12] of the policy at the last iteration of training, averaged over 3 random seeds. For the Sawyer task, we report success rates over the last 100 evaluation runs of training. For the dataset, M refers to medium, M-R refers to medium-replay, and M-E refers to medium expert. ",
849
+ "bbox": [
850
+ 405,
851
+ 804,
852
+ 825,
853
+ 881
854
+ ],
855
+ "page_idx": 7
856
+ },
857
+ {
858
+ "type": "text",
859
+ "text": "COMBO to the image-based setting, we follow Rafailov et al. [48] and train a recurrent variational model using the offline data and use train COMBO in the latent space of this model. We present ",
860
+ "bbox": [
861
+ 176,
862
+ 883,
863
+ 825,
864
+ 911
865
+ ],
866
+ "page_idx": 7
867
+ },
868
+ {
869
+ "type": "table",
870
+ "img_path": "images/c470af5d324b1dd9496f3f4be3632c5edeea4e1ee3c489364e2a1f7c1959d0d5.jpg",
871
+ "table_caption": [],
872
+ "table_footnote": [],
873
+ "table_body": "<table><tr><td>Dataset type</td><td>Environment</td><td>BC</td><td>COMBO (Ours)</td><td>MOPO</td><td>MOReL</td><td>CQL</td><td>SAC-off</td><td>BEAR</td><td>BRAC-p</td><td>BRAC-v</td></tr><tr><td>random</td><td>halfcheetah</td><td>2.1</td><td>38.8±3.7</td><td>35.4</td><td>25.6</td><td>35.4</td><td>30.5</td><td>25.1</td><td>24.1</td><td>31.2</td></tr><tr><td>random</td><td>hopper</td><td>1.6</td><td>17.9±1.4</td><td>11.7</td><td>53.6</td><td>10.8</td><td>11.3</td><td>11.4</td><td>11.0</td><td>12.2</td></tr><tr><td>random</td><td>walker2d</td><td>9.8</td><td>7.0±3.6</td><td>13.6</td><td>37.3</td><td>7.0</td><td>4.1</td><td>7.3</td><td>-0.2</td><td>1.9</td></tr><tr><td>medium</td><td>halfcheetah</td><td>36.1</td><td>54.2±1.5</td><td>42.3</td><td>42.1</td><td>44.4</td><td>-4.3</td><td>41.7</td><td>43.8</td><td>46.3</td></tr><tr><td>medium</td><td>hopper</td><td>29.0</td><td>97.2±2.2</td><td>28.0</td><td>95.4</td><td>86.6</td><td>0.8</td><td>52.1</td><td>32.7</td><td>31.1</td></tr><tr><td>medium</td><td>walker2d</td><td>6.6</td><td>81.9±2.8</td><td>17.8</td><td>77.8</td><td>74.5</td><td>0.9</td><td>59.1</td><td>77.5</td><td>81.1</td></tr><tr><td>medium-replay</td><td>halfcheetah</td><td>38.4</td><td>55.1±1.0</td><td>53.1</td><td>40.2</td><td>46.2</td><td>-2.4</td><td>38.6</td><td>45.4</td><td>47.7</td></tr><tr><td>medium-replay</td><td>hopper</td><td>11.8</td><td>89.5±1.8</td><td>67.5</td><td>93.6</td><td>48.6</td><td>3.5</td><td>33.7</td><td>0.6</td><td>0.6</td></tr><tr><td>medium-replay</td><td>walker2d</td><td>11.3</td><td>56.0±8.6</td><td>39.0</td><td>49.8</td><td>32.6</td><td>1.9</td><td>19.2</td><td>-0.3</td><td>0.9</td></tr><tr><td>med-expert</td><td>halfcheetah</td><td>35.8</td><td>90.0±5.6</td><td>63.3</td><td>53.3</td><td>62.4</td><td>1.8</td><td>53.4</td><td>44.2</td><td>41.9</td></tr><tr><td>med-expert</td><td>hopper</td><td>111.9</td><td>111.1±2.9</td><td>23.7</td><td>108.7</td><td>111.0</td><td>1.6</td><td>96.3</td><td>1.9</td><td>0.8</td></tr><tr><td>med-expert</td><td>walker2d</td><td>6.4</td><td>103.3±5.6</td><td>44.6</td><td>95.6</td><td>98.7</td><td>-0.1</td><td>40.1</td><td>76.9</td><td>81.6</td></tr></table>",
874
+ "bbox": [
875
+ 178,
876
+ 92,
877
+ 816,
878
+ 244
879
+ ],
880
+ "page_idx": 8
881
+ },
882
+ {
883
+ "type": "text",
884
+ "text": "Table 3: Results for D4RL datasets. Each number is the normalized score proposed in [12] of the policy at the last iteration of training, averaged over 6 random seeds. We take results of MOPO, MOReL and CQL from their original papers and results of other model-free methods from [12]. We include the performance of behavior cloning (BC) for comparison. We include the $9 5 \\%$ -confidence interval for COMBO. We bold the highest score across all methods. ",
885
+ "bbox": [
886
+ 173,
887
+ 252,
888
+ 823,
889
+ 315
890
+ ],
891
+ "page_idx": 8
892
+ },
893
+ {
894
+ "type": "text",
895
+ "text": "results in Table 2. On the walker-walk task, COMBO performs in line with LOMPO and previous methods. On the more challenging Sawyer task, COMBO matches LOMPO and achieves $100 \\%$ success rate on the medium-expert dataset, and substantially outperforms all other methods on the narrow expert dataset, achieving an average success rate of $9 6 . 7 \\%$ , when all other model-based and model-free methods fail. ",
896
+ "bbox": [
897
+ 174,
898
+ 316,
899
+ 825,
900
+ 386
901
+ ],
902
+ "page_idx": 8
903
+ },
904
+ {
905
+ "type": "text",
906
+ "text": "5.3 Results on the D4RL tasks ",
907
+ "text_level": 1,
908
+ "bbox": [
909
+ 174,
910
+ 395,
911
+ 397,
912
+ 409
913
+ ],
914
+ "page_idx": 8
915
+ },
916
+ {
917
+ "type": "text",
918
+ "text": "Finally, to answer the question (3), we evaluate COMBO on the OpenAI Gym [6] domains in the D4RL benchmark [12], which contains three environments (halfcheetah, hopper, and walker2d) and four dataset types (random, medium, medium-replay, and medium-expert). We include the results in Table 3. The numbers of BC, SAC-off, BEAR, BRAC-P and BRAC-v are taken from the D4RL paper, while the results for MOPO, MOReL and CQL are based on their respective papers [67, 29]. COMBO achieves the best performance in 9 out of 12 settings and comparable result in 1 out of the remaining 3 settings (hopper medium-replay). As noted by Yu et al. [67] and Rafailov et al. [48], model-based offline methods are generally more performant on datasets that are collected by a wide range of policies and have diverse state-action distributions (random, medium-replay datasets) while model-free approaches do better on datasets with narrow distributions (medium, medium-expert datasets). However, in these results, COMBO generally performs well across dataset types compared to existing model-free and model-based approaches, suggesting that COMBO is robust to different dataset types. ",
919
+ "bbox": [
920
+ 173,
921
+ 417,
922
+ 825,
923
+ 598
924
+ ],
925
+ "page_idx": 8
926
+ },
927
+ {
928
+ "type": "text",
929
+ "text": "6 Related Work ",
930
+ "text_level": 1,
931
+ "bbox": [
932
+ 174,
933
+ 608,
934
+ 321,
935
+ 625
936
+ ],
937
+ "page_idx": 8
938
+ },
939
+ {
940
+ "type": "text",
941
+ "text": "Offline RL [10, 50, 30, 34] is the task of learning policies from a static dataset of past interactions with the environment. It has found applications in domains including robotic manipulation [25, 38, 48, 54], NLP [21, 22] and healthcare [52, 62]. Similar to interactive RL, both model-free and model-based algorithms have been studied for offline RL, with explicit or implicit regularization of the learning algorithm playing a major role. ",
942
+ "bbox": [
943
+ 174,
944
+ 635,
945
+ 825,
946
+ 704
947
+ ],
948
+ "page_idx": 8
949
+ },
950
+ {
951
+ "type": "text",
952
+ "text": "Model-free offline RL. Prior model-free offline RL algorithms have been designed to regularize the learned policy to be “close“ to the behavioral policy either implicitly via regularized variants of importance sampling based algorithms [47, 58, 35, 59, 41], offline actor-critic methods [53, 45, 27, 16, 64], applying uncertainty quantification to the predictions of the Q-values [2, 28, 63, 34], and learning conservative Q-values [29, 55] or explicitly measured by direct state or action constraints [14, 36], KL divergence [21, 63, 69], Wasserstein distance, MMD [28] and auxiliary imitation loss [13]. Different from these works, COMBO uses both the offline dataset as well as model-generated data. ",
953
+ "bbox": [
954
+ 174,
955
+ 710,
956
+ 825,
957
+ 808
958
+ ],
959
+ "page_idx": 8
960
+ },
961
+ {
962
+ "type": "text",
963
+ "text": "Model-based offline RL. Model-based offline RL methods [11, 9, 24, 26, 67, 39, 3, 60, 48, 33, 68] provide an alternative approach to policy learning that involves the learning of a dynamics model using techniques from supervised learning and generative modeling. Such methods however rely either on uncertainty quantification of the learned dynamics model which can be difficult for deep network models [44], or on directly constraining the policy towards the behavioral policy similar to model-free algorithms [39]. In contrast, COMBO conservatively estimates the value function by penalizing it in out-of-support states generated through model rollouts. This allows COMBO to retain all benefits of model-based algorithms such as broad generalization, without the constraints of explicit policy regularization or uncertainty quantification. ",
964
+ "bbox": [
965
+ 174,
966
+ 814,
967
+ 823,
968
+ 911
969
+ ],
970
+ "page_idx": 8
971
+ },
972
+ {
973
+ "type": "text",
974
+ "text": "",
975
+ "bbox": [
976
+ 173,
977
+ 92,
978
+ 823,
979
+ 119
980
+ ],
981
+ "page_idx": 9
982
+ },
983
+ {
984
+ "type": "text",
985
+ "text": "7 Conclusion ",
986
+ "text_level": 1,
987
+ "bbox": [
988
+ 174,
989
+ 127,
990
+ 299,
991
+ 143
992
+ ],
993
+ "page_idx": 9
994
+ },
995
+ {
996
+ "type": "text",
997
+ "text": "In the paper, we present conservative offline model-based policy optimization (COMBO), a modelbased offline RL algorithm that penalizes the Q-values evaluated on out-of-support state-action pairs. In particular, COMBO removes the need of uncertainty quantification as widely used in previous model-based offline RL works [26, 67], which can be challenging and unreliable with deep neural networks [44]. Theoretically, we show that COMBO achieves less conservative Q values compared to prior model-free offline RL methods [29] and guarantees a safe policy improvement. In our empirical study, COMBO achieves the best generalization performances in 3 tasks that require adaptation to unseen behaviors. Moreover, COMBO is able scale to vision-based tasks and outperforms or obtain comparable results in vision-based locomotion and robotic manipulation tasks. Finlly, on standard D4RL benchmark, COMBO generally performs well across dataset types compared to prior methods Despite the advantages of COMBO, there are few challenges left such as the lack of an offline hyperparameter selection scheme that can yield a uniform hyperparameter across different datasets and an automatically selected $f$ conditioned on the model error. We leave them for future work. ",
998
+ "bbox": [
999
+ 174,
1000
+ 151,
1001
+ 825,
1002
+ 344
1003
+ ],
1004
+ "page_idx": 9
1005
+ },
1006
+ {
1007
+ "type": "text",
1008
+ "text": "Acknowledgments and Disclosure of Funding ",
1009
+ "text_level": 1,
1010
+ "bbox": [
1011
+ 173,
1012
+ 353,
1013
+ 553,
1014
+ 369
1015
+ ],
1016
+ "page_idx": 9
1017
+ },
1018
+ {
1019
+ "type": "text",
1020
+ "text": "We thank members of RAIL and IRIS for their support and feedback. This work was supported in part by ONR grants N00014-20-1-2675 and N00014-21-1-2685 as well as Intel Corporation. AK and SL are supported by the DARPA Assured Autonomy program. AR was supported by the J.P. Morgan PhD Fellowship in AI. ",
1021
+ "bbox": [
1022
+ 174,
1023
+ 377,
1024
+ 825,
1025
+ 433
1026
+ ],
1027
+ "page_idx": 9
1028
+ },
1029
+ {
1030
+ "type": "text",
1031
+ "text": "References ",
1032
+ "text_level": 1,
1033
+ "bbox": [
1034
+ 174,
1035
+ 441,
1036
+ 266,
1037
+ 457
1038
+ ],
1039
+ "page_idx": 9
1040
+ },
1041
+ {
1042
+ "type": "text",
1043
+ "text": "[1] Alekh Agarwal, Nan Jiang, and Sham M Kakade. Reinforcement learning: Theory and algorithms. CS Dept., UW Seattle, Seattle, WA, USA, Tech. Rep, 2019. \n[2] Rishabh Agarwal, Dale Schuurmans, and Mohammad Norouzi. An optimistic perspective on offline reinforcement learning. In International Conference on Machine Learning, pages 104–114. PMLR, 2020. \n[3] Arthur Argenson and Gabriel Dulac-Arnold. Model-based offline planning. arXiv preprint arXiv:2008.05556, 2020. \n[4] Kamyar Azizzadenesheli, Emma Brunskill, and Animashree Anandkumar. Efficient exploration through bayesian deep q-networks. In ITA, pages 1–9. IEEE, 2018. \n[5] Dimitri P. Bertsekas and John N. Tsitsiklis. Neuro-Dynamic Programming. Athena Scientific, Belmont, MA, 1996. \n[6] Greg Brockman, Vicki Cheung, Ludwig Pettersson, Jonas Schneider, John Schulman, Jie Tang, and Wojciech Zaremba. Openai gym. arXiv preprint arXiv:1606.01540, 2016. \n[7] Ignasi Clavera, Violet Fu, and Pieter Abbeel. Model-augmented actor-critic: Backpropagating through paths. arXiv preprint arXiv:2005.08068, 2020. \n[8] Thomas Degris, Martha White, and Richard S Sutton. Off-policy actor-critic. arXiv preprint arXiv:1205.4839, 2012. \n[9] Frederik Ebert, Chelsea Finn, Sudeep Dasari, Annie Xie, Alex Lee, and Sergey Levine. Visual foresight: Model-based deep reinforcement learning for vision-based robotic control. arXiv preprint arXiv:1812.00568, 2018. \n[10] Damien Ernst, Pierre Geurts, and Louis Wehenkel. Tree-based batch mode reinforcement learning. Journal of Machine Learning Research, 6:503–556, 2005. \n[11] Chelsea Finn and Sergey Levine. Deep visual foresight for planning robot motion. In 2017 IEEE International Conference on Robotics and Automation (ICRA), pages 2786–2793. IEEE, 2017. \n[12] Justin Fu, Aviral Kumar, Ofir Nachum, George Tucker, and Sergey Levine. D4rl: Datasets for deep data-driven reinforcement learning, 2020. \n[13] Scott Fujimoto and Shixiang Shane Gu. A minimalist approach to offline reinforcement learning. arXiv preprint arXiv:2106.06860, 2021. \n[14] Scott Fujimoto, David Meger, and Doina Precup. Off-policy deep reinforcement learning without exploration. arXiv preprint arXiv:1812.02900, 2018. \n[15] Scott Fujimoto, Herke Van Hoof, and David Meger. Addressing function approximation error in actor-critic methods. arXiv preprint arXiv:1802.09477, 2018. \n[16] Seyed Kamyar Seyed Ghasemipour, Dale Schuurmans, and Shixiang Shane Gu. Emaq: Expected-max q-learning operator for simple yet effective offline and online rl. In International Conference on Machine Learning, pages 3682–3691. PMLR, 2021. \n[17] Tuomas Haarnoja, Aurick Zhou, Pieter Abbeel, and Sergey Levine. Soft actor-critic: Offpolicy maximum entropy deep reinforcement learning with a stochastic actor. arXiv preprint arXiv:1801.01290, 2018. \n[18] Danijar Hafner, Timothy Lillicrap, Ian Fischer, Ruben Villegas, David Ha, Honglak Lee, and James Davidson. International conference on machine learning. In International Conference on Machine Learning, 2019. \n[19] Thomas Jaksch, Ronald Ortner, and Peter Auer. Near-optimal regret bounds for reinforcement learning. Journal of Machine Learning Research, 11(4), 2010. \n[20] Michael Janner, Justin Fu, Marvin Zhang, and Sergey Levine. When to trust your model: Model-based policy optimization. In Advances in Neural Information Processing Systems, pages 12498–12509, 2019. \n[21] Natasha Jaques, Asma Ghandeharioun, Judy Hanwen Shen, Craig Ferguson, Agata Lapedriza, Noah Jones, Shixiang Gu, and Rosalind Picard. Way off-policy batch deep reinforcement learning of implicit human preferences in dialog. arXiv preprint arXiv:1907.00456, 2019. \n[22] Natasha Jaques, Judy Hanwen Shen, Asma Ghandeharioun, Craig Ferguson, Agata Lapedriza, Noah Jones, Shixiang Shane Gu, and Rosalind Picard. Human-centric dialog training via offline reinforcement learning. arXiv preprint arXiv:2010.05848, 2020. \n[23] Ying Jin, Zhuoran Yang, and Zhaoran Wang. Is pessimism provably efficient for offline rl? In International Conference on Machine Learning, pages 5084–5096. PMLR, 2021. \n[24] Gregory Kahn, Adam Villaflor, Pieter Abbeel, and Sergey Levine. Composable actionconditioned predictors: Flexible off-policy learning for robot navigation. In Conference on Robot Learning, pages 806–816. PMLR, 2018. \n[25] Dmitry Kalashnikov, Alex Irpan, Peter Pastor, Julian Ibarz, Alexander Herzog, Eric Jang, Deirdre Quillen, Ethan Holly, Mrinal Kalakrishnan, Vincent Vanhoucke, et al. Scalable deep reinforcement learning for vision-based robotic manipulation. In Conference on Robot Learning, pages 651–673. PMLR, 2018. \n[26] Rahul Kidambi, Aravind Rajeswaran, Praneeth Netrapalli, and Thorsten Joachims. Morel: Model-based offline reinforcement learning. arXiv preprint arXiv:2005.05951, 2020. \n[27] Ilya Kostrikov, Rob Fergus, Jonathan Tompson, and Ofir Nachum. Offline reinforcement learning with fisher divergence critic regularization. In International Conference on Machine Learning, pages 5774–5783. PMLR, 2021. \n[28] Aviral Kumar, Justin Fu, Matthew Soh, George Tucker, and Sergey Levine. Stabilizing off-policy q-learning via bootstrapping error reduction. In Advances in Neural Information Processing Systems, pages 11761–11771, 2019. \n[29] Aviral Kumar, Aurick Zhou, George Tucker, and Sergey Levine. Conservative q-learning for offline reinforcement learning. arXiv preprint arXiv:2006.04779, 2020. ",
1044
+ "bbox": [
1045
+ 179,
1046
+ 463,
1047
+ 826,
1048
+ 912
1049
+ ],
1050
+ "page_idx": 9
1051
+ },
1052
+ {
1053
+ "type": "text",
1054
+ "text": "",
1055
+ "bbox": [
1056
+ 171,
1057
+ 36,
1058
+ 828,
1059
+ 914
1060
+ ],
1061
+ "page_idx": 10
1062
+ },
1063
+ {
1064
+ "type": "text",
1065
+ "text": "[30] Sascha Lange, Thomas Gabel, and Martin A. Riedmiller. Batch reinforcement learning. In Reinforcement Learning, volume 12. Springer, 2012. ",
1066
+ "bbox": [
1067
+ 169,
1068
+ 90,
1069
+ 825,
1070
+ 121
1071
+ ],
1072
+ "page_idx": 11
1073
+ },
1074
+ {
1075
+ "type": "text",
1076
+ "text": "[31] Romain Laroche, Paul Trichelair, and Remi Tachet Des Combes. Safe policy improvement with baseline bootstrapping. In International Conference on Machine Learning, pages 3652–3661. PMLR, 2019. ",
1077
+ "bbox": [
1078
+ 176,
1079
+ 128,
1080
+ 825,
1081
+ 171
1082
+ ],
1083
+ "page_idx": 11
1084
+ },
1085
+ {
1086
+ "type": "text",
1087
+ "text": "[32] Alex X. Lee, Anusha Nagabandi, Pieter Abbeel, and Sergey Levine. Stochastic latent actor-critic: Deep reinforcement learning with a latent variable model. In Advances in Neural Information Processing Systems, 2020. ",
1088
+ "bbox": [
1089
+ 176,
1090
+ 181,
1091
+ 823,
1092
+ 224
1093
+ ],
1094
+ "page_idx": 11
1095
+ },
1096
+ {
1097
+ "type": "text",
1098
+ "text": "[33] Byung-Jun Lee, Jongmin Lee, and Kee-Eung Kim. Representation balancing offline modelbased reinforcement learning. In International Conference on Learning Representations, 2021. URL https://openreview.net/forum?id=QpNz8r_Ri2Y. ",
1099
+ "bbox": [
1100
+ 174,
1101
+ 233,
1102
+ 825,
1103
+ 276
1104
+ ],
1105
+ "page_idx": 11
1106
+ },
1107
+ {
1108
+ "type": "text",
1109
+ "text": "[34] Sergey Levine, Aviral Kumar, George Tucker, and Justin Fu. Offline reinforcement learning: Tutorial, review, and perspectives on open problems. arXiv preprint arXiv:2005.01643, 2020. ",
1110
+ "bbox": [
1111
+ 174,
1112
+ 286,
1113
+ 825,
1114
+ 315
1115
+ ],
1116
+ "page_idx": 11
1117
+ },
1118
+ {
1119
+ "type": "text",
1120
+ "text": "[35] Yao Liu, Adith Swaminathan, Alekh Agarwal, and Emma Brunskill. Off-policy policy gradient with state distribution correction. CoRR, abs/1904.08473, 2019. ",
1121
+ "bbox": [
1122
+ 173,
1123
+ 324,
1124
+ 823,
1125
+ 353
1126
+ ],
1127
+ "page_idx": 11
1128
+ },
1129
+ {
1130
+ "type": "text",
1131
+ "text": "[36] Yao Liu, Adith Swaminathan, Alekh Agarwal, and Emma Brunskill. Provably good batch reinforcement learning without great exploration. arXiv preprint arXiv:2007.08202, 2020. ",
1132
+ "bbox": [
1133
+ 173,
1134
+ 362,
1135
+ 825,
1136
+ 392
1137
+ ],
1138
+ "page_idx": 11
1139
+ },
1140
+ {
1141
+ "type": "text",
1142
+ "text": "[37] Kendall Lowrey, Aravind Rajeswaran, Sham Kakade, Emanuel Todorov, and Igor Mordatch. Plan Online, Learn Offline: Efficient Learning and Exploration via Model-Based Control. In International Conference on Learning Representations (ICLR), 2019. ",
1143
+ "bbox": [
1144
+ 174,
1145
+ 401,
1146
+ 825,
1147
+ 445
1148
+ ],
1149
+ "page_idx": 11
1150
+ },
1151
+ {
1152
+ "type": "text",
1153
+ "text": "[38] Ajay Mandlekar, Fabio Ramos, Byron Boots, Silvio Savarese, Li Fei-Fei, Animesh Garg, and Dieter Fox. Iris: Implicit reinforcement without interaction at scale for learning control from offline robot manipulation data. In 2020 IEEE International Conference on Robotics and Automation (ICRA), pages 4414–4420. IEEE, 2020. ",
1154
+ "bbox": [
1155
+ 176,
1156
+ 453,
1157
+ 823,
1158
+ 511
1159
+ ],
1160
+ "page_idx": 11
1161
+ },
1162
+ {
1163
+ "type": "text",
1164
+ "text": "[39] Tatsuya Matsushima, Hiroki Furuta, Yutaka Matsuo, Ofir Nachum, and Shixiang Gu. Deployment-efficient reinforcement learning via model-based offline optimization. arXiv preprint arXiv:2006.03647, 2020. ",
1165
+ "bbox": [
1166
+ 173,
1167
+ 518,
1168
+ 823,
1169
+ 563
1170
+ ],
1171
+ "page_idx": 11
1172
+ },
1173
+ {
1174
+ "type": "text",
1175
+ "text": "[40] Rémi Munos and Csaba Szepesvari. Finite-time bounds for fitted value iteration. J. Mach. Learn. Res., 9:815–857, 2008. ",
1176
+ "bbox": [
1177
+ 171,
1178
+ 571,
1179
+ 823,
1180
+ 602
1181
+ ],
1182
+ "page_idx": 11
1183
+ },
1184
+ {
1185
+ "type": "text",
1186
+ "text": "[41] Ofir Nachum, Bo Dai, Ilya Kostrikov, Yinlam Chow, Lihong Li, and Dale Schuurmans. Algaedice: Policy gradient from arbitrary experience. arXiv preprint arXiv:1912.02074, 2019. ",
1187
+ "bbox": [
1188
+ 171,
1189
+ 609,
1190
+ 823,
1191
+ 640
1192
+ ],
1193
+ "page_idx": 11
1194
+ },
1195
+ {
1196
+ "type": "text",
1197
+ "text": "[42] Ian Osband and Benjamin Van Roy. Why is posterior sampling better than optimism for reinforcement learning? In International Conference on Machine Learning, pages 2701–2710. PMLR, 2017. ",
1198
+ "bbox": [
1199
+ 173,
1200
+ 648,
1201
+ 823,
1202
+ 691
1203
+ ],
1204
+ "page_idx": 11
1205
+ },
1206
+ {
1207
+ "type": "text",
1208
+ "text": "[43] Ian Osband, John Aslanides, and Albin Cassirer. Randomized prior functions for deep reinforcement learning. CoRR, abs/1806.03335, 2018. ",
1209
+ "bbox": [
1210
+ 166,
1211
+ 700,
1212
+ 826,
1213
+ 731
1214
+ ],
1215
+ "page_idx": 11
1216
+ },
1217
+ {
1218
+ "type": "text",
1219
+ "text": "[44] Yaniv Ovadia, Emily Fertig, Jie Ren, Zachary Nado, David Sculley, Sebastian Nowozin, Joshua V Dillon, Balaji Lakshminarayanan, and Jasper Snoek. Can you trust your model’s uncertainty? evaluating predictive uncertainty under dataset shift. arXiv preprint arXiv:1906.02530, 2019. ",
1220
+ "bbox": [
1221
+ 173,
1222
+ 739,
1223
+ 826,
1224
+ 795
1225
+ ],
1226
+ "page_idx": 11
1227
+ },
1228
+ {
1229
+ "type": "text",
1230
+ "text": "[45] Xue Bin Peng, Aviral Kumar, Grace Zhang, and Sergey Levine. Advantage-weighted regression: Simple and scalable off-policy reinforcement learning. arXiv preprint arXiv:1910.00177, 2019. ",
1231
+ "bbox": [
1232
+ 173,
1233
+ 805,
1234
+ 825,
1235
+ 835
1236
+ ],
1237
+ "page_idx": 11
1238
+ },
1239
+ {
1240
+ "type": "text",
1241
+ "text": "[46] Marek Petrik, Yinlam Chow, and Mohammad Ghavamzadeh. Safe policy improvement by minimizing robust baseline regret. arXiv preprint arXiv:1607.03842, 2016. ",
1242
+ "bbox": [
1243
+ 173,
1244
+ 844,
1245
+ 823,
1246
+ 873
1247
+ ],
1248
+ "page_idx": 11
1249
+ },
1250
+ {
1251
+ "type": "text",
1252
+ "text": "[47] Doina Precup, Richard S Sutton, and Sanjoy Dasgupta. Off-policy temporal-difference learning with function approximation. In ICML, pages 417–424, 2001. ",
1253
+ "bbox": [
1254
+ 174,
1255
+ 882,
1256
+ 820,
1257
+ 912
1258
+ ],
1259
+ "page_idx": 11
1260
+ },
1261
+ {
1262
+ "type": "text",
1263
+ "text": "[48] Rafael Rafailov, Tianhe Yu, A. Rajeswaran, and Chelsea Finn. Offline reinforcement learning from images with latent space models. ArXiv, abs/2012.11547, 2020. \n[49] Paria Rashidinejad, Banghua Zhu, Cong Ma, Jiantao Jiao, and Stuart Russell. Bridging offline reinforcement learning and imitation learning: A tale of pessimism. arXiv preprint arXiv:2103.12021, 2021. \n[50] Martin Riedmiller. Neural fitted q iteration–first experiences with a data efficient neural reinforcement learning method. In European Conference on Machine Learning, pages 317–328. Springer, 2005. \n[51] Stephane Ross and Drew Bagnell. Agnostic system identification for model-based reinforcement learning. In ICML, 2012. \n[52] Susan M Shortreed, Eric Laber, Daniel J Lizotte, T Scott Stroup, Joelle Pineau, and Susan A Murphy. Informing sequential clinical decision-making through reinforcement learning: an empirical study. Machine learning, 84(1-2):109–136, 2011. \n[53] Noah Y Siegel, Jost Tobias Springenberg, Felix Berkenkamp, Abbas Abdolmaleki, Michael Neunert, Thomas Lampe, Roland Hafner, and Martin Riedmiller. Keep doing what worked: Behavioral modelling priors for offline reinforcement learning. arXiv preprint arXiv:2002.08396, 2020. \n[54] Avi Singh, Albert Yu, Jonathan Yang, Jesse Zhang, Aviral Kumar, and Sergey Levine. Cog: Connecting new skills to past experience with offline reinforcement learning. arXiv preprint arXiv:2010.14500, 2020. \n[55] Samarth Sinha and Animesh Garg. S4rl: Surprisingly simple self-supervision for offline reinforcement learning. arXiv preprint arXiv:2103.06326, 2021. \n[56] R. S. Sutton and A. G. Barto. Reinforcement Learning: An Introduction. MIT Press, Cambridge, MA, 1998. \n[57] Richard S Sutton. Dyna, an integrated architecture for learning, planning, and reacting. ACM Sigart Bulletin, 2(4):160–163, 1991. \n[58] Richard S Sutton, A Rupam Mahmood, and Martha White. An emphatic approach to the problem of off-policy temporal-difference learning. The Journal of Machine Learning Research, 17(1):2603–2631, 2016. \n[59] Adith Swaminathan and Thorsten Joachims. Batch learning from logged bandit feedback through counterfactual risk minimization. J. Mach. Learn. Res, 16:1731–1755, 2015. \n[60] Phillip Swazinna, Steffen Udluft, and Thomas Runkler. Overcoming model bias for robust offline deep reinforcement learning. arXiv preprint arXiv:2008.05533, 2020. \n[61] Yuval Tassa, Yotam Doron, Alistair Muldal, Tom Erez, Yazhe Li, Diego de Las Casas, David Budden, Abbas Abdolmaleki, Josh Merel, Andrew Lefrancq, et al. Deepmind control suite. arXiv preprint arXiv:1801.00690, 2018. \n[62] L. Wang, Wei Zhang, Xiaofeng He, and H. Zha. Supervised reinforcement learning with recurrent neural network for dynamic treatment recommendation. Proceedings of the 24th ACM SIGKDD International Conference on Knowledge Discovery & Data Mining, 2018. \n[63] Yifan Wu, George Tucker, and Ofir Nachum. Behavior regularized offline reinforcement learning. arXiv preprint arXiv:1911.11361, 2019. \n[64] Yue Wu, Shuangfei Zhai, Nitish Srivastava, Joshua Susskind, Jian Zhang, Ruslan Salakhutdinov, and Hanlin Goh. Uncertainty weighted actor-critic for offline reinforcement learning. arXiv preprint arXiv:2105.08140, 2021. \n[65] F. Yu, H. Chen, X. Wang, Wenqi Xian, Yingying Chen, Fangchen Liu, V. Madhavan, and Trevor Darrell. Bdd100k: A diverse driving dataset for heterogeneous multitask learning. 2020 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pages 2633–2642, 2020. \n[66] Tianhe Yu, Deirdre Quillen, Zhanpeng He, Ryan Julian, Karol Hausman, Chelsea Finn, and Sergey Levine. Meta-world: A benchmark and evaluation for multi-task and meta reinforcement learning. In Conference on Robot Learning, pages 1094–1100. PMLR, 2020. \n[67] Tianhe Yu, Garrett Thomas, Lantao Yu, Stefano Ermon, James Zou, Sergey Levine, Chelsea Finn, and Tengyu Ma. Mopo: Model-based offline policy optimization. arXiv preprint arXiv:2005.13239, 2020. \n[68] Xianyuan Zhan, Xiangyu Zhu, and Haoran Xu. Model-based offline planning with trajectory pruning. arXiv preprint arXiv:2105.07351, 2021. \n[69] Wenxuan Zhou, Sujay Bajracharya, and David Held. Plas: Latent action space for offline reinforcement learning. arXiv preprint arXiv:2011.07213, 2020. ",
1264
+ "bbox": [
1265
+ 171,
1266
+ 78,
1267
+ 828,
1268
+ 919
1269
+ ],
1270
+ "page_idx": 12
1271
+ },
1272
+ {
1273
+ "type": "text",
1274
+ "text": "",
1275
+ "bbox": [
1276
+ 169,
1277
+ 90,
1278
+ 826,
1279
+ 261
1280
+ ],
1281
+ "page_idx": 13
1282
+ }
1283
+ ]
parse/train/dUEpGV2mhf/dUEpGV2mhf_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/dUEpGV2mhf/dUEpGV2mhf_model.json ADDED
The diff for this file is too large to render. See raw diff