Datasets:
Add files using upload-large-folder tool
Browse filesThis view is limited to 50 files because it contains too many changes. See raw diff
- parse/train/B1VZqjAcYX/B1VZqjAcYX.md +330 -0
- parse/train/B1VZqjAcYX/B1VZqjAcYX_content_list.json +1773 -0
- parse/train/B1VZqjAcYX/B1VZqjAcYX_middle.json +0 -0
- parse/train/B1VZqjAcYX/B1VZqjAcYX_model.json +0 -0
- parse/train/BkVsEMYel/BkVsEMYel.md +0 -0
- parse/train/BkVsEMYel/BkVsEMYel_content_list.json +0 -0
- parse/train/BkVsEMYel/BkVsEMYel_middle.json +0 -0
- parse/train/BkVsEMYel/BkVsEMYel_model.json +0 -0
- parse/train/BkmM8Dceg/BkmM8Dceg.md +322 -0
- parse/train/BkmM8Dceg/BkmM8Dceg_content_list.json +1635 -0
- parse/train/BkmM8Dceg/BkmM8Dceg_middle.json +0 -0
- parse/train/BkmM8Dceg/BkmM8Dceg_model.json +0 -0
- parse/train/H1gzR2VKDH/H1gzR2VKDH_middle.json +0 -0
- parse/train/H1gzR2VKDH/H1gzR2VKDH_model.json +0 -0
- parse/train/O9bnihsFfXU/O9bnihsFfXU_middle.json +0 -0
- parse/train/O9bnihsFfXU/O9bnihsFfXU_model.json +0 -0
- parse/train/z-X_PpwaroO/z-X_PpwaroO.md +271 -0
- parse/train/z-X_PpwaroO/z-X_PpwaroO_content_list.json +1228 -0
- parse/train/z-X_PpwaroO/z-X_PpwaroO_middle.json +0 -0
- parse/train/z-X_PpwaroO/z-X_PpwaroO_model.json +0 -0
- vlm/train/5CGPY2VeEGb/0.png +3 -0
- vlm/train/5CGPY2VeEGb/1.png +3 -0
- vlm/train/5CGPY2VeEGb/10.png +3 -0
- vlm/train/5CGPY2VeEGb/11.png +3 -0
- vlm/train/5CGPY2VeEGb/12.png +3 -0
- vlm/train/5CGPY2VeEGb/2.png +3 -0
- vlm/train/5CGPY2VeEGb/3.png +3 -0
- vlm/train/5CGPY2VeEGb/4.png +3 -0
- vlm/train/5CGPY2VeEGb/5.png +3 -0
- vlm/train/5CGPY2VeEGb/6.png +3 -0
- vlm/train/5CGPY2VeEGb/7.png +3 -0
- vlm/train/5CGPY2VeEGb/8.png +3 -0
- vlm/train/5CGPY2VeEGb/9.png +3 -0
- vlm/train/6MaBrlQ5JM/0.png +3 -0
- vlm/train/6MaBrlQ5JM/1.png +3 -0
- vlm/train/6MaBrlQ5JM/2.png +3 -0
- vlm/train/6MaBrlQ5JM/3.png +3 -0
- vlm/train/6MaBrlQ5JM/4.png +3 -0
- vlm/train/6MaBrlQ5JM/5.png +3 -0
- vlm/train/6MaBrlQ5JM/6.png +3 -0
- vlm/train/6MaBrlQ5JM/7.png +3 -0
- vlm/train/6MaBrlQ5JM/8.png +3 -0
- vlm/train/6MaBrlQ5JM/9.png +3 -0
- vlm/train/79zWncwO2p/0.png +3 -0
- vlm/train/79zWncwO2p/1.png +3 -0
- vlm/train/79zWncwO2p/10.png +3 -0
- vlm/train/79zWncwO2p/11.png +3 -0
- vlm/train/79zWncwO2p/12.png +3 -0
- vlm/train/79zWncwO2p/13.png +3 -0
- vlm/train/79zWncwO2p/2.png +3 -0
parse/train/B1VZqjAcYX/B1VZqjAcYX.md
ADDED
|
@@ -0,0 +1,330 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# SNIP: SINGLE-SHOT NETWORK PRUNING BASED ONCONNECTION SENSITIVITY
|
| 2 |
+
|
| 3 |
+
Namhoon Lee, Thalaiyasingam Ajanthan & Philip H. S. Torr University of Oxford {namhoon,ajanthan,phst}@robots.ox.ac.uk
|
| 4 |
+
|
| 5 |
+
# ABSTRACT
|
| 6 |
+
|
| 7 |
+
Pruning large neural networks while maintaining their performance is often desirable due to the reduced space and time complexity. In existing methods, pruning is done within an iterative optimization procedure with either heuristically designed pruning schedules or additional hyperparameters, undermining their utility. In this work, we present a new approach that prunes a given network once at initialization prior to training. To achieve this, we introduce a saliency criterion based on connection sensitivity that identifies structurally important connections in the network for the given task. This eliminates the need for both pretraining and the complex pruning schedule while making it robust to architecture variations. After pruning, the sparse network is trained in the standard way. Our method obtains extremely sparse networks with virtually the same accuracy as the reference network on the MNIST, CIFAR-10, and Tiny-ImageNet classification tasks and is broadly applicable to various architectures including convolutional, residual and recurrent networks. Unlike existing methods, our approach enables us to demonstrate that the retained connections are indeed relevant to the given task.
|
| 8 |
+
|
| 9 |
+
# 1 INTRODUCTION
|
| 10 |
+
|
| 11 |
+
Despite the success of deep neural networks in machine learning, they are often found to be highly overparametrized making them computationally expensive with excessive memory requirements. Pruning such large networks with minimal loss in performance is appealing for real-time applications, especially on resource-limited devices. In addition, compressed neural networks utilize the model capacity efficiently, and this interpretation can be used to derive better generalization bounds for neural networks (Arora et al. (2018)).
|
| 12 |
+
|
| 13 |
+
In network pruning, given a large reference neural network, the goal is to learn a much smaller subnetwork that mimics the performance of the reference network. The majority of existing methods in the literature attempt to find a subset of weights from the pretrained reference network either based on a saliency criterion (Mozer & Smolensky (1989); LeCun et al. (1990); Han et al. (2015)) or utilizing sparsity enforcing penalties (Chauvin (1989); Carreira-Perpin˜an & Idelbayev (2018)). ´ Unfortunately, since pruning is included as a part of an iterative optimization procedure, all these methods require many expensive prune – retrain cycles and heuristic design choices with additional hyperparameters, making them non-trivial to extend to new architectures and tasks.
|
| 14 |
+
|
| 15 |
+
In this work, we introduce a saliency criterion that identifies connections in the network that are important to the given task in a data-dependent way before training. Specifically, we discover important connections based on their influence on the loss function at a variance scaling initialization, which we call connection sensitivity. Given the desired sparsity level, redundant connections are pruned once prior to training (i.e., single-shot), and then the sparse pruned network is trained in the standard way. Our approach has several attractive properties:
|
| 16 |
+
|
| 17 |
+
• Simplicity. Since the network is pruned once prior to training, there is no need for pretraining and complex pruning schedules. Our method has no additional hyperparameters and once pruned, training of the sparse network is performed in the standard way.
|
| 18 |
+
• Versatility. Since our saliency criterion chooses structurally important connections, it is robust to architecture variations. Therefore our method can be applied to various architectures including convolutional, residual and recurrent networks with no modifications.
|
| 19 |
+
|
| 20 |
+
• Interpretability. Our method determines important connections with a mini-batch of data at single-shot. By varying this mini-batch used for pruning, our method enables us to verify that the retained connections are indeed essential for the given task.
|
| 21 |
+
|
| 22 |
+
We evaluate our method on MNIST, CIFAR-10, and Tiny-ImageNet classification datasets with widely varying architectures. Despite being the simplest, our method obtains extremely sparse networks with virtually the same accuracy as the existing baselines across all tested architectures. Furthermore, we investigate the relevance of the retained connections as well as the effect of the network initialization and the dataset on the saliency score.
|
| 23 |
+
|
| 24 |
+
# 2 RELATED WORK
|
| 25 |
+
|
| 26 |
+
Classical methods. Essentially, early works in network pruning can be categorized into two groups (Reed (1993)): 1) those that utilize sparsity enforcing penalties; and 2) methods that prune the network based on some saliency criterion. The methods from the former category (Chauvin (1989); Weigend et al. (1991); Ishikawa (1996)) augment the loss function with some sparsity enforcing penalty terms (e.g., $L _ { 0 }$ or $L _ { 1 }$ norm), so that back-propagation effectively penalizes the magnitude of the weights during training. Then weights below a certain threshold may be removed. On the other hand, classical saliency criteria include the sensitivity of the loss with respect to the neurons (Mozer & Smolensky (1989)) or the weights (Karnin (1990)) and Hessian of the loss with respect to the weights (LeCun et al. (1990); Hassibi et al. (1993)). Since these criteria are heavily dependent on the scale of the weights and are designed to be incorporated within the learning process, these methods are prohibitively slow requiring many iterations of pruning and learning steps. Our approach identifies redundant weights from an architectural point of view and prunes them once at the beginning before training.
|
| 27 |
+
|
| 28 |
+
Modern advances. In recent years, the increased space and time complexities as well as the risk of overfitting in deep neural networks prompted a surge of further investigation in network pruning. While Hessian based approaches employ the diagonal approximation due to its computational simplicity, impressive results (i.e., extreme sparsity without loss in accuracy) are achieved using magnitude of the weights as the criterion (Han et al. (2015)). This made them the de facto standard method for network pruning and led to various implementations (Guo et al. (2016); Carreira-Perpin˜an & ´ Idelbayev (2018)). The magnitude criterion is also extended to recurrent neural networks (Narang et al. (2017)), yet with heavily tuned hyperparameter setting. Unlike our approach, the main drawbacks of magnitude based approaches are the reliance on pretraining and the expensive prune – retrain cycles. Furthermore, since pruning and learning steps are intertwined, they often require highly heuristic design choices which make them non-trivial to be extended to new architectures and different tasks. Meanwhile, Bayesian methods are also applied to network pruning (Ullrich et al. (2017); Molchanov et al. (2017a)) where the former extends the soft weight sharing in Nowlan & Hinton (1992) to obtain a sparse and compressed network, and the latter uses variational inference to learn the dropout rate which can then be used to prune the network. Unlike the above methods, our approach is simple and easily adaptable to any given architecture or task without modifying the pruning procedure.
|
| 29 |
+
|
| 30 |
+
Network compression in general. Apart from weight pruning, there are approaches focused on structured simplification such as pruning filters (Li et al. (2017); Molchanov et al. (2017b)), structured sparsity with regularizers (Wen et al. (2016)), low-rank approximation (Jaderberg et al. (2014)), matrix and tensor factorization (Novikov et al. (2015)), and sparsification using expander graphs (Prabhu et al. (2018)) or Erdos-R ˝ enyi random graph (Mocanu et al. (2018)). In addition, ´ there is a large body of work on compressing the representation of weights. A non-exhaustive list includes quantization (Gong et al. (2014)), reduced precision (Gupta et al. (2015)) and binary weights (Hubara et al. (2016)). In this work, we focus on weight pruning that is free from structural constraints and amenable to further compression schemes.
|
| 31 |
+
|
| 32 |
+
# 3 NEURAL NETWORK PRUNING
|
| 33 |
+
|
| 34 |
+
The main hypothesis behind the neural network pruning literature is that neural networks are usually overparametrized, and comparable performance can be obtained by a much smaller network (Reed (1993)) while improving generalization (Arora et al. (2018)). To this end, the objective is to learn
|
| 35 |
+
|
| 36 |
+
a sparse network while maintaining the accuracy of the standard reference network. Let us first formulate neural network pruning as an optimization problem.
|
| 37 |
+
|
| 38 |
+
Given a dataset $\mathbfcal { D } = \{ ( \mathbf { x } _ { i } , \mathbf { y } _ { i } ) \} _ { i = 1 } ^ { n }$ , and a desired sparsity level $\kappa$ (i.e., the number of non-zero weights) neural network pruning can be written as the following constrained optimization problem:
|
| 39 |
+
|
| 40 |
+
$$
|
| 41 |
+
\begin{array} { l } { \displaystyle \operatorname* { m i n } _ { \mathbf { w } } L ( \mathbf { w } ; \mathcal { D } ) = \displaystyle \operatorname* { m i n } _ { \mathbf { w } } \frac { 1 } { n } \sum _ { i = 1 } ^ { n } \ell ( \mathbf { w } ; ( \mathbf { x } _ { i } , \mathbf { y } _ { i } ) ) ~ , } \\ { \mathrm { s . t . } \quad \mathbf { w } \in \mathbb { R } ^ { m } , \quad \| \mathbf { w } \| _ { 0 } \leq \kappa ~ . } \end{array}
|
| 42 |
+
$$
|
| 43 |
+
|
| 44 |
+
Here, $\ell ( \cdot )$ is the standard loss function (e.g., cross-entropy loss), w is the set of parameters of the neural network, $m$ is the total number of parameters and $\| \cdot \| _ { 0 }$ is the standard $L _ { 0 }$ norm.
|
| 45 |
+
|
| 46 |
+
The conventional approach to optimize the above problem is by adding sparsity enforcing penalty terms (Chauvin (1989); Weigend et al. (1991); Ishikawa (1996)). Recently, Carreira-Perpin˜an´ $\&$ Idelbayev (2018) attempts to minimize the above constrained optimization problem using the stochastic version of projected gradient descent (where the projection is accomplished by pruning). However, these methods often turn out to be inferior to saliency based methods in terms of resulting sparsity and require heavily tuned hyperparameter settings to obtain comparable results.
|
| 47 |
+
|
| 48 |
+
On the other hand, saliency based methods treat the above problem as selectively removing redundant parameters (or connections) in the neural network. In order to do so, one has to come up with a good criterion to identify such redundant connections. Popular criteria include magnitude of the weights, i.e., weights below a certain threshold are redundant (Han et al. (2015); Guo et al. (2016)) and Hessian of the loss with respect to the weights, i.e., the higher the value of Hessian, the higher the importance of the parameters (LeCun et al. (1990); Hassibi et al. (1993)), defined as follows:
|
| 49 |
+
|
| 50 |
+
$$
|
| 51 |
+
s _ { j } = \left\{ \begin{array} { l l } { \left| w _ { j } \right| , } & { \mathrm { f o r m a g n i t u d e ~ b a s e d } } \\ { \frac { w _ { j } ^ { 2 } H _ { j j } } { 2 } } & { \mathrm { o r } \frac { w _ { j } ^ { 2 } } { 2 H _ { j j } ^ { - 1 } } } & { \mathrm { f o r } \mathrm { H e s s i a n ~ b a s e d } . } \end{array} \right.
|
| 52 |
+
$$
|
| 53 |
+
|
| 54 |
+
Here, for connection $j , s _ { j }$ is the saliency score, $w _ { j }$ is the weight, and $H _ { j j }$ is the value of the Hessian matrix, where the Hessian $\mathbf { H } = \partial ^ { 2 } L / \partial \mathbf { w } ^ { 2 } \in \mathbb { R } ^ { m \times m }$ . Considering Hessian based methods, the Hessian matrix is neither diagonal nor positive definite in general, approximate at best, and intractable to compute for large networks.
|
| 55 |
+
|
| 56 |
+
Despite being popular, both of these criteria depend on the scale of the weights and in turn require pretraining and are very sensitive to the architectural choices. For instance, different normalization layers affect the scale of the weights in a different way, and this would non-trivially affect the saliency score. Furthermore, pruning and the optimization steps are alternated many times throughout training, resulting in highly expensive prune – retrain cycles. Such an exorbitant requirement hinders the use of pruning methods in large-scale applications and raises questions about the credibility of the existing pruning criteria.
|
| 57 |
+
|
| 58 |
+
In this work, we design a criterion which directly measures the connection importance in a datadependent manner. This alleviates the dependency on the weights and enables us to prune the network once at the beginning, and then the training can be performed on the sparse pruned network. Therefore, our method eliminates the need for the expensive prune – retrain cycles, and in theory, it can be an order of magnitude faster than the standard neural network training as it can be implemented using software libraries that support sparse matrix computations.
|
| 59 |
+
|
| 60 |
+
# 4 SINGLE-SHOT NETWORK PRUNING BASED ON CONNECTION SENSITIVITY
|
| 61 |
+
|
| 62 |
+
Given a neural network and a dataset, our goal is to design a method that can selectively prune redundant connections for the given task in a data-dependent way even before training. To this end, we first introduce a criterion to identify important connections and then discuss its benefits.
|
| 63 |
+
|
| 64 |
+
# 4.1 CONNECTION SENSITIVITY: ARCHITECTURAL PERSPECTIVE
|
| 65 |
+
|
| 66 |
+
Since we intend to measure the importance (or sensitivity) of each connection independently of its weight, we introduce auxiliary indicator variables $\mathbf { c } \in \{ 0 , 1 \} ^ { m }$ representing the connectivity of
|
| 67 |
+
|
| 68 |
+
parameters w.1 Now, given the sparsity level $\kappa$ , Equation 1 can be correspondingly modified as:
|
| 69 |
+
|
| 70 |
+
$$
|
| 71 |
+
\begin{array} { r l } { \displaystyle \operatorname* { m i n } _ { \mathbf { c } , \mathbf { w } } L ( \mathbf { c } \odot \mathbf { w } ; \mathcal { D } ) = \displaystyle \operatorname* { m i n } _ { \mathbf { c } , \mathbf { w } } \frac { 1 } { n } \sum _ { i = 1 } ^ { n } \ell ( \mathbf { c } \odot \mathbf { w } ; ( \mathbf { x } _ { i } , \mathbf { y } _ { i } ) ) ~ , } & { } \\ { \mathrm { s . t . } \quad \mathbf { w } \in \mathbb { R } ^ { m } ~ , } & { } \\ { \displaystyle \quad \mathbf { c } \in \{ 0 , 1 \} ^ { m } , \quad \| \mathbf { c } \| _ { 0 } \leq \kappa ~ , } \end{array}
|
| 72 |
+
$$
|
| 73 |
+
|
| 74 |
+
where $\odot$ denotes the Hadamard product. Compared to Equation 1, we have doubled the number of learnable parameters in the network and directly optimizing the above problem is even more difficult. However, the idea here is that since we have separated the weight of the connection (w) from whether the connection is present or not (c), we may be able to determine the importance of each connection by measuring its effect on the loss function.
|
| 75 |
+
|
| 76 |
+
For instance, the value of $c _ { j }$ indicates whether the connection $j$ is active $( c _ { j } = 1 )$ ) in the network or pruned $( c _ { j } = 0 )$ . Therefore, to measure the effect of connection $j$ on the loss, one can try to measure the difference in loss when $c _ { j } = 1$ and $c _ { j } = 0$ , keeping everything else constant. Precisely, the effect of removing connection $j$ can be measured by,
|
| 77 |
+
|
| 78 |
+
$$
|
| 79 |
+
\begin{array} { r } { \Delta L _ { j } ( \mathbf { w } ; \mathcal { D } ) = L \big ( \mathbf { 1 } \odot \mathbf { w } ; \mathcal { D } \big ) - L \big ( \big ( \mathbf { 1 } - \mathbf { e } _ { j } \big ) \odot \mathbf { w } ; \mathcal { D } \big ) , } \end{array}
|
| 80 |
+
$$
|
| 81 |
+
|
| 82 |
+
where $\mathbf { e } _ { j }$ is the indicator vector of element $j$ (i.e., zeros everywhere except at the index $j$ where it is one) and 1 is the vector of dimension $m$ .
|
| 83 |
+
|
| 84 |
+
Note that computing $\Delta L _ { j }$ for each $j \in \{ 1 \ldots m \}$ is prohibitively expensive as it requires $m + 1$ (usually in the order of millions) forward passes over the dataset. In fact, since $\mathbf { c }$ is binary, $L$ is not differentiable with respect to $\mathbf { c }$ , and it is easy to see that $\Delta L _ { j }$ attempts to measure the influence of connection $j$ on the loss function in this discrete setting. Therefore, by relaxing the binary constraint on the indicator variables c, $\Delta L _ { j }$ can be approximated by the derivative of $L$ with respect to $c _ { j }$ , which we denote $g _ { j } ( \mathbf { w } ; \mathcal { D } )$ . Hence, the effect of connection $j$ on the loss can be written as:
|
| 85 |
+
|
| 86 |
+
$$
|
| 87 |
+
\Delta L _ { j } ( \mathbf { w } ; \mathcal { D } ) \approx g _ { j } ( \mathbf { w } ; \mathcal { D } ) = \left. \frac { \partial L ( \mathbf { c } \odot \mathbf { w } ; \mathcal { D } ) } { \partial c _ { j } } \right| _ { \mathbf { c } = \mathbf { 1 } } = \operatorname* { l i m } _ { \delta \to 0 } \left. \frac { L ( \mathbf { c } \odot \mathbf { w } ; \mathcal { D } ) - L ( ( \mathbf { c } - \delta \mathbf { e } _ { j } ) \odot \mathbf { w } ; \mathcal { D } ) } { \delta } \right| _ { \mathbf { c } = \mathbf { 1 } } .
|
| 88 |
+
$$
|
| 89 |
+
|
| 90 |
+
In fact, $\partial L / \partial c _ { j }$ is an infinitesimal version of $\Delta L _ { j }$ , that measures the rate of change of $L$ with respect to an infinitesimal change in $c _ { j }$ from $1 1 - \delta$ . This can be computed efficiently in one forward-backward pass using automatic differentiation, for all $j$ at once. Notice, this formulation can be viewed as perturbing the weight $w _ { j }$ by a multiplicative factor $\delta$ and measuring the change in loss. This approximation is similar in spirit to Koh & Liang (2017) where they try to measure the influence of a datapoint to the loss function. Here we measure the influence of connections. Furthermore, $\partial L / \partial c _ { j }$ is not to be confused with the gradient with respect to the weights $( \partial L / \partial w _ { j } )$ , where the change in loss is measured with respect to an additive change in weight $w _ { j }$ .
|
| 91 |
+
|
| 92 |
+
Notably, our interest is to discover important (or sensitive) connections in the architecture, so that we can prune unimportant ones in single-shot, disentangling the pruning process from the iterative optimization cycles. To this end, we take the magnitude of the derivatives $g _ { j }$ as the saliency criterion. Note that if the magnitude of the derivative is high (regardless of the sign), it essentially means that the connection $c _ { j }$ has a considerable effect on the loss (either positive or negative), and it has to be preserved to allow learning on $w _ { j }$ . Based on this hypothesis, we define connection sensitivity as the normalized magnitude of the derivatives:
|
| 93 |
+
|
| 94 |
+
$$
|
| 95 |
+
s _ { j } = \frac { | g _ { j } ( \mathbf { w } ; \mathcal { D } ) | } { \sum _ { k = 1 } ^ { m } | g _ { k } ( \mathbf { w } ; \mathcal { D } ) | } .
|
| 96 |
+
$$
|
| 97 |
+
|
| 98 |
+
Once the sensitivity is computed, only the top- $\kappa$ connections are retained, where $\kappa$ denotes the desired number of non-zero weights. Precisely, the indicator variables $\mathbf { c }$ are set as follows:
|
| 99 |
+
|
| 100 |
+
$$
|
| 101 |
+
c _ { j } = \mathbb { 1 } [ s _ { j } - \tilde { s } _ { \kappa } \geq 0 ] , \quad \forall j \in \{ 1 \ldots m \} ,
|
| 102 |
+
$$
|
| 103 |
+
|
| 104 |
+
where $\tilde { s } _ { \kappa }$ is the $\kappa$ -th largest element in the vector s and $\mathbb { 1 } [ \cdot ]$ is the indicator function. Here, for exactly $\kappa$ connections to be retained, ties can be broken arbitrarily.
|
| 105 |
+
|
| 106 |
+
We would like to clarify that the above criterion (Equation 6) is different from the criteria used in early works by Mozer & Smolensky (1989) or Karnin (1990) which do not entirely capture the connection sensitivity. The fundamental idea behind them is to identify elements (e.g. weights or neurons) that least degrade the performance when removed. This means that their saliency criteria (i.e. $- \partial L / \partial \mathbf { w }$ or $- \partial L / \partial \pmb { \alpha }$ ; $_ { \pmb { \alpha } }$ refers to the connectivity of neurons), in fact, depend on the loss value before pruning, which in turn, require the network to be pre-trained and iterative optimization cycles to ensure minimal loss in performance. They also suffer from the same drawbacks as the magnitude and Hessian based methods as discussed in Section 3. In contrast, our saliency criterion (Equation 6) is designed to measure the sensitivity as to how much influence elements have on the loss function regardless of whether it is positive or negative. This criterion alleviates the dependency on the value of the loss, eliminating the need for pre-training. These fundamental differences enable the network to be pruned at single-shot prior to training, which we discuss further in the next section.
|
| 107 |
+
|
| 108 |
+
<table><tr><td colspan="3">Algorithm1 SNIP: Single-shot Network Pruning based on Connection Sensitivity</td></tr><tr><td>Ensure: | w*|lo ≤ κ</td><td>Require: Loss function L, training dataset D, sparsity level K</td><td>Refer Equation 3</td></tr><tr><td></td><td>1:w_← VarianceScalingInitialization</td><td>Refer Section 4.2</td></tr><tr><td></td><td>2:Db={(xi,yi)}=1 ~D</td><td>> Sample a mini-batch of training data</td></tr><tr><td>3:Sj←</td><td>l9j(w;Db) ∑=1l9k((w;Db)l , ∀j∈{1...m}</td><td>Connection sensitivity</td></tr><tr><td></td><td>4:s ← SortDescending(s)</td><td></td></tr><tr><td></td><td>5:cj←1[sj-$κ≥0],∀j∈{1...m}</td><td>>Pruning: choose top-k connections</td></tr><tr><td>7: w* ← c⊙w*</td><td>6: W* ← arg minw∈Rm L(c ③ w;D)</td><td>Regular training</td></tr></table>
|
| 109 |
+
|
| 110 |
+
# 4.2 SINGLE-SHOT PRUNING AT INITIALIZATION
|
| 111 |
+
|
| 112 |
+
Note that the saliency measure defined in Equation 6 depends on the value of weights w used to evaluate the derivative as well as the dataset $\mathcal { D }$ and the loss function $L$ . In this section, we discuss the effect of each of them and show that it can be used to prune the network in single-shot with initial weights w.
|
| 113 |
+
|
| 114 |
+
Firstly, in order to minimize the impact of weights on the derivatives $\partial L / \partial c _ { j }$ , we need to choose these weights carefully. For instance, if the weights are too large, the activations after the non-linear function (e.g., sigmoid) will be saturated, which would result in uninformative gradients. Therefore, the weights should be within a sensible range. In particular, there is a body of work on neural network initialization (Goodfellow et al. (2016)) that ensures the gradients to be in a reasonable range, and our saliency measure can be used to prune neural networks at any such initialization.
|
| 115 |
+
|
| 116 |
+
Furthermore, we are interested in making our saliency measure robust to architecture variations. Note that initializing neural networks is a random process, typically done using normal distribution. However, if the initial weights have a fixed variance, the signal passing through each layer no longer guarantees to have the same variance, as noted by LeCun et al. (1998). This would make the gradient and in turn our saliency measure, to be dependent on the architectural characteristics. Thus, we advocate the use of variance scaling methods (e.g., Glorot & Bengio (2010)) to initialize the weights, such that the variance remains the same throughout the network. By ensuring this, we empirically show that our saliency measure computed at initialization is robust to variations in the architecture.
|
| 117 |
+
|
| 118 |
+
Next, since the dataset and the loss function defines the task at hand, by relying on both of them, our saliency criterion in fact discovers the connections in the network that are important to the given task. However, the practitioner needs to make a choice on whether to use the whole training set, or a mini-batch or the validation set to compute the connection saliency. Moreover, in case there are memory limitations (e.g., large model or dataset), one can accumulate the saliency measure over multiple batches or take an exponential moving average. In our experiments, we show that using only one mini-batch of a reasonable number of training examples can lead to effective pruning.
|
| 119 |
+
|
| 120 |
+
Finally, in contrast to the previous approaches, our criterion for finding redundant connections is simple and directly based on the sensitivity of the connections. This allows us to effectively identify and prune redundant connections in a single step even before training. Then, training can be performed on the resulting pruned (sparse) network. We name our method SNIP for Single-shot Network Pruning, and the complete algorithm is given in Algorithm 1.
|
| 121 |
+
|
| 122 |
+

|
| 123 |
+
Figure 1: Test errors of LeNets pruned at varying sparsity levels $\bar { \kappa }$ , where $\bar { \kappa } = 0$ refers to the reference network trained without pruning. Our approach performs as good as the reference network across varying sparsity levels on both the models.
|
| 124 |
+
|
| 125 |
+
# 5 EXPERIMENTS
|
| 126 |
+
|
| 127 |
+
We evaluate our method, SNIP, on MNIST, CIFAR-10 and Tiny-ImageNet classification tasks with a variety of network architectures. Our results show that SNIP yields extremely sparse models with minimal or no loss in accuracy across all tested architectures, while being much simpler than other state-of-the-art alternatives. We also provide clear evidence that our method prunes genuinely explainable connections rather than performing blind pruning.
|
| 128 |
+
|
| 129 |
+
Experiment setup For brevity, we define the sparsity level to be $\bar { \kappa } = ( m - \kappa ) / m \cdot 1 0 0 ( \% )$ , where $m$ is the total number of parameters and $\kappa$ is the desired number of non-zero weights. For a given sparsity level $\bar { \kappa }$ , the sensitivity scores are computed using a batch of 100 and 128 examples for MNIST and CIFAR experiments, respectively. After pruning, the pruned network is trained in the standard way. Specifically, we train the models using SGD with momentum of 0.9, batch size of 100 for MNIST and 128 for CIFAR experiments and the weight decay rate of 0.0005, unless stated otherwise. The initial learning rate is set to 0.1 and decayed by 0.1 at every 25k or $3 0 \mathrm { k }$ iterations for MNIST and CIFAR, respectively. Our algorithm requires no other hyperparameters or complex learning/pruning schedules as in most pruning algorithms. We spare $10 \%$ of the training data as a validation set and used only $90 \%$ for training. For CIFAR experiments, we use the standard data augmentation (i.e., random horizontal flip and translation up to 4 pixels) for both the reference and sparse models. The code can be found here: https://github.com/namhoonlee/snip-public.
|
| 130 |
+
|
| 131 |
+
# 5.1 PRUNING LENETS WITH VARYING LEVELS OF SPARSITY
|
| 132 |
+
|
| 133 |
+
We first test our approach on two standard networks for pruning, LeNet-300-100 and LeNet-5-Caffe. LeNet-300-100 consists of three fully-connected (fc) layers with $2 6 7 \mathrm { k }$ parameters and LeNet-5-Caffe consists of two convolutional (conv) layers and two fc layers with 431k parameters. We prune the LeNets for different sparsity levels $\bar { \kappa }$ and report the performance in error on the MNIST image classification task. We run the experiment 20 times for each $\bar { \kappa }$ by changing random seeds for dataset and network initialization. The results are reported in Figure 1.
|
| 134 |
+
|
| 135 |
+
The pruned sparse LeNet-300-100 achieves performances similar to the reference $( \bar { \kappa } = 0$ ), only with negligible loss at $\bar { \kappa } = 9 0$ . For LeNet-5-Caffe, the performance degradation is nearly invisible. Note that our saliency measure does not require the network to be pre-trained and is computed at random initialization. Despite such simplicity, our approach prunes LeNets quickly (single-shot) and effectively (minimal accuracy loss) at varying sparsity levels.
|
| 136 |
+
|
| 137 |
+
# 5.2 COMPARISONS TO EXISTING APPROACHES
|
| 138 |
+
|
| 139 |
+
What happens if we increase the target sparsity to an extreme level? For example, would a model with only $1 \%$ of the total parameters still be trainable and perform well? We test our approach for extreme sparsity levels (e.g., up to $9 9 \%$ sparsity on LeNet-5-Caffe) and compare with various pruning algorithms as follows: LWC (Han et al. (2015)), DNS (Guo et al. (2016)), LC (Carreira-Perpin˜ an & ´
|
| 140 |
+
|
| 141 |
+
Table 1: Pruning results on LeNets and comparisons to other approaches. Here, “many” refers to an arbitrary number often in the order of total learning steps, and “soft” refers to soft pruning in Bayesian based methods. Our approach is capable of pruning up to $98 \%$ for LeNet-300-100 and $9 9 \%$ for LeNet-5-Caffe with marginal increases in error from the reference network. Notably, our approach is considerably simpler than other approaches, with no requirements such as pretraining, additional hyperparameters, augmented training objective or architecture dependent constraints.
|
| 142 |
+
|
| 143 |
+
<table><tr><td rowspan="2">Method</td><td rowspan="2">Criterion</td><td colspan="2">LeNet-300-100</td><td colspan="2">LeNet-5-Caffe</td><td rowspan="2">Pretrain</td><td rowspan="2">#Prune</td><td rowspan="2">Additional hyperparam.</td><td rowspan="2">Augment objective</td><td rowspan="2">Arch. constraints</td></tr><tr><td>K(%)</td><td>err. (%)</td><td>K(%)</td><td>err. (%)</td></tr><tr><td>Ref.</td><td></td><td></td><td>1.7</td><td>一</td><td>0.9</td><td></td><td>1</td><td>-></td><td>-xx></td><td>√</td></tr><tr><td>LWC</td><td>Magnitude</td><td>91.7</td><td>1.6</td><td>91.7</td><td>0.8</td><td></td><td>many</td><td></td><td></td><td></td></tr><tr><td>DNS</td><td>Magnitude</td><td>98.2</td><td>2.0</td><td>99.1</td><td>0.9</td><td></td><td>many</td><td></td><td></td><td>√</td></tr><tr><td>LC</td><td>Magnitude</td><td>99.0</td><td>3.2</td><td>99.0</td><td>1.1</td><td></td><td>many</td><td>√</td><td></td><td>X</td></tr><tr><td>SWS</td><td>Bayesian</td><td>95.6</td><td>1.9</td><td>99.5</td><td>1.0</td><td></td><td>soft</td><td>√</td><td>√</td><td>X</td></tr><tr><td>SVD</td><td>Bayesian</td><td>98.5</td><td>1.9</td><td>99.6</td><td>0.8</td><td>->>>>></td><td>soft</td><td>√</td><td>√</td><td>X</td></tr><tr><td>OBD</td><td>Hessian</td><td>92.0</td><td>2.0</td><td>92.0</td><td>2.7</td><td>√</td><td>many</td><td>√</td><td>X</td><td>X</td></tr><tr><td>L-OBS</td><td>Hessian</td><td>98.5</td><td>2.0</td><td>99.0</td><td>2.1</td><td>√</td><td>many</td><td>√</td><td>X</td><td>√</td></tr><tr><td rowspan="2">SNIP (ours)</td><td>Connection</td><td>95.0</td><td>1.6</td><td>98.0</td><td>0.8</td><td>×</td><td></td><td>×</td><td>×</td><td>×</td></tr><tr><td>sensitivity</td><td>98.0</td><td>2.4</td><td>99.0</td><td>1.1</td><td></td><td>1</td><td></td><td></td><td></td></tr></table>
|
| 144 |
+
|
| 145 |
+
Idelbayev (2018)), SWS (Ullrich et al. (2017)), SVD (Molchanov et al. (2017a)), OBD (LeCun et al.
|
| 146 |
+
(1990)), L-OBS (Dong et al. (2017)). The results are summarized in Table 1.
|
| 147 |
+
|
| 148 |
+
We achieve errors that are comparable to the reference model, degrading approximately $0 . 7 \%$ and $0 . 3 \%$ while pruning $98 \%$ and $9 9 \%$ of the parameters in LeNet-300-100 and LeNet-5-Caffe respectively. For slightly relaxed sparsities (i.e., $9 5 \%$ for LeNet-300-100 and $98 \%$ for LeNet-5-Caffe), the sparse models pruned by SNIP record better performances than the dense reference network. Considering $9 9 \%$ sparsity, our method efficiently finds $1 \%$ of the connections even before training, that are sufficient to learn as good as the reference network. Moreover, SNIP is competitive to other methods, yet it is unparalleled in terms of algorithm simplicity.
|
| 149 |
+
|
| 150 |
+
To be more specific, we enumerate some key points and non-trivial aspects of other algorithms and highlight the benefit of our approach. First of all, the aforementioned methods require networks to be fully trained (if not partly) before pruning. These approaches typically perform many pruning operations even if the network is well pretrained, and require additional hyperparameters (e.g., pruning frequency in Guo et al. (2016), annealing schedule in Carreira-Perpin˜an & Idelbayev (2018)). Some ´ methods augment the training objective to handle pruning together with training, increasing the complexity of the algorithm (e.g., augmented Lagrangian in Carreira-Perpin˜an & Idelbayev (2018), ´ variational inference in Molchanov et al. (2017a)). Furthermore, there are approaches designed to include architecture dependent constraints (e.g., layer-wise pruning schemes in Dong et al. (2017)).
|
| 151 |
+
|
| 152 |
+
Compared to the above approaches, ours seems to cost almost nothing; it requires no pretraining or additional hyperparameters, and is applied only once at initialization. This means that one can easily plug-in SNIP as a preprocessor before training neural networks. Since SNIP prunes the network at the beginning, we could potentially expedite the training phase by training only the survived parameters (e.g., reduced expected FLOPs in Louizos et al. (2018)). Notice that this is not possible for the aforementioned approaches as they obtain the maximum sparsity at the end of the process.
|
| 153 |
+
|
| 154 |
+
# 5.3 VARIOUS MODERN ARCHITECTURES
|
| 155 |
+
|
| 156 |
+
In this section we show that our approach is generally applicable to more complex modern network architectures including deep convolutional, residual and recurrent ones. Specifically, our method is applied to the following models:
|
| 157 |
+
|
| 158 |
+
• AlexNet-s and AlexNet-b: Models similar to Krizhevsky et al. (2012) in terms of the number of layers and size of kernels. We set the size of fc layers to 512 (AlexNet-s) and to 1024 (AlexNet-b) to adapt for CIFAR-10 and use strides of 2 for all conv layers instead of using pooling layers. • VGG-C, VGG-D and VGG-like: Models similar to the original VGG models described in Simonyan & Zisserman (2015). VGG-like (Zagoruyko (2015)) is a popular variant adapted for CIFAR-10 which has one less fc layers. For all VGG models, we set the size of fc layers to 512, remove dropout layers to avoid any effect on sparsification and use batch normalization instead. • WRN-16-8, WRN-16-10 and WRN-22-8: Same models as in Zagoruyko & Komodakis (2016).
|
| 159 |
+
|
| 160 |
+
<table><tr><td>Architecture</td><td>Model</td><td>Sparsity (%)</td><td># Parameters</td><td>Error (%)</td><td></td><td>△</td></tr><tr><td rowspan="5">Convolutional</td><td>AlexNet-s</td><td>90.0</td><td>5.1m → 507k</td><td>14.12 →</td><td>14.99</td><td>+0.87</td></tr><tr><td>AlexNet-b</td><td>90.0</td><td>8.5m → 849k</td><td>13.92 →</td><td>14.50</td><td>+0.58</td></tr><tr><td>VGG-C</td><td>95.0</td><td>10.5m → 526k</td><td>6.82 →</td><td>7.27</td><td>+0.45</td></tr><tr><td>VGG-D</td><td>95.0</td><td>15.2m → 762k</td><td>6.76 →</td><td>7.09</td><td>+0.33</td></tr><tr><td>VGG-like</td><td>97.0</td><td>15.0m → 449k</td><td>8.26 →</td><td>8.00</td><td>-0.26</td></tr><tr><td rowspan="3">Residual</td><td>WRN-16-8</td><td>95.0</td><td>10.0m → 548k</td><td>6.21 →</td><td>6.63</td><td>+0.42</td></tr><tr><td>WRN-16-10</td><td>95.0</td><td>17.1m → 856k</td><td>5.91 →</td><td>6.43</td><td>+0.52</td></tr><tr><td>WRN-22-8</td><td>95.0</td><td>17.2m → 858k</td><td>6.14 →</td><td>5.85</td><td>-0.29</td></tr><tr><td rowspan="4">Recurrent</td><td>LSTM-s</td><td>95.0</td><td>137k → 6.8k</td><td>1.88 →</td><td>1.57</td><td>-0.31</td></tr><tr><td>LSTM-b</td><td>95.0</td><td>535k → 26.8k</td><td>1.15 →</td><td>1.35</td><td>+0.20</td></tr><tr><td>GRU-s</td><td>95.0</td><td>104k → 5.2k</td><td>1.87 →</td><td>2.41</td><td>+0.54</td></tr><tr><td>GRU-b</td><td>95.0</td><td>404k→ 20.2k</td><td>1.71 →</td><td>1.52</td><td>-0.19</td></tr></table>
|
| 161 |
+
|
| 162 |
+
Table 2: Pruning results of the proposed approach on various modern architectures (before after). AlexNets, VGGs and WRNs are evaluated on CIFAR-10, and LSTMs and GRUs are evaluated on the sequential MNIST classification task. The approach is generally applicable regardless of architecture types and models and results in a significant amount of reduction in the number of parameters with minimal or no loss in performance.
|
| 163 |
+
|
| 164 |
+
• LSTM-s, LSTM-b, GRU-s, GRU-b: One layer RNN networks with either LSTM (Zaremba et al. (2014)) or GRU (Cho et al. (2014)) cells. We develop two unit sizes for each cell type, 128 and 256 for $\{ \cdot \}$ -s and $\{ \cdot \}$ -b, respectively. The model is adapted for the sequential MNIST classification task, similar to Le et al. (2015). Instead of processing pixel-by-pixel, however, we perform rowby-row processing (i.e., the RNN cell receives each row at a time).
|
| 165 |
+
|
| 166 |
+
The results are summarized in Table 2. Overall, our approach prunes a substantial amount of parameters in a variety of network models with minimal or no loss in accuracy $( < 1 \% )$ . Our pruning procedure does not need to be modified for specific architectural variations (e.g., recurrent connections), indicating that it is indeed versatile and scalable. Note that prior art that use a saliency criterion based on the weights (i.e., magnitude or Hessian based) would require considerable adjustments in their pruning schedules as per changes in the model.
|
| 167 |
+
|
| 168 |
+
We note of a few challenges in directly comparing against others: different network specifications, learning policies, datasets and tasks. Nonetheless, we provide a few comparison points that we found in the literature. On CIFAR-10, SVD prunes $9 7 . 9 \%$ of the connections in VGG-like with no loss in accuracy (ours: $9 7 \%$ sparsity) while SWS obtained $9 3 . 4 \%$ sparsity on WRN-16-4 but with a non-negligible loss in accuracy of $2 \%$ . There are a couple of works attempting to prune RNNs (e.g., GRU in Narang et al. (2017) and LSTM in See et al. (2016)). Even though these methods are specifically designed for RNNs, none of them are able to obtain extreme sparsity without substantial loss in accuracy reflecting the challenges of pruning RNNs. To the best of our knowledge, we are the first to demonstrate on convolutional, residual and recurrent networks for extreme sparsities without requiring additional hyperparameters or modifying the pruning procedure.
|
| 169 |
+
|
| 170 |
+
# 5.4 UNDERSTANDING WHICH CONNECTIONS ARE BEING PRUNED
|
| 171 |
+
|
| 172 |
+
So far we have shown that our approach can prune a variety of deep neural network architectures for extreme sparsities without losing much on accuracy. However, it is not clear yet which connections are actually being pruned away or whether we are pruning the right (i.e., unimportant) ones. What if we could actually peep through our approach into this inspection?
|
| 173 |
+
|
| 174 |
+
Consider the first layer in LeNet-300-100 parameterized by $\mathbf { w } _ { l = 1 } ~ \in ~ \mathbb { R } ^ { 7 8 4 \times 3 0 0 }$ . This is a layer fully connected to the input where input images are of size $2 8 \times 2 8 \ : = \ : 7 8 4$ . In order to understand which connections are retained, we can visualize the binary connectivity mask for this layer $\mathbf { c } _ { l = 1 }$ , by averaging across columns and then reshaping the vector into 2D matrix (i.e., $\begin{array} { r } { \mathbf { c } _ { l = 1 } ^ { \check { } } \in \{ \bar { 0 } , 1 \} ^ { \check { } 8 4 \times 3 0 \widetilde { 0 } } \mathbb { R } ^ { 7 8 4 } \mathbb { R } ^ { 2 8 \times 2 8 } } \end{array}$ ). Recall that our method computes c using a minibatch of examples. In this experiment, we curate the mini-batch of examples of the same class and see which weights are retained for that mini-batch of data. We repeat this experiment for all classes (i.e., digits for MNIST and fashion items for Fashion-MNIST) with varying sparsity levels $\bar { \kappa }$ . The results are displayed in Figure 2 (see Appendix A for more results).
|
| 175 |
+
|
| 176 |
+

|
| 177 |
+
Figure 2: Visualizations of pruned parameters of the first layer in LeNet-300-100; the parameters are reshaped to be visualized as an image. Each column represents the visualizations for a particular class obtained using a batch of 100 examples with varying levels of sparsity $\bar { \kappa }$ , from 10 (top) to 90 (bottom). Bright pixels indicate that the parameters connected to these region had high importance scores (s) and survived from pruning. As the sparsity increases, the parameters connected to the discriminative part of the image for classification survive and the irrelevant parts get pruned.
|
| 178 |
+
|
| 179 |
+
The results are significant; important connections seem to reconstruct either the complete image (MNIST) or silhouettes (Fashion-MNIST) of input class. When we use a batch of examples of the digit 0 (i.e., the first column of MNIST results), for example, the parameters connected to the foreground of the digit 0 survive from pruning while the majority of background is removed. Also, one can easily determine the identity of items from Fashion-MNIST results. This clearly indicates that our method indeed prunes the unimportant connections in performing the classification task, receiving signals only from the most discriminative part of the input. This stands in stark contrast to other pruning methods from which carrying out such inspection is not straightforward.
|
| 180 |
+
|
| 181 |
+
# 5.5 EFFECTS OF DATA AND WEIGHT INITIALIZATION
|
| 182 |
+
|
| 183 |
+
Recall that our connection saliency measure depends on the network weights w as well as the given data $\mathcal { D }$ (Section 4.2). We study the effect of each of these in this section.
|
| 184 |
+
|
| 185 |
+
Effect of data. Our connection saliency measure depends on a mini-batch of train examples $\mathcal { D } ^ { b }$ (see Algorithm 1). To study the effect of data, we vary the batch size used to compute the saliency $( | \mathcal { D } ^ { b } | )$ and check which connections are being pruned as well as how much performance change this results in on the corresponding sparse network. We test with LeNet-300-100 to visualize the remaining parameters, and set the sparsity level $\bar { \kappa } = 9 0$ . Note that the batch size used for training remains the same as 100 for all cases. The results are displayed in Figure 3.
|
| 186 |
+
|
| 187 |
+
Effect of initialization. Our approach prunes a network at a stochastic initialization as discussed. We study the effect of the following initialization methods: 1) RN (random normal), 2) TN (truncated random normal), 3) VS-X (a variance scaling method using Glorot & Bengio (2010)), and 4) VS-H (a variance scaling method He et al. (2015)). We test on LeNets and RNNs on MNIST and run 20 sets of experiments by varying the seed for initialization. We set the sparsity level $\bar { \kappa } = 9 0$ , and train with Adam optimizer (Kingma & Ba (2015)) with learning rate of 0.001 without weight decay. Note that for training VS-X initialization is used in all the cases. The results are reported in Figure 3.
|
| 188 |
+
|
| 189 |
+
For all models, VS-H achieves the best performance. The differences between initializers are marginal on LeNets, however, variance scaling methods indeed turns out to be essential for complex RNN models. This effect is significant especially for GRU where without variance scaling initialization, the pruned networks are unable to achieve good accuracies, even with different optimizers. Overall, initializing with a variance scaling method seems crucial to making our saliency measure reliable and model-agnostic.
|
| 190 |
+
|
| 191 |
+

|
| 192 |
+
|
| 193 |
+
Figure 3: The effect of different batch sizes: (top-row) survived parameters in the first layer of LeNet-300-100 from pruning visualized as images; (bottom-row) the performance in errors of the pruned networks. For $| \mathcal { D } ^ { b } | \overset { - } { = } 1$ , the sampled example was 8; our pruning precisely retains the valid connections. As $| \mathcal { D } ^ { b } |$ increases, survived parameters get close to the average of all examples in the train set (last column), and the error decreases.
|
| 194 |
+
|
| 195 |
+
<table><tr><td>Init.</td><td>LeNet-300-100</td><td>LeNet-5-Caffe</td><td>LSTM-s</td><td>GRU-s</td></tr><tr><td>RN</td><td>1.90 ± (0.09)</td><td>0.89 ± (0.04)</td><td>2.93 ± (0.20)</td><td>47.61 ± (20.49)</td></tr><tr><td>TN</td><td>1.96 ± (0.11)</td><td>0.87 ± (0.05)</td><td>3.03 ± (0.17)</td><td>46.48± (22.25)</td></tr><tr><td>VS-X</td><td>1.91 ± (0.10)</td><td>0.88 ± (0.07)</td><td>1.48 ± (0.09)</td><td>1.80 ± (0.10)</td></tr><tr><td>VS-H</td><td>1.88 ± (0.10)</td><td>0.85 ± (0.05)</td><td>1.47 ± (0.08)</td><td>1.80 ± (0.14)</td></tr></table>
|
| 196 |
+
|
| 197 |
+
Table 3: The effect of initialization on our saliency score. We report the classification errors ( $\pm$ std).
|
| 198 |
+
Variance scaling initialization (VS-X, VS-H) improves the performance, especially for RNNs.
|
| 199 |
+
|
| 200 |
+
# 5.6 FITTING RANDOM LABELS
|
| 201 |
+
|
| 202 |
+
To further explore the use cases of SNIP, we run the experiment introduced in Zhang et al. (2017) and check whether the sparse network obtained by SNIP memorizes the dataset. Specifically, we train LeNet-5-Caffe for both the reference model and pruned model (with $\bar { \kappa } = 9 9 $ ) on MNIST with either true or randomly shuffled labels. To compute the connection sensitivity, always true labels are used. The results are plotted in Figure 4.
|
| 203 |
+
|
| 204 |
+
Given true labels, both the reference (red) and pruned (blue) models quickly reach to almost zero training loss. However, the reference model provided with random labels (green) also reaches to very low training loss, even with an explicit L2 regularizer (purple), indicating that neural networks have enough capacity to memorize completely random data. In contrast, the model pruned by SNIP (orange) fails to fit the random labels (high training error). The potential explanation is that the pruned network does not have sufficient capacity to fit the random labels, but it is able to classify MNIST with true labels, reinforcing the significance of our saliency criterion. It is possible that a similar experiment can be done with other pruning methods (Molchanov et al. (2017a)), however, being simple, SNIP enables such exploration much easier. We provide a further analysis on the effect of varying $\bar { \kappa }$ in Appendix B.
|
| 205 |
+
|
| 206 |
+

|
| 207 |
+
Figure 4: The sparse model pruned by SNIP does not fit the random labels.
|
| 208 |
+
|
| 209 |
+
# 6 DISCUSSION AND FUTURE WORK
|
| 210 |
+
|
| 211 |
+
In this work, we have presented a new approach, SNIP, that is simple, versatile and interpretable; it prunes irrelevant connections for a given task at single-shot prior to training and is applicable to a variety of neural network models without modifications. While SNIP results in extremely sparse models, we find that our connection sensitivity measure itself is noteworthy in that it diagnoses important connections in the network from a purely untrained network. We believe that this opens up new possibilities beyond pruning in the topics of understanding of neural network architectures, multi-task transfer learning and structural regularization, to name a few. In addition to these potential directions, we intend to explore the generalization capabilities of sparse networks.
|
| 212 |
+
|
| 213 |
+
# ACKNOWLEDGEMENTS
|
| 214 |
+
|
| 215 |
+
This work was supported by the Korean Government Graduate Scholarship, the ERC grant ERC2012-AdG 321162-HELIOS, EPSRC grant Seebibyte EP/M013774/1 and EPSRC/MURI grant EP/N019474/1. We would also like to acknowledge the Royal Academy of Engineering and FiveAI.
|
| 216 |
+
|
| 217 |
+
# REFERENCES
|
| 218 |
+
|
| 219 |
+
Sanjeev Arora, Rong Ge, Behnam Neyshabur, and Yi Zhang. Stronger generalization bounds for deep nets via a compression approach. ICML, 2018.
|
| 220 |
+
|
| 221 |
+
Leo Breiman. Better subset regression using the nonnegative garrote. Technometrics, 1995.
|
| 222 |
+
|
| 223 |
+
Miguel A. Carreira-Perpi ´ n˜an and Yerlan Idelbayev. “Learning-compression” algorithms for neural ´ net pruning. CVPR, 2018.
|
| 224 |
+
|
| 225 |
+
Yves Chauvin. A back-propagation algorithm with optimal use of hidden units. NIPS, 1989.
|
| 226 |
+
|
| 227 |
+
Kyunghyun Cho, Bart Van Merrienboer, Caglar Gulcehre, Dzmitry Bahdanau, Fethi Bougares, Hol- ¨ ger Schwenk, and Yoshua Bengio. Learning phrase representations using rnn encoder-decoder for statistical machine translation. EMNLP, 2014.
|
| 228 |
+
|
| 229 |
+
Xin Dong, Shangyu Chen, and Sinno Pan. Learning to prune deep neural networks via layer-wise optimal brain surgeon. NIPS, 2017.
|
| 230 |
+
|
| 231 |
+
Xavier Glorot and Yoshua Bengio. Understanding the difficulty of training deep feedforward neural networks. AISTATS, 2010.
|
| 232 |
+
|
| 233 |
+
Yunchao Gong, Liu Liu, Ming Yang, and Lubomir Bourdev. Compressing deep convolutional networks using vector quantization. arXiv preprint arXiv:1412.6115, 2014.
|
| 234 |
+
|
| 235 |
+
Ian Goodfellow, Yoshua Bengio, Aaron Courville, and Yoshua Bengio. Deep learning. MIT press Cambridge, 2016.
|
| 236 |
+
|
| 237 |
+
Yiwen Guo, Anbang Yao, and Yurong Chen. Dynamic network surgery for efficient dnns. NIPS, 2016.
|
| 238 |
+
|
| 239 |
+
Suyog Gupta, Ankur Agrawal, Kailash Gopalakrishnan, and Pritish Narayanan. Deep learning with limited numerical precision. ICML, 2015.
|
| 240 |
+
|
| 241 |
+
Song Han, Jeff Pool, John Tran, and William Dally. Learning both weights and connections for efficient neural network. NIPS, 2015.
|
| 242 |
+
|
| 243 |
+
Babak Hassibi, David G Stork, and Gregory J Wolff. Optimal brain surgeon and general network pruning. Neural Networks, 1993.
|
| 244 |
+
|
| 245 |
+
Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Delving deep into rectifiers: Surpassing human-level performance on imagenet classification. ICCV, 2015.
|
| 246 |
+
|
| 247 |
+
Itay Hubara, Matthieu Courbariaux, Daniel Soudry, Ran El-Yaniv, and Yoshua Bengio. Binarized neural networks. NIPS, 2016.
|
| 248 |
+
|
| 249 |
+
Masumi Ishikawa. Structural learning with forgetting. Neural Networks, 1996.
|
| 250 |
+
|
| 251 |
+
Max Jaderberg, Andrea Vedaldi, and Andrew Zisserman. Speeding up convolutional neural networks with low rank expansions. BMVC, 2014.
|
| 252 |
+
|
| 253 |
+
Ehud D Karnin. A simple procedure for pruning back-propagation trained neural networks. Neural Networks, 1990.
|
| 254 |
+
|
| 255 |
+
Diederik P Kingma and Jimmy Ba. Adam: A method for stochastic optimization. ICLR, 2015.
|
| 256 |
+
|
| 257 |
+
Pang Wei Koh and Percy Liang. Understanding black-box predictions via influence functions. ICML, 2017.
|
| 258 |
+
|
| 259 |
+
Alex Krizhevsky, Ilya Sutskever, and Geoffrey E Hinton. Imagenet classification with deep convolutional neural networks. 2012.
|
| 260 |
+
|
| 261 |
+
Quoc V Le, Navdeep Jaitly, and Geoffrey E Hinton. A simple way to initialize recurrent networks of rectified linear units. CoRR, 2015.
|
| 262 |
+
|
| 263 |
+
Yann LeCun, John S Denker, and Sara A Solla. Optimal brain damage. NIPS, 1990.
|
| 264 |
+
|
| 265 |
+
Yann LeCun, Leon Bottou, Genevieve B. Orr, and Klaus-Robert M ´ uller. Efficient backprop. ¨ Neural Networks: Tricks of the Trade, 1998.
|
| 266 |
+
|
| 267 |
+
Hao Li, Asim Kadav, Igor Durdanovic, Hanan Samet, and Hans Peter Graf. Pruning filters for efficient convnets. ICLR, 2017.
|
| 268 |
+
|
| 269 |
+
Christos Louizos, Max Welling, and Diederik P Kingma. Learning sparse neural networks through $l _ { 0 }$ regularization. ICLR, 2018.
|
| 270 |
+
|
| 271 |
+
Decebal Constantin Mocanu, Elena Mocanu, Peter Stone, Phuong H Nguyen, Madeleine Gibescu, and Antonio Liotta. Scalable training of artificial neural networks with adaptive sparse connectivity inspired by network science. Nature Communications, 2018.
|
| 272 |
+
|
| 273 |
+
Dmitry Molchanov, Arsenii Ashukha, and Dmitry Vetrov. Variational dropout sparsifies deep neural networks. ICML, 2017a.
|
| 274 |
+
|
| 275 |
+
Pavlo Molchanov, Stephen Tyree, Tero Karras, Timo Aila, and Jan Kautz. Pruning convolutional neural networks for resource efficient inference. ICLR, 2017b.
|
| 276 |
+
|
| 277 |
+
Michael C Mozer and Paul Smolensky. Skeletonization: A technique for trimming the fat from a network via relevance assessment. NIPS, 1989.
|
| 278 |
+
|
| 279 |
+
Sharan Narang, Erich Elsen, Gregory Diamos, and Shubho Sengupta. Exploring sparsity in recurrent neural networks. ICLR, 2017.
|
| 280 |
+
|
| 281 |
+
Alexander Novikov, Dmitrii Podoprikhin, Anton Osokin, and Dmitry P Vetrov. Tensorizing neural networks. NIPS, 2015.
|
| 282 |
+
|
| 283 |
+
Steven J Nowlan and Geoffrey E Hinton. Simplifying neural networks by soft weight-sharing. Neural Computation, 1992.
|
| 284 |
+
|
| 285 |
+
Ameya Prabhu, Girish Varma, and Anoop Namboodiri. Deep expander networks: Efficient deep networks from graph theory. ECCV, 2018.
|
| 286 |
+
|
| 287 |
+
Russell Reed. Pruning algorithms-a survey. Neural Networks, 1993.
|
| 288 |
+
|
| 289 |
+
Abigail See, Minh-Thang Luong, and Christopher D Manning. Compression of neural machine translation models via pruning. CoNLL, 2016.
|
| 290 |
+
|
| 291 |
+
Karen Simonyan and Andrew Zisserman. Very deep convolutional networks for large-scale image recognition. ICLR, 2015.
|
| 292 |
+
|
| 293 |
+
Karen Ullrich, Edward Meeds, and Max Welling. Soft weight-sharing for neural network compression. ICLR, 2017.
|
| 294 |
+
|
| 295 |
+
Andreas S Weigend, David E Rumelhart, and Bernardo A Huberman. Generalization by weightelimination with application to forecasting. NIPS, 1991.
|
| 296 |
+
|
| 297 |
+
Wei Wen, Chunpeng Wu, Yandan Wang, Yiran Chen, and Hai Li. Learning structured sparsity in deep neural networks. NIPS, 2016.
|
| 298 |
+
|
| 299 |
+
Sergey Zagoruyko. $9 2 . 4 5 \%$ on cifar-10 in torch. Torch Blog, 2015.
|
| 300 |
+
|
| 301 |
+
Sergey Zagoruyko and Nikos Komodakis. Wide residual networks. BMVC, 2016.
|
| 302 |
+
|
| 303 |
+
Wojciech Zaremba, Ilya Sutskever, and Oriol Vinyals. Recurrent neural network regularization. arXiv preprint arXiv:1409.2329, 2014.
|
| 304 |
+
|
| 305 |
+
Chiyuan Zhang, Samy Bengio, Moritz Hardt, Benjamin Recht, and Oriol Vinyals. Understanding deep learning requires rethinking generalization. ICLR, 2017.
|
| 306 |
+
|
| 307 |
+

|
| 308 |
+
Figure 5: Results of pruning with SNIP on inverted (Fashion-)MNIST (i.e., dark and bright regions are swapped). Notably, even if the data is inverted, the results are the same as the ones on the original (Fashion-)MNIST in Figure 2.
|
| 309 |
+
|
| 310 |
+

|
| 311 |
+
Figure 6: Results of pruning with $\partial L / \partial$ w on the original and inverted (Fashion-)MNIST. Notably, compared to the case of using SNIP (Figures 2 and 5), the results are different: Firstly, the results on the original (Fashion-)MNIST (i.e., (a) and (c) above) are not the same as the ones using SNIP (i.e., (a) and (b) in Figure 2). Moreover, the pruning patterns are inconsistent with different sparsity levels, either intra-class or inter-class. Furthermore, using ${ \partial L } / { \partial \mathbf { w } }$ results in different pruning patterns between the original and inverted data in some cases (e.g., the $2 ^ { \mathrm { n d } }$ columns between (c) and (d)).
|
| 312 |
+
|
| 313 |
+

|
| 314 |
+
Figure 7: The effect of varying sparsity levels $\left( \hat { \kappa } \right)$ . The lower $\bar { \kappa }$ becomes, the lower training loss is recorded, meaning that a network with more parameters is more vulnerable to fitting random labels. Recall, however, that all pruned models are able to learn to perform the classification task without losing much accuracy (see Figure 1). This potentially indicates that the pruned network does not have sufficient capacity to fit the random labels, but it is capable of performing the classification.
|
| 315 |
+
|
| 316 |
+
# C TINY-IMAGENET
|
| 317 |
+
|
| 318 |
+
<table><tr><td>Architecture</td><td>Model</td><td>Sparsity (%)</td><td># Parameters</td><td>Error (%)</td><td>△</td></tr><tr><td rowspan="5">Convolutional</td><td>AlexNet-s</td><td>90.0</td><td>5.1m → 507k</td><td>62.52 → 65.27</td><td>+2.75</td></tr><tr><td>AlexNet-b</td><td>90.0</td><td>8.5m → 849k</td><td>62.76 → 65.54</td><td>+2.78</td></tr><tr><td>VGG-C</td><td>95.0</td><td>10.5m → 526k</td><td>56.49 → 57.48</td><td>+0.99</td></tr><tr><td>VGG-D</td><td>95.0</td><td>15.2m → 762k</td><td>56.85 → 57.00</td><td>+0.15</td></tr><tr><td>VGG-like</td><td>95.0</td><td>15.0m → 749k</td><td>54.86 → 55.73</td><td>+0.87</td></tr></table>
|
| 319 |
+
|
| 320 |
+
Table 4: Pruning results of SNIP on Tiny-ImageNet (before after). Tiny-ImageNet2 is a subset of the full ImageNet: there are 200 classes in total, each class has 500 and 50 images for training and validation respectively, and each image has the spatial resolution of $6 4 \times 6 4$ . Compared to CIFAR-10, the resolution is doubled, and to deal with this, the stride of the first convolution in all architectures is doubled, following the standard practice for this dataset. In general, the Tiny-ImageNet classification task is considered much more complex than MNIST or CIFAR-10. Even on Tiny-ImageNet, however, SNIP is still able to prune a large amount of parameters with minimal loss in performance. AlexNet models lose more accuracies than VGGs, which may be attributed to the fact that the first convolution stride for AlexNet is set to be 4 (by its design of no pooling) which is too large and could lead to high loss of information when pruned.
|
| 321 |
+
|
| 322 |
+
D ARCHITECTURE DETAILS
|
| 323 |
+
|
| 324 |
+
<table><tr><td rowspan=1 colspan=8>Module Weight Stride Bias BatchNorm ReLU</td></tr><tr><td rowspan=1 colspan=1>Conv</td><td rowspan=1 colspan=1>[11,11, 3,96]</td><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1>[2,2]</td><td rowspan=1 colspan=3>[96] √</td><td rowspan=1 colspan=1>√</td></tr><tr><td rowspan=1 colspan=1>Conv</td><td rowspan=1 colspan=1>[5,5,96,256]</td><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1>2j</td><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1>[256]</td><td rowspan=1 colspan=1>√</td><td rowspan=1 colspan=1></td></tr><tr><td rowspan=1 colspan=1>Conv</td><td rowspan=1 colspan=1>[3,3,256,384]</td><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1>2.2</td><td rowspan=1 colspan=2>[384]</td><td rowspan=1 colspan=2>√</td></tr><tr><td rowspan=1 colspan=1>Conv</td><td rowspan=1 colspan=1>[3,3,384,384]</td><td rowspan=1 colspan=1></td><td rowspan=1 colspan=5>[384]</td></tr><tr><td rowspan=1 colspan=1>Conv</td><td rowspan=1 colspan=1>[3,3,384,256]</td><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1>2,2</td><td rowspan=1 colspan=2>[256]</td><td rowspan=1 colspan=2>(</td></tr><tr><td rowspan=1 colspan=1>Linear</td><td rowspan=1 colspan=1>[256,1024 ×k]</td><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1></td><td rowspan=1 colspan=3>[1024×k] √</td><td rowspan=1 colspan=1>√</td></tr><tr><td rowspan=1 colspan=3>Linear [1024 × k,1024 ×k]</td><td rowspan=1 colspan=1></td><td rowspan=1 colspan=3>[1024 × k] √</td><td rowspan=1 colspan=1>√</td></tr><tr><td rowspan=1 colspan=8>Linear [1024 × k,c] [c] X X</td></tr></table>
|
| 325 |
+
|
| 326 |
+
Table 5: AlexNet-s $k = 1 ,$ ) and AlexNet-b $( k = 2 )$ ). In the last layer, $c$ denotes the number of possible classes: $c = 1 0$ for CIFAR-10 and $c = 2 0 0$ for Tiny-ImageNet. The strides in the first convolution layer for Tiny-ImageNet are set [4, 4] instead of [2, 2] to deal with the increase in the image resolution.
|
| 327 |
+
|
| 328 |
+
<table><tr><td>Module</td><td>Weight</td><td>Stride</td><td>Bias</td><td>BatchNorm</td><td>ReLU</td></tr><tr><td>Conv</td><td>[3,3,3,64]</td><td>[1,1]</td><td>[64]</td><td></td><td></td></tr><tr><td>Conv</td><td>[3,3, 64, 64]</td><td></td><td>[64]</td><td>广</td><td></td></tr><tr><td>Pool</td><td></td><td></td><td></td><td>×</td><td><>x></td></tr><tr><td>Conv</td><td>[3,3,64,128]</td><td>1j</td><td>[128]</td><td>√</td><td></td></tr><tr><td>Conv</td><td>[3,3,128,128]</td><td>1j</td><td>[128]</td><td>√</td><td>√</td></tr><tr><td>Pool</td><td></td><td>18E.83. 2</td><td></td><td>X</td><td>X</td></tr><tr><td>Conv</td><td>[3,3,128,256]</td><td></td><td>[256]</td><td>√</td><td></td></tr><tr><td>Conv</td><td>[3,3,256,256]</td><td>1</td><td>[256]</td><td></td><td></td></tr><tr><td>Conv</td><td>[1/3/3,1/3/3,256,256]</td><td>1j</td><td>[256]</td><td>√</td><td></td></tr><tr><td>Pool</td><td></td><td>2j</td><td></td><td>X</td><td>X</td></tr><tr><td>Conv</td><td>[3,3,256,512]</td><td>1</td><td>[512]</td><td></td><td></td></tr><tr><td>Conv</td><td>[3,3,512, 512]</td><td>1j</td><td>[512]</td><td></td><td></td></tr><tr><td>Conv</td><td>[1/3/3,1/3/3,512,512]</td><td>1j</td><td>[512]</td><td></td><td></td></tr><tr><td>Pool</td><td></td><td>2</td><td></td><td></td><td></td></tr><tr><td>Conv</td><td>[3,3,512, 512]</td><td>1j</td><td>[512]</td><td></td><td></td></tr><tr><td>Conv</td><td>[3,3, 512,512]</td><td>1]</td><td>[512]</td><td></td><td></td></tr><tr><td>Conv</td><td>[1/3/3,1/3/3,512,512]</td><td>1]</td><td>[512]</td><td></td><td></td></tr><tr><td>Pool</td><td></td><td></td><td></td><td>X</td><td></td></tr><tr><td>Linear</td><td>[512, 512]</td><td></td><td>[512]</td><td>√</td><td>√</td></tr><tr><td>Linear</td><td>[512, 512]</td><td></td><td>[512]</td><td>√</td><td>√</td></tr><tr><td>Linear</td><td>[512,c]</td><td></td><td>[c]</td><td>X</td><td>X</td></tr></table>
|
| 329 |
+
|
| 330 |
+
Table 6: VGG-C/D/like. In the last layer, $c$ denotes the number of possible classes: $c = 1 0$ for CIFAR10 and $c = 2 0 0$ for Tiny-ImageNet. The strides in the first convolution layer for Tiny-ImageNet are set [2, 2] instead of [1, 1] to deal with the increase in the image resolution. The second Linear layer is only used in VGG-C/D.
|
parse/train/B1VZqjAcYX/B1VZqjAcYX_content_list.json
ADDED
|
@@ -0,0 +1,1773 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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"page_idx": 0
|
| 13 |
+
},
|
| 14 |
+
{
|
| 15 |
+
"type": "text",
|
| 16 |
+
"text": "Namhoon Lee, Thalaiyasingam Ajanthan & Philip H. S. Torr University of Oxford {namhoon,ajanthan,phst}@robots.ox.ac.uk ",
|
| 17 |
+
"bbox": [
|
| 18 |
+
183,
|
| 19 |
+
170,
|
| 20 |
+
607,
|
| 21 |
+
212
|
| 22 |
+
],
|
| 23 |
+
"page_idx": 0
|
| 24 |
+
},
|
| 25 |
+
{
|
| 26 |
+
"type": "text",
|
| 27 |
+
"text": "ABSTRACT ",
|
| 28 |
+
"text_level": 1,
|
| 29 |
+
"bbox": [
|
| 30 |
+
454,
|
| 31 |
+
250,
|
| 32 |
+
544,
|
| 33 |
+
263
|
| 34 |
+
],
|
| 35 |
+
"page_idx": 0
|
| 36 |
+
},
|
| 37 |
+
{
|
| 38 |
+
"type": "text",
|
| 39 |
+
"text": "Pruning large neural networks while maintaining their performance is often desirable due to the reduced space and time complexity. In existing methods, pruning is done within an iterative optimization procedure with either heuristically designed pruning schedules or additional hyperparameters, undermining their utility. In this work, we present a new approach that prunes a given network once at initialization prior to training. To achieve this, we introduce a saliency criterion based on connection sensitivity that identifies structurally important connections in the network for the given task. This eliminates the need for both pretraining and the complex pruning schedule while making it robust to architecture variations. After pruning, the sparse network is trained in the standard way. Our method obtains extremely sparse networks with virtually the same accuracy as the reference network on the MNIST, CIFAR-10, and Tiny-ImageNet classification tasks and is broadly applicable to various architectures including convolutional, residual and recurrent networks. Unlike existing methods, our approach enables us to demonstrate that the retained connections are indeed relevant to the given task. ",
|
| 40 |
+
"bbox": [
|
| 41 |
+
233,
|
| 42 |
+
280,
|
| 43 |
+
764,
|
| 44 |
+
487
|
| 45 |
+
],
|
| 46 |
+
"page_idx": 0
|
| 47 |
+
},
|
| 48 |
+
{
|
| 49 |
+
"type": "text",
|
| 50 |
+
"text": "1 INTRODUCTION ",
|
| 51 |
+
"text_level": 1,
|
| 52 |
+
"bbox": [
|
| 53 |
+
176,
|
| 54 |
+
512,
|
| 55 |
+
336,
|
| 56 |
+
529
|
| 57 |
+
],
|
| 58 |
+
"page_idx": 0
|
| 59 |
+
},
|
| 60 |
+
{
|
| 61 |
+
"type": "text",
|
| 62 |
+
"text": "Despite the success of deep neural networks in machine learning, they are often found to be highly overparametrized making them computationally expensive with excessive memory requirements. Pruning such large networks with minimal loss in performance is appealing for real-time applications, especially on resource-limited devices. In addition, compressed neural networks utilize the model capacity efficiently, and this interpretation can be used to derive better generalization bounds for neural networks (Arora et al. (2018)). ",
|
| 63 |
+
"bbox": [
|
| 64 |
+
174,
|
| 65 |
+
544,
|
| 66 |
+
825,
|
| 67 |
+
627
|
| 68 |
+
],
|
| 69 |
+
"page_idx": 0
|
| 70 |
+
},
|
| 71 |
+
{
|
| 72 |
+
"type": "text",
|
| 73 |
+
"text": "In network pruning, given a large reference neural network, the goal is to learn a much smaller subnetwork that mimics the performance of the reference network. The majority of existing methods in the literature attempt to find a subset of weights from the pretrained reference network either based on a saliency criterion (Mozer & Smolensky (1989); LeCun et al. (1990); Han et al. (2015)) or utilizing sparsity enforcing penalties (Chauvin (1989); Carreira-Perpin˜an & Idelbayev (2018)). ´ Unfortunately, since pruning is included as a part of an iterative optimization procedure, all these methods require many expensive prune – retrain cycles and heuristic design choices with additional hyperparameters, making them non-trivial to extend to new architectures and tasks. ",
|
| 74 |
+
"bbox": [
|
| 75 |
+
174,
|
| 76 |
+
635,
|
| 77 |
+
825,
|
| 78 |
+
746
|
| 79 |
+
],
|
| 80 |
+
"page_idx": 0
|
| 81 |
+
},
|
| 82 |
+
{
|
| 83 |
+
"type": "text",
|
| 84 |
+
"text": "In this work, we introduce a saliency criterion that identifies connections in the network that are important to the given task in a data-dependent way before training. Specifically, we discover important connections based on their influence on the loss function at a variance scaling initialization, which we call connection sensitivity. Given the desired sparsity level, redundant connections are pruned once prior to training (i.e., single-shot), and then the sparse pruned network is trained in the standard way. Our approach has several attractive properties: ",
|
| 85 |
+
"bbox": [
|
| 86 |
+
174,
|
| 87 |
+
752,
|
| 88 |
+
825,
|
| 89 |
+
837
|
| 90 |
+
],
|
| 91 |
+
"page_idx": 0
|
| 92 |
+
},
|
| 93 |
+
{
|
| 94 |
+
"type": "text",
|
| 95 |
+
"text": "• Simplicity. Since the network is pruned once prior to training, there is no need for pretraining and complex pruning schedules. Our method has no additional hyperparameters and once pruned, training of the sparse network is performed in the standard way. \n• Versatility. Since our saliency criterion chooses structurally important connections, it is robust to architecture variations. Therefore our method can be applied to various architectures including convolutional, residual and recurrent networks with no modifications. ",
|
| 96 |
+
"bbox": [
|
| 97 |
+
174,
|
| 98 |
+
840,
|
| 99 |
+
825,
|
| 100 |
+
924
|
| 101 |
+
],
|
| 102 |
+
"page_idx": 0
|
| 103 |
+
},
|
| 104 |
+
{
|
| 105 |
+
"type": "text",
|
| 106 |
+
"text": "• Interpretability. Our method determines important connections with a mini-batch of data at single-shot. By varying this mini-batch used for pruning, our method enables us to verify that the retained connections are indeed essential for the given task. ",
|
| 107 |
+
"bbox": [
|
| 108 |
+
178,
|
| 109 |
+
103,
|
| 110 |
+
823,
|
| 111 |
+
145
|
| 112 |
+
],
|
| 113 |
+
"page_idx": 1
|
| 114 |
+
},
|
| 115 |
+
{
|
| 116 |
+
"type": "text",
|
| 117 |
+
"text": "We evaluate our method on MNIST, CIFAR-10, and Tiny-ImageNet classification datasets with widely varying architectures. Despite being the simplest, our method obtains extremely sparse networks with virtually the same accuracy as the existing baselines across all tested architectures. Furthermore, we investigate the relevance of the retained connections as well as the effect of the network initialization and the dataset on the saliency score. ",
|
| 118 |
+
"bbox": [
|
| 119 |
+
174,
|
| 120 |
+
156,
|
| 121 |
+
823,
|
| 122 |
+
226
|
| 123 |
+
],
|
| 124 |
+
"page_idx": 1
|
| 125 |
+
},
|
| 126 |
+
{
|
| 127 |
+
"type": "text",
|
| 128 |
+
"text": "2 RELATED WORK ",
|
| 129 |
+
"text_level": 1,
|
| 130 |
+
"bbox": [
|
| 131 |
+
176,
|
| 132 |
+
244,
|
| 133 |
+
341,
|
| 134 |
+
261
|
| 135 |
+
],
|
| 136 |
+
"page_idx": 1
|
| 137 |
+
},
|
| 138 |
+
{
|
| 139 |
+
"type": "text",
|
| 140 |
+
"text": "Classical methods. Essentially, early works in network pruning can be categorized into two groups (Reed (1993)): 1) those that utilize sparsity enforcing penalties; and 2) methods that prune the network based on some saliency criterion. The methods from the former category (Chauvin (1989); Weigend et al. (1991); Ishikawa (1996)) augment the loss function with some sparsity enforcing penalty terms (e.g., $L _ { 0 }$ or $L _ { 1 }$ norm), so that back-propagation effectively penalizes the magnitude of the weights during training. Then weights below a certain threshold may be removed. On the other hand, classical saliency criteria include the sensitivity of the loss with respect to the neurons (Mozer & Smolensky (1989)) or the weights (Karnin (1990)) and Hessian of the loss with respect to the weights (LeCun et al. (1990); Hassibi et al. (1993)). Since these criteria are heavily dependent on the scale of the weights and are designed to be incorporated within the learning process, these methods are prohibitively slow requiring many iterations of pruning and learning steps. Our approach identifies redundant weights from an architectural point of view and prunes them once at the beginning before training. ",
|
| 141 |
+
"bbox": [
|
| 142 |
+
174,
|
| 143 |
+
276,
|
| 144 |
+
825,
|
| 145 |
+
455
|
| 146 |
+
],
|
| 147 |
+
"page_idx": 1
|
| 148 |
+
},
|
| 149 |
+
{
|
| 150 |
+
"type": "text",
|
| 151 |
+
"text": "Modern advances. In recent years, the increased space and time complexities as well as the risk of overfitting in deep neural networks prompted a surge of further investigation in network pruning. While Hessian based approaches employ the diagonal approximation due to its computational simplicity, impressive results (i.e., extreme sparsity without loss in accuracy) are achieved using magnitude of the weights as the criterion (Han et al. (2015)). This made them the de facto standard method for network pruning and led to various implementations (Guo et al. (2016); Carreira-Perpin˜an & ´ Idelbayev (2018)). The magnitude criterion is also extended to recurrent neural networks (Narang et al. (2017)), yet with heavily tuned hyperparameter setting. Unlike our approach, the main drawbacks of magnitude based approaches are the reliance on pretraining and the expensive prune – retrain cycles. Furthermore, since pruning and learning steps are intertwined, they often require highly heuristic design choices which make them non-trivial to be extended to new architectures and different tasks. Meanwhile, Bayesian methods are also applied to network pruning (Ullrich et al. (2017); Molchanov et al. (2017a)) where the former extends the soft weight sharing in Nowlan & Hinton (1992) to obtain a sparse and compressed network, and the latter uses variational inference to learn the dropout rate which can then be used to prune the network. Unlike the above methods, our approach is simple and easily adaptable to any given architecture or task without modifying the pruning procedure. ",
|
| 152 |
+
"bbox": [
|
| 153 |
+
174,
|
| 154 |
+
463,
|
| 155 |
+
825,
|
| 156 |
+
699
|
| 157 |
+
],
|
| 158 |
+
"page_idx": 1
|
| 159 |
+
},
|
| 160 |
+
{
|
| 161 |
+
"type": "text",
|
| 162 |
+
"text": "Network compression in general. Apart from weight pruning, there are approaches focused on structured simplification such as pruning filters (Li et al. (2017); Molchanov et al. (2017b)), structured sparsity with regularizers (Wen et al. (2016)), low-rank approximation (Jaderberg et al. (2014)), matrix and tensor factorization (Novikov et al. (2015)), and sparsification using expander graphs (Prabhu et al. (2018)) or Erdos-R ˝ enyi random graph (Mocanu et al. (2018)). In addition, ´ there is a large body of work on compressing the representation of weights. A non-exhaustive list includes quantization (Gong et al. (2014)), reduced precision (Gupta et al. (2015)) and binary weights (Hubara et al. (2016)). In this work, we focus on weight pruning that is free from structural constraints and amenable to further compression schemes. ",
|
| 163 |
+
"bbox": [
|
| 164 |
+
174,
|
| 165 |
+
707,
|
| 166 |
+
825,
|
| 167 |
+
832
|
| 168 |
+
],
|
| 169 |
+
"page_idx": 1
|
| 170 |
+
},
|
| 171 |
+
{
|
| 172 |
+
"type": "text",
|
| 173 |
+
"text": "3 NEURAL NETWORK PRUNING ",
|
| 174 |
+
"text_level": 1,
|
| 175 |
+
"bbox": [
|
| 176 |
+
176,
|
| 177 |
+
852,
|
| 178 |
+
446,
|
| 179 |
+
867
|
| 180 |
+
],
|
| 181 |
+
"page_idx": 1
|
| 182 |
+
},
|
| 183 |
+
{
|
| 184 |
+
"type": "text",
|
| 185 |
+
"text": "The main hypothesis behind the neural network pruning literature is that neural networks are usually overparametrized, and comparable performance can be obtained by a much smaller network (Reed (1993)) while improving generalization (Arora et al. (2018)). To this end, the objective is to learn ",
|
| 186 |
+
"bbox": [
|
| 187 |
+
176,
|
| 188 |
+
882,
|
| 189 |
+
823,
|
| 190 |
+
924
|
| 191 |
+
],
|
| 192 |
+
"page_idx": 1
|
| 193 |
+
},
|
| 194 |
+
{
|
| 195 |
+
"type": "text",
|
| 196 |
+
"text": "a sparse network while maintaining the accuracy of the standard reference network. Let us first formulate neural network pruning as an optimization problem. ",
|
| 197 |
+
"bbox": [
|
| 198 |
+
171,
|
| 199 |
+
103,
|
| 200 |
+
823,
|
| 201 |
+
132
|
| 202 |
+
],
|
| 203 |
+
"page_idx": 2
|
| 204 |
+
},
|
| 205 |
+
{
|
| 206 |
+
"type": "text",
|
| 207 |
+
"text": "Given a dataset $\\mathbfcal { D } = \\{ ( \\mathbf { x } _ { i } , \\mathbf { y } _ { i } ) \\} _ { i = 1 } ^ { n }$ , and a desired sparsity level $\\kappa$ (i.e., the number of non-zero weights) neural network pruning can be written as the following constrained optimization problem: ",
|
| 208 |
+
"bbox": [
|
| 209 |
+
173,
|
| 210 |
+
138,
|
| 211 |
+
821,
|
| 212 |
+
167
|
| 213 |
+
],
|
| 214 |
+
"page_idx": 2
|
| 215 |
+
},
|
| 216 |
+
{
|
| 217 |
+
"type": "equation",
|
| 218 |
+
"img_path": "images/ebd04375ac44347d780918c47861ac8c8cb91d7f6944a11ee1010af8262106cf.jpg",
|
| 219 |
+
"text": "$$\n\\begin{array} { l } { \\displaystyle \\operatorname* { m i n } _ { \\mathbf { w } } L ( \\mathbf { w } ; \\mathcal { D } ) = \\displaystyle \\operatorname* { m i n } _ { \\mathbf { w } } \\frac { 1 } { n } \\sum _ { i = 1 } ^ { n } \\ell ( \\mathbf { w } ; ( \\mathbf { x } _ { i } , \\mathbf { y } _ { i } ) ) ~ , } \\\\ { \\mathrm { s . t . } \\quad \\mathbf { w } \\in \\mathbb { R } ^ { m } , \\quad \\| \\mathbf { w } \\| _ { 0 } \\leq \\kappa ~ . } \\end{array}\n$$",
|
| 220 |
+
"text_format": "latex",
|
| 221 |
+
"bbox": [
|
| 222 |
+
354,
|
| 223 |
+
171,
|
| 224 |
+
640,
|
| 225 |
+
232
|
| 226 |
+
],
|
| 227 |
+
"page_idx": 2
|
| 228 |
+
},
|
| 229 |
+
{
|
| 230 |
+
"type": "text",
|
| 231 |
+
"text": "Here, $\\ell ( \\cdot )$ is the standard loss function (e.g., cross-entropy loss), w is the set of parameters of the neural network, $m$ is the total number of parameters and $\\| \\cdot \\| _ { 0 }$ is the standard $L _ { 0 }$ norm. ",
|
| 232 |
+
"bbox": [
|
| 233 |
+
173,
|
| 234 |
+
236,
|
| 235 |
+
826,
|
| 236 |
+
265
|
| 237 |
+
],
|
| 238 |
+
"page_idx": 2
|
| 239 |
+
},
|
| 240 |
+
{
|
| 241 |
+
"type": "text",
|
| 242 |
+
"text": "The conventional approach to optimize the above problem is by adding sparsity enforcing penalty terms (Chauvin (1989); Weigend et al. (1991); Ishikawa (1996)). Recently, Carreira-Perpin˜an´ $\\&$ Idelbayev (2018) attempts to minimize the above constrained optimization problem using the stochastic version of projected gradient descent (where the projection is accomplished by pruning). However, these methods often turn out to be inferior to saliency based methods in terms of resulting sparsity and require heavily tuned hyperparameter settings to obtain comparable results. ",
|
| 243 |
+
"bbox": [
|
| 244 |
+
174,
|
| 245 |
+
271,
|
| 246 |
+
825,
|
| 247 |
+
356
|
| 248 |
+
],
|
| 249 |
+
"page_idx": 2
|
| 250 |
+
},
|
| 251 |
+
{
|
| 252 |
+
"type": "text",
|
| 253 |
+
"text": "On the other hand, saliency based methods treat the above problem as selectively removing redundant parameters (or connections) in the neural network. In order to do so, one has to come up with a good criterion to identify such redundant connections. Popular criteria include magnitude of the weights, i.e., weights below a certain threshold are redundant (Han et al. (2015); Guo et al. (2016)) and Hessian of the loss with respect to the weights, i.e., the higher the value of Hessian, the higher the importance of the parameters (LeCun et al. (1990); Hassibi et al. (1993)), defined as follows: ",
|
| 254 |
+
"bbox": [
|
| 255 |
+
173,
|
| 256 |
+
362,
|
| 257 |
+
825,
|
| 258 |
+
446
|
| 259 |
+
],
|
| 260 |
+
"page_idx": 2
|
| 261 |
+
},
|
| 262 |
+
{
|
| 263 |
+
"type": "equation",
|
| 264 |
+
"img_path": "images/c088681f4071600c4852356681f774de0be83b26f0fa5008c7ee00bef5d07c4c.jpg",
|
| 265 |
+
"text": "$$\ns _ { j } = \\left\\{ \\begin{array} { l l } { \\left| w _ { j } \\right| , } & { \\mathrm { f o r m a g n i t u d e ~ b a s e d } } \\\\ { \\frac { w _ { j } ^ { 2 } H _ { j j } } { 2 } } & { \\mathrm { o r } \\frac { w _ { j } ^ { 2 } } { 2 H _ { j j } ^ { - 1 } } } & { \\mathrm { f o r } \\mathrm { H e s s i a n ~ b a s e d } . } \\end{array} \\right.\n$$",
|
| 266 |
+
"text_format": "latex",
|
| 267 |
+
"bbox": [
|
| 268 |
+
338,
|
| 269 |
+
452,
|
| 270 |
+
655,
|
| 271 |
+
503
|
| 272 |
+
],
|
| 273 |
+
"page_idx": 2
|
| 274 |
+
},
|
| 275 |
+
{
|
| 276 |
+
"type": "text",
|
| 277 |
+
"text": "Here, for connection $j , s _ { j }$ is the saliency score, $w _ { j }$ is the weight, and $H _ { j j }$ is the value of the Hessian matrix, where the Hessian $\\mathbf { H } = \\partial ^ { 2 } L / \\partial \\mathbf { w } ^ { 2 } \\in \\mathbb { R } ^ { m \\times m }$ . Considering Hessian based methods, the Hessian matrix is neither diagonal nor positive definite in general, approximate at best, and intractable to compute for large networks. ",
|
| 278 |
+
"bbox": [
|
| 279 |
+
174,
|
| 280 |
+
507,
|
| 281 |
+
825,
|
| 282 |
+
564
|
| 283 |
+
],
|
| 284 |
+
"page_idx": 2
|
| 285 |
+
},
|
| 286 |
+
{
|
| 287 |
+
"type": "text",
|
| 288 |
+
"text": "Despite being popular, both of these criteria depend on the scale of the weights and in turn require pretraining and are very sensitive to the architectural choices. For instance, different normalization layers affect the scale of the weights in a different way, and this would non-trivially affect the saliency score. Furthermore, pruning and the optimization steps are alternated many times throughout training, resulting in highly expensive prune – retrain cycles. Such an exorbitant requirement hinders the use of pruning methods in large-scale applications and raises questions about the credibility of the existing pruning criteria. ",
|
| 289 |
+
"bbox": [
|
| 290 |
+
173,
|
| 291 |
+
570,
|
| 292 |
+
825,
|
| 293 |
+
669
|
| 294 |
+
],
|
| 295 |
+
"page_idx": 2
|
| 296 |
+
},
|
| 297 |
+
{
|
| 298 |
+
"type": "text",
|
| 299 |
+
"text": "In this work, we design a criterion which directly measures the connection importance in a datadependent manner. This alleviates the dependency on the weights and enables us to prune the network once at the beginning, and then the training can be performed on the sparse pruned network. Therefore, our method eliminates the need for the expensive prune – retrain cycles, and in theory, it can be an order of magnitude faster than the standard neural network training as it can be implemented using software libraries that support sparse matrix computations. ",
|
| 300 |
+
"bbox": [
|
| 301 |
+
174,
|
| 302 |
+
675,
|
| 303 |
+
825,
|
| 304 |
+
760
|
| 305 |
+
],
|
| 306 |
+
"page_idx": 2
|
| 307 |
+
},
|
| 308 |
+
{
|
| 309 |
+
"type": "text",
|
| 310 |
+
"text": "4 SINGLE-SHOT NETWORK PRUNING BASED ON CONNECTION SENSITIVITY",
|
| 311 |
+
"text_level": 1,
|
| 312 |
+
"bbox": [
|
| 313 |
+
173,
|
| 314 |
+
780,
|
| 315 |
+
805,
|
| 316 |
+
795
|
| 317 |
+
],
|
| 318 |
+
"page_idx": 2
|
| 319 |
+
},
|
| 320 |
+
{
|
| 321 |
+
"type": "text",
|
| 322 |
+
"text": "Given a neural network and a dataset, our goal is to design a method that can selectively prune redundant connections for the given task in a data-dependent way even before training. To this end, we first introduce a criterion to identify important connections and then discuss its benefits. ",
|
| 323 |
+
"bbox": [
|
| 324 |
+
174,
|
| 325 |
+
810,
|
| 326 |
+
825,
|
| 327 |
+
853
|
| 328 |
+
],
|
| 329 |
+
"page_idx": 2
|
| 330 |
+
},
|
| 331 |
+
{
|
| 332 |
+
"type": "text",
|
| 333 |
+
"text": "4.1 CONNECTION SENSITIVITY: ARCHITECTURAL PERSPECTIVE ",
|
| 334 |
+
"text_level": 1,
|
| 335 |
+
"bbox": [
|
| 336 |
+
174,
|
| 337 |
+
871,
|
| 338 |
+
629,
|
| 339 |
+
883
|
| 340 |
+
],
|
| 341 |
+
"page_idx": 2
|
| 342 |
+
},
|
| 343 |
+
{
|
| 344 |
+
"type": "text",
|
| 345 |
+
"text": "Since we intend to measure the importance (or sensitivity) of each connection independently of its weight, we introduce auxiliary indicator variables $\\mathbf { c } \\in \\{ 0 , 1 \\} ^ { m }$ representing the connectivity of ",
|
| 346 |
+
"bbox": [
|
| 347 |
+
173,
|
| 348 |
+
895,
|
| 349 |
+
821,
|
| 350 |
+
924
|
| 351 |
+
],
|
| 352 |
+
"page_idx": 2
|
| 353 |
+
},
|
| 354 |
+
{
|
| 355 |
+
"type": "text",
|
| 356 |
+
"text": "parameters w.1 Now, given the sparsity level $\\kappa$ , Equation 1 can be correspondingly modified as: ",
|
| 357 |
+
"bbox": [
|
| 358 |
+
169,
|
| 359 |
+
102,
|
| 360 |
+
802,
|
| 361 |
+
119
|
| 362 |
+
],
|
| 363 |
+
"page_idx": 3
|
| 364 |
+
},
|
| 365 |
+
{
|
| 366 |
+
"type": "equation",
|
| 367 |
+
"img_path": "images/ad23c70798958ceacba7cc412e5f4821e5a573dd20685c7c524d2a4992c31a21.jpg",
|
| 368 |
+
"text": "$$\n\\begin{array} { r l } { \\displaystyle \\operatorname* { m i n } _ { \\mathbf { c } , \\mathbf { w } } L ( \\mathbf { c } \\odot \\mathbf { w } ; \\mathcal { D } ) = \\displaystyle \\operatorname* { m i n } _ { \\mathbf { c } , \\mathbf { w } } \\frac { 1 } { n } \\sum _ { i = 1 } ^ { n } \\ell ( \\mathbf { c } \\odot \\mathbf { w } ; ( \\mathbf { x } _ { i } , \\mathbf { y } _ { i } ) ) ~ , } & { } \\\\ { \\mathrm { s . t . } \\quad \\mathbf { w } \\in \\mathbb { R } ^ { m } ~ , } & { } \\\\ { \\displaystyle \\quad \\mathbf { c } \\in \\{ 0 , 1 \\} ^ { m } , \\quad \\| \\mathbf { c } \\| _ { 0 } \\leq \\kappa ~ , } \\end{array}\n$$",
|
| 369 |
+
"text_format": "latex",
|
| 370 |
+
"bbox": [
|
| 371 |
+
326,
|
| 372 |
+
119,
|
| 373 |
+
669,
|
| 374 |
+
194
|
| 375 |
+
],
|
| 376 |
+
"page_idx": 3
|
| 377 |
+
},
|
| 378 |
+
{
|
| 379 |
+
"type": "text",
|
| 380 |
+
"text": "where $\\odot$ denotes the Hadamard product. Compared to Equation 1, we have doubled the number of learnable parameters in the network and directly optimizing the above problem is even more difficult. However, the idea here is that since we have separated the weight of the connection (w) from whether the connection is present or not (c), we may be able to determine the importance of each connection by measuring its effect on the loss function. ",
|
| 381 |
+
"bbox": [
|
| 382 |
+
173,
|
| 383 |
+
196,
|
| 384 |
+
825,
|
| 385 |
+
267
|
| 386 |
+
],
|
| 387 |
+
"page_idx": 3
|
| 388 |
+
},
|
| 389 |
+
{
|
| 390 |
+
"type": "text",
|
| 391 |
+
"text": "For instance, the value of $c _ { j }$ indicates whether the connection $j$ is active $( c _ { j } = 1 )$ ) in the network or pruned $( c _ { j } = 0 )$ . Therefore, to measure the effect of connection $j$ on the loss, one can try to measure the difference in loss when $c _ { j } = 1$ and $c _ { j } = 0$ , keeping everything else constant. Precisely, the effect of removing connection $j$ can be measured by, ",
|
| 392 |
+
"bbox": [
|
| 393 |
+
173,
|
| 394 |
+
273,
|
| 395 |
+
825,
|
| 396 |
+
330
|
| 397 |
+
],
|
| 398 |
+
"page_idx": 3
|
| 399 |
+
},
|
| 400 |
+
{
|
| 401 |
+
"type": "equation",
|
| 402 |
+
"img_path": "images/e6365ca8d23c010ba62a5254564ce85692ebeab191c5a566631d07f8358e87d8.jpg",
|
| 403 |
+
"text": "$$\n\\begin{array} { r } { \\Delta L _ { j } ( \\mathbf { w } ; \\mathcal { D } ) = L \\big ( \\mathbf { 1 } \\odot \\mathbf { w } ; \\mathcal { D } \\big ) - L \\big ( \\big ( \\mathbf { 1 } - \\mathbf { e } _ { j } \\big ) \\odot \\mathbf { w } ; \\mathcal { D } \\big ) , } \\end{array}\n$$",
|
| 404 |
+
"text_format": "latex",
|
| 405 |
+
"bbox": [
|
| 406 |
+
321,
|
| 407 |
+
335,
|
| 408 |
+
674,
|
| 409 |
+
353
|
| 410 |
+
],
|
| 411 |
+
"page_idx": 3
|
| 412 |
+
},
|
| 413 |
+
{
|
| 414 |
+
"type": "text",
|
| 415 |
+
"text": "where $\\mathbf { e } _ { j }$ is the indicator vector of element $j$ (i.e., zeros everywhere except at the index $j$ where it is one) and 1 is the vector of dimension $m$ . ",
|
| 416 |
+
"bbox": [
|
| 417 |
+
174,
|
| 418 |
+
357,
|
| 419 |
+
823,
|
| 420 |
+
386
|
| 421 |
+
],
|
| 422 |
+
"page_idx": 3
|
| 423 |
+
},
|
| 424 |
+
{
|
| 425 |
+
"type": "text",
|
| 426 |
+
"text": "Note that computing $\\Delta L _ { j }$ for each $j \\in \\{ 1 \\ldots m \\}$ is prohibitively expensive as it requires $m + 1$ (usually in the order of millions) forward passes over the dataset. In fact, since $\\mathbf { c }$ is binary, $L$ is not differentiable with respect to $\\mathbf { c }$ , and it is easy to see that $\\Delta L _ { j }$ attempts to measure the influence of connection $j$ on the loss function in this discrete setting. Therefore, by relaxing the binary constraint on the indicator variables c, $\\Delta L _ { j }$ can be approximated by the derivative of $L$ with respect to $c _ { j }$ , which we denote $g _ { j } ( \\mathbf { w } ; \\mathcal { D } )$ . Hence, the effect of connection $j$ on the loss can be written as: ",
|
| 427 |
+
"bbox": [
|
| 428 |
+
173,
|
| 429 |
+
391,
|
| 430 |
+
825,
|
| 431 |
+
477
|
| 432 |
+
],
|
| 433 |
+
"page_idx": 3
|
| 434 |
+
},
|
| 435 |
+
{
|
| 436 |
+
"type": "equation",
|
| 437 |
+
"img_path": "images/42176d39e7cf3667a3a141ea6f0addeb9f8d4f8297d5e9bce08d1f31245171b5.jpg",
|
| 438 |
+
"text": "$$\n\\Delta L _ { j } ( \\mathbf { w } ; \\mathcal { D } ) \\approx g _ { j } ( \\mathbf { w } ; \\mathcal { D } ) = \\left. \\frac { \\partial L ( \\mathbf { c } \\odot \\mathbf { w } ; \\mathcal { D } ) } { \\partial c _ { j } } \\right| _ { \\mathbf { c } = \\mathbf { 1 } } = \\operatorname* { l i m } _ { \\delta \\to 0 } \\left. \\frac { L ( \\mathbf { c } \\odot \\mathbf { w } ; \\mathcal { D } ) - L ( ( \\mathbf { c } - \\delta \\mathbf { e } _ { j } ) \\odot \\mathbf { w } ; \\mathcal { D } ) } { \\delta } \\right| _ { \\mathbf { c } = \\mathbf { 1 } } .\n$$",
|
| 439 |
+
"text_format": "latex",
|
| 440 |
+
"bbox": [
|
| 441 |
+
181,
|
| 442 |
+
481,
|
| 443 |
+
838,
|
| 444 |
+
517
|
| 445 |
+
],
|
| 446 |
+
"page_idx": 3
|
| 447 |
+
},
|
| 448 |
+
{
|
| 449 |
+
"type": "text",
|
| 450 |
+
"text": "In fact, $\\partial L / \\partial c _ { j }$ is an infinitesimal version of $\\Delta L _ { j }$ , that measures the rate of change of $L$ with respect to an infinitesimal change in $c _ { j }$ from $1 1 - \\delta$ . This can be computed efficiently in one forward-backward pass using automatic differentiation, for all $j$ at once. Notice, this formulation can be viewed as perturbing the weight $w _ { j }$ by a multiplicative factor $\\delta$ and measuring the change in loss. This approximation is similar in spirit to Koh & Liang (2017) where they try to measure the influence of a datapoint to the loss function. Here we measure the influence of connections. Furthermore, $\\partial L / \\partial c _ { j }$ is not to be confused with the gradient with respect to the weights $( \\partial L / \\partial w _ { j } )$ , where the change in loss is measured with respect to an additive change in weight $w _ { j }$ . ",
|
| 451 |
+
"bbox": [
|
| 452 |
+
173,
|
| 453 |
+
529,
|
| 454 |
+
825,
|
| 455 |
+
642
|
| 456 |
+
],
|
| 457 |
+
"page_idx": 3
|
| 458 |
+
},
|
| 459 |
+
{
|
| 460 |
+
"type": "text",
|
| 461 |
+
"text": "Notably, our interest is to discover important (or sensitive) connections in the architecture, so that we can prune unimportant ones in single-shot, disentangling the pruning process from the iterative optimization cycles. To this end, we take the magnitude of the derivatives $g _ { j }$ as the saliency criterion. Note that if the magnitude of the derivative is high (regardless of the sign), it essentially means that the connection $c _ { j }$ has a considerable effect on the loss (either positive or negative), and it has to be preserved to allow learning on $w _ { j }$ . Based on this hypothesis, we define connection sensitivity as the normalized magnitude of the derivatives: ",
|
| 462 |
+
"bbox": [
|
| 463 |
+
173,
|
| 464 |
+
647,
|
| 465 |
+
825,
|
| 466 |
+
744
|
| 467 |
+
],
|
| 468 |
+
"page_idx": 3
|
| 469 |
+
},
|
| 470 |
+
{
|
| 471 |
+
"type": "equation",
|
| 472 |
+
"img_path": "images/a8bb08f585f88b41a5785256eb41527e77555af8cf3e2c39ba70d686ef13e47a.jpg",
|
| 473 |
+
"text": "$$\ns _ { j } = \\frac { | g _ { j } ( \\mathbf { w } ; \\mathcal { D } ) | } { \\sum _ { k = 1 } ^ { m } | g _ { k } ( \\mathbf { w } ; \\mathcal { D } ) | } .\n$$",
|
| 474 |
+
"text_format": "latex",
|
| 475 |
+
"bbox": [
|
| 476 |
+
415,
|
| 477 |
+
742,
|
| 478 |
+
583,
|
| 479 |
+
779
|
| 480 |
+
],
|
| 481 |
+
"page_idx": 3
|
| 482 |
+
},
|
| 483 |
+
{
|
| 484 |
+
"type": "text",
|
| 485 |
+
"text": "Once the sensitivity is computed, only the top- $\\kappa$ connections are retained, where $\\kappa$ denotes the desired number of non-zero weights. Precisely, the indicator variables $\\mathbf { c }$ are set as follows: ",
|
| 486 |
+
"bbox": [
|
| 487 |
+
171,
|
| 488 |
+
782,
|
| 489 |
+
823,
|
| 490 |
+
810
|
| 491 |
+
],
|
| 492 |
+
"page_idx": 3
|
| 493 |
+
},
|
| 494 |
+
{
|
| 495 |
+
"type": "equation",
|
| 496 |
+
"img_path": "images/3bb568d384e6a4f34d439518abd1c66f802cd3f1ae4c509d77bbe48a995b13fe.jpg",
|
| 497 |
+
"text": "$$\nc _ { j } = \\mathbb { 1 } [ s _ { j } - \\tilde { s } _ { \\kappa } \\geq 0 ] , \\quad \\forall j \\in \\{ 1 \\ldots m \\} ,\n$$",
|
| 498 |
+
"text_format": "latex",
|
| 499 |
+
"bbox": [
|
| 500 |
+
359,
|
| 501 |
+
815,
|
| 502 |
+
635,
|
| 503 |
+
833
|
| 504 |
+
],
|
| 505 |
+
"page_idx": 3
|
| 506 |
+
},
|
| 507 |
+
{
|
| 508 |
+
"type": "text",
|
| 509 |
+
"text": "where $\\tilde { s } _ { \\kappa }$ is the $\\kappa$ -th largest element in the vector s and $\\mathbb { 1 } [ \\cdot ]$ is the indicator function. Here, for exactly $\\kappa$ connections to be retained, ties can be broken arbitrarily. ",
|
| 510 |
+
"bbox": [
|
| 511 |
+
174,
|
| 512 |
+
837,
|
| 513 |
+
826,
|
| 514 |
+
866
|
| 515 |
+
],
|
| 516 |
+
"page_idx": 3
|
| 517 |
+
},
|
| 518 |
+
{
|
| 519 |
+
"type": "text",
|
| 520 |
+
"text": "We would like to clarify that the above criterion (Equation 6) is different from the criteria used in early works by Mozer & Smolensky (1989) or Karnin (1990) which do not entirely capture the connection sensitivity. The fundamental idea behind them is to identify elements (e.g. weights or neurons) that least degrade the performance when removed. This means that their saliency criteria (i.e. $- \\partial L / \\partial \\mathbf { w }$ or $- \\partial L / \\partial \\pmb { \\alpha }$ ; $_ { \\pmb { \\alpha } }$ refers to the connectivity of neurons), in fact, depend on the loss value before pruning, which in turn, require the network to be pre-trained and iterative optimization cycles to ensure minimal loss in performance. They also suffer from the same drawbacks as the magnitude and Hessian based methods as discussed in Section 3. In contrast, our saliency criterion (Equation 6) is designed to measure the sensitivity as to how much influence elements have on the loss function regardless of whether it is positive or negative. This criterion alleviates the dependency on the value of the loss, eliminating the need for pre-training. These fundamental differences enable the network to be pruned at single-shot prior to training, which we discuss further in the next section. ",
|
| 521 |
+
"bbox": [
|
| 522 |
+
176,
|
| 523 |
+
872,
|
| 524 |
+
825,
|
| 525 |
+
901
|
| 526 |
+
],
|
| 527 |
+
"page_idx": 3
|
| 528 |
+
},
|
| 529 |
+
{
|
| 530 |
+
"type": "table",
|
| 531 |
+
"img_path": "images/ba832c82fdeca45ec305823a28416cffe95432383608d5e24276e28ddf126a8e.jpg",
|
| 532 |
+
"table_caption": [],
|
| 533 |
+
"table_footnote": [],
|
| 534 |
+
"table_body": "<table><tr><td colspan=\"3\">Algorithm1 SNIP: Single-shot Network Pruning based on Connection Sensitivity</td></tr><tr><td>Ensure: | w*|lo ≤ κ</td><td>Require: Loss function L, training dataset D, sparsity level K</td><td>Refer Equation 3</td></tr><tr><td></td><td>1:w_← VarianceScalingInitialization</td><td>Refer Section 4.2</td></tr><tr><td></td><td>2:Db={(xi,yi)}=1 ~D</td><td>> Sample a mini-batch of training data</td></tr><tr><td>3:Sj←</td><td>l9j(w;Db) ∑=1l9k((w;Db)l , ∀j∈{1...m}</td><td>Connection sensitivity</td></tr><tr><td></td><td>4:s ← SortDescending(s)</td><td></td></tr><tr><td></td><td>5:cj←1[sj-$κ≥0],∀j∈{1...m}</td><td>>Pruning: choose top-k connections</td></tr><tr><td>7: w* ← c⊙w*</td><td>6: W* ← arg minw∈Rm L(c ③ w;D)</td><td>Regular training</td></tr></table>",
|
| 535 |
+
"bbox": [
|
| 536 |
+
173,
|
| 537 |
+
99,
|
| 538 |
+
825,
|
| 539 |
+
263
|
| 540 |
+
],
|
| 541 |
+
"page_idx": 4
|
| 542 |
+
},
|
| 543 |
+
{
|
| 544 |
+
"type": "text",
|
| 545 |
+
"text": "",
|
| 546 |
+
"bbox": [
|
| 547 |
+
173,
|
| 548 |
+
291,
|
| 549 |
+
825,
|
| 550 |
+
431
|
| 551 |
+
],
|
| 552 |
+
"page_idx": 4
|
| 553 |
+
},
|
| 554 |
+
{
|
| 555 |
+
"type": "text",
|
| 556 |
+
"text": "4.2 SINGLE-SHOT PRUNING AT INITIALIZATION",
|
| 557 |
+
"text_level": 1,
|
| 558 |
+
"bbox": [
|
| 559 |
+
174,
|
| 560 |
+
452,
|
| 561 |
+
514,
|
| 562 |
+
464
|
| 563 |
+
],
|
| 564 |
+
"page_idx": 4
|
| 565 |
+
},
|
| 566 |
+
{
|
| 567 |
+
"type": "text",
|
| 568 |
+
"text": "Note that the saliency measure defined in Equation 6 depends on the value of weights w used to evaluate the derivative as well as the dataset $\\mathcal { D }$ and the loss function $L$ . In this section, we discuss the effect of each of them and show that it can be used to prune the network in single-shot with initial weights w. ",
|
| 569 |
+
"bbox": [
|
| 570 |
+
174,
|
| 571 |
+
477,
|
| 572 |
+
823,
|
| 573 |
+
534
|
| 574 |
+
],
|
| 575 |
+
"page_idx": 4
|
| 576 |
+
},
|
| 577 |
+
{
|
| 578 |
+
"type": "text",
|
| 579 |
+
"text": "Firstly, in order to minimize the impact of weights on the derivatives $\\partial L / \\partial c _ { j }$ , we need to choose these weights carefully. For instance, if the weights are too large, the activations after the non-linear function (e.g., sigmoid) will be saturated, which would result in uninformative gradients. Therefore, the weights should be within a sensible range. In particular, there is a body of work on neural network initialization (Goodfellow et al. (2016)) that ensures the gradients to be in a reasonable range, and our saliency measure can be used to prune neural networks at any such initialization. ",
|
| 580 |
+
"bbox": [
|
| 581 |
+
174,
|
| 582 |
+
540,
|
| 583 |
+
825,
|
| 584 |
+
625
|
| 585 |
+
],
|
| 586 |
+
"page_idx": 4
|
| 587 |
+
},
|
| 588 |
+
{
|
| 589 |
+
"type": "text",
|
| 590 |
+
"text": "Furthermore, we are interested in making our saliency measure robust to architecture variations. Note that initializing neural networks is a random process, typically done using normal distribution. However, if the initial weights have a fixed variance, the signal passing through each layer no longer guarantees to have the same variance, as noted by LeCun et al. (1998). This would make the gradient and in turn our saliency measure, to be dependent on the architectural characteristics. Thus, we advocate the use of variance scaling methods (e.g., Glorot & Bengio (2010)) to initialize the weights, such that the variance remains the same throughout the network. By ensuring this, we empirically show that our saliency measure computed at initialization is robust to variations in the architecture. ",
|
| 591 |
+
"bbox": [
|
| 592 |
+
174,
|
| 593 |
+
631,
|
| 594 |
+
825,
|
| 595 |
+
742
|
| 596 |
+
],
|
| 597 |
+
"page_idx": 4
|
| 598 |
+
},
|
| 599 |
+
{
|
| 600 |
+
"type": "text",
|
| 601 |
+
"text": "Next, since the dataset and the loss function defines the task at hand, by relying on both of them, our saliency criterion in fact discovers the connections in the network that are important to the given task. However, the practitioner needs to make a choice on whether to use the whole training set, or a mini-batch or the validation set to compute the connection saliency. Moreover, in case there are memory limitations (e.g., large model or dataset), one can accumulate the saliency measure over multiple batches or take an exponential moving average. In our experiments, we show that using only one mini-batch of a reasonable number of training examples can lead to effective pruning. ",
|
| 602 |
+
"bbox": [
|
| 603 |
+
174,
|
| 604 |
+
750,
|
| 605 |
+
825,
|
| 606 |
+
847
|
| 607 |
+
],
|
| 608 |
+
"page_idx": 4
|
| 609 |
+
},
|
| 610 |
+
{
|
| 611 |
+
"type": "text",
|
| 612 |
+
"text": "Finally, in contrast to the previous approaches, our criterion for finding redundant connections is simple and directly based on the sensitivity of the connections. This allows us to effectively identify and prune redundant connections in a single step even before training. Then, training can be performed on the resulting pruned (sparse) network. We name our method SNIP for Single-shot Network Pruning, and the complete algorithm is given in Algorithm 1. ",
|
| 613 |
+
"bbox": [
|
| 614 |
+
174,
|
| 615 |
+
854,
|
| 616 |
+
823,
|
| 617 |
+
924
|
| 618 |
+
],
|
| 619 |
+
"page_idx": 4
|
| 620 |
+
},
|
| 621 |
+
{
|
| 622 |
+
"type": "image",
|
| 623 |
+
"img_path": "images/3926bf85ac622a47d0b4130ae5dbb2c6cc89a43e80cedae36061229911cdf321.jpg",
|
| 624 |
+
"image_caption": [
|
| 625 |
+
"Figure 1: Test errors of LeNets pruned at varying sparsity levels $\\bar { \\kappa }$ , where $\\bar { \\kappa } = 0$ refers to the reference network trained without pruning. Our approach performs as good as the reference network across varying sparsity levels on both the models. "
|
| 626 |
+
],
|
| 627 |
+
"image_footnote": [],
|
| 628 |
+
"bbox": [
|
| 629 |
+
205,
|
| 630 |
+
106,
|
| 631 |
+
782,
|
| 632 |
+
247
|
| 633 |
+
],
|
| 634 |
+
"page_idx": 5
|
| 635 |
+
},
|
| 636 |
+
{
|
| 637 |
+
"type": "text",
|
| 638 |
+
"text": "5 EXPERIMENTS ",
|
| 639 |
+
"text_level": 1,
|
| 640 |
+
"bbox": [
|
| 641 |
+
176,
|
| 642 |
+
330,
|
| 643 |
+
326,
|
| 644 |
+
347
|
| 645 |
+
],
|
| 646 |
+
"page_idx": 5
|
| 647 |
+
},
|
| 648 |
+
{
|
| 649 |
+
"type": "text",
|
| 650 |
+
"text": "We evaluate our method, SNIP, on MNIST, CIFAR-10 and Tiny-ImageNet classification tasks with a variety of network architectures. Our results show that SNIP yields extremely sparse models with minimal or no loss in accuracy across all tested architectures, while being much simpler than other state-of-the-art alternatives. We also provide clear evidence that our method prunes genuinely explainable connections rather than performing blind pruning. ",
|
| 651 |
+
"bbox": [
|
| 652 |
+
174,
|
| 653 |
+
364,
|
| 654 |
+
825,
|
| 655 |
+
435
|
| 656 |
+
],
|
| 657 |
+
"page_idx": 5
|
| 658 |
+
},
|
| 659 |
+
{
|
| 660 |
+
"type": "text",
|
| 661 |
+
"text": "Experiment setup For brevity, we define the sparsity level to be $\\bar { \\kappa } = ( m - \\kappa ) / m \\cdot 1 0 0 ( \\% )$ , where $m$ is the total number of parameters and $\\kappa$ is the desired number of non-zero weights. For a given sparsity level $\\bar { \\kappa }$ , the sensitivity scores are computed using a batch of 100 and 128 examples for MNIST and CIFAR experiments, respectively. After pruning, the pruned network is trained in the standard way. Specifically, we train the models using SGD with momentum of 0.9, batch size of 100 for MNIST and 128 for CIFAR experiments and the weight decay rate of 0.0005, unless stated otherwise. The initial learning rate is set to 0.1 and decayed by 0.1 at every 25k or $3 0 \\mathrm { k }$ iterations for MNIST and CIFAR, respectively. Our algorithm requires no other hyperparameters or complex learning/pruning schedules as in most pruning algorithms. We spare $10 \\%$ of the training data as a validation set and used only $90 \\%$ for training. For CIFAR experiments, we use the standard data augmentation (i.e., random horizontal flip and translation up to 4 pixels) for both the reference and sparse models. The code can be found here: https://github.com/namhoonlee/snip-public. ",
|
| 662 |
+
"bbox": [
|
| 663 |
+
174,
|
| 664 |
+
441,
|
| 665 |
+
825,
|
| 666 |
+
608
|
| 667 |
+
],
|
| 668 |
+
"page_idx": 5
|
| 669 |
+
},
|
| 670 |
+
{
|
| 671 |
+
"type": "text",
|
| 672 |
+
"text": "5.1 PRUNING LENETS WITH VARYING LEVELS OF SPARSITY ",
|
| 673 |
+
"text_level": 1,
|
| 674 |
+
"bbox": [
|
| 675 |
+
174,
|
| 676 |
+
631,
|
| 677 |
+
599,
|
| 678 |
+
643
|
| 679 |
+
],
|
| 680 |
+
"page_idx": 5
|
| 681 |
+
},
|
| 682 |
+
{
|
| 683 |
+
"type": "text",
|
| 684 |
+
"text": "We first test our approach on two standard networks for pruning, LeNet-300-100 and LeNet-5-Caffe. LeNet-300-100 consists of three fully-connected (fc) layers with $2 6 7 \\mathrm { k }$ parameters and LeNet-5-Caffe consists of two convolutional (conv) layers and two fc layers with 431k parameters. We prune the LeNets for different sparsity levels $\\bar { \\kappa }$ and report the performance in error on the MNIST image classification task. We run the experiment 20 times for each $\\bar { \\kappa }$ by changing random seeds for dataset and network initialization. The results are reported in Figure 1. ",
|
| 685 |
+
"bbox": [
|
| 686 |
+
174,
|
| 687 |
+
657,
|
| 688 |
+
825,
|
| 689 |
+
742
|
| 690 |
+
],
|
| 691 |
+
"page_idx": 5
|
| 692 |
+
},
|
| 693 |
+
{
|
| 694 |
+
"type": "text",
|
| 695 |
+
"text": "The pruned sparse LeNet-300-100 achieves performances similar to the reference $( \\bar { \\kappa } = 0$ ), only with negligible loss at $\\bar { \\kappa } = 9 0$ . For LeNet-5-Caffe, the performance degradation is nearly invisible. Note that our saliency measure does not require the network to be pre-trained and is computed at random initialization. Despite such simplicity, our approach prunes LeNets quickly (single-shot) and effectively (minimal accuracy loss) at varying sparsity levels. ",
|
| 696 |
+
"bbox": [
|
| 697 |
+
174,
|
| 698 |
+
748,
|
| 699 |
+
825,
|
| 700 |
+
818
|
| 701 |
+
],
|
| 702 |
+
"page_idx": 5
|
| 703 |
+
},
|
| 704 |
+
{
|
| 705 |
+
"type": "text",
|
| 706 |
+
"text": "5.2 COMPARISONS TO EXISTING APPROACHES",
|
| 707 |
+
"text_level": 1,
|
| 708 |
+
"bbox": [
|
| 709 |
+
178,
|
| 710 |
+
840,
|
| 711 |
+
504,
|
| 712 |
+
854
|
| 713 |
+
],
|
| 714 |
+
"page_idx": 5
|
| 715 |
+
},
|
| 716 |
+
{
|
| 717 |
+
"type": "text",
|
| 718 |
+
"text": "What happens if we increase the target sparsity to an extreme level? For example, would a model with only $1 \\%$ of the total parameters still be trainable and perform well? We test our approach for extreme sparsity levels (e.g., up to $9 9 \\%$ sparsity on LeNet-5-Caffe) and compare with various pruning algorithms as follows: LWC (Han et al. (2015)), DNS (Guo et al. (2016)), LC (Carreira-Perpin˜ an & ´ ",
|
| 719 |
+
"bbox": [
|
| 720 |
+
176,
|
| 721 |
+
867,
|
| 722 |
+
823,
|
| 723 |
+
924
|
| 724 |
+
],
|
| 725 |
+
"page_idx": 5
|
| 726 |
+
},
|
| 727 |
+
{
|
| 728 |
+
"type": "table",
|
| 729 |
+
"img_path": "images/c5c09ddcf38a7e654111aab6f939c07bb19eb493c1e1176b36e965541c1d4383.jpg",
|
| 730 |
+
"table_caption": [
|
| 731 |
+
"Table 1: Pruning results on LeNets and comparisons to other approaches. Here, “many” refers to an arbitrary number often in the order of total learning steps, and “soft” refers to soft pruning in Bayesian based methods. Our approach is capable of pruning up to $98 \\%$ for LeNet-300-100 and $9 9 \\%$ for LeNet-5-Caffe with marginal increases in error from the reference network. Notably, our approach is considerably simpler than other approaches, with no requirements such as pretraining, additional hyperparameters, augmented training objective or architecture dependent constraints. "
|
| 732 |
+
],
|
| 733 |
+
"table_footnote": [],
|
| 734 |
+
"table_body": "<table><tr><td rowspan=\"2\">Method</td><td rowspan=\"2\">Criterion</td><td colspan=\"2\">LeNet-300-100</td><td colspan=\"2\">LeNet-5-Caffe</td><td rowspan=\"2\">Pretrain</td><td rowspan=\"2\">#Prune</td><td rowspan=\"2\">Additional hyperparam.</td><td rowspan=\"2\">Augment objective</td><td rowspan=\"2\">Arch. constraints</td></tr><tr><td>K(%)</td><td>err. (%)</td><td>K(%)</td><td>err. (%)</td></tr><tr><td>Ref.</td><td></td><td></td><td>1.7</td><td>一</td><td>0.9</td><td></td><td>1</td><td>-></td><td>-xx></td><td>√</td></tr><tr><td>LWC</td><td>Magnitude</td><td>91.7</td><td>1.6</td><td>91.7</td><td>0.8</td><td></td><td>many</td><td></td><td></td><td></td></tr><tr><td>DNS</td><td>Magnitude</td><td>98.2</td><td>2.0</td><td>99.1</td><td>0.9</td><td></td><td>many</td><td></td><td></td><td>√</td></tr><tr><td>LC</td><td>Magnitude</td><td>99.0</td><td>3.2</td><td>99.0</td><td>1.1</td><td></td><td>many</td><td>√</td><td></td><td>X</td></tr><tr><td>SWS</td><td>Bayesian</td><td>95.6</td><td>1.9</td><td>99.5</td><td>1.0</td><td></td><td>soft</td><td>√</td><td>√</td><td>X</td></tr><tr><td>SVD</td><td>Bayesian</td><td>98.5</td><td>1.9</td><td>99.6</td><td>0.8</td><td>->>>>></td><td>soft</td><td>√</td><td>√</td><td>X</td></tr><tr><td>OBD</td><td>Hessian</td><td>92.0</td><td>2.0</td><td>92.0</td><td>2.7</td><td>√</td><td>many</td><td>√</td><td>X</td><td>X</td></tr><tr><td>L-OBS</td><td>Hessian</td><td>98.5</td><td>2.0</td><td>99.0</td><td>2.1</td><td>√</td><td>many</td><td>√</td><td>X</td><td>√</td></tr><tr><td rowspan=\"2\">SNIP (ours)</td><td>Connection</td><td>95.0</td><td>1.6</td><td>98.0</td><td>0.8</td><td>×</td><td></td><td>×</td><td>×</td><td>×</td></tr><tr><td>sensitivity</td><td>98.0</td><td>2.4</td><td>99.0</td><td>1.1</td><td></td><td>1</td><td></td><td></td><td></td></tr></table>",
|
| 735 |
+
"bbox": [
|
| 736 |
+
173,
|
| 737 |
+
101,
|
| 738 |
+
825,
|
| 739 |
+
244
|
| 740 |
+
],
|
| 741 |
+
"page_idx": 6
|
| 742 |
+
},
|
| 743 |
+
{
|
| 744 |
+
"type": "text",
|
| 745 |
+
"text": "Idelbayev (2018)), SWS (Ullrich et al. (2017)), SVD (Molchanov et al. (2017a)), OBD (LeCun et al. \n(1990)), L-OBS (Dong et al. (2017)). The results are summarized in Table 1. ",
|
| 746 |
+
"bbox": [
|
| 747 |
+
171,
|
| 748 |
+
366,
|
| 749 |
+
821,
|
| 750 |
+
393
|
| 751 |
+
],
|
| 752 |
+
"page_idx": 6
|
| 753 |
+
},
|
| 754 |
+
{
|
| 755 |
+
"type": "text",
|
| 756 |
+
"text": "We achieve errors that are comparable to the reference model, degrading approximately $0 . 7 \\%$ and $0 . 3 \\%$ while pruning $98 \\%$ and $9 9 \\%$ of the parameters in LeNet-300-100 and LeNet-5-Caffe respectively. For slightly relaxed sparsities (i.e., $9 5 \\%$ for LeNet-300-100 and $98 \\%$ for LeNet-5-Caffe), the sparse models pruned by SNIP record better performances than the dense reference network. Considering $9 9 \\%$ sparsity, our method efficiently finds $1 \\%$ of the connections even before training, that are sufficient to learn as good as the reference network. Moreover, SNIP is competitive to other methods, yet it is unparalleled in terms of algorithm simplicity. ",
|
| 757 |
+
"bbox": [
|
| 758 |
+
173,
|
| 759 |
+
401,
|
| 760 |
+
825,
|
| 761 |
+
498
|
| 762 |
+
],
|
| 763 |
+
"page_idx": 6
|
| 764 |
+
},
|
| 765 |
+
{
|
| 766 |
+
"type": "text",
|
| 767 |
+
"text": "To be more specific, we enumerate some key points and non-trivial aspects of other algorithms and highlight the benefit of our approach. First of all, the aforementioned methods require networks to be fully trained (if not partly) before pruning. These approaches typically perform many pruning operations even if the network is well pretrained, and require additional hyperparameters (e.g., pruning frequency in Guo et al. (2016), annealing schedule in Carreira-Perpin˜an & Idelbayev (2018)). Some ´ methods augment the training objective to handle pruning together with training, increasing the complexity of the algorithm (e.g., augmented Lagrangian in Carreira-Perpin˜an & Idelbayev (2018), ´ variational inference in Molchanov et al. (2017a)). Furthermore, there are approaches designed to include architecture dependent constraints (e.g., layer-wise pruning schemes in Dong et al. (2017)). ",
|
| 768 |
+
"bbox": [
|
| 769 |
+
174,
|
| 770 |
+
506,
|
| 771 |
+
825,
|
| 772 |
+
631
|
| 773 |
+
],
|
| 774 |
+
"page_idx": 6
|
| 775 |
+
},
|
| 776 |
+
{
|
| 777 |
+
"type": "text",
|
| 778 |
+
"text": "Compared to the above approaches, ours seems to cost almost nothing; it requires no pretraining or additional hyperparameters, and is applied only once at initialization. This means that one can easily plug-in SNIP as a preprocessor before training neural networks. Since SNIP prunes the network at the beginning, we could potentially expedite the training phase by training only the survived parameters (e.g., reduced expected FLOPs in Louizos et al. (2018)). Notice that this is not possible for the aforementioned approaches as they obtain the maximum sparsity at the end of the process. ",
|
| 779 |
+
"bbox": [
|
| 780 |
+
174,
|
| 781 |
+
637,
|
| 782 |
+
825,
|
| 783 |
+
722
|
| 784 |
+
],
|
| 785 |
+
"page_idx": 6
|
| 786 |
+
},
|
| 787 |
+
{
|
| 788 |
+
"type": "text",
|
| 789 |
+
"text": "5.3 VARIOUS MODERN ARCHITECTURES ",
|
| 790 |
+
"text_level": 1,
|
| 791 |
+
"bbox": [
|
| 792 |
+
176,
|
| 793 |
+
739,
|
| 794 |
+
464,
|
| 795 |
+
753
|
| 796 |
+
],
|
| 797 |
+
"page_idx": 6
|
| 798 |
+
},
|
| 799 |
+
{
|
| 800 |
+
"type": "text",
|
| 801 |
+
"text": "In this section we show that our approach is generally applicable to more complex modern network architectures including deep convolutional, residual and recurrent ones. Specifically, our method is applied to the following models: ",
|
| 802 |
+
"bbox": [
|
| 803 |
+
174,
|
| 804 |
+
765,
|
| 805 |
+
821,
|
| 806 |
+
808
|
| 807 |
+
],
|
| 808 |
+
"page_idx": 6
|
| 809 |
+
},
|
| 810 |
+
{
|
| 811 |
+
"type": "text",
|
| 812 |
+
"text": "• AlexNet-s and AlexNet-b: Models similar to Krizhevsky et al. (2012) in terms of the number of layers and size of kernels. We set the size of fc layers to 512 (AlexNet-s) and to 1024 (AlexNet-b) to adapt for CIFAR-10 and use strides of 2 for all conv layers instead of using pooling layers. • VGG-C, VGG-D and VGG-like: Models similar to the original VGG models described in Simonyan & Zisserman (2015). VGG-like (Zagoruyko (2015)) is a popular variant adapted for CIFAR-10 which has one less fc layers. For all VGG models, we set the size of fc layers to 512, remove dropout layers to avoid any effect on sparsification and use batch normalization instead. • WRN-16-8, WRN-16-10 and WRN-22-8: Same models as in Zagoruyko & Komodakis (2016). ",
|
| 813 |
+
"bbox": [
|
| 814 |
+
173,
|
| 815 |
+
811,
|
| 816 |
+
825,
|
| 817 |
+
924
|
| 818 |
+
],
|
| 819 |
+
"page_idx": 6
|
| 820 |
+
},
|
| 821 |
+
{
|
| 822 |
+
"type": "table",
|
| 823 |
+
"img_path": "images/3fb488c343d9e8ef6995cf22620a1fb59bb2c951a83d7424081ba37e8bd8748b.jpg",
|
| 824 |
+
"table_caption": [],
|
| 825 |
+
"table_footnote": [],
|
| 826 |
+
"table_body": "<table><tr><td>Architecture</td><td>Model</td><td>Sparsity (%)</td><td># Parameters</td><td>Error (%)</td><td></td><td>△</td></tr><tr><td rowspan=\"5\">Convolutional</td><td>AlexNet-s</td><td>90.0</td><td>5.1m → 507k</td><td>14.12 →</td><td>14.99</td><td>+0.87</td></tr><tr><td>AlexNet-b</td><td>90.0</td><td>8.5m → 849k</td><td>13.92 →</td><td>14.50</td><td>+0.58</td></tr><tr><td>VGG-C</td><td>95.0</td><td>10.5m → 526k</td><td>6.82 →</td><td>7.27</td><td>+0.45</td></tr><tr><td>VGG-D</td><td>95.0</td><td>15.2m → 762k</td><td>6.76 →</td><td>7.09</td><td>+0.33</td></tr><tr><td>VGG-like</td><td>97.0</td><td>15.0m → 449k</td><td>8.26 →</td><td>8.00</td><td>-0.26</td></tr><tr><td rowspan=\"3\">Residual</td><td>WRN-16-8</td><td>95.0</td><td>10.0m → 548k</td><td>6.21 →</td><td>6.63</td><td>+0.42</td></tr><tr><td>WRN-16-10</td><td>95.0</td><td>17.1m → 856k</td><td>5.91 →</td><td>6.43</td><td>+0.52</td></tr><tr><td>WRN-22-8</td><td>95.0</td><td>17.2m → 858k</td><td>6.14 →</td><td>5.85</td><td>-0.29</td></tr><tr><td rowspan=\"4\">Recurrent</td><td>LSTM-s</td><td>95.0</td><td>137k → 6.8k</td><td>1.88 →</td><td>1.57</td><td>-0.31</td></tr><tr><td>LSTM-b</td><td>95.0</td><td>535k → 26.8k</td><td>1.15 →</td><td>1.35</td><td>+0.20</td></tr><tr><td>GRU-s</td><td>95.0</td><td>104k → 5.2k</td><td>1.87 →</td><td>2.41</td><td>+0.54</td></tr><tr><td>GRU-b</td><td>95.0</td><td>404k→ 20.2k</td><td>1.71 →</td><td>1.52</td><td>-0.19</td></tr></table>",
|
| 827 |
+
"bbox": [
|
| 828 |
+
199,
|
| 829 |
+
101,
|
| 830 |
+
799,
|
| 831 |
+
294
|
| 832 |
+
],
|
| 833 |
+
"page_idx": 7
|
| 834 |
+
},
|
| 835 |
+
{
|
| 836 |
+
"type": "text",
|
| 837 |
+
"text": "Table 2: Pruning results of the proposed approach on various modern architectures (before after). AlexNets, VGGs and WRNs are evaluated on CIFAR-10, and LSTMs and GRUs are evaluated on the sequential MNIST classification task. The approach is generally applicable regardless of architecture types and models and results in a significant amount of reduction in the number of parameters with minimal or no loss in performance. ",
|
| 838 |
+
"bbox": [
|
| 839 |
+
173,
|
| 840 |
+
303,
|
| 841 |
+
825,
|
| 842 |
+
373
|
| 843 |
+
],
|
| 844 |
+
"page_idx": 7
|
| 845 |
+
},
|
| 846 |
+
{
|
| 847 |
+
"type": "text",
|
| 848 |
+
"text": "• LSTM-s, LSTM-b, GRU-s, GRU-b: One layer RNN networks with either LSTM (Zaremba et al. (2014)) or GRU (Cho et al. (2014)) cells. We develop two unit sizes for each cell type, 128 and 256 for $\\{ \\cdot \\}$ -s and $\\{ \\cdot \\}$ -b, respectively. The model is adapted for the sequential MNIST classification task, similar to Le et al. (2015). Instead of processing pixel-by-pixel, however, we perform rowby-row processing (i.e., the RNN cell receives each row at a time). ",
|
| 849 |
+
"bbox": [
|
| 850 |
+
174,
|
| 851 |
+
405,
|
| 852 |
+
823,
|
| 853 |
+
476
|
| 854 |
+
],
|
| 855 |
+
"page_idx": 7
|
| 856 |
+
},
|
| 857 |
+
{
|
| 858 |
+
"type": "text",
|
| 859 |
+
"text": "The results are summarized in Table 2. Overall, our approach prunes a substantial amount of parameters in a variety of network models with minimal or no loss in accuracy $( < 1 \\% )$ . Our pruning procedure does not need to be modified for specific architectural variations (e.g., recurrent connections), indicating that it is indeed versatile and scalable. Note that prior art that use a saliency criterion based on the weights (i.e., magnitude or Hessian based) would require considerable adjustments in their pruning schedules as per changes in the model. ",
|
| 860 |
+
"bbox": [
|
| 861 |
+
174,
|
| 862 |
+
482,
|
| 863 |
+
825,
|
| 864 |
+
566
|
| 865 |
+
],
|
| 866 |
+
"page_idx": 7
|
| 867 |
+
},
|
| 868 |
+
{
|
| 869 |
+
"type": "text",
|
| 870 |
+
"text": "We note of a few challenges in directly comparing against others: different network specifications, learning policies, datasets and tasks. Nonetheless, we provide a few comparison points that we found in the literature. On CIFAR-10, SVD prunes $9 7 . 9 \\%$ of the connections in VGG-like with no loss in accuracy (ours: $9 7 \\%$ sparsity) while SWS obtained $9 3 . 4 \\%$ sparsity on WRN-16-4 but with a non-negligible loss in accuracy of $2 \\%$ . There are a couple of works attempting to prune RNNs (e.g., GRU in Narang et al. (2017) and LSTM in See et al. (2016)). Even though these methods are specifically designed for RNNs, none of them are able to obtain extreme sparsity without substantial loss in accuracy reflecting the challenges of pruning RNNs. To the best of our knowledge, we are the first to demonstrate on convolutional, residual and recurrent networks for extreme sparsities without requiring additional hyperparameters or modifying the pruning procedure. ",
|
| 871 |
+
"bbox": [
|
| 872 |
+
174,
|
| 873 |
+
573,
|
| 874 |
+
825,
|
| 875 |
+
713
|
| 876 |
+
],
|
| 877 |
+
"page_idx": 7
|
| 878 |
+
},
|
| 879 |
+
{
|
| 880 |
+
"type": "text",
|
| 881 |
+
"text": "5.4 UNDERSTANDING WHICH CONNECTIONS ARE BEING PRUNED ",
|
| 882 |
+
"text_level": 1,
|
| 883 |
+
"bbox": [
|
| 884 |
+
176,
|
| 885 |
+
736,
|
| 886 |
+
635,
|
| 887 |
+
750
|
| 888 |
+
],
|
| 889 |
+
"page_idx": 7
|
| 890 |
+
},
|
| 891 |
+
{
|
| 892 |
+
"type": "text",
|
| 893 |
+
"text": "So far we have shown that our approach can prune a variety of deep neural network architectures for extreme sparsities without losing much on accuracy. However, it is not clear yet which connections are actually being pruned away or whether we are pruning the right (i.e., unimportant) ones. What if we could actually peep through our approach into this inspection? ",
|
| 894 |
+
"bbox": [
|
| 895 |
+
174,
|
| 896 |
+
763,
|
| 897 |
+
825,
|
| 898 |
+
819
|
| 899 |
+
],
|
| 900 |
+
"page_idx": 7
|
| 901 |
+
},
|
| 902 |
+
{
|
| 903 |
+
"type": "text",
|
| 904 |
+
"text": "Consider the first layer in LeNet-300-100 parameterized by $\\mathbf { w } _ { l = 1 } ~ \\in ~ \\mathbb { R } ^ { 7 8 4 \\times 3 0 0 }$ . This is a layer fully connected to the input where input images are of size $2 8 \\times 2 8 \\ : = \\ : 7 8 4$ . In order to understand which connections are retained, we can visualize the binary connectivity mask for this layer $\\mathbf { c } _ { l = 1 }$ , by averaging across columns and then reshaping the vector into 2D matrix (i.e., $\\begin{array} { r } { \\mathbf { c } _ { l = 1 } ^ { \\check { } } \\in \\{ \\bar { 0 } , 1 \\} ^ { \\check { } 8 4 \\times 3 0 \\widetilde { 0 } } \\mathbb { R } ^ { 7 8 4 } \\mathbb { R } ^ { 2 8 \\times 2 8 } } \\end{array}$ ). Recall that our method computes c using a minibatch of examples. In this experiment, we curate the mini-batch of examples of the same class and see which weights are retained for that mini-batch of data. We repeat this experiment for all classes (i.e., digits for MNIST and fashion items for Fashion-MNIST) with varying sparsity levels $\\bar { \\kappa }$ . The results are displayed in Figure 2 (see Appendix A for more results). ",
|
| 905 |
+
"bbox": [
|
| 906 |
+
174,
|
| 907 |
+
825,
|
| 908 |
+
823,
|
| 909 |
+
924
|
| 910 |
+
],
|
| 911 |
+
"page_idx": 7
|
| 912 |
+
},
|
| 913 |
+
{
|
| 914 |
+
"type": "image",
|
| 915 |
+
"img_path": "images/0f4107c55d7dc6d96c089d84572497bc1ec5a1fdb8c53251ac813dd698b02584.jpg",
|
| 916 |
+
"image_caption": [
|
| 917 |
+
"Figure 2: Visualizations of pruned parameters of the first layer in LeNet-300-100; the parameters are reshaped to be visualized as an image. Each column represents the visualizations for a particular class obtained using a batch of 100 examples with varying levels of sparsity $\\bar { \\kappa }$ , from 10 (top) to 90 (bottom). Bright pixels indicate that the parameters connected to these region had high importance scores (s) and survived from pruning. As the sparsity increases, the parameters connected to the discriminative part of the image for classification survive and the irrelevant parts get pruned. "
|
| 918 |
+
],
|
| 919 |
+
"image_footnote": [],
|
| 920 |
+
"bbox": [
|
| 921 |
+
200,
|
| 922 |
+
99,
|
| 923 |
+
797,
|
| 924 |
+
292
|
| 925 |
+
],
|
| 926 |
+
"page_idx": 8
|
| 927 |
+
},
|
| 928 |
+
{
|
| 929 |
+
"type": "text",
|
| 930 |
+
"text": "",
|
| 931 |
+
"bbox": [
|
| 932 |
+
173,
|
| 933 |
+
417,
|
| 934 |
+
823,
|
| 935 |
+
445
|
| 936 |
+
],
|
| 937 |
+
"page_idx": 8
|
| 938 |
+
},
|
| 939 |
+
{
|
| 940 |
+
"type": "text",
|
| 941 |
+
"text": "The results are significant; important connections seem to reconstruct either the complete image (MNIST) or silhouettes (Fashion-MNIST) of input class. When we use a batch of examples of the digit 0 (i.e., the first column of MNIST results), for example, the parameters connected to the foreground of the digit 0 survive from pruning while the majority of background is removed. Also, one can easily determine the identity of items from Fashion-MNIST results. This clearly indicates that our method indeed prunes the unimportant connections in performing the classification task, receiving signals only from the most discriminative part of the input. This stands in stark contrast to other pruning methods from which carrying out such inspection is not straightforward. ",
|
| 942 |
+
"bbox": [
|
| 943 |
+
174,
|
| 944 |
+
453,
|
| 945 |
+
825,
|
| 946 |
+
564
|
| 947 |
+
],
|
| 948 |
+
"page_idx": 8
|
| 949 |
+
},
|
| 950 |
+
{
|
| 951 |
+
"type": "text",
|
| 952 |
+
"text": "5.5 EFFECTS OF DATA AND WEIGHT INITIALIZATION",
|
| 953 |
+
"text_level": 1,
|
| 954 |
+
"bbox": [
|
| 955 |
+
174,
|
| 956 |
+
583,
|
| 957 |
+
547,
|
| 958 |
+
597
|
| 959 |
+
],
|
| 960 |
+
"page_idx": 8
|
| 961 |
+
},
|
| 962 |
+
{
|
| 963 |
+
"type": "text",
|
| 964 |
+
"text": "Recall that our connection saliency measure depends on the network weights w as well as the given data $\\mathcal { D }$ (Section 4.2). We study the effect of each of these in this section. ",
|
| 965 |
+
"bbox": [
|
| 966 |
+
173,
|
| 967 |
+
609,
|
| 968 |
+
823,
|
| 969 |
+
637
|
| 970 |
+
],
|
| 971 |
+
"page_idx": 8
|
| 972 |
+
},
|
| 973 |
+
{
|
| 974 |
+
"type": "text",
|
| 975 |
+
"text": "Effect of data. Our connection saliency measure depends on a mini-batch of train examples $\\mathcal { D } ^ { b }$ (see Algorithm 1). To study the effect of data, we vary the batch size used to compute the saliency $( | \\mathcal { D } ^ { b } | )$ and check which connections are being pruned as well as how much performance change this results in on the corresponding sparse network. We test with LeNet-300-100 to visualize the remaining parameters, and set the sparsity level $\\bar { \\kappa } = 9 0$ . Note that the batch size used for training remains the same as 100 for all cases. The results are displayed in Figure 3. ",
|
| 976 |
+
"bbox": [
|
| 977 |
+
174,
|
| 978 |
+
645,
|
| 979 |
+
825,
|
| 980 |
+
728
|
| 981 |
+
],
|
| 982 |
+
"page_idx": 8
|
| 983 |
+
},
|
| 984 |
+
{
|
| 985 |
+
"type": "text",
|
| 986 |
+
"text": "Effect of initialization. Our approach prunes a network at a stochastic initialization as discussed. We study the effect of the following initialization methods: 1) RN (random normal), 2) TN (truncated random normal), 3) VS-X (a variance scaling method using Glorot & Bengio (2010)), and 4) VS-H (a variance scaling method He et al. (2015)). We test on LeNets and RNNs on MNIST and run 20 sets of experiments by varying the seed for initialization. We set the sparsity level $\\bar { \\kappa } = 9 0$ , and train with Adam optimizer (Kingma & Ba (2015)) with learning rate of 0.001 without weight decay. Note that for training VS-X initialization is used in all the cases. The results are reported in Figure 3. ",
|
| 987 |
+
"bbox": [
|
| 988 |
+
174,
|
| 989 |
+
736,
|
| 990 |
+
825,
|
| 991 |
+
833
|
| 992 |
+
],
|
| 993 |
+
"page_idx": 8
|
| 994 |
+
},
|
| 995 |
+
{
|
| 996 |
+
"type": "text",
|
| 997 |
+
"text": "For all models, VS-H achieves the best performance. The differences between initializers are marginal on LeNets, however, variance scaling methods indeed turns out to be essential for complex RNN models. This effect is significant especially for GRU where without variance scaling initialization, the pruned networks are unable to achieve good accuracies, even with different optimizers. Overall, initializing with a variance scaling method seems crucial to making our saliency measure reliable and model-agnostic. ",
|
| 998 |
+
"bbox": [
|
| 999 |
+
174,
|
| 1000 |
+
840,
|
| 1001 |
+
825,
|
| 1002 |
+
924
|
| 1003 |
+
],
|
| 1004 |
+
"page_idx": 8
|
| 1005 |
+
},
|
| 1006 |
+
{
|
| 1007 |
+
"type": "image",
|
| 1008 |
+
"img_path": "images/0571d02738677c85bfcc4968a17cec170d1e05716329724896a5e65b46ef5437.jpg",
|
| 1009 |
+
"image_caption": [],
|
| 1010 |
+
"image_footnote": [],
|
| 1011 |
+
"bbox": [
|
| 1012 |
+
194,
|
| 1013 |
+
101,
|
| 1014 |
+
803,
|
| 1015 |
+
212
|
| 1016 |
+
],
|
| 1017 |
+
"page_idx": 9
|
| 1018 |
+
},
|
| 1019 |
+
{
|
| 1020 |
+
"type": "table",
|
| 1021 |
+
"img_path": "images/a505a44a37956c2130096a5ae7d1716db983bfb2c703887f7d1cd3760d02587e.jpg",
|
| 1022 |
+
"table_caption": [
|
| 1023 |
+
"Figure 3: The effect of different batch sizes: (top-row) survived parameters in the first layer of LeNet-300-100 from pruning visualized as images; (bottom-row) the performance in errors of the pruned networks. For $| \\mathcal { D } ^ { b } | \\overset { - } { = } 1$ , the sampled example was 8; our pruning precisely retains the valid connections. As $| \\mathcal { D } ^ { b } |$ increases, survived parameters get close to the average of all examples in the train set (last column), and the error decreases. "
|
| 1024 |
+
],
|
| 1025 |
+
"table_footnote": [],
|
| 1026 |
+
"table_body": "<table><tr><td>Init.</td><td>LeNet-300-100</td><td>LeNet-5-Caffe</td><td>LSTM-s</td><td>GRU-s</td></tr><tr><td>RN</td><td>1.90 ± (0.09)</td><td>0.89 ± (0.04)</td><td>2.93 ± (0.20)</td><td>47.61 ± (20.49)</td></tr><tr><td>TN</td><td>1.96 ± (0.11)</td><td>0.87 ± (0.05)</td><td>3.03 ± (0.17)</td><td>46.48± (22.25)</td></tr><tr><td>VS-X</td><td>1.91 ± (0.10)</td><td>0.88 ± (0.07)</td><td>1.48 ± (0.09)</td><td>1.80 ± (0.10)</td></tr><tr><td>VS-H</td><td>1.88 ± (0.10)</td><td>0.85 ± (0.05)</td><td>1.47 ± (0.08)</td><td>1.80 ± (0.14)</td></tr></table>",
|
| 1027 |
+
"bbox": [
|
| 1028 |
+
277,
|
| 1029 |
+
311,
|
| 1030 |
+
720,
|
| 1031 |
+
378
|
| 1032 |
+
],
|
| 1033 |
+
"page_idx": 9
|
| 1034 |
+
},
|
| 1035 |
+
{
|
| 1036 |
+
"type": "text",
|
| 1037 |
+
"text": "Table 3: The effect of initialization on our saliency score. We report the classification errors ( $\\pm$ std). \nVariance scaling initialization (VS-X, VS-H) improves the performance, especially for RNNs. ",
|
| 1038 |
+
"bbox": [
|
| 1039 |
+
173,
|
| 1040 |
+
388,
|
| 1041 |
+
820,
|
| 1042 |
+
417
|
| 1043 |
+
],
|
| 1044 |
+
"page_idx": 9
|
| 1045 |
+
},
|
| 1046 |
+
{
|
| 1047 |
+
"type": "text",
|
| 1048 |
+
"text": "5.6 FITTING RANDOM LABELS ",
|
| 1049 |
+
"text_level": 1,
|
| 1050 |
+
"bbox": [
|
| 1051 |
+
176,
|
| 1052 |
+
450,
|
| 1053 |
+
398,
|
| 1054 |
+
464
|
| 1055 |
+
],
|
| 1056 |
+
"page_idx": 9
|
| 1057 |
+
},
|
| 1058 |
+
{
|
| 1059 |
+
"type": "text",
|
| 1060 |
+
"text": "To further explore the use cases of SNIP, we run the experiment introduced in Zhang et al. (2017) and check whether the sparse network obtained by SNIP memorizes the dataset. Specifically, we train LeNet-5-Caffe for both the reference model and pruned model (with $\\bar { \\kappa } = 9 9 $ ) on MNIST with either true or randomly shuffled labels. To compute the connection sensitivity, always true labels are used. The results are plotted in Figure 4. ",
|
| 1061 |
+
"bbox": [
|
| 1062 |
+
174,
|
| 1063 |
+
479,
|
| 1064 |
+
549,
|
| 1065 |
+
590
|
| 1066 |
+
],
|
| 1067 |
+
"page_idx": 9
|
| 1068 |
+
},
|
| 1069 |
+
{
|
| 1070 |
+
"type": "text",
|
| 1071 |
+
"text": "Given true labels, both the reference (red) and pruned (blue) models quickly reach to almost zero training loss. However, the reference model provided with random labels (green) also reaches to very low training loss, even with an explicit L2 regularizer (purple), indicating that neural networks have enough capacity to memorize completely random data. In contrast, the model pruned by SNIP (orange) fails to fit the random labels (high training error). The potential explanation is that the pruned network does not have sufficient capacity to fit the random labels, but it is able to classify MNIST with true labels, reinforcing the significance of our saliency criterion. It is possible that a similar experiment can be done with other pruning methods (Molchanov et al. (2017a)), however, being simple, SNIP enables such exploration much easier. We provide a further analysis on the effect of varying $\\bar { \\kappa }$ in Appendix B. ",
|
| 1072 |
+
"bbox": [
|
| 1073 |
+
174,
|
| 1074 |
+
598,
|
| 1075 |
+
547,
|
| 1076 |
+
654
|
| 1077 |
+
],
|
| 1078 |
+
"page_idx": 9
|
| 1079 |
+
},
|
| 1080 |
+
{
|
| 1081 |
+
"type": "image",
|
| 1082 |
+
"img_path": "images/9a651ab94be553eb9324682211e6a7c4d4dcea5b1a266aa2431d015c01647a2d.jpg",
|
| 1083 |
+
"image_caption": [
|
| 1084 |
+
"Figure 4: The sparse model pruned by SNIP does not fit the random labels. "
|
| 1085 |
+
],
|
| 1086 |
+
"image_footnote": [],
|
| 1087 |
+
"bbox": [
|
| 1088 |
+
573,
|
| 1089 |
+
481,
|
| 1090 |
+
803,
|
| 1091 |
+
619
|
| 1092 |
+
],
|
| 1093 |
+
"page_idx": 9
|
| 1094 |
+
},
|
| 1095 |
+
{
|
| 1096 |
+
"type": "text",
|
| 1097 |
+
"text": "",
|
| 1098 |
+
"bbox": [
|
| 1099 |
+
174,
|
| 1100 |
+
654,
|
| 1101 |
+
825,
|
| 1102 |
+
750
|
| 1103 |
+
],
|
| 1104 |
+
"page_idx": 9
|
| 1105 |
+
},
|
| 1106 |
+
{
|
| 1107 |
+
"type": "text",
|
| 1108 |
+
"text": "6 DISCUSSION AND FUTURE WORK ",
|
| 1109 |
+
"text_level": 1,
|
| 1110 |
+
"bbox": [
|
| 1111 |
+
176,
|
| 1112 |
+
777,
|
| 1113 |
+
478,
|
| 1114 |
+
792
|
| 1115 |
+
],
|
| 1116 |
+
"page_idx": 9
|
| 1117 |
+
},
|
| 1118 |
+
{
|
| 1119 |
+
"type": "text",
|
| 1120 |
+
"text": "In this work, we have presented a new approach, SNIP, that is simple, versatile and interpretable; it prunes irrelevant connections for a given task at single-shot prior to training and is applicable to a variety of neural network models without modifications. While SNIP results in extremely sparse models, we find that our connection sensitivity measure itself is noteworthy in that it diagnoses important connections in the network from a purely untrained network. We believe that this opens up new possibilities beyond pruning in the topics of understanding of neural network architectures, multi-task transfer learning and structural regularization, to name a few. In addition to these potential directions, we intend to explore the generalization capabilities of sparse networks. ",
|
| 1121 |
+
"bbox": [
|
| 1122 |
+
173,
|
| 1123 |
+
811,
|
| 1124 |
+
825,
|
| 1125 |
+
924
|
| 1126 |
+
],
|
| 1127 |
+
"page_idx": 9
|
| 1128 |
+
},
|
| 1129 |
+
{
|
| 1130 |
+
"type": "text",
|
| 1131 |
+
"text": "ACKNOWLEDGEMENTS ",
|
| 1132 |
+
"text_level": 1,
|
| 1133 |
+
"bbox": [
|
| 1134 |
+
176,
|
| 1135 |
+
104,
|
| 1136 |
+
334,
|
| 1137 |
+
117
|
| 1138 |
+
],
|
| 1139 |
+
"page_idx": 10
|
| 1140 |
+
},
|
| 1141 |
+
{
|
| 1142 |
+
"type": "text",
|
| 1143 |
+
"text": "This work was supported by the Korean Government Graduate Scholarship, the ERC grant ERC2012-AdG 321162-HELIOS, EPSRC grant Seebibyte EP/M013774/1 and EPSRC/MURI grant EP/N019474/1. We would also like to acknowledge the Royal Academy of Engineering and FiveAI. ",
|
| 1144 |
+
"bbox": [
|
| 1145 |
+
176,
|
| 1146 |
+
127,
|
| 1147 |
+
823,
|
| 1148 |
+
170
|
| 1149 |
+
],
|
| 1150 |
+
"page_idx": 10
|
| 1151 |
+
},
|
| 1152 |
+
{
|
| 1153 |
+
"type": "text",
|
| 1154 |
+
"text": "REFERENCES ",
|
| 1155 |
+
"text_level": 1,
|
| 1156 |
+
"bbox": [
|
| 1157 |
+
174,
|
| 1158 |
+
190,
|
| 1159 |
+
287,
|
| 1160 |
+
207
|
| 1161 |
+
],
|
| 1162 |
+
"page_idx": 10
|
| 1163 |
+
},
|
| 1164 |
+
{
|
| 1165 |
+
"type": "text",
|
| 1166 |
+
"text": "Sanjeev Arora, Rong Ge, Behnam Neyshabur, and Yi Zhang. Stronger generalization bounds for deep nets via a compression approach. ICML, 2018. ",
|
| 1167 |
+
"bbox": [
|
| 1168 |
+
174,
|
| 1169 |
+
214,
|
| 1170 |
+
823,
|
| 1171 |
+
243
|
| 1172 |
+
],
|
| 1173 |
+
"page_idx": 10
|
| 1174 |
+
},
|
| 1175 |
+
{
|
| 1176 |
+
"type": "text",
|
| 1177 |
+
"text": "Leo Breiman. Better subset regression using the nonnegative garrote. Technometrics, 1995. ",
|
| 1178 |
+
"bbox": [
|
| 1179 |
+
169,
|
| 1180 |
+
252,
|
| 1181 |
+
772,
|
| 1182 |
+
267
|
| 1183 |
+
],
|
| 1184 |
+
"page_idx": 10
|
| 1185 |
+
},
|
| 1186 |
+
{
|
| 1187 |
+
"type": "text",
|
| 1188 |
+
"text": "Miguel A. Carreira-Perpi ´ n˜an and Yerlan Idelbayev. “Learning-compression” algorithms for neural ´ net pruning. CVPR, 2018. ",
|
| 1189 |
+
"bbox": [
|
| 1190 |
+
173,
|
| 1191 |
+
277,
|
| 1192 |
+
823,
|
| 1193 |
+
306
|
| 1194 |
+
],
|
| 1195 |
+
"page_idx": 10
|
| 1196 |
+
},
|
| 1197 |
+
{
|
| 1198 |
+
"type": "text",
|
| 1199 |
+
"text": "Yves Chauvin. A back-propagation algorithm with optimal use of hidden units. NIPS, 1989. ",
|
| 1200 |
+
"bbox": [
|
| 1201 |
+
178,
|
| 1202 |
+
315,
|
| 1203 |
+
781,
|
| 1204 |
+
332
|
| 1205 |
+
],
|
| 1206 |
+
"page_idx": 10
|
| 1207 |
+
},
|
| 1208 |
+
{
|
| 1209 |
+
"type": "text",
|
| 1210 |
+
"text": "Kyunghyun Cho, Bart Van Merrienboer, Caglar Gulcehre, Dzmitry Bahdanau, Fethi Bougares, Hol- ¨ ger Schwenk, and Yoshua Bengio. Learning phrase representations using rnn encoder-decoder for statistical machine translation. EMNLP, 2014. ",
|
| 1211 |
+
"bbox": [
|
| 1212 |
+
176,
|
| 1213 |
+
339,
|
| 1214 |
+
825,
|
| 1215 |
+
382
|
| 1216 |
+
],
|
| 1217 |
+
"page_idx": 10
|
| 1218 |
+
},
|
| 1219 |
+
{
|
| 1220 |
+
"type": "text",
|
| 1221 |
+
"text": "Xin Dong, Shangyu Chen, and Sinno Pan. Learning to prune deep neural networks via layer-wise optimal brain surgeon. NIPS, 2017. ",
|
| 1222 |
+
"bbox": [
|
| 1223 |
+
171,
|
| 1224 |
+
391,
|
| 1225 |
+
823,
|
| 1226 |
+
421
|
| 1227 |
+
],
|
| 1228 |
+
"page_idx": 10
|
| 1229 |
+
},
|
| 1230 |
+
{
|
| 1231 |
+
"type": "text",
|
| 1232 |
+
"text": "Xavier Glorot and Yoshua Bengio. Understanding the difficulty of training deep feedforward neural networks. AISTATS, 2010. ",
|
| 1233 |
+
"bbox": [
|
| 1234 |
+
171,
|
| 1235 |
+
429,
|
| 1236 |
+
823,
|
| 1237 |
+
458
|
| 1238 |
+
],
|
| 1239 |
+
"page_idx": 10
|
| 1240 |
+
},
|
| 1241 |
+
{
|
| 1242 |
+
"type": "text",
|
| 1243 |
+
"text": "Yunchao Gong, Liu Liu, Ming Yang, and Lubomir Bourdev. Compressing deep convolutional networks using vector quantization. arXiv preprint arXiv:1412.6115, 2014. ",
|
| 1244 |
+
"bbox": [
|
| 1245 |
+
171,
|
| 1246 |
+
467,
|
| 1247 |
+
823,
|
| 1248 |
+
497
|
| 1249 |
+
],
|
| 1250 |
+
"page_idx": 10
|
| 1251 |
+
},
|
| 1252 |
+
{
|
| 1253 |
+
"type": "text",
|
| 1254 |
+
"text": "Ian Goodfellow, Yoshua Bengio, Aaron Courville, and Yoshua Bengio. Deep learning. MIT press Cambridge, 2016. ",
|
| 1255 |
+
"bbox": [
|
| 1256 |
+
173,
|
| 1257 |
+
505,
|
| 1258 |
+
823,
|
| 1259 |
+
535
|
| 1260 |
+
],
|
| 1261 |
+
"page_idx": 10
|
| 1262 |
+
},
|
| 1263 |
+
{
|
| 1264 |
+
"type": "text",
|
| 1265 |
+
"text": "Yiwen Guo, Anbang Yao, and Yurong Chen. Dynamic network surgery for efficient dnns. NIPS, 2016. ",
|
| 1266 |
+
"bbox": [
|
| 1267 |
+
176,
|
| 1268 |
+
542,
|
| 1269 |
+
823,
|
| 1270 |
+
573
|
| 1271 |
+
],
|
| 1272 |
+
"page_idx": 10
|
| 1273 |
+
},
|
| 1274 |
+
{
|
| 1275 |
+
"type": "text",
|
| 1276 |
+
"text": "Suyog Gupta, Ankur Agrawal, Kailash Gopalakrishnan, and Pritish Narayanan. Deep learning with limited numerical precision. ICML, 2015. ",
|
| 1277 |
+
"bbox": [
|
| 1278 |
+
174,
|
| 1279 |
+
580,
|
| 1280 |
+
823,
|
| 1281 |
+
611
|
| 1282 |
+
],
|
| 1283 |
+
"page_idx": 10
|
| 1284 |
+
},
|
| 1285 |
+
{
|
| 1286 |
+
"type": "text",
|
| 1287 |
+
"text": "Song Han, Jeff Pool, John Tran, and William Dally. Learning both weights and connections for efficient neural network. NIPS, 2015. ",
|
| 1288 |
+
"bbox": [
|
| 1289 |
+
174,
|
| 1290 |
+
618,
|
| 1291 |
+
823,
|
| 1292 |
+
648
|
| 1293 |
+
],
|
| 1294 |
+
"page_idx": 10
|
| 1295 |
+
},
|
| 1296 |
+
{
|
| 1297 |
+
"type": "text",
|
| 1298 |
+
"text": "Babak Hassibi, David G Stork, and Gregory J Wolff. Optimal brain surgeon and general network pruning. Neural Networks, 1993. ",
|
| 1299 |
+
"bbox": [
|
| 1300 |
+
176,
|
| 1301 |
+
656,
|
| 1302 |
+
823,
|
| 1303 |
+
686
|
| 1304 |
+
],
|
| 1305 |
+
"page_idx": 10
|
| 1306 |
+
},
|
| 1307 |
+
{
|
| 1308 |
+
"type": "text",
|
| 1309 |
+
"text": "Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Delving deep into rectifiers: Surpassing human-level performance on imagenet classification. ICCV, 2015. ",
|
| 1310 |
+
"bbox": [
|
| 1311 |
+
174,
|
| 1312 |
+
694,
|
| 1313 |
+
823,
|
| 1314 |
+
724
|
| 1315 |
+
],
|
| 1316 |
+
"page_idx": 10
|
| 1317 |
+
},
|
| 1318 |
+
{
|
| 1319 |
+
"type": "text",
|
| 1320 |
+
"text": "Itay Hubara, Matthieu Courbariaux, Daniel Soudry, Ran El-Yaniv, and Yoshua Bengio. Binarized neural networks. NIPS, 2016. ",
|
| 1321 |
+
"bbox": [
|
| 1322 |
+
174,
|
| 1323 |
+
732,
|
| 1324 |
+
823,
|
| 1325 |
+
762
|
| 1326 |
+
],
|
| 1327 |
+
"page_idx": 10
|
| 1328 |
+
},
|
| 1329 |
+
{
|
| 1330 |
+
"type": "text",
|
| 1331 |
+
"text": "Masumi Ishikawa. Structural learning with forgetting. Neural Networks, 1996. ",
|
| 1332 |
+
"bbox": [
|
| 1333 |
+
173,
|
| 1334 |
+
771,
|
| 1335 |
+
694,
|
| 1336 |
+
786
|
| 1337 |
+
],
|
| 1338 |
+
"page_idx": 10
|
| 1339 |
+
},
|
| 1340 |
+
{
|
| 1341 |
+
"type": "text",
|
| 1342 |
+
"text": "Max Jaderberg, Andrea Vedaldi, and Andrew Zisserman. Speeding up convolutional neural networks with low rank expansions. BMVC, 2014. ",
|
| 1343 |
+
"bbox": [
|
| 1344 |
+
173,
|
| 1345 |
+
795,
|
| 1346 |
+
820,
|
| 1347 |
+
824
|
| 1348 |
+
],
|
| 1349 |
+
"page_idx": 10
|
| 1350 |
+
},
|
| 1351 |
+
{
|
| 1352 |
+
"type": "text",
|
| 1353 |
+
"text": "Ehud D Karnin. A simple procedure for pruning back-propagation trained neural networks. Neural Networks, 1990. ",
|
| 1354 |
+
"bbox": [
|
| 1355 |
+
174,
|
| 1356 |
+
833,
|
| 1357 |
+
823,
|
| 1358 |
+
862
|
| 1359 |
+
],
|
| 1360 |
+
"page_idx": 10
|
| 1361 |
+
},
|
| 1362 |
+
{
|
| 1363 |
+
"type": "text",
|
| 1364 |
+
"text": "Diederik P Kingma and Jimmy Ba. Adam: A method for stochastic optimization. ICLR, 2015. ",
|
| 1365 |
+
"bbox": [
|
| 1366 |
+
173,
|
| 1367 |
+
871,
|
| 1368 |
+
792,
|
| 1369 |
+
887
|
| 1370 |
+
],
|
| 1371 |
+
"page_idx": 10
|
| 1372 |
+
},
|
| 1373 |
+
{
|
| 1374 |
+
"type": "text",
|
| 1375 |
+
"text": "Pang Wei Koh and Percy Liang. Understanding black-box predictions via influence functions. ICML, 2017. ",
|
| 1376 |
+
"bbox": [
|
| 1377 |
+
173,
|
| 1378 |
+
895,
|
| 1379 |
+
821,
|
| 1380 |
+
922
|
| 1381 |
+
],
|
| 1382 |
+
"page_idx": 10
|
| 1383 |
+
},
|
| 1384 |
+
{
|
| 1385 |
+
"type": "text",
|
| 1386 |
+
"text": "Alex Krizhevsky, Ilya Sutskever, and Geoffrey E Hinton. Imagenet classification with deep convolutional neural networks. 2012. ",
|
| 1387 |
+
"bbox": [
|
| 1388 |
+
171,
|
| 1389 |
+
103,
|
| 1390 |
+
823,
|
| 1391 |
+
132
|
| 1392 |
+
],
|
| 1393 |
+
"page_idx": 11
|
| 1394 |
+
},
|
| 1395 |
+
{
|
| 1396 |
+
"type": "text",
|
| 1397 |
+
"text": "Quoc V Le, Navdeep Jaitly, and Geoffrey E Hinton. A simple way to initialize recurrent networks of rectified linear units. CoRR, 2015. ",
|
| 1398 |
+
"bbox": [
|
| 1399 |
+
174,
|
| 1400 |
+
138,
|
| 1401 |
+
823,
|
| 1402 |
+
169
|
| 1403 |
+
],
|
| 1404 |
+
"page_idx": 11
|
| 1405 |
+
},
|
| 1406 |
+
{
|
| 1407 |
+
"type": "text",
|
| 1408 |
+
"text": "Yann LeCun, John S Denker, and Sara A Solla. Optimal brain damage. NIPS, 1990. ",
|
| 1409 |
+
"bbox": [
|
| 1410 |
+
174,
|
| 1411 |
+
175,
|
| 1412 |
+
727,
|
| 1413 |
+
190
|
| 1414 |
+
],
|
| 1415 |
+
"page_idx": 11
|
| 1416 |
+
},
|
| 1417 |
+
{
|
| 1418 |
+
"type": "text",
|
| 1419 |
+
"text": "Yann LeCun, Leon Bottou, Genevieve B. Orr, and Klaus-Robert M ´ uller. Efficient backprop. ¨ Neural Networks: Tricks of the Trade, 1998. ",
|
| 1420 |
+
"bbox": [
|
| 1421 |
+
176,
|
| 1422 |
+
198,
|
| 1423 |
+
823,
|
| 1424 |
+
227
|
| 1425 |
+
],
|
| 1426 |
+
"page_idx": 11
|
| 1427 |
+
},
|
| 1428 |
+
{
|
| 1429 |
+
"type": "text",
|
| 1430 |
+
"text": "Hao Li, Asim Kadav, Igor Durdanovic, Hanan Samet, and Hans Peter Graf. Pruning filters for efficient convnets. ICLR, 2017. ",
|
| 1431 |
+
"bbox": [
|
| 1432 |
+
173,
|
| 1433 |
+
233,
|
| 1434 |
+
823,
|
| 1435 |
+
263
|
| 1436 |
+
],
|
| 1437 |
+
"page_idx": 11
|
| 1438 |
+
},
|
| 1439 |
+
{
|
| 1440 |
+
"type": "text",
|
| 1441 |
+
"text": "Christos Louizos, Max Welling, and Diederik P Kingma. Learning sparse neural networks through $l _ { 0 }$ regularization. ICLR, 2018. ",
|
| 1442 |
+
"bbox": [
|
| 1443 |
+
173,
|
| 1444 |
+
270,
|
| 1445 |
+
821,
|
| 1446 |
+
299
|
| 1447 |
+
],
|
| 1448 |
+
"page_idx": 11
|
| 1449 |
+
},
|
| 1450 |
+
{
|
| 1451 |
+
"type": "text",
|
| 1452 |
+
"text": "Decebal Constantin Mocanu, Elena Mocanu, Peter Stone, Phuong H Nguyen, Madeleine Gibescu, and Antonio Liotta. Scalable training of artificial neural networks with adaptive sparse connectivity inspired by network science. Nature Communications, 2018. ",
|
| 1453 |
+
"bbox": [
|
| 1454 |
+
174,
|
| 1455 |
+
305,
|
| 1456 |
+
820,
|
| 1457 |
+
349
|
| 1458 |
+
],
|
| 1459 |
+
"page_idx": 11
|
| 1460 |
+
},
|
| 1461 |
+
{
|
| 1462 |
+
"type": "text",
|
| 1463 |
+
"text": "Dmitry Molchanov, Arsenii Ashukha, and Dmitry Vetrov. Variational dropout sparsifies deep neural networks. ICML, 2017a. ",
|
| 1464 |
+
"bbox": [
|
| 1465 |
+
173,
|
| 1466 |
+
356,
|
| 1467 |
+
823,
|
| 1468 |
+
386
|
| 1469 |
+
],
|
| 1470 |
+
"page_idx": 11
|
| 1471 |
+
},
|
| 1472 |
+
{
|
| 1473 |
+
"type": "text",
|
| 1474 |
+
"text": "Pavlo Molchanov, Stephen Tyree, Tero Karras, Timo Aila, and Jan Kautz. Pruning convolutional neural networks for resource efficient inference. ICLR, 2017b. ",
|
| 1475 |
+
"bbox": [
|
| 1476 |
+
173,
|
| 1477 |
+
392,
|
| 1478 |
+
823,
|
| 1479 |
+
421
|
| 1480 |
+
],
|
| 1481 |
+
"page_idx": 11
|
| 1482 |
+
},
|
| 1483 |
+
{
|
| 1484 |
+
"type": "text",
|
| 1485 |
+
"text": "Michael C Mozer and Paul Smolensky. Skeletonization: A technique for trimming the fat from a network via relevance assessment. NIPS, 1989. ",
|
| 1486 |
+
"bbox": [
|
| 1487 |
+
173,
|
| 1488 |
+
428,
|
| 1489 |
+
823,
|
| 1490 |
+
458
|
| 1491 |
+
],
|
| 1492 |
+
"page_idx": 11
|
| 1493 |
+
},
|
| 1494 |
+
{
|
| 1495 |
+
"type": "text",
|
| 1496 |
+
"text": "Sharan Narang, Erich Elsen, Gregory Diamos, and Shubho Sengupta. Exploring sparsity in recurrent neural networks. ICLR, 2017. ",
|
| 1497 |
+
"bbox": [
|
| 1498 |
+
176,
|
| 1499 |
+
464,
|
| 1500 |
+
823,
|
| 1501 |
+
493
|
| 1502 |
+
],
|
| 1503 |
+
"page_idx": 11
|
| 1504 |
+
},
|
| 1505 |
+
{
|
| 1506 |
+
"type": "text",
|
| 1507 |
+
"text": "Alexander Novikov, Dmitrii Podoprikhin, Anton Osokin, and Dmitry P Vetrov. Tensorizing neural networks. NIPS, 2015. ",
|
| 1508 |
+
"bbox": [
|
| 1509 |
+
174,
|
| 1510 |
+
500,
|
| 1511 |
+
823,
|
| 1512 |
+
530
|
| 1513 |
+
],
|
| 1514 |
+
"page_idx": 11
|
| 1515 |
+
},
|
| 1516 |
+
{
|
| 1517 |
+
"type": "text",
|
| 1518 |
+
"text": "Steven J Nowlan and Geoffrey E Hinton. Simplifying neural networks by soft weight-sharing. Neural Computation, 1992. ",
|
| 1519 |
+
"bbox": [
|
| 1520 |
+
173,
|
| 1521 |
+
536,
|
| 1522 |
+
823,
|
| 1523 |
+
565
|
| 1524 |
+
],
|
| 1525 |
+
"page_idx": 11
|
| 1526 |
+
},
|
| 1527 |
+
{
|
| 1528 |
+
"type": "text",
|
| 1529 |
+
"text": "Ameya Prabhu, Girish Varma, and Anoop Namboodiri. Deep expander networks: Efficient deep networks from graph theory. ECCV, 2018. ",
|
| 1530 |
+
"bbox": [
|
| 1531 |
+
171,
|
| 1532 |
+
571,
|
| 1533 |
+
823,
|
| 1534 |
+
602
|
| 1535 |
+
],
|
| 1536 |
+
"page_idx": 11
|
| 1537 |
+
},
|
| 1538 |
+
{
|
| 1539 |
+
"type": "text",
|
| 1540 |
+
"text": "Russell Reed. Pruning algorithms-a survey. Neural Networks, 1993. ",
|
| 1541 |
+
"bbox": [
|
| 1542 |
+
173,
|
| 1543 |
+
608,
|
| 1544 |
+
622,
|
| 1545 |
+
625
|
| 1546 |
+
],
|
| 1547 |
+
"page_idx": 11
|
| 1548 |
+
},
|
| 1549 |
+
{
|
| 1550 |
+
"type": "text",
|
| 1551 |
+
"text": "Abigail See, Minh-Thang Luong, and Christopher D Manning. Compression of neural machine translation models via pruning. CoNLL, 2016. ",
|
| 1552 |
+
"bbox": [
|
| 1553 |
+
173,
|
| 1554 |
+
631,
|
| 1555 |
+
818,
|
| 1556 |
+
661
|
| 1557 |
+
],
|
| 1558 |
+
"page_idx": 11
|
| 1559 |
+
},
|
| 1560 |
+
{
|
| 1561 |
+
"type": "text",
|
| 1562 |
+
"text": "Karen Simonyan and Andrew Zisserman. Very deep convolutional networks for large-scale image recognition. ICLR, 2015. ",
|
| 1563 |
+
"bbox": [
|
| 1564 |
+
173,
|
| 1565 |
+
666,
|
| 1566 |
+
823,
|
| 1567 |
+
696
|
| 1568 |
+
],
|
| 1569 |
+
"page_idx": 11
|
| 1570 |
+
},
|
| 1571 |
+
{
|
| 1572 |
+
"type": "text",
|
| 1573 |
+
"text": "Karen Ullrich, Edward Meeds, and Max Welling. Soft weight-sharing for neural network compression. ICLR, 2017. ",
|
| 1574 |
+
"bbox": [
|
| 1575 |
+
173,
|
| 1576 |
+
703,
|
| 1577 |
+
823,
|
| 1578 |
+
733
|
| 1579 |
+
],
|
| 1580 |
+
"page_idx": 11
|
| 1581 |
+
},
|
| 1582 |
+
{
|
| 1583 |
+
"type": "text",
|
| 1584 |
+
"text": "Andreas S Weigend, David E Rumelhart, and Bernardo A Huberman. Generalization by weightelimination with application to forecasting. NIPS, 1991. ",
|
| 1585 |
+
"bbox": [
|
| 1586 |
+
171,
|
| 1587 |
+
739,
|
| 1588 |
+
823,
|
| 1589 |
+
768
|
| 1590 |
+
],
|
| 1591 |
+
"page_idx": 11
|
| 1592 |
+
},
|
| 1593 |
+
{
|
| 1594 |
+
"type": "text",
|
| 1595 |
+
"text": "Wei Wen, Chunpeng Wu, Yandan Wang, Yiran Chen, and Hai Li. Learning structured sparsity in deep neural networks. NIPS, 2016. ",
|
| 1596 |
+
"bbox": [
|
| 1597 |
+
174,
|
| 1598 |
+
775,
|
| 1599 |
+
823,
|
| 1600 |
+
805
|
| 1601 |
+
],
|
| 1602 |
+
"page_idx": 11
|
| 1603 |
+
},
|
| 1604 |
+
{
|
| 1605 |
+
"type": "text",
|
| 1606 |
+
"text": "Sergey Zagoruyko. $9 2 . 4 5 \\%$ on cifar-10 in torch. Torch Blog, 2015. ",
|
| 1607 |
+
"bbox": [
|
| 1608 |
+
174,
|
| 1609 |
+
811,
|
| 1610 |
+
614,
|
| 1611 |
+
827
|
| 1612 |
+
],
|
| 1613 |
+
"page_idx": 11
|
| 1614 |
+
},
|
| 1615 |
+
{
|
| 1616 |
+
"type": "text",
|
| 1617 |
+
"text": "Sergey Zagoruyko and Nikos Komodakis. Wide residual networks. BMVC, 2016. ",
|
| 1618 |
+
"bbox": [
|
| 1619 |
+
174,
|
| 1620 |
+
834,
|
| 1621 |
+
707,
|
| 1622 |
+
849
|
| 1623 |
+
],
|
| 1624 |
+
"page_idx": 11
|
| 1625 |
+
},
|
| 1626 |
+
{
|
| 1627 |
+
"type": "text",
|
| 1628 |
+
"text": "Wojciech Zaremba, Ilya Sutskever, and Oriol Vinyals. Recurrent neural network regularization. arXiv preprint arXiv:1409.2329, 2014. ",
|
| 1629 |
+
"bbox": [
|
| 1630 |
+
173,
|
| 1631 |
+
856,
|
| 1632 |
+
821,
|
| 1633 |
+
886
|
| 1634 |
+
],
|
| 1635 |
+
"page_idx": 11
|
| 1636 |
+
},
|
| 1637 |
+
{
|
| 1638 |
+
"type": "text",
|
| 1639 |
+
"text": "Chiyuan Zhang, Samy Bengio, Moritz Hardt, Benjamin Recht, and Oriol Vinyals. Understanding deep learning requires rethinking generalization. ICLR, 2017. ",
|
| 1640 |
+
"bbox": [
|
| 1641 |
+
173,
|
| 1642 |
+
892,
|
| 1643 |
+
823,
|
| 1644 |
+
921
|
| 1645 |
+
],
|
| 1646 |
+
"page_idx": 11
|
| 1647 |
+
},
|
| 1648 |
+
{
|
| 1649 |
+
"type": "image",
|
| 1650 |
+
"img_path": "images/cc69ae2f5789c064a9d7ec25c2cae8be85125a7807f27c075058ab31684ccd3c.jpg",
|
| 1651 |
+
"image_caption": [
|
| 1652 |
+
"Figure 5: Results of pruning with SNIP on inverted (Fashion-)MNIST (i.e., dark and bright regions are swapped). Notably, even if the data is inverted, the results are the same as the ones on the original (Fashion-)MNIST in Figure 2. "
|
| 1653 |
+
],
|
| 1654 |
+
"image_footnote": [],
|
| 1655 |
+
"bbox": [
|
| 1656 |
+
200,
|
| 1657 |
+
138,
|
| 1658 |
+
797,
|
| 1659 |
+
330
|
| 1660 |
+
],
|
| 1661 |
+
"page_idx": 12
|
| 1662 |
+
},
|
| 1663 |
+
{
|
| 1664 |
+
"type": "image",
|
| 1665 |
+
"img_path": "images/7e10adb4cd3b78aa3523f4d7e8ead3c6621045e90fb560498f3758f598063b9e.jpg",
|
| 1666 |
+
"image_caption": [
|
| 1667 |
+
"Figure 6: Results of pruning with $\\partial L / \\partial$ w on the original and inverted (Fashion-)MNIST. Notably, compared to the case of using SNIP (Figures 2 and 5), the results are different: Firstly, the results on the original (Fashion-)MNIST (i.e., (a) and (c) above) are not the same as the ones using SNIP (i.e., (a) and (b) in Figure 2). Moreover, the pruning patterns are inconsistent with different sparsity levels, either intra-class or inter-class. Furthermore, using ${ \\partial L } / { \\partial \\mathbf { w } }$ results in different pruning patterns between the original and inverted data in some cases (e.g., the $2 ^ { \\mathrm { n d } }$ columns between (c) and (d)). "
|
| 1668 |
+
],
|
| 1669 |
+
"image_footnote": [],
|
| 1670 |
+
"bbox": [
|
| 1671 |
+
200,
|
| 1672 |
+
407,
|
| 1673 |
+
797,
|
| 1674 |
+
791
|
| 1675 |
+
],
|
| 1676 |
+
"page_idx": 12
|
| 1677 |
+
},
|
| 1678 |
+
{
|
| 1679 |
+
"type": "image",
|
| 1680 |
+
"img_path": "images/2c60ed92201d216f7acfecb7839cd7dcf12f0266b4e0e0b0daf88b490479c204.jpg",
|
| 1681 |
+
"image_caption": [
|
| 1682 |
+
"Figure 7: The effect of varying sparsity levels $\\left( \\hat { \\kappa } \\right)$ . The lower $\\bar { \\kappa }$ becomes, the lower training loss is recorded, meaning that a network with more parameters is more vulnerable to fitting random labels. Recall, however, that all pruned models are able to learn to perform the classification task without losing much accuracy (see Figure 1). This potentially indicates that the pruned network does not have sufficient capacity to fit the random labels, but it is capable of performing the classification. "
|
| 1683 |
+
],
|
| 1684 |
+
"image_footnote": [],
|
| 1685 |
+
"bbox": [
|
| 1686 |
+
315,
|
| 1687 |
+
146,
|
| 1688 |
+
676,
|
| 1689 |
+
364
|
| 1690 |
+
],
|
| 1691 |
+
"page_idx": 13
|
| 1692 |
+
},
|
| 1693 |
+
{
|
| 1694 |
+
"type": "text",
|
| 1695 |
+
"text": "C TINY-IMAGENET ",
|
| 1696 |
+
"text_level": 1,
|
| 1697 |
+
"bbox": [
|
| 1698 |
+
174,
|
| 1699 |
+
491,
|
| 1700 |
+
346,
|
| 1701 |
+
507
|
| 1702 |
+
],
|
| 1703 |
+
"page_idx": 13
|
| 1704 |
+
},
|
| 1705 |
+
{
|
| 1706 |
+
"type": "table",
|
| 1707 |
+
"img_path": "images/a890875fcc5d4f00a5d82860fb17b436412cb4053d5263657ca571f91ea9cdab.jpg",
|
| 1708 |
+
"table_caption": [],
|
| 1709 |
+
"table_footnote": [],
|
| 1710 |
+
"table_body": "<table><tr><td>Architecture</td><td>Model</td><td>Sparsity (%)</td><td># Parameters</td><td>Error (%)</td><td>△</td></tr><tr><td rowspan=\"5\">Convolutional</td><td>AlexNet-s</td><td>90.0</td><td>5.1m → 507k</td><td>62.52 → 65.27</td><td>+2.75</td></tr><tr><td>AlexNet-b</td><td>90.0</td><td>8.5m → 849k</td><td>62.76 → 65.54</td><td>+2.78</td></tr><tr><td>VGG-C</td><td>95.0</td><td>10.5m → 526k</td><td>56.49 → 57.48</td><td>+0.99</td></tr><tr><td>VGG-D</td><td>95.0</td><td>15.2m → 762k</td><td>56.85 → 57.00</td><td>+0.15</td></tr><tr><td>VGG-like</td><td>95.0</td><td>15.0m → 749k</td><td>54.86 → 55.73</td><td>+0.87</td></tr></table>",
|
| 1711 |
+
"bbox": [
|
| 1712 |
+
209,
|
| 1713 |
+
526,
|
| 1714 |
+
789,
|
| 1715 |
+
618
|
| 1716 |
+
],
|
| 1717 |
+
"page_idx": 13
|
| 1718 |
+
},
|
| 1719 |
+
{
|
| 1720 |
+
"type": "text",
|
| 1721 |
+
"text": "Table 4: Pruning results of SNIP on Tiny-ImageNet (before after). Tiny-ImageNet2 is a subset of the full ImageNet: there are 200 classes in total, each class has 500 and 50 images for training and validation respectively, and each image has the spatial resolution of $6 4 \\times 6 4$ . Compared to CIFAR-10, the resolution is doubled, and to deal with this, the stride of the first convolution in all architectures is doubled, following the standard practice for this dataset. In general, the Tiny-ImageNet classification task is considered much more complex than MNIST or CIFAR-10. Even on Tiny-ImageNet, however, SNIP is still able to prune a large amount of parameters with minimal loss in performance. AlexNet models lose more accuracies than VGGs, which may be attributed to the fact that the first convolution stride for AlexNet is set to be 4 (by its design of no pooling) which is too large and could lead to high loss of information when pruned. ",
|
| 1722 |
+
"bbox": [
|
| 1723 |
+
173,
|
| 1724 |
+
628,
|
| 1725 |
+
826,
|
| 1726 |
+
768
|
| 1727 |
+
],
|
| 1728 |
+
"page_idx": 13
|
| 1729 |
+
},
|
| 1730 |
+
{
|
| 1731 |
+
"type": "table",
|
| 1732 |
+
"img_path": "images/c5b1c3e32d6a5912780b2b0fa9d9c37ee7cb52c76c52ffcb318e5b2010d8f23e.jpg",
|
| 1733 |
+
"table_caption": [
|
| 1734 |
+
"D ARCHITECTURE DETAILS "
|
| 1735 |
+
],
|
| 1736 |
+
"table_footnote": [],
|
| 1737 |
+
"table_body": "<table><tr><td rowspan=1 colspan=8>Module Weight Stride Bias BatchNorm ReLU</td></tr><tr><td rowspan=1 colspan=1>Conv</td><td rowspan=1 colspan=1>[11,11, 3,96]</td><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1>[2,2]</td><td rowspan=1 colspan=3>[96] √</td><td rowspan=1 colspan=1>√</td></tr><tr><td rowspan=1 colspan=1>Conv</td><td rowspan=1 colspan=1>[5,5,96,256]</td><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1>2j</td><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1>[256]</td><td rowspan=1 colspan=1>√</td><td rowspan=1 colspan=1></td></tr><tr><td rowspan=1 colspan=1>Conv</td><td rowspan=1 colspan=1>[3,3,256,384]</td><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1>2.2</td><td rowspan=1 colspan=2>[384]</td><td rowspan=1 colspan=2>√</td></tr><tr><td rowspan=1 colspan=1>Conv</td><td rowspan=1 colspan=1>[3,3,384,384]</td><td rowspan=1 colspan=1></td><td rowspan=1 colspan=5>[384]</td></tr><tr><td rowspan=1 colspan=1>Conv</td><td rowspan=1 colspan=1>[3,3,384,256]</td><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1>2,2</td><td rowspan=1 colspan=2>[256]</td><td rowspan=1 colspan=2>(</td></tr><tr><td rowspan=1 colspan=1>Linear</td><td rowspan=1 colspan=1>[256,1024 ×k]</td><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1></td><td rowspan=1 colspan=3>[1024×k] √</td><td rowspan=1 colspan=1>√</td></tr><tr><td rowspan=1 colspan=3>Linear [1024 × k,1024 ×k]</td><td rowspan=1 colspan=1></td><td rowspan=1 colspan=3>[1024 × k] √</td><td rowspan=1 colspan=1>√</td></tr><tr><td rowspan=1 colspan=8>Linear [1024 × k,c] [c] X X</td></tr></table>",
|
| 1738 |
+
"bbox": [
|
| 1739 |
+
248,
|
| 1740 |
+
136,
|
| 1741 |
+
748,
|
| 1742 |
+
267
|
| 1743 |
+
],
|
| 1744 |
+
"page_idx": 14
|
| 1745 |
+
},
|
| 1746 |
+
{
|
| 1747 |
+
"type": "table",
|
| 1748 |
+
"img_path": "images/68cf239c14c0b9bfb6938d081227ddbd93998f5c59b4860fc3ea76177decd0e5.jpg",
|
| 1749 |
+
"table_caption": [
|
| 1750 |
+
"Table 5: AlexNet-s $k = 1 ,$ ) and AlexNet-b $( k = 2 )$ ). In the last layer, $c$ denotes the number of possible classes: $c = 1 0$ for CIFAR-10 and $c = 2 0 0$ for Tiny-ImageNet. The strides in the first convolution layer for Tiny-ImageNet are set [4, 4] instead of [2, 2] to deal with the increase in the image resolution. "
|
| 1751 |
+
],
|
| 1752 |
+
"table_footnote": [],
|
| 1753 |
+
"table_body": "<table><tr><td>Module</td><td>Weight</td><td>Stride</td><td>Bias</td><td>BatchNorm</td><td>ReLU</td></tr><tr><td>Conv</td><td>[3,3,3,64]</td><td>[1,1]</td><td>[64]</td><td></td><td></td></tr><tr><td>Conv</td><td>[3,3, 64, 64]</td><td></td><td>[64]</td><td>广</td><td></td></tr><tr><td>Pool</td><td></td><td></td><td></td><td>×</td><td><>x></td></tr><tr><td>Conv</td><td>[3,3,64,128]</td><td>1j</td><td>[128]</td><td>√</td><td></td></tr><tr><td>Conv</td><td>[3,3,128,128]</td><td>1j</td><td>[128]</td><td>√</td><td>√</td></tr><tr><td>Pool</td><td></td><td>18E.83. 2</td><td></td><td>X</td><td>X</td></tr><tr><td>Conv</td><td>[3,3,128,256]</td><td></td><td>[256]</td><td>√</td><td></td></tr><tr><td>Conv</td><td>[3,3,256,256]</td><td>1</td><td>[256]</td><td></td><td></td></tr><tr><td>Conv</td><td>[1/3/3,1/3/3,256,256]</td><td>1j</td><td>[256]</td><td>√</td><td></td></tr><tr><td>Pool</td><td></td><td>2j</td><td></td><td>X</td><td>X</td></tr><tr><td>Conv</td><td>[3,3,256,512]</td><td>1</td><td>[512]</td><td></td><td></td></tr><tr><td>Conv</td><td>[3,3,512, 512]</td><td>1j</td><td>[512]</td><td></td><td></td></tr><tr><td>Conv</td><td>[1/3/3,1/3/3,512,512]</td><td>1j</td><td>[512]</td><td></td><td></td></tr><tr><td>Pool</td><td></td><td>2</td><td></td><td></td><td></td></tr><tr><td>Conv</td><td>[3,3,512, 512]</td><td>1j</td><td>[512]</td><td></td><td></td></tr><tr><td>Conv</td><td>[3,3, 512,512]</td><td>1]</td><td>[512]</td><td></td><td></td></tr><tr><td>Conv</td><td>[1/3/3,1/3/3,512,512]</td><td>1]</td><td>[512]</td><td></td><td></td></tr><tr><td>Pool</td><td></td><td></td><td></td><td>X</td><td></td></tr><tr><td>Linear</td><td>[512, 512]</td><td></td><td>[512]</td><td>√</td><td>√</td></tr><tr><td>Linear</td><td>[512, 512]</td><td></td><td>[512]</td><td>√</td><td>√</td></tr><tr><td>Linear</td><td>[512,c]</td><td></td><td>[c]</td><td>X</td><td>X</td></tr></table>",
|
| 1754 |
+
"bbox": [
|
| 1755 |
+
253,
|
| 1756 |
+
340,
|
| 1757 |
+
743,
|
| 1758 |
+
633
|
| 1759 |
+
],
|
| 1760 |
+
"page_idx": 14
|
| 1761 |
+
},
|
| 1762 |
+
{
|
| 1763 |
+
"type": "text",
|
| 1764 |
+
"text": "Table 6: VGG-C/D/like. In the last layer, $c$ denotes the number of possible classes: $c = 1 0$ for CIFAR10 and $c = 2 0 0$ for Tiny-ImageNet. The strides in the first convolution layer for Tiny-ImageNet are set [2, 2] instead of [1, 1] to deal with the increase in the image resolution. The second Linear layer is only used in VGG-C/D. ",
|
| 1765 |
+
"bbox": [
|
| 1766 |
+
174,
|
| 1767 |
+
645,
|
| 1768 |
+
825,
|
| 1769 |
+
700
|
| 1770 |
+
],
|
| 1771 |
+
"page_idx": 14
|
| 1772 |
+
}
|
| 1773 |
+
]
|
parse/train/B1VZqjAcYX/B1VZqjAcYX_middle.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/train/B1VZqjAcYX/B1VZqjAcYX_model.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/train/BkVsEMYel/BkVsEMYel.md
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/train/BkVsEMYel/BkVsEMYel_content_list.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/train/BkVsEMYel/BkVsEMYel_middle.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/train/BkVsEMYel/BkVsEMYel_model.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/train/BkmM8Dceg/BkmM8Dceg.md
ADDED
|
@@ -0,0 +1,322 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# WARPED CONVOLUTIONS: EFFICIENT INVARIANCE TO SPATIAL TRANSFORMATIONS
|
| 2 |
+
|
| 3 |
+
João F. Henriques & Andrea Vedaldi
|
| 4 |
+
Visual Geometry Group
|
| 5 |
+
University of Oxford
|
| 6 |
+
{joao,vedaldi}@robots.ox.ac.uk
|
| 7 |
+
|
| 8 |
+
# ABSTRACT
|
| 9 |
+
|
| 10 |
+
Convolutional Neural Networks (CNNs) are extremely efficient, since they exploit the inherent translation-invariance of natural images. However, translation is just one of a myriad of useful spatial transformations. Can the same efficiency be attained when considering other spatial invariances? Such generalized convolutions have been considered in the past, but at a high computational cost. We present a construction that is simple and exact, yet has the same computational complexity that standard convolutions enjoy. It consists of a constant image warp followed by a simple convolution, which are standard blocks in deep learning toolboxes. With a carefully crafted warp, the resulting architecture can be made equivariant to a wide range of 2-parameters spatial transformations. We show encouraging results in realistic scenarios, including the estimation of vehicle poses in the Google Earth dataset (rotation and scale), and face poses in Annotated Facial Landmarks in the Wild (3D rotations under perspective).
|
| 11 |
+
|
| 12 |
+
# 1 INTRODUCTION
|
| 13 |
+
|
| 14 |
+
A crucial aspect of current deep learning architectures is the encoding of invariances. This fact is epitomized in the success of convolutional neural networks (CNN), where equivariance to image translation is key: translating the input results in a translated output. When invariances are present in the data, encoding them explicitly in an architecture provides an important source of regularization, which allows to reduce the amount of training data required for learning. Invariances may also be used to improve the efficiency of implementations; for instance, a convolutional layer requires orders of magnitude less memory and also less computation compared to an equivalent fully-connected layer.
|
| 15 |
+
|
| 16 |
+
The success of CNNs indicates that translation invariance is an important property of images. However, this does not explain why translation equivariant operators work well for image understanding. The common interpretation is that such operators are matched to the statistics of natural images, which are well known to be translation invariant (Hyvärinen et al., 2009). However, natural image statistics are also (largely) invariant to other transformations such as isotropic scaling and rotation, which suggests that alternative neural network designs may also work well with images. Furthermore, in specific applications, invariances other than translation may be more appropriate.
|
| 17 |
+
|
| 18 |
+
Therefore, it is natural to consider generalizing convolutional architectures to other image transformations, and this has been the subject of extensive study (Kanazawa et al., 2014; Bruna et al., 2013; Cohen & Welling, 2016). Unfortunately these approaches do not possess the same memory and speed benefits that CNNs enjoy. The reason is that, ultimately, they have to transform (warp) an image or filter several times (Kanazawa et al., 2014; Marcos et al., 2016; Dieleman et al., 2015), incurring a high computational burden. Another approach is to consider a basis of filters (analogous to eigen-images) encoding the desired invariance (Cohen & Welling, 2014; Bruna et al., 2013; Cohen & Welling, 2016), which requires more storage than a convolutional filter.
|
| 19 |
+
|
| 20 |
+
Although they are able to handle transformations with many pose parameters, in practice most recent proposals are limited to very coarsely discretized transformations, such as horizontal/vertical flips and $9 0 ^ { \circ }$ rotations (Dieleman et al., 2015; Cohen & Welling, 2014).
|
| 21 |
+
|
| 22 |
+
In this work we propose a generalization of CNNs that overcomes these disadvantages. Our main result shows that a linear layer with equivariance w.r.t. a large class of 2-parameters transformations can always be implemented efficiently, using a standard convolution in a warped image space. The image warp can be implemented using bilinear resampling, a simple and fast operation that has been popularized by spatial transformer networks (Jaderberg et al., 2015), and is part of most deep learning toolboxes. Unlike previous proposals, the proposed warped convolutions can handle continuous transformations, such as fine rotation and scaling.
|
| 23 |
+
|
| 24 |
+
This makes generalized convolution easily implementable in neural networks, including using fast convolution algorithms on GPU hardware, such as Winograd (Lavin, 2015) or the Fast Fourier Transform (Lyons, 2010). We present these notions in the simplest possible way (sections 2 to 4), but we note that they can be derived in broader generality from well know concepts of group theory (section 4.2).
|
| 25 |
+
|
| 26 |
+
# 2 GENERALIZING CONVOLUTION
|
| 27 |
+
|
| 28 |
+
# 2.1 CONVOLUTIONS OF CONTINUOUS IMAGES
|
| 29 |
+
|
| 30 |
+
We start by looking at the basic building block of CNNs, i.e. the convolution operator. This operator computes the inner product of an image $\boldsymbol { I } \in \mathbb { R } ^ { m \times n }$ with a translated version of the filter $\boldsymbol { F } \in \mathbb { R } ^ { r \times s }$ , producing a new image as output:
|
| 31 |
+
|
| 32 |
+
$$
|
| 33 |
+
H _ { j } = \sum _ { k } I _ { k } F _ { k + j } ,
|
| 34 |
+
$$
|
| 35 |
+
|
| 36 |
+
where $k$ ${ \mathfrak { a } } , { \mathfrak { j } } \in \mathbb { Z } ^ { 2 }$ are two-dimensional vectors of indexes, and the summation ranges inside the extents of both arrays.1 To handle continuous deformations of the input, it is more natural to express eq. 1 as an integral over continuous rather than discrete inputs:
|
| 37 |
+
|
| 38 |
+
$$
|
| 39 |
+
H ( u ; I ) = \int I ( x ) F ( x + u ) d x ,
|
| 40 |
+
$$
|
| 41 |
+
|
| 42 |
+
where $I ( x )$ and $F ( x )$ are continuous functions over a bounded 2D region $\Omega \subset \mathbb { R } ^ { 2 }$ , that is: $I , F :$ $\Omega \to \mathbb { R }$ . The real-valued 2D vectors $x \in \Omega$ now play the role of the indexes $k \in { \mathbb { Z } } ^ { 2 }$ . Equation 2 reduces to the discrete case of eq. 1 if we define $I ( x )$ and $F ( x )$ as the sum of delta functions on grids. Intermediate values can be obtained by interpolation, such as bilinear (which amounts to convolution of the delta functions with a triangle filter (Jaderberg et al., 2015)). Importantly, such continuous images can be deformed by very rich continuous transformations of the input coordinates, whereas strictly discrete operations would be more limiting.
|
| 43 |
+
|
| 44 |
+
Over the next sections it will be more convenient to translate the image $I$ instead of the filter $F$ . This alternative form of eq. 2 is obtained by replacing $x + u x$ :
|
| 45 |
+
|
| 46 |
+
$$
|
| 47 |
+
H ( u ; I ) = \int I ( x - u ) F ( x ) d x .
|
| 48 |
+
$$
|
| 49 |
+
|
| 50 |
+
# 2.2 BEYOND IMAGE TRANSLATIONS
|
| 51 |
+
|
| 52 |
+
The standard convolution operator of eq. 3 can be interpreted as applying the filter to translated versions of the image. Translations can be replaced by other transformations as follows (Henriques et al., 2014):
|
| 53 |
+
|
| 54 |
+
$$
|
| 55 |
+
H ( t ; I ) = \int I ( t ( x ) ) F ( x ) d x , \quad t \in G
|
| 56 |
+
$$
|
| 57 |
+
|
| 58 |
+
where $G$ is a set of transformation functions $t : \Omega \to \Omega$ (assumed to be invertible). Intuitively, this generalized convolution performs an exhaustive search for a pattern, at many different poses (Henriques et al., 2014; Kanazawa et al., 2014). The interest in this definition lies in the fact that it makes convolution equivariant (Lenc & Vedaldi, 2015):
|
| 59 |
+
|
| 60 |
+
Lemma 1 (Equivariance). Consider the generalized convolution operator $H ( t ; I )$ of eq. 4. Generalized convolution “commutes” with any transformation $q \in G$ of the image:
|
| 61 |
+
|
| 62 |
+
$$
|
| 63 |
+
H ( t ; I \circ q ) = H ( q \circ t ; I ) .
|
| 64 |
+
$$
|
| 65 |
+
|
| 66 |
+
Proof. One has immediately $\begin{array} { r } { H ( t ; I \circ q ) = \int I ( q ( t ( x ) ) ) F ( x ) d x = H ( q \circ t ; I ) . } \end{array}$
|
| 67 |
+
|
| 68 |
+
A notable case is when transformations have an additive parametrization $t : \Omega \times \mathbb { R } ^ { 2 } \to \Omega$ , with $( x , u ) \mapsto t _ { u } ( x )$ and $t _ { u } \circ t _ { v } = t _ { u + v }$ . In this case, the equivariance relation can be written as
|
| 69 |
+
|
| 70 |
+
$$
|
| 71 |
+
H ( u ; I \circ t _ { v } ) = H ( v + u ; I ) .
|
| 72 |
+
$$
|
| 73 |
+
|
| 74 |
+
In particular, standard convolution is obtained when $t _ { u } ( x ) = x - u$ is the translation operator. In this case, the lemma above simply states that any translation of the input of the convolution results in a corresponding translation of the output.
|
| 75 |
+
|
| 76 |
+
In section 5, we will look in more detail at a few concrete examples of transformations other than translations. Although we will not do so explicitly, in this construction it is also possible to let one or more dimensions of the parameter space $\mathbb { R } ^ { \bar { 2 } }$ be given modulus a period $Q$ , in the sense of replacing $\mathbb { R }$ with $\mathbb { R } / \mathbb { Z } ( Q )$ ; the latter is required to parameterise transformations such as rotation.
|
| 77 |
+
|
| 78 |
+
# 3 COMPUTATIONAL EFFICIENCY
|
| 79 |
+
|
| 80 |
+
Unfortunately, what eq. 4 gains us in generality, it loses in both performance and ease of implementation. Most works in computer vision that looked at filtering under generalized transformations (e.g. scale pyramids (Kanazawa et al., 2014) or rotated filter banks (Marcos et al., 2016; Cohen & Welling, 2014; 2016; Henriques et al., 2014)) compute eq. 4 directly by evaluating a large number of transformations $t \in G$ . This entails warping (transforming) either the image or the filter once per transformation $t$ , which can be expensive.
|
| 81 |
+
|
| 82 |
+
Opting to transform the filter instead of the image can be advantageous, since it is smaller in size. On the other hand, the filter and its domain then become spatially-varying, which foregoes the benefit of the regular, predictable, and local pattern of computations in standard convolution. It precludes the use of fast convolution routines such as Winograd’s algorithm (Lavin, 2015), or the Fast Fourier Transform (Lyons, 2010), which has lower computational complexity than exhaustive search (eq. 3).
|
| 83 |
+
|
| 84 |
+
In practice, most recent works focus on very coarse transformations that do not change the filter support and can be implemented strictly via permutations, like horizontal/vertical flips and $9 0 ^ { \circ }$ rotations (Dieleman et al., 2015; Cohen & Welling, 2014). Such difficulties explain why generalized convolutions are not as widespread as CNNs.
|
| 85 |
+
|
| 86 |
+
In section 4 we will show that, for an important class of transformations, including the ones considered in previous works (such as Kanazawa et al. (2014); Cohen & Welling (2014); Marcos et al. (2016)) it is possible to perform generalized convolution by composing a single warp with a standard convolution, instead of several warps. Thus, we are able to take full advantage of modern convolution implementations (Lavin, 2015; Lyons, 2010), including those with lower computational complexity.
|
| 87 |
+
|
| 88 |
+
# 4 MAIN RESULT
|
| 89 |
+
|
| 90 |
+
Our main contribution is to show that the generalized convolution operator of eq. 4 can be implemented efficiently by a standard convolution, by pre-warping the input image and filter appropriately. The warp is the same for any image, depending solely on the nature of the relevant transformations, and can be written in closed form. This result, given in theorem 1, allows us to implement very efficient generalized convolutions using simple computational blocks, as shown in section 4.1. We name this method warped convolution.
|
| 91 |
+
|
| 92 |
+
The strongest assumption is that transformations must have an additive parametrization. By this, we mean that there exists a bijection $t _ { u } : \Omega \to \Omega$ such that, for any $u , v \in \mathbb { R } ^ { 2 }$ , parameters compose additively $t _ { u } \circ t _ { v } = t _ { u + v }$ . The second assumption is that there exists a pivot point $x _ { 0 } \in \Omega$ such that $u \mapsto t _ { u } ( x _ { 0 } )$ defines a bijection $\mathbb { R } ^ { 2 } \to \Omega$ from the parameter space to the real plane. The latter requirements means that any point $x \in \Omega$ can be “reached” by transforming $x _ { 0 }$ under a suitable $t _ { u }$ . We then have that:
|
| 93 |
+
|
| 94 |
+
Theorem 1. Consider the generalized convolution of eq. 4. Assume that the transformation is additive $( t _ { u } \circ t _ { v } = t _ { u + v . }$ ). Assume also that, for a fixed pivot point $x _ { 0 }$ , the function $u \mapsto t _ { u } ( x _ { 0 } )$ is bijective. Then we can rewrite generalized convolution (eq. 4) as the standard convolution
|
| 95 |
+
|
| 96 |
+
$$
|
| 97 |
+
H ( u ; I ) = \int \hat { I } ( u + v ) \hat { F } ( v ) d v ,
|
| 98 |
+
$$
|
| 99 |
+
|
| 100 |
+
where $\hat { I }$ and $\hat { F }$ are the warped image and filter given by:
|
| 101 |
+
|
| 102 |
+
$$
|
| 103 |
+
\hat { I } ( u ) = I ( t _ { u } ( x _ { 0 } ) ) , \qquad \hat { F } ( u ) = F ( t _ { u } ( x _ { 0 } ) ) \left| \frac { d t _ { u } ( x _ { 0 } ) } { d u } \right| .
|
| 104 |
+
$$
|
| 105 |
+
|
| 106 |
+
Proof. We use the variable substitution $x = t _ { v } ( x _ { 0 } )$ in eq. 4. Then:
|
| 107 |
+
|
| 108 |
+
$$
|
| 109 |
+
\begin{array} { l } { H ( u ; I ) = \displaystyle \int I ( t _ { u } ( x ) ) F ( x ) d x } \\ { \displaystyle = \int I ( t _ { u } ( t _ { v } ( x _ { 0 } ) ) ) F ( t _ { v } ( x _ { 0 } ) ) \left| \frac { d t _ { v } ( x _ { 0 } ) } { d v } \right| d v } \\ { \displaystyle = \int \underbrace { I ( t _ { u + v } ( x _ { 0 } ) ) } _ { \hat { I } ( u + v ) } \underbrace { F ( t _ { v } ( x _ { 0 } ) ) \left| \frac { d t _ { v } ( x _ { 0 } ) } { d v } \right| } _ { \hat { F } ( v ) } d v } \\ { \displaystyle = \int \hat { I } ( u + v ) \hat { F } ( v ) d v . } \end{array}
|
| 110 |
+
$$
|
| 111 |
+
|
| 112 |
+
The warp that is applied to both inputs in eq. 7 can be interpreted as follows. We start with an arbitrary pivot point $x _ { 0 }$ in the image and them sample other points by repeatedly applying the transformation $t _ { u } ( x _ { 0 } )$ to the pivot (by varying $u$ ). When discretized, this sampling is performed over a 2D grid of parameters $u$ . Finally, sampling the input at these points (for example, by bilinear interpolation) yields the warped input.
|
| 113 |
+
|
| 114 |
+
An illustration is given in fig. 1, for various transformations (each one is discussed in more detail in section 5). The red dot shows the pivot point $x _ { 0 }$ , and the two arrows pointing away from it show the two directions of increasing $u$ values (recall that transformation parameters are two-dimensional). The grids were generated by sampling $u$ at regular intervals. Note that the warp grids are independent of the image contents – they can be computed once offline and then applied to any image.
|
| 115 |
+
|
| 116 |
+
The last factor in eq. 7 is the determinant of the Jacobian of the image transformation $t$ . It rescales the image values to account for the stretching and shrinking of space due to non-linear warps. It can also be computed offline, and its application amounts to an element-wise product by a constant array. A generalization using group theory is discussed in section 4.2.
|
| 117 |
+
|
| 118 |
+
# 4.1 PRACTICAL CONSIDERATIONS
|
| 119 |
+
|
| 120 |
+
There are a few interesting aspects that simplify the use of theorem 1 in practice.
|
| 121 |
+
|
| 122 |
+
First, since in most applications the filter $F$ is learned, we are free to ignore the constant warp and Jacobian in eq. 7 (which amounts to a simple reparametrization), and learn $\hat { F }$ directly. In practice, this means that we warp only the input image $I$ to obtain $\hat { I }$ , and then perform a standard convolution with a filter $\hat { F }$ . The learned warped filter $\hat { F }$ has a one-to-one correspondence to an image-space filter $F$ by means of eq. 7, although there is no real need to build the latter explicitly.
|
| 123 |
+
|
| 124 |
+
Second, we can choose either one or two spatial transformations for the generalized convolution (e.g. scale and rotation, simultaneously). The reason is that the input image is 2D, so the parameterspace after warping is also 2D. The choice is not arbitrary though: the two transformations must commute, in order to respect additivity. This will be the case of the pairs we study in section 5.
|
| 125 |
+
|
| 126 |
+
# Algorithm 1 Warped convolution.
|
| 127 |
+
|
| 128 |
+
Grid generation (offline)
|
| 129 |
+
|
| 130 |
+
• Apply the spatial transformation $t$ repeatedly to a pivot point $x _ { 0 }$ , using a 2D grid of parameters $\stackrel { \cdot } { u } = \{ \bar { ( } u _ { 1 } + i \delta _ { 1 } , u _ { 2 } + j \delta _ { 2 } ) : i = 0 , \ldots , m , j = 0 , \bar { \ldots } , n \}$ , obtaining the 2D warp grid $t _ { u } ( x _ { 0 } )$ .
|
| 131 |
+
|
| 132 |
+
Warped convolution
|
| 133 |
+
|
| 134 |
+
1. Resample input image $I$ using the warp grid $t _ { u } ( x _ { 0 } )$ , by bilinear interpolation.
|
| 135 |
+
|
| 136 |
+
2. Convolve the warped image $\hat { I }$ with filter $\hat { F }$ .
|
| 137 |
+
|
| 138 |
+
By theorem 1, these steps are equivalent to a generalized convolution, which performs an exhaustive search across the pose-space of transformation $t$ , but at a much lower computational cost.
|
| 139 |
+
|
| 140 |
+
# 4.2 RELATIONSHIP TO GROUP THEORY
|
| 141 |
+
|
| 142 |
+
This section relates our results, which have been presented using a simple formalism and in a restricted setting, to a more general approach based on group theory (Folland, 1995).
|
| 143 |
+
|
| 144 |
+
To this end, let $G$ be a group of transformations. Under very mild conditions (the group has to be locally compact and Hausdorff), there exists a unique measure on the group, the Haar measure, which is invariant to the group action, in the sense that, given a measurable function ${ \tilde { I } } : G \to$ $\mathbb { R }$ , then $\begin{array} { r } { \int \tilde { I } ( g ^ { \prime } g ) d g = \int \overline { { \tilde { I } } } ( g ) \dot { } d g } \end{array}$ . Using this measure, one can define generalized convolution as $\begin{array} { r } { ( \tilde { I } * \tilde { F } ) ( t ) = \int _ { G } \tilde { I } ( t g ) \tilde { F } ( g ^ { - 1 } ) d g } \end{array}$ . This resembles our definition (4), although image and filter are defined on the group $G$ instead of the spatial domain $\mathbb { R } ^ { 2 }$ . Lemma 1 translates immediately to this case (Folland, 1995).
|
| 145 |
+
|
| 146 |
+
In order to extend Theorem 1, we need to make this general but abstract construction concrete. Here one assumes that the group acts transitively on a subset $X \subset \mathbb { R } ^ { 2 }$ (which means that any point $x \in X$ can be written as $x = g x _ { 0 }$ , for a fixed point $x _ { 0 } \in X$ and a suitable transformation $g \in G$ ). Then one can define the image as $\tilde { I } ( g ) = I ( g \bar { ( } x _ { 0 } ) )$ , where $I$ is a function of the spatial domain $X$ instead of the group $G$ , and likewise for the filter. Next, it is necessary to explicitly calculate the integral over $G$ . If the group is an Abelian (commutative) Lie group, then one can show that there exists a map $\exp : V \to G$ , the exponential map, defined on a vector space $V$ . Under commutativity, this map is also additive, in the sense that $\exp ( u ) \exp ( v ) = \exp ( u + v )$ . The structure of $V$ depends on the specific group, but under such restrictive conditions, it is a torus, which allows the calculation of $\textstyle \int { \tilde { I } } ( { \bar { g } } ) d g$ as $\begin{array} { r } { \int \tilde { I } ( \exp ( u ) x _ { 0 } ) d u . } \end{array}$ .
|
| 147 |
+
|
| 148 |
+
Finally, in order to swap integration over the group parameters with integration over space, one assumes that $x \ = \ \exp ( u ) x _ { 0 }$ defines a smooth bijection $V \ \ X$ , so that it is possible to use the change of variable $\dot { u } u ( x )$ where $\mathrm { e x p } ( u ( x ) ) x _ { 0 } = x$ . This allows writing the integral as $\begin{array} { r } { \int { \tilde { I } } ( \exp ( u ) x _ { 0 } ) d u = \int I ( x ) \left| d u / d x \right| d x } \end{array}$ . Note that this Jacobian is the inverse of the one found in (1) due to the fact that we started by defining our convolution using $I$ instead of $\tilde { I }$ .
|
| 149 |
+
|
| 150 |
+
# 5 EXAMPLES OF SPATIAL TRANSFORMATIONS
|
| 151 |
+
|
| 152 |
+
We now give some concrete examples of pairs of spatial transformations that obey the conditions of theorem 1, and can be useful in practice.
|
| 153 |
+
|
| 154 |
+
# 5.1 SCALE AND ASPECT RATIO
|
| 155 |
+
|
| 156 |
+
Detection tasks require predicting the extent of an object as a bounding box. While the location can be found accurately by a standard CNN, which is equivariant to translation, the size prediction could similarly benefit from equivariance to horizontal and vertical scale (equivalently, scale and aspect ratio).
|
| 157 |
+
|
| 158 |
+
Such a spatial transformation, from which a warp can be constructed, is given by:
|
| 159 |
+
|
| 160 |
+

|
| 161 |
+
Figure 1: First row: Sampling grids that define the warps associated with different spatial transformations. Second row: An example image (a) after warping with each grid (b-d). Third row: A small translation is applied to each warped image, which is then mapped back to the original space (by an inverse warp). Translation in one axis of the appropriate warped space is equivalent to (b) horizontal scaling; (c) planar rotation; (d) 3D rotation around the vertical axis.
|
| 162 |
+
|
| 163 |
+
$$
|
| 164 |
+
t _ { u } ( x ) = { \left[ \begin{array} { l } { x _ { 1 } s ^ { u _ { 1 } } } \\ { x _ { 2 } s ^ { u _ { 2 } } } \end{array} \right] }
|
| 165 |
+
$$
|
| 166 |
+
|
| 167 |
+
The $s$ constant controls the total degree of scaling applied. Notice that the output must be exponential in the scale parameters $u$ ; this ensures the additive structure required by theorem 1: $t _ { u } ( \bar { t } _ { v } ( x ) ) =$ $t _ { u + v } ( x )$ . The resulting warp grid can be visualized in fig. 1-b. In this case, the domain of the image must be $\Omega \in \mathbb { R } _ { + } ^ { 2 }$ , since a pivot $x _ { 0 }$ in one quadrant cannot reach another quadrant by any amount of (positive) scaling.
|
| 168 |
+
|
| 169 |
+
# 5.2 SCALE AND ROTATION (LOG-POLAR WARP)
|
| 170 |
+
|
| 171 |
+
Planar scale and rotation are perhaps the most obvious spatial transformations in images, and are a natural test case for works on spatial transformations (Kanazawa et al., 2014; Marcos et al., 2016). Rotating a point $x$ by $u _ { 1 }$ radians and scaling it by $u _ { 2 }$ , around the origin, can be performed with
|
| 172 |
+
|
| 173 |
+
$$
|
| 174 |
+
t _ { u } ( x ) = \left[ \begin{array} { l } { s ^ { u _ { 2 } } \left\| x \right\| \cos ( \mathrm { a t a n } _ { 2 } ( x _ { 2 } , x _ { 1 } ) + u _ { 1 } ) } \\ { s ^ { u _ { 2 } } \left\| x \right\| \sin ( \mathrm { a t a n } _ { 2 } ( x _ { 2 } , x _ { 1 } ) + u _ { 1 } ) } \end{array} \right] ,
|
| 175 |
+
$$
|
| 176 |
+
|
| 177 |
+
where atan $^ 2$ is the standard 4-quadrant inverse tangent function (atan2). The domain in this case must exclude the origin $( \Omega \in \dot { \mathbb { R } } ^ { 2 } \setminus \{ 0 \} )$ , since a pivot $x _ { 0 } = 0$ cannot reach any other points in the image by rotation or scaling.
|
| 178 |
+
|
| 179 |
+

|
| 180 |
+
Figure 2: Equivariant pose estimation strategy used in the experiments (section 6). With an appropriate warp and a standard CNN, the shaded block becomes equivalent to a generalized CNN (by theorem 1), which performs exhaustive searches across pose-space instead of image-space.
|
| 181 |
+
|
| 182 |
+
The resulting warp grid can be visualized in fig. 1-c. It is interesting to observe that it corresponds exactly to the log-polar domain, which is used in the signal processing literature to perform correlation across scale and rotation (Tzimiropoulos et al., 2010; Reddy & Chatterji, 1996). In fact, it was the source of inspiration for this work, which can be seen as a generalization of the log-polar domain to other spatial transformations.
|
| 183 |
+
|
| 184 |
+
# 5.3 3D SPHERE ROTATION UNDER PERSPECTIVE
|
| 185 |
+
|
| 186 |
+
We will now tackle a more difficult spatial transformation, in an attempt to demonstrate the generality of theorem 1. The transformations we will consider are yaw and pitch rotations in 3D space, as seen by a perspective camera. In the experiments (section 6) we will show how to apply it to face pose estimation.
|
| 187 |
+
|
| 188 |
+
In order to maintain additivity, the rotated 3D points must remain on the surface of a sphere. We consider a simplified camera and world model, whose only hyperparameters are a focal length $f$ , the radius of a sphere $r$ , and its distance from the camera center $d$ . The equations for the spatial transformation corresponding to yaw and pitch rotation under this model are in appendix A.
|
| 189 |
+
|
| 190 |
+
The corresponding warp grid can be seen in fig. 1-d. It can be observed that the grid corresponds to what we would expect of a 3D rendering of a sphere with a discrete mesh. An intuitive picture of the effect of the warp grid in such cases is that it wraps the 2D image around the surface of the 3D object, so that translation in the warped space corresponds to moving between vertexes of the 3D geometry.
|
| 191 |
+
|
| 192 |
+
# 6 EXPERIMENTS
|
| 193 |
+
|
| 194 |
+
# 6.1 ARCHITECTURE
|
| 195 |
+
|
| 196 |
+
As mentioned in section 2.2, generalized convolution performs an exhaustive search for patterns across spatial transformations, by varying pose parameters. For tasks where invariance to that transformation is important, it is usual to pool the detection responses across all poses (Marcos et al., 2016; Kanazawa et al., 2014).
|
| 197 |
+
|
| 198 |
+
In the experiments, however, we will test the framework in pose prediction tasks. As such, we do not want to pool the detection responses (e.g. with a max operation) but rather find the pose with the strongest response (i.e., an argmax operation). To perform this operation in a differentiable manner, we implement a soft argmax operation, defined as follows:
|
| 199 |
+
|
| 200 |
+
$$
|
| 201 |
+
s _ { 1 } ( a ) = \sum _ { i j } ^ { m n } \frac { i } { m } \sigma _ { i j } ( a ) , \qquad s _ { 2 } ( a ) = \sum _ { i j } ^ { m n } \frac { j } { n } \sigma _ { i j } ( a ) ,
|
| 202 |
+
$$
|
| 203 |
+
|
| 204 |
+
where $\sigma ( a ) \in \mathbb { R } ^ { m \times n }$ is the softmax over all spatial locations, and $\sigma _ { i j } ( a )$ indexes the element at $( i , j )$ . The outputs are the two spatial coordinates of the maximum value, $s ( a ) \in \mathbb { R } ^ { 2 }$ .
|
| 205 |
+
|
| 206 |
+
Our base architecture then consists of the following blocks, outlined in fig. 2. First, the input image is warped with a pre-generated grid, according to section 4. The warped image is then processed by a standard CNN, which is now equivariant to the spatial transformation that was used to generate the warp grid. A soft argmax (eq. 10) then finds the maximum over pose-space. To ensure the pose prediction is well registered to the reference coordinate system, a learnable scale and bias are applied to the outputs. Training proceeds by minimizing the $L ^ { 1 }$ loss between the predicted pose and ground truth pose.
|
| 207 |
+
|
| 208 |
+
Table 1: Results of scale and rotation pose estimation of vehicles in the Google Earth dataset.
|
| 209 |
+
|
| 210 |
+
<table><tr><td></td><td>CNN+FC</td><td>CNN+softargmax</td><td> Warped CNN</td></tr><tr><td>Rotation error (degrees)</td><td>28.87</td><td>30.6</td><td>26.44</td></tr><tr><td>Scale error (px)</td><td>17.51</td><td>5.783</td><td>5.4</td></tr></table>
|
| 211 |
+
|
| 212 |
+

|
| 213 |
+
Figure 3: Example pose estimates (rotation and scale) on the Google Earth dataset (Section 6.2).
|
| 214 |
+
|
| 215 |
+
# 6.2 GOOGLE EARTH
|
| 216 |
+
|
| 217 |
+
For the first task in our experiments, we will consider aerial photos of vehicles, which have been used in several works that deal with rotation invariance (Liu et al., 2014; Schmidt & Roth, 2012; Henriques et al., 2014).
|
| 218 |
+
|
| 219 |
+
Dataset. The Google Earth dataset (Heitz & Koller, 2008) contains bounding box annotations, supplemented with angle annotations from (Henriques et al., 2014), for 697 vehicles in 15 large images. We use the first 10 for training and the rest for validation. Going beyond these previous works, we focus on the estimation of both rotation and scale parameters. The object scale is taken to be the diagonal length of the bounding box.
|
| 220 |
+
|
| 221 |
+
Implementation. A $4 8 \times 4 8$ image around each vehicle is cropped and downscaled by $50 \%$ , and then fed to a network for pose prediction. The proposed method, Warped CNN, follows the architecture of section 6.1 (visualized in fig. 2). The CNN block contains 3 convolutional layers with $5 \times 5$ filters, with 20, 50 and 1 output channels respectively. Recall that the output of the CNN block is a single-channel response map over 2D pose-space, which in this case consists of rotation and scale. Between the convolutional layers there are $3 \times 3$ max-pooling operators, with a stride of 2, and a ReLU before the last layer. All networks are trained for 20 epochs with SGD, using hyperparameters chosen by cross-validation.
|
| 222 |
+
|
| 223 |
+
Baselines and results. The results of the experiments are presented in table 1, which shows angular and scale error in the validation set. Qualitative results are shown in fig. 3. To verify whether the proposed warped convolution is indeed responsible for a boost in performance, rather than other architectural details, we compare it against a number of baselines with different components removed. The first baseline, CNN $^ +$ softargmax, consists of the same architecture but without the warp (section 5.2). This is a standard CNN, with the soft argmax at the end. Since CNNs are equivariant to translation, rather than scale and rotation, we observe a drop in performance. For the second baseline, $\mathrm { C N N + F C }$ , we replace the soft argmax with a fully-connected layer, to allow a prediction that is not equivariant with translation. The FC layer improves the angular error, but not the scale error. The proposed Warped CNN has a similar (slightly lower) capacity to the $\mathrm { C N N + F C }$ baseline, but we see it achieve better performance, since its architectural equivariance seems to be better matched to the data distribution.
|
| 224 |
+
|
| 225 |
+
Table 2: Results of yaw and pitch pose estimation of faces on the AFLW dataset.
|
| 226 |
+
|
| 227 |
+
<table><tr><td></td><td>CNN+FC</td><td>STN+FC</td><td> STN+softargmax</td><td> Warped CNN</td></tr><tr><td>Yaw err. (deg.)</td><td>13.87</td><td>16.92</td><td>15.01</td><td>10.65</td></tr><tr><td>Pitch err. (deg.)</td><td>7.23</td><td>10.17</td><td>6.88</td><td>6.351</td></tr></table>
|
| 228 |
+
|
| 229 |
+
# 6.3 FACES
|
| 230 |
+
|
| 231 |
+
We now turn to face pose estimation in unconstrained photos, which requires handling more complex 3D rotations under perspective.
|
| 232 |
+
|
| 233 |
+
Dataset. For this task we use the Annotated Facial Landmarks in the Wild (AFLW) dataset (Koestinger et al., 2011). It contains about 25K faces found in Flickr photos, and includes yaw (left-right) and pitch (up-down) annotations. We removed 933 faces with yaw larger than 90 degrees (i.e., facing away from the camera), resulting in a set of 24,384 samples. $20 \%$ of the faces were set aside for validation.
|
| 234 |
+
|
| 235 |
+
Implementation. The region in each face’s bounding box is resized to a $6 4 \times 6 4$ image, which is then processed by the network. Recall that our simplified 3D model of yaw and pitch rotation (section 5.3) assumes a spherical geometry. Although a person’s head roughly follows a spherical shape, the sample images are centered around the face, not the head. As such, we use an affine Spatial Transformer Network (STN) (Jaderberg et al., 2015) as a first step, to center the image correctly. Similarly, because the optimal camera parameters $( f , r$ and $d$ ) are difficult to set by hand, we let the network learn them, by computing their derivatives numerically (which has a low overhead, since they are scalars). The rest of the network follows the same diagram as before (fig. 2). The main CNN has 4 convolutional layers, the first two with $5 \times 5$ filters, the others being $9 \times 9$ . The numbers of output channels are 20, 50, 20 and 1, respectively. A $3 \times 3$ max-pooling with a stride of 2 is performed after the first layer, and there are ReLU non-linearities between the others. As for the STN, it has 3 convolutional layers $\mathrm { ( 5 \times 5 ) }$ , with 20, 50 and 6 output channels respectively, and $3 \times 3$ max-pooling (stride 2) between them.
|
| 236 |
+
|
| 237 |
+
Baselines and results. The angular error of the proposed equivariant pose estimation, Warped CNN, is shown in table 2, along with a number of baselines. Qualitative results are shown in fig. 4. The goal of these experiments is to demonstrate that it is possible to achieve equivariance to complex 3D rotations. We also wish to disentangle the performance benefits of the warped convolution from the other architectural aspects. The first baseline, $\mathrm { S T N + s }$ oftargmax, is the same as the proposed method, but without the warp. The large performance drop indicates that the spherical model incorporates important domain knowledge, which is ignored by a translation-equivariant STN. To allow nonequivariant models, we also test two other baselines where the softargmax is replaced with a fullyconnected (FC) layer. The $\mathrm { S T N + F C }$ includes an affine Spatial Transformer, while the $\mathrm { C N N + F C }$ does not, corresponding to a standard CNN of equivalent capacity. We observe that neither the FC or the STN components can account up for the performance of the warped convolution, which better exploits the natural 3D rotation equivariance of the data.
|
| 238 |
+
|
| 239 |
+
# 7 CONCLUSIONS
|
| 240 |
+
|
| 241 |
+
In this work we show that it is possible to reuse highly optimized convolutional blocks, which are equivariant to image translation, and coax them to exhibit equivariance to other operators, including 3D transformations. This is achieved by a simple warp of the input image, implemented with off-the-shelf components of deep networks, and can be used for image recognition tasks involving a large range of image transformations. Compared to other works, warped convolutions are simpler, relying on highly optimized convolution routines, and can flexibly handle many types of continuous transformations. Studying generalizations that support more than two parameters seems like a fruitful direction for future work. In addition to the practical aspects, our analysis offers some insights into the fundamental relationships between arbitrary image transformations and convolutional architectures.
|
| 242 |
+
|
| 243 |
+

|
| 244 |
+
Figure 4: Example pose estimates (yaw and pitch) on the AFLW dataset (Section 6.3).
|
| 245 |
+
|
| 246 |
+
# REFERENCES
|
| 247 |
+
|
| 248 |
+
Joan Bruna, Arthur Szlam, and Yann LeCun. Learning stable group invariant representations with convolutional networks. arXiv preprint arXiv:1301.3537, 2013.
|
| 249 |
+
|
| 250 |
+
Taco Cohen and Max Welling. Learning the Irreducible Representations of Commutative Lie Groups. In Proceedings of the 31st International Conference on Machine Learning (ICML-14), 2014.
|
| 251 |
+
|
| 252 |
+
Taco Cohen and Max Welling. Group equivariant convolutional networks. In Proceedings of the 33rd International Conference on Machine Learning (ICML-16), 2016.
|
| 253 |
+
|
| 254 |
+
Sander Dieleman, Kyle W Willett, and Joni Dambre. Rotation-invariant convolutional neural networks for galaxy morphology prediction. Monthly notices of the royal astronomical society, 450 (2):1441–1459, 2015.
|
| 255 |
+
|
| 256 |
+
Gerald B Folland. A course in abstract harmonic analysis. 1995.
|
| 257 |
+
|
| 258 |
+
Geremy Heitz and Daphne Koller. Learning spatial context: Using stuff to find things. In European Conference on Computer Vision, pp. 30–43. Springer, 2008.
|
| 259 |
+
|
| 260 |
+
J. F. Henriques, P. Martins, R. Caseiro, and J. Batista. Fast training of pose detectors in the fourier domain. In Advances in Neural Information Processing Systems, 2014.
|
| 261 |
+
|
| 262 |
+
Aapo Hyvärinen, Jarmo Hurri, and Patrick O Hoyer. Natural Image Statistics: A Probabilistic Approach to Early Computational Vision., volume 39. Springer Science & Business Media, 2009.
|
| 263 |
+
|
| 264 |
+
Max Jaderberg, Karen Simonyan, Andrew Zisserman, et al. Spatial transformer networks. In Advances in Neural Information Processing Systems, pp. 2017–2025, 2015.
|
| 265 |
+
|
| 266 |
+
Angjoo Kanazawa, Abhishek Sharma, and David Jacobs. Locally scale-invariant convolutional neural networks. arXiv preprint arXiv:1412.5104, 2014.
|
| 267 |
+
|
| 268 |
+
Martin Koestinger, Paul Wohlhart, Peter M. Roth, and Horst Bischof. Annotated facial landmarks in the wild: A large-scale, real-world database for facial landmark localization. In First IEEE International Workshop on Benchmarking Facial Image Analysis Technologies, 2011.
|
| 269 |
+
|
| 270 |
+
Andrew Lavin. Fast algorithms for convolutional neural networks. arXiv preprint arXiv:1509.09308, 2015.
|
| 271 |
+
|
| 272 |
+
Karel Lenc and Andrea Vedaldi. Understanding image representations by measuring their equivariance and equivalence. In Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 991–999, 2015.
|
| 273 |
+
|
| 274 |
+
Kun Liu, Henrik Skibbe, Thorsten Schmidt, Thomas Blein, Klaus Palme, Thomas Brox, and Olaf Ronneberger. Rotation-Invariant HOG Descriptors Using Fourier Analysis in Polar and Spherical Coordinates. International Journal of Computer Vision, 106(3):342–364, February 2014. ISSN 0920-5691, 1573-1405. doi: 10.1007/s11263-013-0634-z.
|
| 275 |
+
|
| 276 |
+
Richard G Lyons. Understanding digital signal processing. Pearson Education, 2010.
|
| 277 |
+
|
| 278 |
+
Diego Marcos, Michele Volpi, and Devis Tuia. Learning rotation invariant convolutional filters for texture classification. arXiv preprint arXiv:1604.06720, 2016.
|
| 279 |
+
|
| 280 |
+
B. Srinivasa Reddy and Biswanath N. Chatterji. An FFT-based technique for translation, rotation, and scale-invariant image registration. IEEE Transactions on Image Processing, 5(8):1266–1271, 1996.
|
| 281 |
+
|
| 282 |
+
Uwe Schmidt and Stefan Roth. Learning rotation-aware features: From invariant priors to equivariant descriptors. In Computer Vision and Pattern Recognition (CVPR), 2012 IEEE Conference on, pp. 2050–2057, 2012.
|
| 283 |
+
|
| 284 |
+
Georgios Tzimiropoulos, Vasileios Argyriou, Stefanos Zafeiriou, and Tania Stathaki. Robust FFTbased scale-invariant image registration with image gradients. IEEE Transactions on Pattern Analysis and Machine Intelligence, 32(10):1899–1906, 2010.
|
| 285 |
+
|
| 286 |
+
# A SPATIAL TRANSFORMATION FOR 3D SPHERE ROTATION UNDER PERSPECTIVE
|
| 287 |
+
|
| 288 |
+
Our simplified model consists of a perspective camera with focal length $f$ and all other camera parameters equal to identity, at a distance $d$ from a centered sphere of radius $r$ (see fig. 1-d).
|
| 289 |
+
|
| 290 |
+
A 2D point $x$ in image-space corresponds to the 3D point
|
| 291 |
+
|
| 292 |
+
$$
|
| 293 |
+
p = ( x _ { 1 } , x _ { 2 } , f ) .
|
| 294 |
+
$$
|
| 295 |
+
|
| 296 |
+
Raycasting it along the $z$ axis, it will intersect the sphere surface at the 3D point
|
| 297 |
+
|
| 298 |
+
$$
|
| 299 |
+
q = { \frac { p } { \| p \| } } \left( k - { \sqrt { k ^ { 2 } - d ^ { 2 } + r ^ { 2 } } } \right) , k = { \frac { f d } { \| p \| } } .
|
| 300 |
+
$$
|
| 301 |
+
|
| 302 |
+
If the argument of the square-root is negative, the ray does not intersect the sphere and so the point transformation is undefined. This means that the domain of the image $\Omega$ should be restricted to the sphere region. In practice, in such cases we simply leave the point unmodified.
|
| 303 |
+
|
| 304 |
+
Then, the yaw and pitch coordinates of the point $q$ on the surface of the sphere are
|
| 305 |
+
|
| 306 |
+
$$
|
| 307 |
+
\phi _ { 1 } = \cos ^ { - 1 } \left( - \frac { q _ { 2 } } { r } \right) , \phi _ { 2 } = \mathrm { a t a n _ { 2 } } \left( - \frac { q _ { 1 } } { d - q _ { 3 } } \right) .
|
| 308 |
+
$$
|
| 309 |
+
|
| 310 |
+
These polar coordinates are now rotated by the spatial transformation parameters, $\phi ^ { \prime } = \phi + u$
|
| 311 |
+
|
| 312 |
+
Converting the polar coordinates back to a 3D point $q ^ { \prime }$
|
| 313 |
+
|
| 314 |
+
$$
|
| 315 |
+
\begin{array} { r } { q ^ { \prime } = \left[ \begin{array} { c } { r \sin \phi _ { 1 } ^ { \prime } \sin \phi _ { 2 } ^ { \prime } } \\ { - r \cos \phi _ { 1 } ^ { \prime } } \\ { r \sin \phi _ { 1 } ^ { \prime } \cos \phi _ { 2 } ^ { \prime } - d } \end{array} \right] . } \end{array}
|
| 316 |
+
$$
|
| 317 |
+
|
| 318 |
+
Finally, projection of $q ^ { \prime }$ into image-space yields
|
| 319 |
+
|
| 320 |
+
$$
|
| 321 |
+
t _ { u } ( x ) = - { \frac { f } { q _ { 3 } ^ { \prime } } } \left[ \begin{array} { c } { { q _ { 1 } ^ { \prime } } } \\ { { q _ { 2 } ^ { \prime } } } \end{array} \right] .
|
| 322 |
+
$$
|
parse/train/BkmM8Dceg/BkmM8Dceg_content_list.json
ADDED
|
@@ -0,0 +1,1635 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
[
|
| 2 |
+
{
|
| 3 |
+
"type": "text",
|
| 4 |
+
"text": "WARPED CONVOLUTIONS: EFFICIENT INVARIANCE TO SPATIAL TRANSFORMATIONS ",
|
| 5 |
+
"text_level": 1,
|
| 6 |
+
"bbox": [
|
| 7 |
+
174,
|
| 8 |
+
98,
|
| 9 |
+
823,
|
| 10 |
+
146
|
| 11 |
+
],
|
| 12 |
+
"page_idx": 0
|
| 13 |
+
},
|
| 14 |
+
{
|
| 15 |
+
"type": "text",
|
| 16 |
+
"text": "João F. Henriques & Andrea Vedaldi \nVisual Geometry Group \nUniversity of Oxford \n{joao,vedaldi}@robots.ox.ac.uk ",
|
| 17 |
+
"bbox": [
|
| 18 |
+
184,
|
| 19 |
+
169,
|
| 20 |
+
478,
|
| 21 |
+
226
|
| 22 |
+
],
|
| 23 |
+
"page_idx": 0
|
| 24 |
+
},
|
| 25 |
+
{
|
| 26 |
+
"type": "text",
|
| 27 |
+
"text": "ABSTRACT ",
|
| 28 |
+
"text_level": 1,
|
| 29 |
+
"bbox": [
|
| 30 |
+
454,
|
| 31 |
+
262,
|
| 32 |
+
544,
|
| 33 |
+
277
|
| 34 |
+
],
|
| 35 |
+
"page_idx": 0
|
| 36 |
+
},
|
| 37 |
+
{
|
| 38 |
+
"type": "text",
|
| 39 |
+
"text": "Convolutional Neural Networks (CNNs) are extremely efficient, since they exploit the inherent translation-invariance of natural images. However, translation is just one of a myriad of useful spatial transformations. Can the same efficiency be attained when considering other spatial invariances? Such generalized convolutions have been considered in the past, but at a high computational cost. We present a construction that is simple and exact, yet has the same computational complexity that standard convolutions enjoy. It consists of a constant image warp followed by a simple convolution, which are standard blocks in deep learning toolboxes. With a carefully crafted warp, the resulting architecture can be made equivariant to a wide range of 2-parameters spatial transformations. We show encouraging results in realistic scenarios, including the estimation of vehicle poses in the Google Earth dataset (rotation and scale), and face poses in Annotated Facial Landmarks in the Wild (3D rotations under perspective). ",
|
| 40 |
+
"bbox": [
|
| 41 |
+
233,
|
| 42 |
+
295,
|
| 43 |
+
764,
|
| 44 |
+
476
|
| 45 |
+
],
|
| 46 |
+
"page_idx": 0
|
| 47 |
+
},
|
| 48 |
+
{
|
| 49 |
+
"type": "text",
|
| 50 |
+
"text": "1 INTRODUCTION ",
|
| 51 |
+
"text_level": 1,
|
| 52 |
+
"bbox": [
|
| 53 |
+
178,
|
| 54 |
+
507,
|
| 55 |
+
336,
|
| 56 |
+
523
|
| 57 |
+
],
|
| 58 |
+
"page_idx": 0
|
| 59 |
+
},
|
| 60 |
+
{
|
| 61 |
+
"type": "text",
|
| 62 |
+
"text": "A crucial aspect of current deep learning architectures is the encoding of invariances. This fact is epitomized in the success of convolutional neural networks (CNN), where equivariance to image translation is key: translating the input results in a translated output. When invariances are present in the data, encoding them explicitly in an architecture provides an important source of regularization, which allows to reduce the amount of training data required for learning. Invariances may also be used to improve the efficiency of implementations; for instance, a convolutional layer requires orders of magnitude less memory and also less computation compared to an equivalent fully-connected layer. ",
|
| 63 |
+
"bbox": [
|
| 64 |
+
174,
|
| 65 |
+
541,
|
| 66 |
+
825,
|
| 67 |
+
651
|
| 68 |
+
],
|
| 69 |
+
"page_idx": 0
|
| 70 |
+
},
|
| 71 |
+
{
|
| 72 |
+
"type": "text",
|
| 73 |
+
"text": "The success of CNNs indicates that translation invariance is an important property of images. However, this does not explain why translation equivariant operators work well for image understanding. The common interpretation is that such operators are matched to the statistics of natural images, which are well known to be translation invariant (Hyvärinen et al., 2009). However, natural image statistics are also (largely) invariant to other transformations such as isotropic scaling and rotation, which suggests that alternative neural network designs may also work well with images. Furthermore, in specific applications, invariances other than translation may be more appropriate. ",
|
| 74 |
+
"bbox": [
|
| 75 |
+
174,
|
| 76 |
+
659,
|
| 77 |
+
825,
|
| 78 |
+
756
|
| 79 |
+
],
|
| 80 |
+
"page_idx": 0
|
| 81 |
+
},
|
| 82 |
+
{
|
| 83 |
+
"type": "text",
|
| 84 |
+
"text": "Therefore, it is natural to consider generalizing convolutional architectures to other image transformations, and this has been the subject of extensive study (Kanazawa et al., 2014; Bruna et al., 2013; Cohen & Welling, 2016). Unfortunately these approaches do not possess the same memory and speed benefits that CNNs enjoy. The reason is that, ultimately, they have to transform (warp) an image or filter several times (Kanazawa et al., 2014; Marcos et al., 2016; Dieleman et al., 2015), incurring a high computational burden. Another approach is to consider a basis of filters (analogous to eigen-images) encoding the desired invariance (Cohen & Welling, 2014; Bruna et al., 2013; Cohen & Welling, 2016), which requires more storage than a convolutional filter. ",
|
| 85 |
+
"bbox": [
|
| 86 |
+
174,
|
| 87 |
+
763,
|
| 88 |
+
825,
|
| 89 |
+
875
|
| 90 |
+
],
|
| 91 |
+
"page_idx": 0
|
| 92 |
+
},
|
| 93 |
+
{
|
| 94 |
+
"type": "text",
|
| 95 |
+
"text": "Although they are able to handle transformations with many pose parameters, in practice most recent proposals are limited to very coarsely discretized transformations, such as horizontal/vertical flips and $9 0 ^ { \\circ }$ rotations (Dieleman et al., 2015; Cohen & Welling, 2014). ",
|
| 96 |
+
"bbox": [
|
| 97 |
+
176,
|
| 98 |
+
882,
|
| 99 |
+
823,
|
| 100 |
+
922
|
| 101 |
+
],
|
| 102 |
+
"page_idx": 0
|
| 103 |
+
},
|
| 104 |
+
{
|
| 105 |
+
"type": "text",
|
| 106 |
+
"text": "In this work we propose a generalization of CNNs that overcomes these disadvantages. Our main result shows that a linear layer with equivariance w.r.t. a large class of 2-parameters transformations can always be implemented efficiently, using a standard convolution in a warped image space. The image warp can be implemented using bilinear resampling, a simple and fast operation that has been popularized by spatial transformer networks (Jaderberg et al., 2015), and is part of most deep learning toolboxes. Unlike previous proposals, the proposed warped convolutions can handle continuous transformations, such as fine rotation and scaling. ",
|
| 107 |
+
"bbox": [
|
| 108 |
+
173,
|
| 109 |
+
103,
|
| 110 |
+
825,
|
| 111 |
+
202
|
| 112 |
+
],
|
| 113 |
+
"page_idx": 1
|
| 114 |
+
},
|
| 115 |
+
{
|
| 116 |
+
"type": "text",
|
| 117 |
+
"text": "This makes generalized convolution easily implementable in neural networks, including using fast convolution algorithms on GPU hardware, such as Winograd (Lavin, 2015) or the Fast Fourier Transform (Lyons, 2010). We present these notions in the simplest possible way (sections 2 to 4), but we note that they can be derived in broader generality from well know concepts of group theory (section 4.2). ",
|
| 118 |
+
"bbox": [
|
| 119 |
+
174,
|
| 120 |
+
208,
|
| 121 |
+
825,
|
| 122 |
+
279
|
| 123 |
+
],
|
| 124 |
+
"page_idx": 1
|
| 125 |
+
},
|
| 126 |
+
{
|
| 127 |
+
"type": "text",
|
| 128 |
+
"text": "2 GENERALIZING CONVOLUTION ",
|
| 129 |
+
"text_level": 1,
|
| 130 |
+
"bbox": [
|
| 131 |
+
178,
|
| 132 |
+
297,
|
| 133 |
+
464,
|
| 134 |
+
314
|
| 135 |
+
],
|
| 136 |
+
"page_idx": 1
|
| 137 |
+
},
|
| 138 |
+
{
|
| 139 |
+
"type": "text",
|
| 140 |
+
"text": "2.1 CONVOLUTIONS OF CONTINUOUS IMAGES ",
|
| 141 |
+
"text_level": 1,
|
| 142 |
+
"bbox": [
|
| 143 |
+
176,
|
| 144 |
+
329,
|
| 145 |
+
504,
|
| 146 |
+
343
|
| 147 |
+
],
|
| 148 |
+
"page_idx": 1
|
| 149 |
+
},
|
| 150 |
+
{
|
| 151 |
+
"type": "text",
|
| 152 |
+
"text": "We start by looking at the basic building block of CNNs, i.e. the convolution operator. This operator computes the inner product of an image $\\boldsymbol { I } \\in \\mathbb { R } ^ { m \\times n }$ with a translated version of the filter $\\boldsymbol { F } \\in \\mathbb { R } ^ { r \\times s }$ , producing a new image as output: ",
|
| 153 |
+
"bbox": [
|
| 154 |
+
176,
|
| 155 |
+
354,
|
| 156 |
+
823,
|
| 157 |
+
397
|
| 158 |
+
],
|
| 159 |
+
"page_idx": 1
|
| 160 |
+
},
|
| 161 |
+
{
|
| 162 |
+
"type": "equation",
|
| 163 |
+
"img_path": "images/d66687c82b23f584b74fc1586f926c8608ecfcedd91fe2ee364b6171447e398c.jpg",
|
| 164 |
+
"text": "$$\nH _ { j } = \\sum _ { k } I _ { k } F _ { k + j } ,\n$$",
|
| 165 |
+
"text_format": "latex",
|
| 166 |
+
"bbox": [
|
| 167 |
+
436,
|
| 168 |
+
396,
|
| 169 |
+
562,
|
| 170 |
+
429
|
| 171 |
+
],
|
| 172 |
+
"page_idx": 1
|
| 173 |
+
},
|
| 174 |
+
{
|
| 175 |
+
"type": "text",
|
| 176 |
+
"text": "where $k$ ${ \\mathfrak { a } } , { \\mathfrak { j } } \\in \\mathbb { Z } ^ { 2 }$ are two-dimensional vectors of indexes, and the summation ranges inside the extents of both arrays.1 To handle continuous deformations of the input, it is more natural to express eq. 1 as an integral over continuous rather than discrete inputs: ",
|
| 177 |
+
"bbox": [
|
| 178 |
+
174,
|
| 179 |
+
433,
|
| 180 |
+
825,
|
| 181 |
+
476
|
| 182 |
+
],
|
| 183 |
+
"page_idx": 1
|
| 184 |
+
},
|
| 185 |
+
{
|
| 186 |
+
"type": "equation",
|
| 187 |
+
"img_path": "images/1aac3ddd9e603b228f74471fb49e534750cac869c5ebec337c39afd1194fb627.jpg",
|
| 188 |
+
"text": "$$\nH ( u ; I ) = \\int I ( x ) F ( x + u ) d x ,\n$$",
|
| 189 |
+
"text_format": "latex",
|
| 190 |
+
"bbox": [
|
| 191 |
+
388,
|
| 192 |
+
481,
|
| 193 |
+
607,
|
| 194 |
+
513
|
| 195 |
+
],
|
| 196 |
+
"page_idx": 1
|
| 197 |
+
},
|
| 198 |
+
{
|
| 199 |
+
"type": "text",
|
| 200 |
+
"text": "where $I ( x )$ and $F ( x )$ are continuous functions over a bounded 2D region $\\Omega \\subset \\mathbb { R } ^ { 2 }$ , that is: $I , F :$ $\\Omega \\to \\mathbb { R }$ . The real-valued 2D vectors $x \\in \\Omega$ now play the role of the indexes $k \\in { \\mathbb { Z } } ^ { 2 }$ . Equation 2 reduces to the discrete case of eq. 1 if we define $I ( x )$ and $F ( x )$ as the sum of delta functions on grids. Intermediate values can be obtained by interpolation, such as bilinear (which amounts to convolution of the delta functions with a triangle filter (Jaderberg et al., 2015)). Importantly, such continuous images can be deformed by very rich continuous transformations of the input coordinates, whereas strictly discrete operations would be more limiting. ",
|
| 201 |
+
"bbox": [
|
| 202 |
+
173,
|
| 203 |
+
520,
|
| 204 |
+
825,
|
| 205 |
+
619
|
| 206 |
+
],
|
| 207 |
+
"page_idx": 1
|
| 208 |
+
},
|
| 209 |
+
{
|
| 210 |
+
"type": "text",
|
| 211 |
+
"text": "Over the next sections it will be more convenient to translate the image $I$ instead of the filter $F$ . This alternative form of eq. 2 is obtained by replacing $x + u x$ : ",
|
| 212 |
+
"bbox": [
|
| 213 |
+
174,
|
| 214 |
+
625,
|
| 215 |
+
821,
|
| 216 |
+
654
|
| 217 |
+
],
|
| 218 |
+
"page_idx": 1
|
| 219 |
+
},
|
| 220 |
+
{
|
| 221 |
+
"type": "equation",
|
| 222 |
+
"img_path": "images/c53784700ff0cd400b5498931f64a21a8843276f3b0dc1f7c736466ccb3b073a.jpg",
|
| 223 |
+
"text": "$$\nH ( u ; I ) = \\int I ( x - u ) F ( x ) d x .\n$$",
|
| 224 |
+
"text_format": "latex",
|
| 225 |
+
"bbox": [
|
| 226 |
+
388,
|
| 227 |
+
660,
|
| 228 |
+
607,
|
| 229 |
+
693
|
| 230 |
+
],
|
| 231 |
+
"page_idx": 1
|
| 232 |
+
},
|
| 233 |
+
{
|
| 234 |
+
"type": "text",
|
| 235 |
+
"text": "2.2 BEYOND IMAGE TRANSLATIONS ",
|
| 236 |
+
"text_level": 1,
|
| 237 |
+
"bbox": [
|
| 238 |
+
176,
|
| 239 |
+
707,
|
| 240 |
+
436,
|
| 241 |
+
720
|
| 242 |
+
],
|
| 243 |
+
"page_idx": 1
|
| 244 |
+
},
|
| 245 |
+
{
|
| 246 |
+
"type": "text",
|
| 247 |
+
"text": "The standard convolution operator of eq. 3 can be interpreted as applying the filter to translated versions of the image. Translations can be replaced by other transformations as follows (Henriques et al., 2014): ",
|
| 248 |
+
"bbox": [
|
| 249 |
+
174,
|
| 250 |
+
732,
|
| 251 |
+
825,
|
| 252 |
+
773
|
| 253 |
+
],
|
| 254 |
+
"page_idx": 1
|
| 255 |
+
},
|
| 256 |
+
{
|
| 257 |
+
"type": "equation",
|
| 258 |
+
"img_path": "images/c9c58d1ae40c35730ca04373a89d28c133f2745bd59ccf00fcbaaff8a2edf31a.jpg",
|
| 259 |
+
"text": "$$\nH ( t ; I ) = \\int I ( t ( x ) ) F ( x ) d x , \\quad t \\in G\n$$",
|
| 260 |
+
"text_format": "latex",
|
| 261 |
+
"bbox": [
|
| 262 |
+
367,
|
| 263 |
+
772,
|
| 264 |
+
632,
|
| 265 |
+
804
|
| 266 |
+
],
|
| 267 |
+
"page_idx": 1
|
| 268 |
+
},
|
| 269 |
+
{
|
| 270 |
+
"type": "text",
|
| 271 |
+
"text": "where $G$ is a set of transformation functions $t : \\Omega \\to \\Omega$ (assumed to be invertible). Intuitively, this generalized convolution performs an exhaustive search for a pattern, at many different poses (Henriques et al., 2014; Kanazawa et al., 2014). The interest in this definition lies in the fact that it makes convolution equivariant (Lenc & Vedaldi, 2015): ",
|
| 272 |
+
"bbox": [
|
| 273 |
+
174,
|
| 274 |
+
806,
|
| 275 |
+
825,
|
| 276 |
+
863
|
| 277 |
+
],
|
| 278 |
+
"page_idx": 1
|
| 279 |
+
},
|
| 280 |
+
{
|
| 281 |
+
"type": "text",
|
| 282 |
+
"text": "Lemma 1 (Equivariance). Consider the generalized convolution operator $H ( t ; I )$ of eq. 4. Generalized convolution “commutes” with any transformation $q \\in G$ of the image: ",
|
| 283 |
+
"bbox": [
|
| 284 |
+
171,
|
| 285 |
+
103,
|
| 286 |
+
823,
|
| 287 |
+
132
|
| 288 |
+
],
|
| 289 |
+
"page_idx": 2
|
| 290 |
+
},
|
| 291 |
+
{
|
| 292 |
+
"type": "equation",
|
| 293 |
+
"img_path": "images/215391eb24c08504dcb2ff688bd3ec840e2bb91efb68e7d7e2e094d96e759c4e.jpg",
|
| 294 |
+
"text": "$$\nH ( t ; I \\circ q ) = H ( q \\circ t ; I ) .\n$$",
|
| 295 |
+
"text_format": "latex",
|
| 296 |
+
"bbox": [
|
| 297 |
+
411,
|
| 298 |
+
140,
|
| 299 |
+
584,
|
| 300 |
+
156
|
| 301 |
+
],
|
| 302 |
+
"page_idx": 2
|
| 303 |
+
},
|
| 304 |
+
{
|
| 305 |
+
"type": "text",
|
| 306 |
+
"text": "Proof. One has immediately $\\begin{array} { r } { H ( t ; I \\circ q ) = \\int I ( q ( t ( x ) ) ) F ( x ) d x = H ( q \\circ t ; I ) . } \\end{array}$ ",
|
| 307 |
+
"bbox": [
|
| 308 |
+
171,
|
| 309 |
+
171,
|
| 310 |
+
700,
|
| 311 |
+
189
|
| 312 |
+
],
|
| 313 |
+
"page_idx": 2
|
| 314 |
+
},
|
| 315 |
+
{
|
| 316 |
+
"type": "text",
|
| 317 |
+
"text": "A notable case is when transformations have an additive parametrization $t : \\Omega \\times \\mathbb { R } ^ { 2 } \\to \\Omega$ , with $( x , u ) \\mapsto t _ { u } ( x )$ and $t _ { u } \\circ t _ { v } = t _ { u + v }$ . In this case, the equivariance relation can be written as ",
|
| 318 |
+
"bbox": [
|
| 319 |
+
171,
|
| 320 |
+
205,
|
| 321 |
+
823,
|
| 322 |
+
234
|
| 323 |
+
],
|
| 324 |
+
"page_idx": 2
|
| 325 |
+
},
|
| 326 |
+
{
|
| 327 |
+
"type": "equation",
|
| 328 |
+
"img_path": "images/0661afcf0ae6cdffe78a17ebec2cc568e97a6684c79ffdac14e7bb3a10dd40d5.jpg",
|
| 329 |
+
"text": "$$\nH ( u ; I \\circ t _ { v } ) = H ( v + u ; I ) .\n$$",
|
| 330 |
+
"text_format": "latex",
|
| 331 |
+
"bbox": [
|
| 332 |
+
401,
|
| 333 |
+
242,
|
| 334 |
+
596,
|
| 335 |
+
258
|
| 336 |
+
],
|
| 337 |
+
"page_idx": 2
|
| 338 |
+
},
|
| 339 |
+
{
|
| 340 |
+
"type": "text",
|
| 341 |
+
"text": "In particular, standard convolution is obtained when $t _ { u } ( x ) = x - u$ is the translation operator. In this case, the lemma above simply states that any translation of the input of the convolution results in a corresponding translation of the output. ",
|
| 342 |
+
"bbox": [
|
| 343 |
+
174,
|
| 344 |
+
266,
|
| 345 |
+
826,
|
| 346 |
+
309
|
| 347 |
+
],
|
| 348 |
+
"page_idx": 2
|
| 349 |
+
},
|
| 350 |
+
{
|
| 351 |
+
"type": "text",
|
| 352 |
+
"text": "In section 5, we will look in more detail at a few concrete examples of transformations other than translations. Although we will not do so explicitly, in this construction it is also possible to let one or more dimensions of the parameter space $\\mathbb { R } ^ { \\bar { 2 } }$ be given modulus a period $Q$ , in the sense of replacing $\\mathbb { R }$ with $\\mathbb { R } / \\mathbb { Z } ( Q )$ ; the latter is required to parameterise transformations such as rotation. ",
|
| 353 |
+
"bbox": [
|
| 354 |
+
174,
|
| 355 |
+
315,
|
| 356 |
+
825,
|
| 357 |
+
372
|
| 358 |
+
],
|
| 359 |
+
"page_idx": 2
|
| 360 |
+
},
|
| 361 |
+
{
|
| 362 |
+
"type": "text",
|
| 363 |
+
"text": "3 COMPUTATIONAL EFFICIENCY ",
|
| 364 |
+
"text_level": 1,
|
| 365 |
+
"bbox": [
|
| 366 |
+
176,
|
| 367 |
+
392,
|
| 368 |
+
452,
|
| 369 |
+
409
|
| 370 |
+
],
|
| 371 |
+
"page_idx": 2
|
| 372 |
+
},
|
| 373 |
+
{
|
| 374 |
+
"type": "text",
|
| 375 |
+
"text": "Unfortunately, what eq. 4 gains us in generality, it loses in both performance and ease of implementation. Most works in computer vision that looked at filtering under generalized transformations (e.g. scale pyramids (Kanazawa et al., 2014) or rotated filter banks (Marcos et al., 2016; Cohen & Welling, 2014; 2016; Henriques et al., 2014)) compute eq. 4 directly by evaluating a large number of transformations $t \\in G$ . This entails warping (transforming) either the image or the filter once per transformation $t$ , which can be expensive. ",
|
| 376 |
+
"bbox": [
|
| 377 |
+
173,
|
| 378 |
+
424,
|
| 379 |
+
825,
|
| 380 |
+
508
|
| 381 |
+
],
|
| 382 |
+
"page_idx": 2
|
| 383 |
+
},
|
| 384 |
+
{
|
| 385 |
+
"type": "text",
|
| 386 |
+
"text": "Opting to transform the filter instead of the image can be advantageous, since it is smaller in size. On the other hand, the filter and its domain then become spatially-varying, which foregoes the benefit of the regular, predictable, and local pattern of computations in standard convolution. It precludes the use of fast convolution routines such as Winograd’s algorithm (Lavin, 2015), or the Fast Fourier Transform (Lyons, 2010), which has lower computational complexity than exhaustive search (eq. 3). ",
|
| 387 |
+
"bbox": [
|
| 388 |
+
174,
|
| 389 |
+
515,
|
| 390 |
+
825,
|
| 391 |
+
584
|
| 392 |
+
],
|
| 393 |
+
"page_idx": 2
|
| 394 |
+
},
|
| 395 |
+
{
|
| 396 |
+
"type": "text",
|
| 397 |
+
"text": "In practice, most recent works focus on very coarse transformations that do not change the filter support and can be implemented strictly via permutations, like horizontal/vertical flips and $9 0 ^ { \\circ }$ rotations (Dieleman et al., 2015; Cohen & Welling, 2014). Such difficulties explain why generalized convolutions are not as widespread as CNNs. ",
|
| 398 |
+
"bbox": [
|
| 399 |
+
174,
|
| 400 |
+
592,
|
| 401 |
+
825,
|
| 402 |
+
647
|
| 403 |
+
],
|
| 404 |
+
"page_idx": 2
|
| 405 |
+
},
|
| 406 |
+
{
|
| 407 |
+
"type": "text",
|
| 408 |
+
"text": "In section 4 we will show that, for an important class of transformations, including the ones considered in previous works (such as Kanazawa et al. (2014); Cohen & Welling (2014); Marcos et al. (2016)) it is possible to perform generalized convolution by composing a single warp with a standard convolution, instead of several warps. Thus, we are able to take full advantage of modern convolution implementations (Lavin, 2015; Lyons, 2010), including those with lower computational complexity. ",
|
| 409 |
+
"bbox": [
|
| 410 |
+
174,
|
| 411 |
+
654,
|
| 412 |
+
825,
|
| 413 |
+
738
|
| 414 |
+
],
|
| 415 |
+
"page_idx": 2
|
| 416 |
+
},
|
| 417 |
+
{
|
| 418 |
+
"type": "text",
|
| 419 |
+
"text": "4 MAIN RESULT ",
|
| 420 |
+
"text_level": 1,
|
| 421 |
+
"bbox": [
|
| 422 |
+
176,
|
| 423 |
+
758,
|
| 424 |
+
323,
|
| 425 |
+
775
|
| 426 |
+
],
|
| 427 |
+
"page_idx": 2
|
| 428 |
+
},
|
| 429 |
+
{
|
| 430 |
+
"type": "text",
|
| 431 |
+
"text": "Our main contribution is to show that the generalized convolution operator of eq. 4 can be implemented efficiently by a standard convolution, by pre-warping the input image and filter appropriately. The warp is the same for any image, depending solely on the nature of the relevant transformations, and can be written in closed form. This result, given in theorem 1, allows us to implement very efficient generalized convolutions using simple computational blocks, as shown in section 4.1. We name this method warped convolution. ",
|
| 432 |
+
"bbox": [
|
| 433 |
+
174,
|
| 434 |
+
790,
|
| 435 |
+
825,
|
| 436 |
+
875
|
| 437 |
+
],
|
| 438 |
+
"page_idx": 2
|
| 439 |
+
},
|
| 440 |
+
{
|
| 441 |
+
"type": "text",
|
| 442 |
+
"text": "The strongest assumption is that transformations must have an additive parametrization. By this, we mean that there exists a bijection $t _ { u } : \\Omega \\to \\Omega$ such that, for any $u , v \\in \\mathbb { R } ^ { 2 }$ , parameters compose additively $t _ { u } \\circ t _ { v } = t _ { u + v }$ . The second assumption is that there exists a pivot point $x _ { 0 } \\in \\Omega$ such that $u \\mapsto t _ { u } ( x _ { 0 } )$ defines a bijection $\\mathbb { R } ^ { 2 } \\to \\Omega$ from the parameter space to the real plane. The latter requirements means that any point $x \\in \\Omega$ can be “reached” by transforming $x _ { 0 }$ under a suitable $t _ { u }$ . We then have that: ",
|
| 443 |
+
"bbox": [
|
| 444 |
+
176,
|
| 445 |
+
882,
|
| 446 |
+
823,
|
| 447 |
+
924
|
| 448 |
+
],
|
| 449 |
+
"page_idx": 2
|
| 450 |
+
},
|
| 451 |
+
{
|
| 452 |
+
"type": "text",
|
| 453 |
+
"text": "",
|
| 454 |
+
"bbox": [
|
| 455 |
+
176,
|
| 456 |
+
102,
|
| 457 |
+
823,
|
| 458 |
+
145
|
| 459 |
+
],
|
| 460 |
+
"page_idx": 3
|
| 461 |
+
},
|
| 462 |
+
{
|
| 463 |
+
"type": "text",
|
| 464 |
+
"text": "Theorem 1. Consider the generalized convolution of eq. 4. Assume that the transformation is additive $( t _ { u } \\circ t _ { v } = t _ { u + v . }$ ). Assume also that, for a fixed pivot point $x _ { 0 }$ , the function $u \\mapsto t _ { u } ( x _ { 0 } )$ is bijective. Then we can rewrite generalized convolution (eq. 4) as the standard convolution ",
|
| 465 |
+
"bbox": [
|
| 466 |
+
173,
|
| 467 |
+
148,
|
| 468 |
+
825,
|
| 469 |
+
191
|
| 470 |
+
],
|
| 471 |
+
"page_idx": 3
|
| 472 |
+
},
|
| 473 |
+
{
|
| 474 |
+
"type": "equation",
|
| 475 |
+
"img_path": "images/63ea9bdacd1b511cbcc2248b2a9f69d17af3e02ea4e53ea964c348c91ef9e3a1.jpg",
|
| 476 |
+
"text": "$$\nH ( u ; I ) = \\int \\hat { I } ( u + v ) \\hat { F } ( v ) d v ,\n$$",
|
| 477 |
+
"text_format": "latex",
|
| 478 |
+
"bbox": [
|
| 479 |
+
392,
|
| 480 |
+
195,
|
| 481 |
+
604,
|
| 482 |
+
228
|
| 483 |
+
],
|
| 484 |
+
"page_idx": 3
|
| 485 |
+
},
|
| 486 |
+
{
|
| 487 |
+
"type": "text",
|
| 488 |
+
"text": "where $\\hat { I }$ and $\\hat { F }$ are the warped image and filter given by: ",
|
| 489 |
+
"bbox": [
|
| 490 |
+
174,
|
| 491 |
+
233,
|
| 492 |
+
545,
|
| 493 |
+
250
|
| 494 |
+
],
|
| 495 |
+
"page_idx": 3
|
| 496 |
+
},
|
| 497 |
+
{
|
| 498 |
+
"type": "equation",
|
| 499 |
+
"img_path": "images/36c0607d4677e46cf89b622989f83fa21343507de331febd605abe36a9587f7c.jpg",
|
| 500 |
+
"text": "$$\n\\hat { I } ( u ) = I ( t _ { u } ( x _ { 0 } ) ) , \\qquad \\hat { F } ( u ) = F ( t _ { u } ( x _ { 0 } ) ) \\left| \\frac { d t _ { u } ( x _ { 0 } ) } { d u } \\right| .\n$$",
|
| 501 |
+
"text_format": "latex",
|
| 502 |
+
"bbox": [
|
| 503 |
+
315,
|
| 504 |
+
252,
|
| 505 |
+
681,
|
| 506 |
+
287
|
| 507 |
+
],
|
| 508 |
+
"page_idx": 3
|
| 509 |
+
},
|
| 510 |
+
{
|
| 511 |
+
"type": "text",
|
| 512 |
+
"text": "Proof. We use the variable substitution $x = t _ { v } ( x _ { 0 } )$ in eq. 4. Then: ",
|
| 513 |
+
"bbox": [
|
| 514 |
+
173,
|
| 515 |
+
300,
|
| 516 |
+
611,
|
| 517 |
+
315
|
| 518 |
+
],
|
| 519 |
+
"page_idx": 3
|
| 520 |
+
},
|
| 521 |
+
{
|
| 522 |
+
"type": "equation",
|
| 523 |
+
"img_path": "images/f62b9951c65fe6aab37827b2ea6e20108c56f377a9d664ff0d612ef222aa99ff.jpg",
|
| 524 |
+
"text": "$$\n\\begin{array} { l } { H ( u ; I ) = \\displaystyle \\int I ( t _ { u } ( x ) ) F ( x ) d x } \\\\ { \\displaystyle = \\int I ( t _ { u } ( t _ { v } ( x _ { 0 } ) ) ) F ( t _ { v } ( x _ { 0 } ) ) \\left| \\frac { d t _ { v } ( x _ { 0 } ) } { d v } \\right| d v } \\\\ { \\displaystyle = \\int \\underbrace { I ( t _ { u + v } ( x _ { 0 } ) ) } _ { \\hat { I } ( u + v ) } \\underbrace { F ( t _ { v } ( x _ { 0 } ) ) \\left| \\frac { d t _ { v } ( x _ { 0 } ) } { d v } \\right| } _ { \\hat { F } ( v ) } d v } \\\\ { \\displaystyle = \\int \\hat { I } ( u + v ) \\hat { F } ( v ) d v . } \\end{array}\n$$",
|
| 525 |
+
"text_format": "latex",
|
| 526 |
+
"bbox": [
|
| 527 |
+
321,
|
| 528 |
+
320,
|
| 529 |
+
676,
|
| 530 |
+
479
|
| 531 |
+
],
|
| 532 |
+
"page_idx": 3
|
| 533 |
+
},
|
| 534 |
+
{
|
| 535 |
+
"type": "text",
|
| 536 |
+
"text": "The warp that is applied to both inputs in eq. 7 can be interpreted as follows. We start with an arbitrary pivot point $x _ { 0 }$ in the image and them sample other points by repeatedly applying the transformation $t _ { u } ( x _ { 0 } )$ to the pivot (by varying $u$ ). When discretized, this sampling is performed over a 2D grid of parameters $u$ . Finally, sampling the input at these points (for example, by bilinear interpolation) yields the warped input. ",
|
| 537 |
+
"bbox": [
|
| 538 |
+
174,
|
| 539 |
+
511,
|
| 540 |
+
825,
|
| 541 |
+
582
|
| 542 |
+
],
|
| 543 |
+
"page_idx": 3
|
| 544 |
+
},
|
| 545 |
+
{
|
| 546 |
+
"type": "text",
|
| 547 |
+
"text": "An illustration is given in fig. 1, for various transformations (each one is discussed in more detail in section 5). The red dot shows the pivot point $x _ { 0 }$ , and the two arrows pointing away from it show the two directions of increasing $u$ values (recall that transformation parameters are two-dimensional). The grids were generated by sampling $u$ at regular intervals. Note that the warp grids are independent of the image contents – they can be computed once offline and then applied to any image. ",
|
| 548 |
+
"bbox": [
|
| 549 |
+
174,
|
| 550 |
+
588,
|
| 551 |
+
825,
|
| 552 |
+
659
|
| 553 |
+
],
|
| 554 |
+
"page_idx": 3
|
| 555 |
+
},
|
| 556 |
+
{
|
| 557 |
+
"type": "text",
|
| 558 |
+
"text": "The last factor in eq. 7 is the determinant of the Jacobian of the image transformation $t$ . It rescales the image values to account for the stretching and shrinking of space due to non-linear warps. It can also be computed offline, and its application amounts to an element-wise product by a constant array. A generalization using group theory is discussed in section 4.2. ",
|
| 559 |
+
"bbox": [
|
| 560 |
+
174,
|
| 561 |
+
665,
|
| 562 |
+
825,
|
| 563 |
+
720
|
| 564 |
+
],
|
| 565 |
+
"page_idx": 3
|
| 566 |
+
},
|
| 567 |
+
{
|
| 568 |
+
"type": "text",
|
| 569 |
+
"text": "4.1 PRACTICAL CONSIDERATIONS ",
|
| 570 |
+
"text_level": 1,
|
| 571 |
+
"bbox": [
|
| 572 |
+
176,
|
| 573 |
+
737,
|
| 574 |
+
421,
|
| 575 |
+
752
|
| 576 |
+
],
|
| 577 |
+
"page_idx": 3
|
| 578 |
+
},
|
| 579 |
+
{
|
| 580 |
+
"type": "text",
|
| 581 |
+
"text": "There are a few interesting aspects that simplify the use of theorem 1 in practice. ",
|
| 582 |
+
"bbox": [
|
| 583 |
+
176,
|
| 584 |
+
763,
|
| 585 |
+
700,
|
| 586 |
+
779
|
| 587 |
+
],
|
| 588 |
+
"page_idx": 3
|
| 589 |
+
},
|
| 590 |
+
{
|
| 591 |
+
"type": "text",
|
| 592 |
+
"text": "First, since in most applications the filter $F$ is learned, we are free to ignore the constant warp and Jacobian in eq. 7 (which amounts to a simple reparametrization), and learn $\\hat { F }$ directly. In practice, this means that we warp only the input image $I$ to obtain $\\hat { I }$ , and then perform a standard convolution with a filter $\\hat { F }$ . The learned warped filter $\\hat { F }$ has a one-to-one correspondence to an image-space filter $F$ by means of eq. 7, although there is no real need to build the latter explicitly. ",
|
| 593 |
+
"bbox": [
|
| 594 |
+
174,
|
| 595 |
+
784,
|
| 596 |
+
825,
|
| 597 |
+
861
|
| 598 |
+
],
|
| 599 |
+
"page_idx": 3
|
| 600 |
+
},
|
| 601 |
+
{
|
| 602 |
+
"type": "text",
|
| 603 |
+
"text": "Second, we can choose either one or two spatial transformations for the generalized convolution (e.g. scale and rotation, simultaneously). The reason is that the input image is 2D, so the parameterspace after warping is also 2D. The choice is not arbitrary though: the two transformations must commute, in order to respect additivity. This will be the case of the pairs we study in section 5. ",
|
| 604 |
+
"bbox": [
|
| 605 |
+
174,
|
| 606 |
+
867,
|
| 607 |
+
823,
|
| 608 |
+
924
|
| 609 |
+
],
|
| 610 |
+
"page_idx": 3
|
| 611 |
+
},
|
| 612 |
+
{
|
| 613 |
+
"type": "text",
|
| 614 |
+
"text": "Algorithm 1 Warped convolution. ",
|
| 615 |
+
"text_level": 1,
|
| 616 |
+
"bbox": [
|
| 617 |
+
176,
|
| 618 |
+
103,
|
| 619 |
+
400,
|
| 620 |
+
118
|
| 621 |
+
],
|
| 622 |
+
"page_idx": 4
|
| 623 |
+
},
|
| 624 |
+
{
|
| 625 |
+
"type": "text",
|
| 626 |
+
"text": "Grid generation (offline) ",
|
| 627 |
+
"bbox": [
|
| 628 |
+
174,
|
| 629 |
+
128,
|
| 630 |
+
338,
|
| 631 |
+
143
|
| 632 |
+
],
|
| 633 |
+
"page_idx": 4
|
| 634 |
+
},
|
| 635 |
+
{
|
| 636 |
+
"type": "text",
|
| 637 |
+
"text": "• Apply the spatial transformation $t$ repeatedly to a pivot point $x _ { 0 }$ , using a 2D grid of parameters $\\stackrel { \\cdot } { u } = \\{ \\bar { ( } u _ { 1 } + i \\delta _ { 1 } , u _ { 2 } + j \\delta _ { 2 } ) : i = 0 , \\ldots , m , j = 0 , \\bar { \\ldots } , n \\}$ , obtaining the 2D warp grid $t _ { u } ( x _ { 0 } )$ . ",
|
| 638 |
+
"bbox": [
|
| 639 |
+
215,
|
| 640 |
+
148,
|
| 641 |
+
823,
|
| 642 |
+
190
|
| 643 |
+
],
|
| 644 |
+
"page_idx": 4
|
| 645 |
+
},
|
| 646 |
+
{
|
| 647 |
+
"type": "text",
|
| 648 |
+
"text": "Warped convolution ",
|
| 649 |
+
"bbox": [
|
| 650 |
+
176,
|
| 651 |
+
194,
|
| 652 |
+
307,
|
| 653 |
+
208
|
| 654 |
+
],
|
| 655 |
+
"page_idx": 4
|
| 656 |
+
},
|
| 657 |
+
{
|
| 658 |
+
"type": "text",
|
| 659 |
+
"text": "1. Resample input image $I$ using the warp grid $t _ { u } ( x _ { 0 } )$ , by bilinear interpolation. ",
|
| 660 |
+
"bbox": [
|
| 661 |
+
209,
|
| 662 |
+
213,
|
| 663 |
+
738,
|
| 664 |
+
228
|
| 665 |
+
],
|
| 666 |
+
"page_idx": 4
|
| 667 |
+
},
|
| 668 |
+
{
|
| 669 |
+
"type": "text",
|
| 670 |
+
"text": "2. Convolve the warped image $\\hat { I }$ with filter $\\hat { F }$ . ",
|
| 671 |
+
"bbox": [
|
| 672 |
+
212,
|
| 673 |
+
234,
|
| 674 |
+
519,
|
| 675 |
+
250
|
| 676 |
+
],
|
| 677 |
+
"page_idx": 4
|
| 678 |
+
},
|
| 679 |
+
{
|
| 680 |
+
"type": "text",
|
| 681 |
+
"text": "By theorem 1, these steps are equivalent to a generalized convolution, which performs an exhaustive search across the pose-space of transformation $t$ , but at a much lower computational cost. ",
|
| 682 |
+
"bbox": [
|
| 683 |
+
173,
|
| 684 |
+
253,
|
| 685 |
+
823,
|
| 686 |
+
282
|
| 687 |
+
],
|
| 688 |
+
"page_idx": 4
|
| 689 |
+
},
|
| 690 |
+
{
|
| 691 |
+
"type": "text",
|
| 692 |
+
"text": "4.2 RELATIONSHIP TO GROUP THEORY ",
|
| 693 |
+
"text_level": 1,
|
| 694 |
+
"bbox": [
|
| 695 |
+
176,
|
| 696 |
+
314,
|
| 697 |
+
452,
|
| 698 |
+
328
|
| 699 |
+
],
|
| 700 |
+
"page_idx": 4
|
| 701 |
+
},
|
| 702 |
+
{
|
| 703 |
+
"type": "text",
|
| 704 |
+
"text": "This section relates our results, which have been presented using a simple formalism and in a restricted setting, to a more general approach based on group theory (Folland, 1995). ",
|
| 705 |
+
"bbox": [
|
| 706 |
+
171,
|
| 707 |
+
340,
|
| 708 |
+
821,
|
| 709 |
+
369
|
| 710 |
+
],
|
| 711 |
+
"page_idx": 4
|
| 712 |
+
},
|
| 713 |
+
{
|
| 714 |
+
"type": "text",
|
| 715 |
+
"text": "To this end, let $G$ be a group of transformations. Under very mild conditions (the group has to be locally compact and Hausdorff), there exists a unique measure on the group, the Haar measure, which is invariant to the group action, in the sense that, given a measurable function ${ \\tilde { I } } : G \\to$ $\\mathbb { R }$ , then $\\begin{array} { r } { \\int \\tilde { I } ( g ^ { \\prime } g ) d g = \\int \\overline { { \\tilde { I } } } ( g ) \\dot { } d g } \\end{array}$ . Using this measure, one can define generalized convolution as $\\begin{array} { r } { ( \\tilde { I } * \\tilde { F } ) ( t ) = \\int _ { G } \\tilde { I } ( t g ) \\tilde { F } ( g ^ { - 1 } ) d g } \\end{array}$ . This resembles our definition (4), although image and filter are defined on the group $G$ instead of the spatial domain $\\mathbb { R } ^ { 2 }$ . Lemma 1 translates immediately to this case (Folland, 1995). ",
|
| 716 |
+
"bbox": [
|
| 717 |
+
173,
|
| 718 |
+
376,
|
| 719 |
+
825,
|
| 720 |
+
483
|
| 721 |
+
],
|
| 722 |
+
"page_idx": 4
|
| 723 |
+
},
|
| 724 |
+
{
|
| 725 |
+
"type": "text",
|
| 726 |
+
"text": "In order to extend Theorem 1, we need to make this general but abstract construction concrete. Here one assumes that the group acts transitively on a subset $X \\subset \\mathbb { R } ^ { 2 }$ (which means that any point $x \\in X$ can be written as $x = g x _ { 0 }$ , for a fixed point $x _ { 0 } \\in X$ and a suitable transformation $g \\in G$ ). Then one can define the image as $\\tilde { I } ( g ) = I ( g \\bar { ( } x _ { 0 } ) )$ , where $I$ is a function of the spatial domain $X$ instead of the group $G$ , and likewise for the filter. Next, it is necessary to explicitly calculate the integral over $G$ . If the group is an Abelian (commutative) Lie group, then one can show that there exists a map $\\exp : V \\to G$ , the exponential map, defined on a vector space $V$ . Under commutativity, this map is also additive, in the sense that $\\exp ( u ) \\exp ( v ) = \\exp ( u + v )$ . The structure of $V$ depends on the specific group, but under such restrictive conditions, it is a torus, which allows the calculation of $\\textstyle \\int { \\tilde { I } } ( { \\bar { g } } ) d g$ as $\\begin{array} { r } { \\int \\tilde { I } ( \\exp ( u ) x _ { 0 } ) d u . } \\end{array}$ . ",
|
| 727 |
+
"bbox": [
|
| 728 |
+
173,
|
| 729 |
+
488,
|
| 730 |
+
825,
|
| 731 |
+
632
|
| 732 |
+
],
|
| 733 |
+
"page_idx": 4
|
| 734 |
+
},
|
| 735 |
+
{
|
| 736 |
+
"type": "text",
|
| 737 |
+
"text": "Finally, in order to swap integration over the group parameters with integration over space, one assumes that $x \\ = \\ \\exp ( u ) x _ { 0 }$ defines a smooth bijection $V \\ \\ X$ , so that it is possible to use the change of variable $\\dot { u } u ( x )$ where $\\mathrm { e x p } ( u ( x ) ) x _ { 0 } = x$ . This allows writing the integral as $\\begin{array} { r } { \\int { \\tilde { I } } ( \\exp ( u ) x _ { 0 } ) d u = \\int I ( x ) \\left| d u / d x \\right| d x } \\end{array}$ . Note that this Jacobian is the inverse of the one found in (1) due to the fact that we started by defining our convolution using $I$ instead of $\\tilde { I }$ . ",
|
| 738 |
+
"bbox": [
|
| 739 |
+
174,
|
| 740 |
+
637,
|
| 741 |
+
825,
|
| 742 |
+
713
|
| 743 |
+
],
|
| 744 |
+
"page_idx": 4
|
| 745 |
+
},
|
| 746 |
+
{
|
| 747 |
+
"type": "text",
|
| 748 |
+
"text": "5 EXAMPLES OF SPATIAL TRANSFORMATIONS ",
|
| 749 |
+
"text_level": 1,
|
| 750 |
+
"bbox": [
|
| 751 |
+
174,
|
| 752 |
+
738,
|
| 753 |
+
570,
|
| 754 |
+
752
|
| 755 |
+
],
|
| 756 |
+
"page_idx": 4
|
| 757 |
+
},
|
| 758 |
+
{
|
| 759 |
+
"type": "text",
|
| 760 |
+
"text": "We now give some concrete examples of pairs of spatial transformations that obey the conditions of theorem 1, and can be useful in practice. ",
|
| 761 |
+
"bbox": [
|
| 762 |
+
173,
|
| 763 |
+
770,
|
| 764 |
+
823,
|
| 765 |
+
799
|
| 766 |
+
],
|
| 767 |
+
"page_idx": 4
|
| 768 |
+
},
|
| 769 |
+
{
|
| 770 |
+
"type": "text",
|
| 771 |
+
"text": "5.1 SCALE AND ASPECT RATIO ",
|
| 772 |
+
"text_level": 1,
|
| 773 |
+
"bbox": [
|
| 774 |
+
176,
|
| 775 |
+
819,
|
| 776 |
+
400,
|
| 777 |
+
833
|
| 778 |
+
],
|
| 779 |
+
"page_idx": 4
|
| 780 |
+
},
|
| 781 |
+
{
|
| 782 |
+
"type": "text",
|
| 783 |
+
"text": "Detection tasks require predicting the extent of an object as a bounding box. While the location can be found accurately by a standard CNN, which is equivariant to translation, the size prediction could similarly benefit from equivariance to horizontal and vertical scale (equivalently, scale and aspect ratio). ",
|
| 784 |
+
"bbox": [
|
| 785 |
+
174,
|
| 786 |
+
845,
|
| 787 |
+
825,
|
| 788 |
+
902
|
| 789 |
+
],
|
| 790 |
+
"page_idx": 4
|
| 791 |
+
},
|
| 792 |
+
{
|
| 793 |
+
"type": "text",
|
| 794 |
+
"text": "Such a spatial transformation, from which a warp can be constructed, is given by: ",
|
| 795 |
+
"bbox": [
|
| 796 |
+
171,
|
| 797 |
+
909,
|
| 798 |
+
707,
|
| 799 |
+
924
|
| 800 |
+
],
|
| 801 |
+
"page_idx": 4
|
| 802 |
+
},
|
| 803 |
+
{
|
| 804 |
+
"type": "image",
|
| 805 |
+
"img_path": "images/60788d1a003ce7fcae165868e8ad44de46e7af62c507569ccf0f4de9f35dc344.jpg",
|
| 806 |
+
"image_caption": [
|
| 807 |
+
"Figure 1: First row: Sampling grids that define the warps associated with different spatial transformations. Second row: An example image (a) after warping with each grid (b-d). Third row: A small translation is applied to each warped image, which is then mapped back to the original space (by an inverse warp). Translation in one axis of the appropriate warped space is equivalent to (b) horizontal scaling; (c) planar rotation; (d) 3D rotation around the vertical axis. "
|
| 808 |
+
],
|
| 809 |
+
"image_footnote": [],
|
| 810 |
+
"bbox": [
|
| 811 |
+
191,
|
| 812 |
+
98,
|
| 813 |
+
808,
|
| 814 |
+
483
|
| 815 |
+
],
|
| 816 |
+
"page_idx": 5
|
| 817 |
+
},
|
| 818 |
+
{
|
| 819 |
+
"type": "equation",
|
| 820 |
+
"img_path": "images/2d30af2a4b23b48bb60e4ef9cc351f77c45fee152af7976aafd5c3c199090dea.jpg",
|
| 821 |
+
"text": "$$\nt _ { u } ( x ) = { \\left[ \\begin{array} { l } { x _ { 1 } s ^ { u _ { 1 } } } \\\\ { x _ { 2 } s ^ { u _ { 2 } } } \\end{array} \\right] }\n$$",
|
| 822 |
+
"text_format": "latex",
|
| 823 |
+
"bbox": [
|
| 824 |
+
431,
|
| 825 |
+
606,
|
| 826 |
+
566,
|
| 827 |
+
641
|
| 828 |
+
],
|
| 829 |
+
"page_idx": 5
|
| 830 |
+
},
|
| 831 |
+
{
|
| 832 |
+
"type": "text",
|
| 833 |
+
"text": "The $s$ constant controls the total degree of scaling applied. Notice that the output must be exponential in the scale parameters $u$ ; this ensures the additive structure required by theorem 1: $t _ { u } ( \\bar { t } _ { v } ( x ) ) =$ $t _ { u + v } ( x )$ . The resulting warp grid can be visualized in fig. 1-b. In this case, the domain of the image must be $\\Omega \\in \\mathbb { R } _ { + } ^ { 2 }$ , since a pivot $x _ { 0 }$ in one quadrant cannot reach another quadrant by any amount of (positive) scaling. ",
|
| 834 |
+
"bbox": [
|
| 835 |
+
173,
|
| 836 |
+
654,
|
| 837 |
+
825,
|
| 838 |
+
726
|
| 839 |
+
],
|
| 840 |
+
"page_idx": 5
|
| 841 |
+
},
|
| 842 |
+
{
|
| 843 |
+
"type": "text",
|
| 844 |
+
"text": "5.2 SCALE AND ROTATION (LOG-POLAR WARP) ",
|
| 845 |
+
"text_level": 1,
|
| 846 |
+
"bbox": [
|
| 847 |
+
174,
|
| 848 |
+
744,
|
| 849 |
+
513,
|
| 850 |
+
758
|
| 851 |
+
],
|
| 852 |
+
"page_idx": 5
|
| 853 |
+
},
|
| 854 |
+
{
|
| 855 |
+
"type": "text",
|
| 856 |
+
"text": "Planar scale and rotation are perhaps the most obvious spatial transformations in images, and are a natural test case for works on spatial transformations (Kanazawa et al., 2014; Marcos et al., 2016). Rotating a point $x$ by $u _ { 1 }$ radians and scaling it by $u _ { 2 }$ , around the origin, can be performed with ",
|
| 857 |
+
"bbox": [
|
| 858 |
+
174,
|
| 859 |
+
771,
|
| 860 |
+
825,
|
| 861 |
+
814
|
| 862 |
+
],
|
| 863 |
+
"page_idx": 5
|
| 864 |
+
},
|
| 865 |
+
{
|
| 866 |
+
"type": "equation",
|
| 867 |
+
"img_path": "images/c12bc61daeb8c4068f35af6a7e6dcd729d9df9dbb649a577448644364e368d24.jpg",
|
| 868 |
+
"text": "$$\nt _ { u } ( x ) = \\left[ \\begin{array} { l } { s ^ { u _ { 2 } } \\left\\| x \\right\\| \\cos ( \\mathrm { a t a n } _ { 2 } ( x _ { 2 } , x _ { 1 } ) + u _ { 1 } ) } \\\\ { s ^ { u _ { 2 } } \\left\\| x \\right\\| \\sin ( \\mathrm { a t a n } _ { 2 } ( x _ { 2 } , x _ { 1 } ) + u _ { 1 } ) } \\end{array} \\right] ,\n$$",
|
| 869 |
+
"text_format": "latex",
|
| 870 |
+
"bbox": [
|
| 871 |
+
336,
|
| 872 |
+
833,
|
| 873 |
+
656,
|
| 874 |
+
868
|
| 875 |
+
],
|
| 876 |
+
"page_idx": 5
|
| 877 |
+
},
|
| 878 |
+
{
|
| 879 |
+
"type": "text",
|
| 880 |
+
"text": "where atan $^ 2$ is the standard 4-quadrant inverse tangent function (atan2). The domain in this case must exclude the origin $( \\Omega \\in \\dot { \\mathbb { R } } ^ { 2 } \\setminus \\{ 0 \\} )$ , since a pivot $x _ { 0 } = 0$ cannot reach any other points in the image by rotation or scaling. ",
|
| 881 |
+
"bbox": [
|
| 882 |
+
176,
|
| 883 |
+
881,
|
| 884 |
+
825,
|
| 885 |
+
924
|
| 886 |
+
],
|
| 887 |
+
"page_idx": 5
|
| 888 |
+
},
|
| 889 |
+
{
|
| 890 |
+
"type": "image",
|
| 891 |
+
"img_path": "images/411e48b00e252ab8e9ec8948af96a700f5774ade8b1cca75c0faf68a96fea41e.jpg",
|
| 892 |
+
"image_caption": [
|
| 893 |
+
"Figure 2: Equivariant pose estimation strategy used in the experiments (section 6). With an appropriate warp and a standard CNN, the shaded block becomes equivalent to a generalized CNN (by theorem 1), which performs exhaustive searches across pose-space instead of image-space. "
|
| 894 |
+
],
|
| 895 |
+
"image_footnote": [],
|
| 896 |
+
"bbox": [
|
| 897 |
+
266,
|
| 898 |
+
103,
|
| 899 |
+
735,
|
| 900 |
+
142
|
| 901 |
+
],
|
| 902 |
+
"page_idx": 6
|
| 903 |
+
},
|
| 904 |
+
{
|
| 905 |
+
"type": "text",
|
| 906 |
+
"text": "The resulting warp grid can be visualized in fig. 1-c. It is interesting to observe that it corresponds exactly to the log-polar domain, which is used in the signal processing literature to perform correlation across scale and rotation (Tzimiropoulos et al., 2010; Reddy & Chatterji, 1996). In fact, it was the source of inspiration for this work, which can be seen as a generalization of the log-polar domain to other spatial transformations. ",
|
| 907 |
+
"bbox": [
|
| 908 |
+
173,
|
| 909 |
+
224,
|
| 910 |
+
825,
|
| 911 |
+
295
|
| 912 |
+
],
|
| 913 |
+
"page_idx": 6
|
| 914 |
+
},
|
| 915 |
+
{
|
| 916 |
+
"type": "text",
|
| 917 |
+
"text": "5.3 3D SPHERE ROTATION UNDER PERSPECTIVE ",
|
| 918 |
+
"text_level": 1,
|
| 919 |
+
"bbox": [
|
| 920 |
+
174,
|
| 921 |
+
315,
|
| 922 |
+
517,
|
| 923 |
+
329
|
| 924 |
+
],
|
| 925 |
+
"page_idx": 6
|
| 926 |
+
},
|
| 927 |
+
{
|
| 928 |
+
"type": "text",
|
| 929 |
+
"text": "We will now tackle a more difficult spatial transformation, in an attempt to demonstrate the generality of theorem 1. The transformations we will consider are yaw and pitch rotations in 3D space, as seen by a perspective camera. In the experiments (section 6) we will show how to apply it to face pose estimation. ",
|
| 930 |
+
"bbox": [
|
| 931 |
+
174,
|
| 932 |
+
342,
|
| 933 |
+
825,
|
| 934 |
+
398
|
| 935 |
+
],
|
| 936 |
+
"page_idx": 6
|
| 937 |
+
},
|
| 938 |
+
{
|
| 939 |
+
"type": "text",
|
| 940 |
+
"text": "In order to maintain additivity, the rotated 3D points must remain on the surface of a sphere. We consider a simplified camera and world model, whose only hyperparameters are a focal length $f$ , the radius of a sphere $r$ , and its distance from the camera center $d$ . The equations for the spatial transformation corresponding to yaw and pitch rotation under this model are in appendix A. ",
|
| 941 |
+
"bbox": [
|
| 942 |
+
174,
|
| 943 |
+
405,
|
| 944 |
+
825,
|
| 945 |
+
460
|
| 946 |
+
],
|
| 947 |
+
"page_idx": 6
|
| 948 |
+
},
|
| 949 |
+
{
|
| 950 |
+
"type": "text",
|
| 951 |
+
"text": "The corresponding warp grid can be seen in fig. 1-d. It can be observed that the grid corresponds to what we would expect of a 3D rendering of a sphere with a discrete mesh. An intuitive picture of the effect of the warp grid in such cases is that it wraps the 2D image around the surface of the 3D object, so that translation in the warped space corresponds to moving between vertexes of the 3D geometry. ",
|
| 952 |
+
"bbox": [
|
| 953 |
+
174,
|
| 954 |
+
467,
|
| 955 |
+
825,
|
| 956 |
+
537
|
| 957 |
+
],
|
| 958 |
+
"page_idx": 6
|
| 959 |
+
},
|
| 960 |
+
{
|
| 961 |
+
"type": "text",
|
| 962 |
+
"text": "6 EXPERIMENTS ",
|
| 963 |
+
"text_level": 1,
|
| 964 |
+
"bbox": [
|
| 965 |
+
174,
|
| 966 |
+
560,
|
| 967 |
+
326,
|
| 968 |
+
577
|
| 969 |
+
],
|
| 970 |
+
"page_idx": 6
|
| 971 |
+
},
|
| 972 |
+
{
|
| 973 |
+
"type": "text",
|
| 974 |
+
"text": "6.1 ARCHITECTURE ",
|
| 975 |
+
"text_level": 1,
|
| 976 |
+
"bbox": [
|
| 977 |
+
174,
|
| 978 |
+
593,
|
| 979 |
+
326,
|
| 980 |
+
608
|
| 981 |
+
],
|
| 982 |
+
"page_idx": 6
|
| 983 |
+
},
|
| 984 |
+
{
|
| 985 |
+
"type": "text",
|
| 986 |
+
"text": "As mentioned in section 2.2, generalized convolution performs an exhaustive search for patterns across spatial transformations, by varying pose parameters. For tasks where invariance to that transformation is important, it is usual to pool the detection responses across all poses (Marcos et al., 2016; Kanazawa et al., 2014). ",
|
| 987 |
+
"bbox": [
|
| 988 |
+
174,
|
| 989 |
+
621,
|
| 990 |
+
825,
|
| 991 |
+
676
|
| 992 |
+
],
|
| 993 |
+
"page_idx": 6
|
| 994 |
+
},
|
| 995 |
+
{
|
| 996 |
+
"type": "text",
|
| 997 |
+
"text": "In the experiments, however, we will test the framework in pose prediction tasks. As such, we do not want to pool the detection responses (e.g. with a max operation) but rather find the pose with the strongest response (i.e., an argmax operation). To perform this operation in a differentiable manner, we implement a soft argmax operation, defined as follows: ",
|
| 998 |
+
"bbox": [
|
| 999 |
+
174,
|
| 1000 |
+
683,
|
| 1001 |
+
825,
|
| 1002 |
+
739
|
| 1003 |
+
],
|
| 1004 |
+
"page_idx": 6
|
| 1005 |
+
},
|
| 1006 |
+
{
|
| 1007 |
+
"type": "equation",
|
| 1008 |
+
"img_path": "images/37776009230040da7cad487e5ed5747cc940e28dac129b7bb622cfd1f71dfbd0.jpg",
|
| 1009 |
+
"text": "$$\ns _ { 1 } ( a ) = \\sum _ { i j } ^ { m n } \\frac { i } { m } \\sigma _ { i j } ( a ) , \\qquad s _ { 2 } ( a ) = \\sum _ { i j } ^ { m n } \\frac { j } { n } \\sigma _ { i j } ( a ) ,\n$$",
|
| 1010 |
+
"text_format": "latex",
|
| 1011 |
+
"bbox": [
|
| 1012 |
+
333,
|
| 1013 |
+
760,
|
| 1014 |
+
665,
|
| 1015 |
+
803
|
| 1016 |
+
],
|
| 1017 |
+
"page_idx": 6
|
| 1018 |
+
},
|
| 1019 |
+
{
|
| 1020 |
+
"type": "text",
|
| 1021 |
+
"text": "where $\\sigma ( a ) \\in \\mathbb { R } ^ { m \\times n }$ is the softmax over all spatial locations, and $\\sigma _ { i j } ( a )$ indexes the element at $( i , j )$ . The outputs are the two spatial coordinates of the maximum value, $s ( a ) \\in \\mathbb { R } ^ { 2 }$ . ",
|
| 1022 |
+
"bbox": [
|
| 1023 |
+
173,
|
| 1024 |
+
816,
|
| 1025 |
+
823,
|
| 1026 |
+
848
|
| 1027 |
+
],
|
| 1028 |
+
"page_idx": 6
|
| 1029 |
+
},
|
| 1030 |
+
{
|
| 1031 |
+
"type": "text",
|
| 1032 |
+
"text": "Our base architecture then consists of the following blocks, outlined in fig. 2. First, the input image is warped with a pre-generated grid, according to section 4. The warped image is then processed by a standard CNN, which is now equivariant to the spatial transformation that was used to generate the warp grid. A soft argmax (eq. 10) then finds the maximum over pose-space. To ensure the pose prediction is well registered to the reference coordinate system, a learnable scale and bias are applied to the outputs. Training proceeds by minimizing the $L ^ { 1 }$ loss between the predicted pose and ground truth pose. ",
|
| 1033 |
+
"bbox": [
|
| 1034 |
+
174,
|
| 1035 |
+
853,
|
| 1036 |
+
825,
|
| 1037 |
+
924
|
| 1038 |
+
],
|
| 1039 |
+
"page_idx": 6
|
| 1040 |
+
},
|
| 1041 |
+
{
|
| 1042 |
+
"type": "table",
|
| 1043 |
+
"img_path": "images/de34c593ebae9fa31e656d9dcfe4f5a42a84519aa633726a6f1e516f3398bcef.jpg",
|
| 1044 |
+
"table_caption": [
|
| 1045 |
+
"Table 1: Results of scale and rotation pose estimation of vehicles in the Google Earth dataset. "
|
| 1046 |
+
],
|
| 1047 |
+
"table_footnote": [],
|
| 1048 |
+
"table_body": "<table><tr><td></td><td>CNN+FC</td><td>CNN+softargmax</td><td> Warped CNN</td></tr><tr><td>Rotation error (degrees)</td><td>28.87</td><td>30.6</td><td>26.44</td></tr><tr><td>Scale error (px)</td><td>17.51</td><td>5.783</td><td>5.4</td></tr></table>",
|
| 1049 |
+
"bbox": [
|
| 1050 |
+
243,
|
| 1051 |
+
101,
|
| 1052 |
+
750,
|
| 1053 |
+
169
|
| 1054 |
+
],
|
| 1055 |
+
"page_idx": 7
|
| 1056 |
+
},
|
| 1057 |
+
{
|
| 1058 |
+
"type": "image",
|
| 1059 |
+
"img_path": "images/db8ba0448a92bfa2d818168ec5f182ee517f7c3a909c68da0c90758eb10407fb.jpg",
|
| 1060 |
+
"image_caption": [
|
| 1061 |
+
"Figure 3: Example pose estimates (rotation and scale) on the Google Earth dataset (Section 6.2). "
|
| 1062 |
+
],
|
| 1063 |
+
"image_footnote": [],
|
| 1064 |
+
"bbox": [
|
| 1065 |
+
174,
|
| 1066 |
+
210,
|
| 1067 |
+
820,
|
| 1068 |
+
343
|
| 1069 |
+
],
|
| 1070 |
+
"page_idx": 7
|
| 1071 |
+
},
|
| 1072 |
+
{
|
| 1073 |
+
"type": "text",
|
| 1074 |
+
"text": "",
|
| 1075 |
+
"bbox": [
|
| 1076 |
+
176,
|
| 1077 |
+
401,
|
| 1078 |
+
823,
|
| 1079 |
+
430
|
| 1080 |
+
],
|
| 1081 |
+
"page_idx": 7
|
| 1082 |
+
},
|
| 1083 |
+
{
|
| 1084 |
+
"type": "text",
|
| 1085 |
+
"text": "6.2 GOOGLE EARTH",
|
| 1086 |
+
"text_level": 1,
|
| 1087 |
+
"bbox": [
|
| 1088 |
+
174,
|
| 1089 |
+
450,
|
| 1090 |
+
328,
|
| 1091 |
+
465
|
| 1092 |
+
],
|
| 1093 |
+
"page_idx": 7
|
| 1094 |
+
},
|
| 1095 |
+
{
|
| 1096 |
+
"type": "text",
|
| 1097 |
+
"text": "For the first task in our experiments, we will consider aerial photos of vehicles, which have been used in several works that deal with rotation invariance (Liu et al., 2014; Schmidt & Roth, 2012; Henriques et al., 2014). ",
|
| 1098 |
+
"bbox": [
|
| 1099 |
+
176,
|
| 1100 |
+
478,
|
| 1101 |
+
823,
|
| 1102 |
+
521
|
| 1103 |
+
],
|
| 1104 |
+
"page_idx": 7
|
| 1105 |
+
},
|
| 1106 |
+
{
|
| 1107 |
+
"type": "text",
|
| 1108 |
+
"text": "Dataset. The Google Earth dataset (Heitz & Koller, 2008) contains bounding box annotations, supplemented with angle annotations from (Henriques et al., 2014), for 697 vehicles in 15 large images. We use the first 10 for training and the rest for validation. Going beyond these previous works, we focus on the estimation of both rotation and scale parameters. The object scale is taken to be the diagonal length of the bounding box. ",
|
| 1109 |
+
"bbox": [
|
| 1110 |
+
174,
|
| 1111 |
+
539,
|
| 1112 |
+
825,
|
| 1113 |
+
609
|
| 1114 |
+
],
|
| 1115 |
+
"page_idx": 7
|
| 1116 |
+
},
|
| 1117 |
+
{
|
| 1118 |
+
"type": "text",
|
| 1119 |
+
"text": "Implementation. A $4 8 \\times 4 8$ image around each vehicle is cropped and downscaled by $50 \\%$ , and then fed to a network for pose prediction. The proposed method, Warped CNN, follows the architecture of section 6.1 (visualized in fig. 2). The CNN block contains 3 convolutional layers with $5 \\times 5$ filters, with 20, 50 and 1 output channels respectively. Recall that the output of the CNN block is a single-channel response map over 2D pose-space, which in this case consists of rotation and scale. Between the convolutional layers there are $3 \\times 3$ max-pooling operators, with a stride of 2, and a ReLU before the last layer. All networks are trained for 20 epochs with SGD, using hyperparameters chosen by cross-validation. ",
|
| 1120 |
+
"bbox": [
|
| 1121 |
+
173,
|
| 1122 |
+
627,
|
| 1123 |
+
825,
|
| 1124 |
+
738
|
| 1125 |
+
],
|
| 1126 |
+
"page_idx": 7
|
| 1127 |
+
},
|
| 1128 |
+
{
|
| 1129 |
+
"type": "text",
|
| 1130 |
+
"text": "Baselines and results. The results of the experiments are presented in table 1, which shows angular and scale error in the validation set. Qualitative results are shown in fig. 3. To verify whether the proposed warped convolution is indeed responsible for a boost in performance, rather than other architectural details, we compare it against a number of baselines with different components removed. The first baseline, CNN $^ +$ softargmax, consists of the same architecture but without the warp (section 5.2). This is a standard CNN, with the soft argmax at the end. Since CNNs are equivariant to translation, rather than scale and rotation, we observe a drop in performance. For the second baseline, $\\mathrm { C N N + F C }$ , we replace the soft argmax with a fully-connected layer, to allow a prediction that is not equivariant with translation. The FC layer improves the angular error, but not the scale error. The proposed Warped CNN has a similar (slightly lower) capacity to the $\\mathrm { C N N + F C }$ baseline, but we see it achieve better performance, since its architectural equivariance seems to be better matched to the data distribution. ",
|
| 1131 |
+
"bbox": [
|
| 1132 |
+
174,
|
| 1133 |
+
757,
|
| 1134 |
+
825,
|
| 1135 |
+
922
|
| 1136 |
+
],
|
| 1137 |
+
"page_idx": 7
|
| 1138 |
+
},
|
| 1139 |
+
{
|
| 1140 |
+
"type": "table",
|
| 1141 |
+
"img_path": "images/bf93d6e3f74a317490197552af8bed33a05296e8f8bcae07c592ca6123689bd4.jpg",
|
| 1142 |
+
"table_caption": [
|
| 1143 |
+
"Table 2: Results of yaw and pitch pose estimation of faces on the AFLW dataset. "
|
| 1144 |
+
],
|
| 1145 |
+
"table_footnote": [],
|
| 1146 |
+
"table_body": "<table><tr><td></td><td>CNN+FC</td><td>STN+FC</td><td> STN+softargmax</td><td> Warped CNN</td></tr><tr><td>Yaw err. (deg.)</td><td>13.87</td><td>16.92</td><td>15.01</td><td>10.65</td></tr><tr><td>Pitch err. (deg.)</td><td>7.23</td><td>10.17</td><td>6.88</td><td>6.351</td></tr></table>",
|
| 1147 |
+
"bbox": [
|
| 1148 |
+
232,
|
| 1149 |
+
101,
|
| 1150 |
+
761,
|
| 1151 |
+
169
|
| 1152 |
+
],
|
| 1153 |
+
"page_idx": 8
|
| 1154 |
+
},
|
| 1155 |
+
{
|
| 1156 |
+
"type": "text",
|
| 1157 |
+
"text": "6.3 FACES ",
|
| 1158 |
+
"text_level": 1,
|
| 1159 |
+
"bbox": [
|
| 1160 |
+
174,
|
| 1161 |
+
218,
|
| 1162 |
+
261,
|
| 1163 |
+
233
|
| 1164 |
+
],
|
| 1165 |
+
"page_idx": 8
|
| 1166 |
+
},
|
| 1167 |
+
{
|
| 1168 |
+
"type": "text",
|
| 1169 |
+
"text": "We now turn to face pose estimation in unconstrained photos, which requires handling more complex 3D rotations under perspective. ",
|
| 1170 |
+
"bbox": [
|
| 1171 |
+
174,
|
| 1172 |
+
244,
|
| 1173 |
+
823,
|
| 1174 |
+
272
|
| 1175 |
+
],
|
| 1176 |
+
"page_idx": 8
|
| 1177 |
+
},
|
| 1178 |
+
{
|
| 1179 |
+
"type": "text",
|
| 1180 |
+
"text": "Dataset. For this task we use the Annotated Facial Landmarks in the Wild (AFLW) dataset (Koestinger et al., 2011). It contains about 25K faces found in Flickr photos, and includes yaw (left-right) and pitch (up-down) annotations. We removed 933 faces with yaw larger than 90 degrees (i.e., facing away from the camera), resulting in a set of 24,384 samples. $20 \\%$ of the faces were set aside for validation. ",
|
| 1181 |
+
"bbox": [
|
| 1182 |
+
174,
|
| 1183 |
+
286,
|
| 1184 |
+
825,
|
| 1185 |
+
357
|
| 1186 |
+
],
|
| 1187 |
+
"page_idx": 8
|
| 1188 |
+
},
|
| 1189 |
+
{
|
| 1190 |
+
"type": "text",
|
| 1191 |
+
"text": "Implementation. The region in each face’s bounding box is resized to a $6 4 \\times 6 4$ image, which is then processed by the network. Recall that our simplified 3D model of yaw and pitch rotation (section 5.3) assumes a spherical geometry. Although a person’s head roughly follows a spherical shape, the sample images are centered around the face, not the head. As such, we use an affine Spatial Transformer Network (STN) (Jaderberg et al., 2015) as a first step, to center the image correctly. Similarly, because the optimal camera parameters $( f , r$ and $d$ ) are difficult to set by hand, we let the network learn them, by computing their derivatives numerically (which has a low overhead, since they are scalars). The rest of the network follows the same diagram as before (fig. 2). The main CNN has 4 convolutional layers, the first two with $5 \\times 5$ filters, the others being $9 \\times 9$ . The numbers of output channels are 20, 50, 20 and 1, respectively. A $3 \\times 3$ max-pooling with a stride of 2 is performed after the first layer, and there are ReLU non-linearities between the others. As for the STN, it has 3 convolutional layers $\\mathrm { ( 5 \\times 5 ) }$ , with 20, 50 and 6 output channels respectively, and $3 \\times 3$ max-pooling (stride 2) between them. ",
|
| 1192 |
+
"bbox": [
|
| 1193 |
+
173,
|
| 1194 |
+
371,
|
| 1195 |
+
825,
|
| 1196 |
+
551
|
| 1197 |
+
],
|
| 1198 |
+
"page_idx": 8
|
| 1199 |
+
},
|
| 1200 |
+
{
|
| 1201 |
+
"type": "text",
|
| 1202 |
+
"text": "Baselines and results. The angular error of the proposed equivariant pose estimation, Warped CNN, is shown in table 2, along with a number of baselines. Qualitative results are shown in fig. 4. The goal of these experiments is to demonstrate that it is possible to achieve equivariance to complex 3D rotations. We also wish to disentangle the performance benefits of the warped convolution from the other architectural aspects. The first baseline, $\\mathrm { S T N + s }$ oftargmax, is the same as the proposed method, but without the warp. The large performance drop indicates that the spherical model incorporates important domain knowledge, which is ignored by a translation-equivariant STN. To allow nonequivariant models, we also test two other baselines where the softargmax is replaced with a fullyconnected (FC) layer. The $\\mathrm { S T N + F C }$ includes an affine Spatial Transformer, while the $\\mathrm { C N N + F C }$ does not, corresponding to a standard CNN of equivalent capacity. We observe that neither the FC or the STN components can account up for the performance of the warped convolution, which better exploits the natural 3D rotation equivariance of the data. ",
|
| 1203 |
+
"bbox": [
|
| 1204 |
+
173,
|
| 1205 |
+
565,
|
| 1206 |
+
825,
|
| 1207 |
+
733
|
| 1208 |
+
],
|
| 1209 |
+
"page_idx": 8
|
| 1210 |
+
},
|
| 1211 |
+
{
|
| 1212 |
+
"type": "text",
|
| 1213 |
+
"text": "7 CONCLUSIONS ",
|
| 1214 |
+
"text_level": 1,
|
| 1215 |
+
"bbox": [
|
| 1216 |
+
176,
|
| 1217 |
+
752,
|
| 1218 |
+
328,
|
| 1219 |
+
770
|
| 1220 |
+
],
|
| 1221 |
+
"page_idx": 8
|
| 1222 |
+
},
|
| 1223 |
+
{
|
| 1224 |
+
"type": "text",
|
| 1225 |
+
"text": "In this work we show that it is possible to reuse highly optimized convolutional blocks, which are equivariant to image translation, and coax them to exhibit equivariance to other operators, including 3D transformations. This is achieved by a simple warp of the input image, implemented with off-the-shelf components of deep networks, and can be used for image recognition tasks involving a large range of image transformations. Compared to other works, warped convolutions are simpler, relying on highly optimized convolution routines, and can flexibly handle many types of continuous transformations. Studying generalizations that support more than two parameters seems like a fruitful direction for future work. In addition to the practical aspects, our analysis offers some insights into the fundamental relationships between arbitrary image transformations and convolutional architectures. ",
|
| 1226 |
+
"bbox": [
|
| 1227 |
+
173,
|
| 1228 |
+
784,
|
| 1229 |
+
825,
|
| 1230 |
+
924
|
| 1231 |
+
],
|
| 1232 |
+
"page_idx": 8
|
| 1233 |
+
},
|
| 1234 |
+
{
|
| 1235 |
+
"type": "image",
|
| 1236 |
+
"img_path": "images/fb41b34c37d9d1158c9e5bd2cc84338546aa9a736b99811dd4154caf38a83c9a.jpg",
|
| 1237 |
+
"image_caption": [
|
| 1238 |
+
"Figure 4: Example pose estimates (yaw and pitch) on the AFLW dataset (Section 6.3). "
|
| 1239 |
+
],
|
| 1240 |
+
"image_footnote": [],
|
| 1241 |
+
"bbox": [
|
| 1242 |
+
174,
|
| 1243 |
+
101,
|
| 1244 |
+
825,
|
| 1245 |
+
255
|
| 1246 |
+
],
|
| 1247 |
+
"page_idx": 9
|
| 1248 |
+
},
|
| 1249 |
+
{
|
| 1250 |
+
"type": "text",
|
| 1251 |
+
"text": "REFERENCES ",
|
| 1252 |
+
"text_level": 1,
|
| 1253 |
+
"bbox": [
|
| 1254 |
+
174,
|
| 1255 |
+
308,
|
| 1256 |
+
287,
|
| 1257 |
+
324
|
| 1258 |
+
],
|
| 1259 |
+
"page_idx": 9
|
| 1260 |
+
},
|
| 1261 |
+
{
|
| 1262 |
+
"type": "text",
|
| 1263 |
+
"text": "Joan Bruna, Arthur Szlam, and Yann LeCun. Learning stable group invariant representations with convolutional networks. arXiv preprint arXiv:1301.3537, 2013. ",
|
| 1264 |
+
"bbox": [
|
| 1265 |
+
174,
|
| 1266 |
+
332,
|
| 1267 |
+
823,
|
| 1268 |
+
359
|
| 1269 |
+
],
|
| 1270 |
+
"page_idx": 9
|
| 1271 |
+
},
|
| 1272 |
+
{
|
| 1273 |
+
"type": "text",
|
| 1274 |
+
"text": "Taco Cohen and Max Welling. Learning the Irreducible Representations of Commutative Lie Groups. In Proceedings of the 31st International Conference on Machine Learning (ICML-14), 2014. ",
|
| 1275 |
+
"bbox": [
|
| 1276 |
+
174,
|
| 1277 |
+
369,
|
| 1278 |
+
825,
|
| 1279 |
+
411
|
| 1280 |
+
],
|
| 1281 |
+
"page_idx": 9
|
| 1282 |
+
},
|
| 1283 |
+
{
|
| 1284 |
+
"type": "text",
|
| 1285 |
+
"text": "Taco Cohen and Max Welling. Group equivariant convolutional networks. In Proceedings of the 33rd International Conference on Machine Learning (ICML-16), 2016. ",
|
| 1286 |
+
"bbox": [
|
| 1287 |
+
174,
|
| 1288 |
+
421,
|
| 1289 |
+
821,
|
| 1290 |
+
450
|
| 1291 |
+
],
|
| 1292 |
+
"page_idx": 9
|
| 1293 |
+
},
|
| 1294 |
+
{
|
| 1295 |
+
"type": "text",
|
| 1296 |
+
"text": "Sander Dieleman, Kyle W Willett, and Joni Dambre. Rotation-invariant convolutional neural networks for galaxy morphology prediction. Monthly notices of the royal astronomical society, 450 (2):1441–1459, 2015. ",
|
| 1297 |
+
"bbox": [
|
| 1298 |
+
173,
|
| 1299 |
+
458,
|
| 1300 |
+
825,
|
| 1301 |
+
502
|
| 1302 |
+
],
|
| 1303 |
+
"page_idx": 9
|
| 1304 |
+
},
|
| 1305 |
+
{
|
| 1306 |
+
"type": "text",
|
| 1307 |
+
"text": "Gerald B Folland. A course in abstract harmonic analysis. 1995. ",
|
| 1308 |
+
"bbox": [
|
| 1309 |
+
173,
|
| 1310 |
+
511,
|
| 1311 |
+
598,
|
| 1312 |
+
526
|
| 1313 |
+
],
|
| 1314 |
+
"page_idx": 9
|
| 1315 |
+
},
|
| 1316 |
+
{
|
| 1317 |
+
"type": "text",
|
| 1318 |
+
"text": "Geremy Heitz and Daphne Koller. Learning spatial context: Using stuff to find things. In European Conference on Computer Vision, pp. 30–43. Springer, 2008. ",
|
| 1319 |
+
"bbox": [
|
| 1320 |
+
176,
|
| 1321 |
+
535,
|
| 1322 |
+
823,
|
| 1323 |
+
564
|
| 1324 |
+
],
|
| 1325 |
+
"page_idx": 9
|
| 1326 |
+
},
|
| 1327 |
+
{
|
| 1328 |
+
"type": "text",
|
| 1329 |
+
"text": "J. F. Henriques, P. Martins, R. Caseiro, and J. Batista. Fast training of pose detectors in the fourier domain. In Advances in Neural Information Processing Systems, 2014. ",
|
| 1330 |
+
"bbox": [
|
| 1331 |
+
173,
|
| 1332 |
+
573,
|
| 1333 |
+
823,
|
| 1334 |
+
603
|
| 1335 |
+
],
|
| 1336 |
+
"page_idx": 9
|
| 1337 |
+
},
|
| 1338 |
+
{
|
| 1339 |
+
"type": "text",
|
| 1340 |
+
"text": "Aapo Hyvärinen, Jarmo Hurri, and Patrick O Hoyer. Natural Image Statistics: A Probabilistic Approach to Early Computational Vision., volume 39. Springer Science & Business Media, 2009. ",
|
| 1341 |
+
"bbox": [
|
| 1342 |
+
174,
|
| 1343 |
+
611,
|
| 1344 |
+
823,
|
| 1345 |
+
641
|
| 1346 |
+
],
|
| 1347 |
+
"page_idx": 9
|
| 1348 |
+
},
|
| 1349 |
+
{
|
| 1350 |
+
"type": "text",
|
| 1351 |
+
"text": "Max Jaderberg, Karen Simonyan, Andrew Zisserman, et al. Spatial transformer networks. In Advances in Neural Information Processing Systems, pp. 2017–2025, 2015. ",
|
| 1352 |
+
"bbox": [
|
| 1353 |
+
173,
|
| 1354 |
+
648,
|
| 1355 |
+
825,
|
| 1356 |
+
679
|
| 1357 |
+
],
|
| 1358 |
+
"page_idx": 9
|
| 1359 |
+
},
|
| 1360 |
+
{
|
| 1361 |
+
"type": "text",
|
| 1362 |
+
"text": "Angjoo Kanazawa, Abhishek Sharma, and David Jacobs. Locally scale-invariant convolutional neural networks. arXiv preprint arXiv:1412.5104, 2014. ",
|
| 1363 |
+
"bbox": [
|
| 1364 |
+
173,
|
| 1365 |
+
688,
|
| 1366 |
+
823,
|
| 1367 |
+
717
|
| 1368 |
+
],
|
| 1369 |
+
"page_idx": 9
|
| 1370 |
+
},
|
| 1371 |
+
{
|
| 1372 |
+
"type": "text",
|
| 1373 |
+
"text": "Martin Koestinger, Paul Wohlhart, Peter M. Roth, and Horst Bischof. Annotated facial landmarks in the wild: A large-scale, real-world database for facial landmark localization. In First IEEE International Workshop on Benchmarking Facial Image Analysis Technologies, 2011. ",
|
| 1374 |
+
"bbox": [
|
| 1375 |
+
176,
|
| 1376 |
+
726,
|
| 1377 |
+
825,
|
| 1378 |
+
768
|
| 1379 |
+
],
|
| 1380 |
+
"page_idx": 9
|
| 1381 |
+
},
|
| 1382 |
+
{
|
| 1383 |
+
"type": "text",
|
| 1384 |
+
"text": "Andrew Lavin. Fast algorithms for convolutional neural networks. arXiv preprint arXiv:1509.09308, 2015. ",
|
| 1385 |
+
"bbox": [
|
| 1386 |
+
169,
|
| 1387 |
+
777,
|
| 1388 |
+
823,
|
| 1389 |
+
806
|
| 1390 |
+
],
|
| 1391 |
+
"page_idx": 9
|
| 1392 |
+
},
|
| 1393 |
+
{
|
| 1394 |
+
"type": "text",
|
| 1395 |
+
"text": "Karel Lenc and Andrea Vedaldi. Understanding image representations by measuring their equivariance and equivalence. In Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 991–999, 2015. ",
|
| 1396 |
+
"bbox": [
|
| 1397 |
+
174,
|
| 1398 |
+
815,
|
| 1399 |
+
823,
|
| 1400 |
+
858
|
| 1401 |
+
],
|
| 1402 |
+
"page_idx": 9
|
| 1403 |
+
},
|
| 1404 |
+
{
|
| 1405 |
+
"type": "text",
|
| 1406 |
+
"text": "Kun Liu, Henrik Skibbe, Thorsten Schmidt, Thomas Blein, Klaus Palme, Thomas Brox, and Olaf Ronneberger. Rotation-Invariant HOG Descriptors Using Fourier Analysis in Polar and Spherical Coordinates. International Journal of Computer Vision, 106(3):342–364, February 2014. ISSN 0920-5691, 1573-1405. doi: 10.1007/s11263-013-0634-z. ",
|
| 1407 |
+
"bbox": [
|
| 1408 |
+
174,
|
| 1409 |
+
867,
|
| 1410 |
+
825,
|
| 1411 |
+
922
|
| 1412 |
+
],
|
| 1413 |
+
"page_idx": 9
|
| 1414 |
+
},
|
| 1415 |
+
{
|
| 1416 |
+
"type": "text",
|
| 1417 |
+
"text": "Richard G Lyons. Understanding digital signal processing. Pearson Education, 2010. ",
|
| 1418 |
+
"bbox": [
|
| 1419 |
+
171,
|
| 1420 |
+
103,
|
| 1421 |
+
735,
|
| 1422 |
+
119
|
| 1423 |
+
],
|
| 1424 |
+
"page_idx": 10
|
| 1425 |
+
},
|
| 1426 |
+
{
|
| 1427 |
+
"type": "text",
|
| 1428 |
+
"text": "Diego Marcos, Michele Volpi, and Devis Tuia. Learning rotation invariant convolutional filters for texture classification. arXiv preprint arXiv:1604.06720, 2016. ",
|
| 1429 |
+
"bbox": [
|
| 1430 |
+
171,
|
| 1431 |
+
127,
|
| 1432 |
+
823,
|
| 1433 |
+
156
|
| 1434 |
+
],
|
| 1435 |
+
"page_idx": 10
|
| 1436 |
+
},
|
| 1437 |
+
{
|
| 1438 |
+
"type": "text",
|
| 1439 |
+
"text": "B. Srinivasa Reddy and Biswanath N. Chatterji. An FFT-based technique for translation, rotation, and scale-invariant image registration. IEEE Transactions on Image Processing, 5(8):1266–1271, 1996. ",
|
| 1440 |
+
"bbox": [
|
| 1441 |
+
174,
|
| 1442 |
+
165,
|
| 1443 |
+
823,
|
| 1444 |
+
207
|
| 1445 |
+
],
|
| 1446 |
+
"page_idx": 10
|
| 1447 |
+
},
|
| 1448 |
+
{
|
| 1449 |
+
"type": "text",
|
| 1450 |
+
"text": "Uwe Schmidt and Stefan Roth. Learning rotation-aware features: From invariant priors to equivariant descriptors. In Computer Vision and Pattern Recognition (CVPR), 2012 IEEE Conference on, pp. 2050–2057, 2012. ",
|
| 1451 |
+
"bbox": [
|
| 1452 |
+
174,
|
| 1453 |
+
215,
|
| 1454 |
+
823,
|
| 1455 |
+
258
|
| 1456 |
+
],
|
| 1457 |
+
"page_idx": 10
|
| 1458 |
+
},
|
| 1459 |
+
{
|
| 1460 |
+
"type": "text",
|
| 1461 |
+
"text": "Georgios Tzimiropoulos, Vasileios Argyriou, Stefanos Zafeiriou, and Tania Stathaki. Robust FFTbased scale-invariant image registration with image gradients. IEEE Transactions on Pattern Analysis and Machine Intelligence, 32(10):1899–1906, 2010. ",
|
| 1462 |
+
"bbox": [
|
| 1463 |
+
174,
|
| 1464 |
+
268,
|
| 1465 |
+
825,
|
| 1466 |
+
310
|
| 1467 |
+
],
|
| 1468 |
+
"page_idx": 10
|
| 1469 |
+
},
|
| 1470 |
+
{
|
| 1471 |
+
"type": "text",
|
| 1472 |
+
"text": "A SPATIAL TRANSFORMATION FOR 3D SPHERE ROTATION UNDER PERSPECTIVE ",
|
| 1473 |
+
"text_level": 1,
|
| 1474 |
+
"bbox": [
|
| 1475 |
+
173,
|
| 1476 |
+
102,
|
| 1477 |
+
732,
|
| 1478 |
+
136
|
| 1479 |
+
],
|
| 1480 |
+
"page_idx": 11
|
| 1481 |
+
},
|
| 1482 |
+
{
|
| 1483 |
+
"type": "text",
|
| 1484 |
+
"text": "Our simplified model consists of a perspective camera with focal length $f$ and all other camera parameters equal to identity, at a distance $d$ from a centered sphere of radius $r$ (see fig. 1-d). ",
|
| 1485 |
+
"bbox": [
|
| 1486 |
+
174,
|
| 1487 |
+
150,
|
| 1488 |
+
825,
|
| 1489 |
+
180
|
| 1490 |
+
],
|
| 1491 |
+
"page_idx": 11
|
| 1492 |
+
},
|
| 1493 |
+
{
|
| 1494 |
+
"type": "text",
|
| 1495 |
+
"text": "A 2D point $x$ in image-space corresponds to the 3D point ",
|
| 1496 |
+
"bbox": [
|
| 1497 |
+
173,
|
| 1498 |
+
185,
|
| 1499 |
+
552,
|
| 1500 |
+
202
|
| 1501 |
+
],
|
| 1502 |
+
"page_idx": 11
|
| 1503 |
+
},
|
| 1504 |
+
{
|
| 1505 |
+
"type": "equation",
|
| 1506 |
+
"img_path": "images/31b2b0a184906950d991c80ce2aae529f41484f0295cf85ed81183c4f31b7898.jpg",
|
| 1507 |
+
"text": "$$\np = ( x _ { 1 } , x _ { 2 } , f ) .\n$$",
|
| 1508 |
+
"text_format": "latex",
|
| 1509 |
+
"bbox": [
|
| 1510 |
+
444,
|
| 1511 |
+
220,
|
| 1512 |
+
553,
|
| 1513 |
+
238
|
| 1514 |
+
],
|
| 1515 |
+
"page_idx": 11
|
| 1516 |
+
},
|
| 1517 |
+
{
|
| 1518 |
+
"type": "text",
|
| 1519 |
+
"text": "Raycasting it along the $z$ axis, it will intersect the sphere surface at the 3D point ",
|
| 1520 |
+
"bbox": [
|
| 1521 |
+
171,
|
| 1522 |
+
247,
|
| 1523 |
+
699,
|
| 1524 |
+
263
|
| 1525 |
+
],
|
| 1526 |
+
"page_idx": 11
|
| 1527 |
+
},
|
| 1528 |
+
{
|
| 1529 |
+
"type": "equation",
|
| 1530 |
+
"img_path": "images/65e033401ece94284d9a8c2e47819810b432e434dece1e0248f03118b89e64cd.jpg",
|
| 1531 |
+
"text": "$$\nq = { \\frac { p } { \\| p \\| } } \\left( k - { \\sqrt { k ^ { 2 } - d ^ { 2 } + r ^ { 2 } } } \\right) , k = { \\frac { f d } { \\| p \\| } } .\n$$",
|
| 1532 |
+
"text_format": "latex",
|
| 1533 |
+
"bbox": [
|
| 1534 |
+
352,
|
| 1535 |
+
279,
|
| 1536 |
+
645,
|
| 1537 |
+
313
|
| 1538 |
+
],
|
| 1539 |
+
"page_idx": 11
|
| 1540 |
+
},
|
| 1541 |
+
{
|
| 1542 |
+
"type": "text",
|
| 1543 |
+
"text": "If the argument of the square-root is negative, the ray does not intersect the sphere and so the point transformation is undefined. This means that the domain of the image $\\Omega$ should be restricted to the sphere region. In practice, in such cases we simply leave the point unmodified. ",
|
| 1544 |
+
"bbox": [
|
| 1545 |
+
174,
|
| 1546 |
+
321,
|
| 1547 |
+
825,
|
| 1548 |
+
364
|
| 1549 |
+
],
|
| 1550 |
+
"page_idx": 11
|
| 1551 |
+
},
|
| 1552 |
+
{
|
| 1553 |
+
"type": "text",
|
| 1554 |
+
"text": "Then, the yaw and pitch coordinates of the point $q$ on the surface of the sphere are ",
|
| 1555 |
+
"bbox": [
|
| 1556 |
+
173,
|
| 1557 |
+
371,
|
| 1558 |
+
712,
|
| 1559 |
+
386
|
| 1560 |
+
],
|
| 1561 |
+
"page_idx": 11
|
| 1562 |
+
},
|
| 1563 |
+
{
|
| 1564 |
+
"type": "equation",
|
| 1565 |
+
"img_path": "images/eef936dd424937eaf2ee8049bccbb30bbd6a80d89ead27a210e329c8de5152f5.jpg",
|
| 1566 |
+
"text": "$$\n\\phi _ { 1 } = \\cos ^ { - 1 } \\left( - \\frac { q _ { 2 } } { r } \\right) , \\phi _ { 2 } = \\mathrm { a t a n _ { 2 } } \\left( - \\frac { q _ { 1 } } { d - q _ { 3 } } \\right) .\n$$",
|
| 1567 |
+
"text_format": "latex",
|
| 1568 |
+
"bbox": [
|
| 1569 |
+
339,
|
| 1570 |
+
401,
|
| 1571 |
+
658,
|
| 1572 |
+
436
|
| 1573 |
+
],
|
| 1574 |
+
"page_idx": 11
|
| 1575 |
+
},
|
| 1576 |
+
{
|
| 1577 |
+
"type": "text",
|
| 1578 |
+
"text": "These polar coordinates are now rotated by the spatial transformation parameters, $\\phi ^ { \\prime } = \\phi + u$ ",
|
| 1579 |
+
"bbox": [
|
| 1580 |
+
173,
|
| 1581 |
+
446,
|
| 1582 |
+
789,
|
| 1583 |
+
463
|
| 1584 |
+
],
|
| 1585 |
+
"page_idx": 11
|
| 1586 |
+
},
|
| 1587 |
+
{
|
| 1588 |
+
"type": "text",
|
| 1589 |
+
"text": "Converting the polar coordinates back to a 3D point $q ^ { \\prime }$ ",
|
| 1590 |
+
"bbox": [
|
| 1591 |
+
173,
|
| 1592 |
+
468,
|
| 1593 |
+
532,
|
| 1594 |
+
483
|
| 1595 |
+
],
|
| 1596 |
+
"page_idx": 11
|
| 1597 |
+
},
|
| 1598 |
+
{
|
| 1599 |
+
"type": "equation",
|
| 1600 |
+
"img_path": "images/c31db84264a5f137aa8076f7b4f5b20fa78965ee3c84fec0a39ee035046b4fa2.jpg",
|
| 1601 |
+
"text": "$$\n\\begin{array} { r } { q ^ { \\prime } = \\left[ \\begin{array} { c } { r \\sin \\phi _ { 1 } ^ { \\prime } \\sin \\phi _ { 2 } ^ { \\prime } } \\\\ { - r \\cos \\phi _ { 1 } ^ { \\prime } } \\\\ { r \\sin \\phi _ { 1 } ^ { \\prime } \\cos \\phi _ { 2 } ^ { \\prime } - d } \\end{array} \\right] . } \\end{array}\n$$",
|
| 1602 |
+
"text_format": "latex",
|
| 1603 |
+
"bbox": [
|
| 1604 |
+
397,
|
| 1605 |
+
500,
|
| 1606 |
+
601,
|
| 1607 |
+
545
|
| 1608 |
+
],
|
| 1609 |
+
"page_idx": 11
|
| 1610 |
+
},
|
| 1611 |
+
{
|
| 1612 |
+
"type": "text",
|
| 1613 |
+
"text": "Finally, projection of $q ^ { \\prime }$ into image-space yields ",
|
| 1614 |
+
"bbox": [
|
| 1615 |
+
174,
|
| 1616 |
+
555,
|
| 1617 |
+
488,
|
| 1618 |
+
571
|
| 1619 |
+
],
|
| 1620 |
+
"page_idx": 11
|
| 1621 |
+
},
|
| 1622 |
+
{
|
| 1623 |
+
"type": "equation",
|
| 1624 |
+
"img_path": "images/9121d7cb1fbc46d052286b9a607a4800601ac9121a4351b6b000ffc46db5e8eb.jpg",
|
| 1625 |
+
"text": "$$\nt _ { u } ( x ) = - { \\frac { f } { q _ { 3 } ^ { \\prime } } } \\left[ \\begin{array} { c } { { q _ { 1 } ^ { \\prime } } } \\\\ { { q _ { 2 } ^ { \\prime } } } \\end{array} \\right] .\n$$",
|
| 1626 |
+
"text_format": "latex",
|
| 1627 |
+
"bbox": [
|
| 1628 |
+
423,
|
| 1629 |
+
587,
|
| 1630 |
+
575,
|
| 1631 |
+
622
|
| 1632 |
+
],
|
| 1633 |
+
"page_idx": 11
|
| 1634 |
+
}
|
| 1635 |
+
]
|
parse/train/BkmM8Dceg/BkmM8Dceg_middle.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/train/BkmM8Dceg/BkmM8Dceg_model.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/train/H1gzR2VKDH/H1gzR2VKDH_middle.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/train/H1gzR2VKDH/H1gzR2VKDH_model.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/train/O9bnihsFfXU/O9bnihsFfXU_middle.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/train/O9bnihsFfXU/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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Computer-Aided Design as Language
|
| 2 |
+
|
| 3 |
+
Yaroslav Ganin1∗ Sergey Bartunov1 Yujia Li1 Ethan Keller2 Stefano Saliceti1 1DeepMind 2Onshape
|
| 4 |
+
|
| 5 |
+
# Abstract
|
| 6 |
+
|
| 7 |
+
Computer-Aided Design (CAD) applications are used in manufacturing to model everything from coffee mugs to sports cars. These programs are complex and require years of training and experience to master. A component of all CAD models particularly difficult to make are the highly structured 2D sketches that lie at the heart of every 3D construction. In this work, we propose a machine learning model capable of automatically generating such sketches. Through this, we pave the way for developing intelligent tools that would help engineers create better designs with less effort. The core of our method is a combination of a generalpurpose language modeling technique alongside an off-the-shelf data serialization protocol. Additionally, we explore several extensions allowing us to gain finer control over the generation process. We show that our approach has enough flexibility to accommodate the complexity of the domain and performs well for both unconditional synthesis and image-to-sketch translation.
|
| 8 |
+
|
| 9 |
+
# 1 Introduction
|
| 10 |
+
|
| 11 |
+
Computer-Aided Design (CAD) is used in the production of most manufactured objects: from cars to robots to stents to power plants. CAD has replaced pencil drawings with precise computer sketches, enabling unparalleled precision, flexibility, and speed. Despite these improvements the CAD engineer must still develop, relate and annotate all the minutiae of their designs with the same attention to detail as their draftingtable forebears. CAD productivity might be improved by the careful application of machine learning to automate predictable design tasks and free the engineer to focus on the bigger picture. The flexibility and power of deep learning is uniquely suited to the complexity of design.
|
| 12 |
+
|
| 13 |
+
Sketches are at the heart of mechanical CAD. They are the skeleton from which three dimensional forms are made. A sketch consists of various geometric entities (e.g., lines, arcs, splines and circles) related by specific constraints such as tangency, perpendicularity and symmetry. Figure 1 illustrates how entities and constraints work in tandem to create well-defined shapes. Geometric entities lie on a single plane and together form enclosed regions used by subsequent construction operations such as lofts and extrusions to generate complex
|
| 14 |
+
|
| 15 |
+

|
| 16 |
+
Figure 1: The anatomy of a CAD sketch. Sketches are the main building block of every 3D construction. A sketch consists of entities (e.g., lines and arcs) and constraints (e.g., tangent and mirror). The dotted curve shows what happens if we drop some of the constraints — the design idea is lost.
|
| 17 |
+
|
| 18 |
+

|
| 19 |
+
Figure 2: Interpreter-guided generation of a sketch. At each point in time, a Transformer [33] outputs a raw value which is fed into an interpreter that decides which field of a Protocol Buffers message this value corresponds to. Once the field is populated the interpreter communicates $( - )$ its decision back to the Transformer and transitions $( \nrightarrow )$ to the next state.
|
| 20 |
+
|
| 21 |
+
3D geometry. Well-chosen sketch constraints are essential to properly convey design intent [2] and facilitate the sketch’s resilience to successive parameters modifications which is often understood as a measure of the quality of a design document [8]. The dotted curve in Figure 1 shows what happens when some of the constraints are dropped – the design idea is lost.
|
| 22 |
+
|
| 23 |
+
The complexities of sketch construction are analogous to those of natural language modeling. Selecting the next constraint or entity in a sketch is like the generation of the next word in a sentence. In both contexts, the selection must function grammatically (form a consistent constraint system in the case of the sketch) and work towards some cohesive meaning (preserve design intent). Luckily, machine learning has proved highly successful in generating natural language — especially the Transformer [33] trained on vast amounts of real-world data [26, 6]. It is therefore a promising choice for adapting to the task of sketch generation. This work is our take at this adaptation.
|
| 24 |
+
|
| 25 |
+
We make the following contributions: (1) We devise a method for describing structured objects using Protocol Buffers [32] and demonstrate its flexibility on the domain of natural CAD sketches. (2) We propose several techniques for capturing distributions of objects represented as serialized Protocol Buffers. Our approach draws inspiration from recent advances in language modeling while focusing on eliminating data redundancy. (3) We collect a dataset of over $4 . 7 \mathbf { M }$ of carefully preprocessed parametric CAD sketches and use this dataset to validate the proposed generative models. To our knowledge, the experiments presented in this work significantly surpass the scale of those reported in the literature both in terms of the amount of training data and the model capacity.
|
| 26 |
+
|
| 27 |
+
# 2 Related work
|
| 28 |
+
|
| 29 |
+
Datasets and generative models for CAD. Until recently there were very few parametric CAD datasets large and varied enough to serve as training data for machine learning. This situation had started to change with the release of the ABC dataset [16] containing a collection of 3D shapes from the Onshape public repository [22]. Unfortunately, the main focus of [16] revolves around meshes and, as a result, the dataset is difficult to use for sketch modeling.
|
| 30 |
+
|
| 31 |
+
Several works concurrent with ours deal with the symbolic representation of CAD constructions. Seff et al. [31] center their attention on contributing a better dataset of 2D sketches but also provide a proof-of-concept model predicting a selected subset of object attributes. Willis et al. [37] use the dataset from [31] to train a modification of [21] which demonstrates a boost in generation quality but is designed to only work for sketch entities. The latter is addressed in our present work and in a subsequent paper by Para et al. [24]. While [24] employ very similar ideas to ours they do not support certain features of the CAD data and their proposed model is a more direct adaptation of [21] and therefore cannot handle arbitrary orderings of entities and constraints. In Section 5, we show that object ordering has a substantial impact on the performance.
|
| 32 |
+
|
| 33 |
+
Fusion 360 Gallery [36] attacks CAD data from a different angle. Here, the task is to recover a sequence of extrusion operations that gives rise to a particular target 3D shape. Despite dealing with 3D, this setting is deliberately limited: sketches are assumed to be given and the proposed model only decides on which sketch to extrude and to what extent. [38] considers a more general scenario where extrusion profiles are not provided and need to be synthesized from scratch. Although both of these works make initial steps towards full parametric CAD generation, they rely on significant simplifying assumptions and therefore it is unclear how well they will scale to more real-world scenarios. Our approach, on the other hand, is designed to be flexible and domain-agnostic and is only limited by the data availability.
|
| 34 |
+
|
| 35 |
+
Vector image generation and inference. Synthesizing CAD sketches bears a lot of similarities with predicting vector graphics. In this field, several recent works Carlier et al. [7] and Reddy et al. [30] using different vector object representations to define generative models of vector images. Egiazarian et al. [13] take a more traditional computer vision approach and propose a multi-stage pipeline for vectorizing technical drawings. All of these methods use highly domain-dependent architectures and, therefore, it would be a non-trivial task to adapt them for generation of complex sketch objects. CAD community has also been concerned with a similar task of image to CAD conversion [20, 34, 10, 11], largely focusing on heuristic object recognition while our work relies more on learning the recognition from data.
|
| 36 |
+
|
| 37 |
+
Transformers for sequence modeling. In our work, we employ Transfomers [33] as a computational backbone for the proposed approach. Due to its scalability and excellent performance [29, 9, 6, 27], this architecture has become the dominating approach in many sequence modeling applications. Our method can be seen as generalization of PolyGen [21], a Transformer-based generative model for 3D meshes. Similarly to [21], we use Pointer Networks [35] to relate items in the synthesized sequence. Unlike PolyGen, however, our framework can handle non-homogeneous structures of arbitrary complexity. Moreover, we simplify the architecture to use a single neural network to generate the entire object of interest. All these improvements make our approach a good fit for modeling CAD sketches and potentially other components of CAD constructions.
|
| 38 |
+
|
| 39 |
+
# 3 Data
|
| 40 |
+
|
| 41 |
+
Formally, a CAD sketch is defined by two collections of objects: entities and constraints. Each object is generally represented as a set of attribute-value pairs where a value can be either primitive (e.g., integer or floating-point) or complex (e.g., an array or another object). Sketches that we use in this work originate from the Onshape platform [22] which provides them in JSON format [25]. As the first step in our processing pipeline we convert JSON messages into Protocol Buffers (PB) [32]. In order to keep the pipeline as domain-agnostic and as widely applicable as possible, we aim to avoid any significant changes to the data and largely retain the original structures of objects. The benefit of converting into PB is twofold: the resulting data occupies less space because unnecessary information is removed, but also, unlike JSON, PB provide a convenient way to define precise specifications for structures of arbitrary complexity.
|
| 42 |
+
|
| 43 |
+
Listing 1a shows how we represent the line entity and the mirror constraint (see Appendix A for an extensive list of supported objects). The line specification is straightforward: we first need to decide whether our entity should be treated as a construction geometry2 and then provide pairs of coordinates for the beginning and end of the segment. The MirrorConstraint is used to force an arbitrary number of pairs of geometries (i.e., mirrored_pairs) to be symmetrical with respect to some axis (i.e., mirror). Constraints rely on the Pointer data type to specify entities they act upon. In practice, a pointer is simply an index in the table of all the eligible pointees (i.e., entities and their parts).
|
| 44 |
+
|
| 45 |
+
message LineEntity { bool is_construction $\ c = ~ 1$ ; message Vector $\{ \begin{array} { r l } \end{array} / / $ 2D coordinate. double $\texttt { x } = \texttt { 1 }$ ; double $\tt { y } = 2$ ; } Vector start $= ~ 2$ ; // Start point. Vector end $\ c = \ 3$ ; // End point.
|
| 46 |
+
}
|
| 47 |
+
message MirrorConstraint { Pointer mirror $\ c = ~ 1$ ; // Axis of symmetry. message Pair { // Mirrored objects. Pointer first $\ l = \ 1$ ; Pointer second $= ~ 2$ ; } repeated Pair mirrored_pairs $= ~ 2$ ;
|
| 48 |
+
}
|
| 49 |
+
|
| 50 |
+
(a) Entities and constraints have similar structures. Pointers refer to entities that constraints are applied to.
|
| 51 |
+
|
| 52 |
+
message Entity { oneof kind { LineEntity line $\ l = \ 1$ ; // And other entity types. }
|
| 53 |
+
}
|
| 54 |
+
message Object { oneof kind { Entity entity $\ l = \ 1$ ; Constraint constraint $= ~ 2$ ; }
|
| 55 |
+
}
|
| 56 |
+
message Constraint { // Defined similarly to Entity.
|
| 57 |
+
}
|
| 58 |
+
message Sketch { repeated Object objects $\ c = ~ 1$ ;
|
| 59 |
+
}
|
| 60 |
+
|
| 61 |
+
(b) A full sketch is defined as a sequence of objects each of which can be either an entity or a constraint.
|
| 62 |
+
|
| 63 |
+
Listing 1: Examples of object specifications. We represent objects using Protocol Buffers. Protocol Buffers allow us to easily write specifications for structured objects of varying complexity.
|
| 64 |
+
|
| 65 |
+
Our ultimate goal is to build a machine learning model of sketch objects. To that end, we process the data even further and represent these objects as sequences of tokens. This allows us to pose sketch generation as language modeling (LM) and take advantage of the recent progress in this area [26, 6]. To achieve this, we pack first collections of entities and constraints into one Protocol Buffer message (see Listing 1b) assuming some ordering of objects. We discuss different orderings in Section 5.
|
| 66 |
+
|
| 67 |
+
There are a few ways to obtaining a sequence of tokens from a sketch message. Arguably the most intuitive one is to format messages as text. For a line entity connecting (0.0, 0.1) and $( - 0 . 5 , 0 . 2 )$ this will result in:
|
| 68 |
+
|
| 69 |
+
{ is_construction: true, start { x: 0.0, y: 0.1 }, end { x: -0.5, y: 0.2 } }
|
| 70 |
+
|
| 71 |
+
Since this format contains both the structure and the content of the data, the resulting sequences end up being prohibitively long. Additionally, the model would have to generate valid syntax, which would take up some portion of the model’s capacity. To overcome these challenges, we work with two flavours of serialized PB messages.
|
| 72 |
+
|
| 73 |
+
The first one is a sequences of bytes obtained by calling the SerializeToString() method of a message. Such sequences are much shorter since the structure is handled by an external parser automatically generated from the data specification. The parser’s task is to interpret the incoming stream of unstructured bytes and populate the fields of PB messages. However, like the text format, not every sequence of bytes results in a valid PB message.
|
| 74 |
+
|
| 75 |
+
Going one step further, we can utilize the structure of the sketch format more directly, and build a custom interpreter, that takes as input a sequence of tokens each representing a valid choice at various decision steps [4] in the sketch creation process. We designed this interpreter in such a way that all sequences of tokens in this format lead to valid PB messages. More specifically, we represent a message as a sequence of triplets $( d _ { i } , c _ { i } , f _ { i } )$ where $i$ is an index of the token. The majority of tokens describe basic fields of the sketch objects with each token representing exactly one field. The first two positions in each triplet are allocated for a discrete value and a continuous value respectively. Since each field in a message is either discrete or continuous only one of two positions is active at a time (the other one is set to a default zero value). The third component is a boolean flag signifying the end of a repeated field3 which contains a list of elements of the same type. An example sequence for a sketch containing a line and a point placed at one of its ends is shown in Table 1 (Triplet column).
|
| 76 |
+
|
| 77 |
+
<table><tr><td>Triplet</td><td>Field</td><td></td><td>Triplet</td><td>Field</td></tr><tr><td>1.</td><td>(0,0.0,False)</td><td>objects.kind</td><td>8. (0,0.0,False)</td><td>objects.kind</td></tr><tr><td>2.</td><td>(0,0.0,False)</td><td>entity.kind</td><td>9. (1, 0.0,False)</td><td>entity.kind</td></tr><tr><td>3.</td><td>(1,0.0,False)</td><td>line.is_constr</td><td>10. (0, 0.0,False)</td><td>Point point.is_const</td></tr><tr><td>4.</td><td>(0, 0.0,False)</td><td>line.start.x</td><td>11. (0, 0.0,False)</td><td>point .x</td></tr><tr><td>5.</td><td>(0,0.1,False)</td><td>line.start.y</td><td>12. (0,0.1,False)</td><td>point.y</td></tr><tr><td>6.</td><td>(0,-0.5,False)</td><td>line.end.x</td><td>13. (0, 0.0, True)</td><td>objects.kind</td></tr><tr><td>7.</td><td>(0, 0.2,False)</td><td>line.end.y</td><td></td><td></td></tr></table>
|
| 78 |
+
|
| 79 |
+
Table 1: A triplet representation of a simple sketch. The sketch contains and a line and a point. Within each triplet in the left column, the active component (the value that is actually used) is highlighted in bold. The right column shows which field of the object the triplet is associated with.
|
| 80 |
+
|
| 81 |
+
Given a sequence of such triplets, it is possible to infer which exact field each token corresponds to. Indeed, the very first token $( d _ { 1 } , c _ { 1 } , f _ { 1 } )$ is always associated with objects.kind since it is the first choice that needs to be made to create a Sketch message (see Listing 1b). The second field depends on the concrete value of $d _ { 1 }$ . If $d _ { 1 } = 0$ then the first object is an entity which means that the second token corresponds to entity.kind . The rest of the sequence is associated in a similar fashion. Field identifiers along with their locations within an object form the context of the tokens. We use this contextual information as an additional input for our machine learning models since it makes it easier to interpret the meaning of the triplet values and to be aware of the overall structure of the data.
|
| 82 |
+
|
| 83 |
+
# 4 Model
|
| 84 |
+
|
| 85 |
+
In order to estimate the distribution $p _ { \mathrm { d a t a } }$ of 2D sketches in a dataset $\mathcal { D }$ , we decompose the joint distribution over the sequence of tokens [19] $\mathbf { t } = ( t _ { 1 } , \ldots , t _ { N } )$ in an autoregressive fashion, representing each conditional with a neural network parameterized by $\theta$ and pose the estimation of $p _ { \mathrm { d a t a } }$ as maximization of the log-likelihood of $\mathcal { D }$ , i.e.,
|
| 86 |
+
|
| 87 |
+
$$
|
| 88 |
+
p ( t ; \theta ) = \prod _ { i = 1 } ^ { N } p ( t _ { i } \mid t _ { < i } ; \theta ) , \quad \sum _ { t \in \mathcal { D } } \log p ( t ; \theta ) \to \operatorname* { m a x } _ { \theta } ,
|
| 89 |
+
$$
|
| 90 |
+
|
| 91 |
+
where $N$ is the length of the sequence and $t _ { < i }$ denotes all the tokens preceding $t _ { i }$ .
|
| 92 |
+
|
| 93 |
+
More concretely, we employ the Transformer decoder architecture [33] that takes an embedding of the token $\pmb { e } _ { i - 1 } \overset { \cdot } { = } \mathrm { e m b e d } _ { i } ^ { \cdot } ( t _ { i - 1 } ^ { \cdot } ) \in \mathbb { R } ^ { D }$ and maps it into another vector $\boldsymbol { h } _ { i }$ of the same dimensionality. The latter is decoded into parameters of $p ( t _ { i } \mid t _ { < i } )$ by a learned mapping $\mathsf { d i s t } _ { i } ( \cdot )$ .4
|
| 94 |
+
|
| 95 |
+
Byte representation When dealing with the bytes of a PB message, each token is simply a discrete value in the range $\{ 0 , \dots , 2 5 5 \} \cup \{ \bar { \bf E 0 S } \}$ and therefore $p ( t _ { i } \mid t _ { < i } ; \bar { \theta ( \mathbf { \Sigma } ) }$ can be modeled as a categorical distribution similar to how it’s done in typical LM approaches [5]. In this setting, for each time step $i$ of the sequence we have
|
| 96 |
+
|
| 97 |
+
$$
|
| 98 |
+
\mathbf { e m b e d } _ { i } ( t _ { i - 1 } ) = V [ t _ { i - 1 } ] + e _ { i } ^ { \mathrm { p o s } } ,
|
| 99 |
+
$$
|
| 100 |
+
|
| 101 |
+
where $[ \cdot ]$ denotes the lookup operation and $e _ { i } ^ { \mathrm { p o s } }$ is a position embedding for position $i$ . Both $V$ and $e _ { i } ^ { \mathrm { p o s } }$ are learned. Moreover, $\forall i \ \mathtt { d i s t } _ { i }$ is the same linear projection into $\mathbb { R } ^ { 2 5 7 }$ (256 values and EOS) and the output is treated as logits of the distribution.
|
| 102 |
+
|
| 103 |
+
Triplet representation In case of the triplet representation, we follow a slightly more involved procedure. As outlined in Section 3, tokens can be either discrete or continuous. Additionally, different discrete tokens may have different ranges of values. For example, there are only two possible values for the object.kind token – either to an entity or a constraint. On the other hand, the range of the entity.kind token has cardinality of 4 since we support 4 different types of sketch entities. This means that we can’t naively describe each conditional in Equation 1 using the same template distribution like we did for the bytes. We circumvent this by introducing the notion of token groups.
|
| 104 |
+
|
| 105 |
+
A token group $\mathcal { G }$ is a collection of related token types that can be handled in a similar fashion. Specifically, we use the same embedding function and the same projection for every $t$ such that
|
| 106 |
+
|
| 107 |
+

|
| 108 |
+
|
| 109 |
+
(a) Unconditional byte model.
|
| 110 |
+
|
| 111 |
+
(b) Unconditional triplet model.
|
| 112 |
+
|
| 113 |
+

|
| 114 |
+
Figure 3: Synthesized sketches and data. (a)–(c) show samples from various proposed models (we use Nucleus Sampling with top- $p = 0 . 9 ,$ ). In (c), the output is rendered in a slightly thicker style. (d) demonstrates samples from the unconditional model after applying predicted constraints (the output is in blue). (e) shows examples from the dataset.
|
| 115 |
+
|
| 116 |
+
$\mathsf { t y p e } ( t ) \in \mathcal { G }$ . For instance, we might want to group all the tokens associated with coordinates. In the example from Table 1, tokens with indices 4–7 and 11–12 will all end up in the same $\mathcal { G } ^ { 5 }$ . Naturally, we use the same functional form for the output distribution $p ( t _ { i } \mid t _ { < i } ; \boldsymbol { \theta } )$ within each group.
|
| 117 |
+
|
| 118 |
+
We embed $t _ { i - 1 }$ that belongs to the group $\mathcal { G }$ as (note the difference with Equation 2):
|
| 119 |
+
|
| 120 |
+
$$
|
| 121 |
+
K [ \mathbf { f i e l d } ( t _ { i - 1 } ) ] + V ^ { \mathcal { G } } [ t _ { i - 1 } ] + e _ { n } ^ { \mathrm { o b j } } + e _ { m } ^ { \mathrm { r e l } } ,
|
| 122 |
+
$$
|
| 123 |
+
|
| 124 |
+
where field $( t )$ returns the field of $t$ (e.g., objects.kind or line.start. $\mathtt { x }$ ) and $K$ is a collection of learnable embeddings for every possible field type. Unlike in Equation 2, instead of using global position embedding eposi w e describe the location with the index $n$ of the current object as well as the relative position $m$ of $t _ { i - 1 }$ within an object.
|
| 125 |
+
|
| 126 |
+
We handle the “end” tokens (i.e., $f _ { i } = \mathrm { T r u e } )$ similarly to EOS in Section 4 — the output projection produces an additional logit used to compute the probability of ending the repetition. Since $f _ { i }$ is only expected to be True at particular points in the sequence (i.e., right after tokens forming a whole element of the list) we mask out the extra logit everywhere else. This ensures that the “end” token can’t be predicted prematurely and also eliminates its unnecessary contribution to the optimized objective.
|
| 127 |
+
|
| 128 |
+
One significant difference between the byte setting and the triplet setting is how we process pointer fields. In the former, pointers do not get any special treatment and are generated just like any other integer field. We rely on the model’s capability to make sense of the entity part index and relate it to the corresponding locations in the sequence via attention weights. This seems to be a viable strategy since Transformers have demonstrated an impressive referencing capacity in recent works [6].
|
| 129 |
+
|
| 130 |
+
Since the triplet representation provides us with direct access to the semantics of tokens it’s possible to relate pointers to their pointees more explicitly by using Pointer Networks [35]. The approach we are taking here is similar to [21]. In order to compute $p ( t _ { i } \mid t _ { < i } ; \theta )$ , we first project the output of the Transformer $\boldsymbol { h } _ { i }$ into the final pointer vector $p _ { i } = { W _ { \mathrm { p t r } } h _ { i } }$ . The conditional is then obtained as follows:
|
| 131 |
+
|
| 132 |
+
$$
|
| 133 |
+
\begin{array} { r } { p ( t _ { i } \mathrm { ~ p o i n t s ~ t o ~ } t _ { i k } \mid t _ { < i } ; \theta ) = \mathrm { s o f t m a x } _ { k } ( \pmb { p } _ { i } ^ { T } H _ { i } ) , \quad H _ { i } = [ \pmb { h } _ { i 1 } , \dots , \pmb { h } _ { i k } , \dots , \pmb { h } _ { i M } ] , } \end{array}
|
| 134 |
+
$$
|
| 135 |
+
|
| 136 |
+
where $\operatorname { s o f t m a x } _ { k }$ is the $k$ -th element of the softmax vector and $\boldsymbol { r } _ { i } = \{ t _ { i 1 } , . . . , t _ { i M } \}$ is the set of tokens that $t _ { i }$ can point to. Naturally, $\mathbf { \nabla } _ { \mathbf { r } _ { i } }$ only contains tokens from $t _ { < i }$ . This is different from [35, 21] where $\textstyle r _ { i } \equiv r$ is external to the predicted sequence and remains immutable throughout the generation process.
|
| 137 |
+
|
| 138 |
+
In Onshape, constraints can be applied not only to whole entities but also to their subparts (e.g., the center of a circle or the end points of a line segment). To handle this, we introduce special referrable tokens decoupling pointees from the object attribute tokens. Referrables are injected after each entity and have the same identifier within each entity type. In order to let the model distinguish between different subparts, we adjust Equation 3 to use a learnable embedding of a part index instead of $V ^ { \mathcal { G } } [ t _ { i - 1 } ]$ . As referrable tokens do not need to be predicted the respective terms are removed from Equation 1. For the same reason, in Equation 4, $\boldsymbol { h } _ { i k }$ corresponds to the time step where $t _ { i k }$ is the output and not the input. This allows us to avoid having unused Transformer outputs.
|
| 139 |
+
|
| 140 |
+
Finally, we need to specify how we embed pointers as inputs to the Transformer network. Following [35, 21] we could reuse $h _ { j }$ for tokens that point to $t _ { j }$ . Unfortunately, this creates output-to-input connections which are extremely detrimental to the efficiency of the Transformer architecture — different time steps can no longer be processed in parallel during training. Instead, we opt for a simpler solution and employ the standard embedding scheme for discrete tokens (Equation 3).
|
| 141 |
+
|
| 142 |
+
Sampling from the model Sampling from the byte model is identical to sampling from any typical Transformer-based LM. The triplet model, on the other hand, requires slightly more bespoke handling. Figure 2 illustrates the procedure. We start by embedding and feeding a special BOS token into the Transformer. The Transformer then outputs a collection of triplets, one for each possible token group. In order to determine which concrete token needs to be emitted, we employ an interpreter (a state machine) automatically generated from the data specification. Knowing the current state allows us to choose the right token group and associate the active component of the triplet with a field in the synthesized object. Once the appropriate field is populated the interpreter transitions to the next state and produces an output token which is then fed back into the model. The process stops when the state machine receives the “end” triplet for the outermost repeated field (i.e., object.kind ).
|
| 143 |
+
|
| 144 |
+
Conditional generation In addition to the unconditional model described above, we explore a variant that allows us to translate bitmaps into sketches. Here, we simply let the main Transformer cross-attend to the features extracted from the input image by a ViT network [12]. The specific setup is detailed in Appendix C.
|
| 145 |
+
|
| 146 |
+
# 5 Experiments
|
| 147 |
+
|
| 148 |
+
We validate our proposed approaches on the data that we obtained from the repository of documents publicly available on the Onshape platform [22]. Following the standard evaluation methodology for autoregressive generative models [23, 21] we use log-likelihood as our primary quantitative metric. Additionally, we provide a variety of random and selected model samples for qualitative assessment (Figure 3).
|
| 149 |
+
|
| 150 |
+
Dataset Unlike the majority of the existing works dealing with CAD sketch generation [31, 37, 24] we do not rely on SketchGraphs [31]. Instead, we collect the largest to date dataset of engineering sketches addressing the main disadvantage of [31], severe data duplication. The acquisition and the filtering procedures
|
| 151 |
+
|
| 152 |
+
Table 2: Test likelihoods of various models. The object column is computed as the average number of bits per object in a sketch averaged across test examples. The sketch column is similar except we do not divide by the number of objects.
|
| 153 |
+
|
| 154 |
+
<table><tr><td rowspan="2">Model</td><td rowspan="2"> Sequence</td><td colspan="2">Average bits per</td></tr><tr><td>object</td><td>sketch</td></tr><tr><td>Uniform</td><td>unord. bytes</td><td>112.23</td><td>3683.56</td></tr><tr><td></td><td>unord. triplets</td><td>25.34</td><td>847.52</td></tr><tr><td>Text</td><td>interleaved</td><td>4.622</td><td>139.687</td></tr><tr><td>Byte</td><td>concatenated</td><td>4.381</td><td>132.621</td></tr><tr><td rowspan="3">Triplet</td><td>interleaved</td><td>4.252</td><td>127.495</td></tr><tr><td>concatenated</td><td>4.218</td><td>127.913</td></tr><tr><td>interleaved</td><td>4.103</td><td>123.213</td></tr><tr><td>Cond.</td><td>interleaved</td><td>1.570</td><td>53.730</td></tr></table>
|
| 155 |
+
|
| 156 |
+

|
| 157 |
+
Figure 4: Distribution of various sketch statistics for samples drawn from our unconditional models. The top- $p$ parameter for Nucleus Sampling is shown in parentheses.
|
| 158 |
+
|
| 159 |
+
are detailed in Appendix D. For our experiments we split the dataset randomly into 3 parts: 4,656,607
|
| 160 |
+
examples for the training set and 50,000 sketches for each the validation and the test set.6
|
| 161 |
+
|
| 162 |
+
Unconditional generation. In this series of experiments, the goal is to determine how well our models capture the distribution of sketches in the dataset. We use the same network architecture for both the byte and the triplet settings.7 We compare two orderings of objects: in the first one (concatenated), constraints go after the last entity while in the second (interleaved), a constraint object is injected immediately after the entities it operates on. In both cases, the relative orderings within both the sequence of entities and the sequence of constraints are taken directly from the original JSON messages.
|
| 163 |
+
|
| 164 |
+
Table 2 shows test log-likelihoods obtained by different models. Unsurprisingly, our proposed methods (rows 4–7) significantly outperform the weak baselines (rows 1–2). The difference between the two uniform settings is due to the fact that the byte description of a PB message is usually longer than the triplet one: $2 3 9 \nu s . 4 5 6$ tokens on average with the maximum length of 959 vs. 1987. Additionally, the tokens in the triplet representation tend to have smaller range of values $( i . e . , < 2 5 7 )$ ).
|
| 165 |
+
|
| 166 |
+
These differences between representations may partially explain why triplet models demonstrate better performance on the hold-out test set. It’s also worth emphasizing that the byte model does not receive any explicit information about the parsing state. This seem to make learning more challenging and as a result compared to the triplet model it takes roughly 3 times more network updates to reach the highest data likelihood on the validation.
|
| 167 |
+
|
| 168 |
+
Another important factor affecting the performance of the models is the choice of the object ordering. As it is evident from Table 2, the interleaved ordering consistently leads to better results. One explanation for this is that at any point in time, the model has more explicit information about the relations between the sketch entities produced so far.
|
| 169 |
+
|
| 170 |
+
In the row 3 of Table 2, we also provide the test log-likelihood for a conventional language modeling baseline trained on the text representation of PB messages (see Section 3). Here, we employ the SentencePiece tokenizer [17] with fairly aggressive settings (8000 words in the vocabulary; splitting at whitespaces switched off) to be able to keep the sequences within the budget of 1024 tokens. As can be seen from the table, the resulting Transformer model (of exactly the same architecture as other entries) despite being better than the uniform baselines is still substantially worse than the proposed methods.
|
| 171 |
+
|
| 172 |
+
In addition to measuring likelihoods, we sampled 10,000 sketches from the best performing byte and triplet models and computed distributions of various high-level statistics (Figure 4 and Figure 6 in the appendix). We repeated this procedure both with and without using Nucleus Sampling (NS) [15]. Both models follow the data distribution closely when we use samples from the unmodified model output. In this setting, however, a significant fraction of sketches is either malformed (e.g., the generated PB message cannot be parsed) or unsolvable: $3 6 \%$ for the byte model and $1 4 \%$ for the triplet model. NS with top- $p = 0 . 9$ skews the sample distribution and seems to have a more pronounced negative effect on the byte model. The upside is that the resulting sketches become “cleaner”: the percentage of invalid samples goes down to $2 5 \%$ and $6 \%$ for the byte and the triplet settings respectively.
|
| 173 |
+
|
| 174 |
+

|
| 175 |
+
Figure 5: Entities and constraints sampled from the unconditional (top) and the conditional (bottom) triplet models. The first column of nodes represents different entities (all parts are folded into a single node). The order of nodes (top to bottom) follows the generation order. The second column represents different constraints also ordered by their index in the sequence. Finally, the third column is reserved for constraint types, from the most to the least frequent.
|
| 176 |
+
|
| 177 |
+
Figures 3a and 3b show renders of random samples from several proposed models. Overall, generated sketches look plausible and exhibit a lot of desired properties: closedness of regions, regularity, symmetry, a non-trivial amount of fine detail. We observe that the byte model produces slightly less complex samples with fewer open arcs but this could be a side effect of a particular top- $p$ value. We also note that the model does not always synthesize sensible sketches — just like any other typical autoregressive model trained with teacher forcing it suffers from not being able to recover from mistakes made early on in the sequence [28]. This can potentially be addressed by fine-tuning using, for example, reinforcement learning.
|
| 178 |
+
|
| 179 |
+
We show a more detailed sample from the triplet model in Figure 5. While not perfect, the inferred constraints are reasonable most of the time. The model does a good job at connecting entities using Coincident constraints but also successfully detects more complex relations spanning more than two primitives (e.g., Mirror). Having access to constraints gives us opportunity to correct mistakes in entity prediction by applying an external sketch solver (see Figure 3d). Although this aspect of sketching was not the main focus of this work, we believe that a tighter integration between the model and the CAD software will lead to a significant boost in generation quality.
|
| 180 |
+
|
| 181 |
+
Conditional generation. As discussed in Section 4, we also trained an image-conditional model using the same regime as for the unconditional one. As expected, it achieves a significantly better fit (the last row of Table 2) but at the same time retains a non-trivial amount of uncertainty. The latter is arising, in particular, from the fact that different permutations of entities result in the same rendered image. Image-conditional samples can be found in Figure 3c. The model was able to nearly perfectly reconstruct simpler sketches and mostly made mistakes in the presence of a large number of fine details. Additionally, we compared our system against the nearest neighbour baseline in terms of visual reconstruction error as measured by Chamfer distance. We found that the proposed method reduces the error by $\approx 8 0 \%$ (see Appendix H). In order to test the out-of-distribution performance, we supply the model with several custom-made drawings. Surprisingly, after minor post-processing to account for the short sequence bias the system manages to produce reasonable reconstructions (see the bottom example in Figure 5). We detail this experiment in Appendix I.
|
| 182 |
+
|
| 183 |
+
# 6 Discussion
|
| 184 |
+
|
| 185 |
+
In this work, we have demonstrated how a combination of a general-purpose language modeling technique alongside an off-the-shelf data serialization protocol can be used to effectively solve generation of complex structured objects. We showcased the proposed system on the domain of 2D CAD drawings and developed models that can synthesize geometric primitives and relations between them both unconditionally as well as using a bitmap as a reference. These are only initial proof-of-concept experiments and we are hoping to see more applications taking advantage of the flexibility of the developed interface: conditioning on various sketch properties, inferring constraints given entities and automatically completing drawings, to name a few.
|
| 186 |
+
|
| 187 |
+
Although we focused our attention on a particular dataset we argue that the approach described in this paper is largely domain-agnostic. In order to adapt the system to a new kind of data, the algorithm designer only needs to provide an appropriate Protocol Buffer specification and if the PB language is too restrictive one can always replace it with a more powerful interpreter. As a straightforward direction for future work, we can consider extending the method to handle 3D. In Onshape, 3D operations bear a lot of similarities with sketch constraints — just like constraints, they can be represented as nested messages containing references to the geometries existing in the scene. Thus, most of the ideas from the present work can be taken verbatim to this new setting.
|
| 188 |
+
|
| 189 |
+
We hope that this work will serve as a stepping stone for further advances in the field of automated CAD but also inspire new ideas and approaches to generative modeling of arbitrary structured data.
|
| 190 |
+
|
| 191 |
+
# Acknowledgments and Disclosure of Funding
|
| 192 |
+
|
| 193 |
+
The authors would like to thank Charlie Nash, Georg Ostrovski, and Adam Kosiorek for helping with the manuscript preparation as well as Igor Babuschkin, David Choi, Nate Kushman, Andrew Kimpton, Jake Rosenfeld, Lana Saksonov, John Rousseau, Greg Guarriello, Andy Brock, Francesco Nori, Aäron van den Oord, and Oriol Vinyals for insightful discussions and support.
|
| 194 |
+
|
| 195 |
+
YG, SB, YL, and SS are funded by DeepMind. EK is funded by PTC.
|
| 196 |
+
|
| 197 |
+
# References
|
| 198 |
+
|
| 199 |
+
[1] J. Alakuijala, A. Farruggia, P. Ferragina, E. Kliuchnikov, R. Obryk, Z. Szabadka, and L. Vandevenne. Brotli: A general-purpose data compressor. TOIS, 2018.
|
| 200 |
+
[2] H. K. Ault. Using geometric constraints to capture design intent. JGG, 1999.
|
| 201 |
+
[3] H. G. Barrow, J. M. Tenenbaum, R. C. Bolles, and H. C. Wolf. Parametric correspondence and chamfer matching: Two new techniques for image matching. Technical report, SRI INTERNATIONAL MENLO PARK CA ARTIFICIAL INTELLIGENCE CENTER, 1977.
|
| 202 |
+
[4] R. Bavishi, C. Lemieux, R. Fox, K. Sen, and I. Stoica. AutoPandas: Neural-backed generators for program synthesis. In OOPSLA, 2019.
|
| 203 |
+
[5] Y. Bengio, R. Ducharme, P. Vincent, and C. Janvin. A neural probabilistic language model. JMLR, 2003.
|
| 204 |
+
[6] T. B. Brown, B. Mann, N. Ryder, M. Subbiah, J. Kaplan, P. Dhariwal, A. Neelakantan, P. Shyam, G. Sastry, A. Askell, et al. Language models are few-shot learners. arXiv preprint arXiv:2005.14165, 2020.
|
| 205 |
+
[7] A. Carlier, M. Danelljan, A. Alahi, and R. Timofte. DeepSVG: A hierarchical generative network for vector graphics animation. arXiv preprint arXiv:2007.11301, 2020.
|
| 206 |
+
[8] P. Company, F. Naya, M. Contero, and J. Camba. On the role of geometric constraints to support design intent communication and model reusability. Computer-Aided Design and Applications, 2019.
|
| 207 |
+
[9] P. Dhariwal, H. Jun, C. Payne, J. W. Kim, A. Radford, and I. Sutskever. Jukebox: A generative model for music. arXiv preprint arXiv:2005.00341, 2020.
|
| 208 |
+
[10] D. Dori and K. Tombre. From engineering drawings to 3d CAD models: are we ready now? Computer-Aided Design, 1995.
|
| 209 |
+
[11] D. Dori and L. Wenyin. Automated cad conversion with the machine drawing understanding system: concepts, algorithms, and performance. SMC, 1999.
|
| 210 |
+
[12] A. Dosovitskiy, L. Beyer, A. Kolesnikov, D. Weissenborn, X. Zhai, T. Unterthiner, M. Dehghani, M. Minderer, G. Heigold, S. Gelly, et al. An image is worth 16x16 words: Transformers for image recognition at scale. arXiv preprint arXiv:2010.11929, 2020.
|
| 211 |
+
[13] V. Egiazarian, O. Voynov, A. Artemov, D. Volkhonskiy, A. Safin, M. Taktasheva, D. Zorin, and E. Burnaev. Deep vectorization of technical drawings. In ECCV, 2020.
|
| 212 |
+
[14] Y. Ganin, T. Kulkarni, I. Babuschkin, S. A. Eslami, and O. Vinyals. Synthesizing programs for images using reinforced adversarial learning. In ICML, 2018.
|
| 213 |
+
[15] A. Holtzman, J. Buys, L. Du, M. Forbes, and Y. Choi. The curious case of neural text degeneration. arXiv preprint arXiv:1904.09751, 2019.
|
| 214 |
+
[16] S. Koch, A. Matveev, Z. Jiang, F. Williams, A. Artemov, E. Burnaev, M. Alexa, D. Zorin, and D. Panozzo. ABC: A big CAD model dataset for geometric deep learning. In CVPR, 2019.
|
| 215 |
+
[17] T. Kudo and J. Richardson. Sentencepiece: A simple and language independent subword tokenizer and detokenizer for neural text processing. arXiv preprint arXiv:1808.06226, 2018.
|
| 216 |
+
[18] A. Meurer, C. P. Smith, M. Paprocki, O. Certík, S. B. Kirpichev, M. Rocklin, A. Kumar, ˇ S. Ivanov, J. K. Moore, S. Singh, et al. SymPy: symbolic computing in Python. PeerJ Computer Science, 2017.
|
| 217 |
+
[19] T. Mikolov, M. Karafiát, L. Burget, J. Cernock ˇ y, and S. Khudanpur. Recurrent neural network \` based language model. In INTERSPEECH, 2010.
|
| 218 |
+
[20] V. Nagasamy and N. A. Langrana. Engineering drawing processing and vectorization system. CVGIP, 1990.
|
| 219 |
+
[21] C. Nash, Y. Ganin, S. A. Eslami, and P. Battaglia. PolyGen: An autoregressive generative model of 3D meshes. In ICML, 2020.
|
| 220 |
+
[22] Onshape developers. Onshape website. https://www.onshape.com/. Accessed: 2021-03-10.
|
| 221 |
+
[23] A. v. d. Oord, N. Kalchbrenner, O. Vinyals, L. Espeholt, A. Graves, and K. Kavukcuoglu. Conditional image generation with PixelCNN decoders. arXiv preprint arXiv:1606.05328, 2016.
|
| 222 |
+
[24] W. R. Para, S. F. Bhat, P. Guerrero, T. Kelly, N. Mitra, L. Guibas, and P. Wonka. SketchGen: Generating constrained CAD sketches. arXiv preprint arXiv:2106.02711, 2021.
|
| 223 |
+
[25] F. Pezoa, J. L. Reutter, F. Suarez, M. Ugarte, and D. Vrgoc. Foundations of JSON schema. In ˇ WWW, 2016.
|
| 224 |
+
[26] A. Radford, J. Wu, R. Child, D. Luan, D. Amodei, and I. Sutskever. Language models are unsupervised multitask learners. OpenAI blog, 2019.
|
| 225 |
+
[27] A. Ramesh, M. Pavlov, G. Goh, S. Gray, C. Voss, A. Radford, M. Chen, and I. Sutskever. Zero-shot text-to-image generation. arXiv preprint arXiv:2102.12092, 2021.
|
| 226 |
+
[28] M. Ranzato, S. Chopra, M. Auli, and W. Zaremba. Sequence level training with recurrent neural networks. arXiv preprint arXiv:1511.06732, 2015.
|
| 227 |
+
[29] A. Razavi, A. v. d. Oord, and O. Vinyals. Generating diverse high-fidelity images with VQVAE-2. arXiv preprint arXiv:1906.00446, 2019.
|
| 228 |
+
[30] P. Reddy, M. Gharbi, M. Lukac, and N. J. Mitra. Im2Vec: Synthesizing vector graphics without vector supervision. arXiv preprint arXiv:2102.02798, 2021.
|
| 229 |
+
[31] A. Seff, Y. Ovadia, W. Zhou, and R. P. Adams. Sketchgraphs: A large-scale dataset for modeling relational geometry in computer-aided design. arXiv preprint arXiv:2007.08506, 2020.
|
| 230 |
+
[32] K. Varda. Google protocol buffers: Google’s data interchange format. Technical report, 2008.
|
| 231 |
+
[33] A. Vaswani, N. Shazeer, N. Parmar, J. Uszkoreit, L. Jones, A. N. Gomez, L. Kaiser, and I. Polosukhin. Attention is all you need. arXiv preprint arXiv:1706.03762, 2017.
|
| 232 |
+
[34] P. Vaxiviere and K. Tombre. Celesstin: CAD conversion of mechanical drawings. Computer, 1992.
|
| 233 |
+
[35] O. Vinyals, M. Fortunato, and N. Jaitly. Pointer networks. In NeurIPS, 2015.
|
| 234 |
+
[36] K. D. Willis, Y. Pu, J. Luo, H. Chu, T. Du, J. G. Lambourne, A. Solar-Lezama, and W. Matusik. Fusion 360 gallery: A dataset and environment for programmatic CAD reconstruction. arXiv preprint arXiv:2010.02392, 2020.
|
| 235 |
+
[37] K. D. Willis, P. K. Jayaraman, J. G. Lambourne, H. Chu, and Y. Pu. Engineering sketch generation for computer-aided design. arXiv preprint arXiv:2104.09621, 2021.
|
| 236 |
+
[38] R. Wu, C. Xiao, and C. Zheng. DeepCAD: A deep generative network for computer-aided design models. In ICCV, 2021.
|
| 237 |
+
|
| 238 |
+
# Checklist
|
| 239 |
+
|
| 240 |
+
1. For all authors...
|
| 241 |
+
|
| 242 |
+
(a) Do the main claims made in the abstract and introduction accurately reflect the paper’s contributions and scope? [Yes]
|
| 243 |
+
(b) Did you describe the limitations of your work? [Yes]
|
| 244 |
+
(c) Did you discuss any potential negative societal impacts of your work? [No] The method presented in this work is a general machine learning framework and it is not immediately obvious how it could negatively impact the society.
|
| 245 |
+
(d) Have you read the ethics review guidelines and ensured that your paper conforms to them? [Yes]
|
| 246 |
+
|
| 247 |
+
2. If you are including theoretical results...
|
| 248 |
+
|
| 249 |
+
(a) Did you state the full set of assumptions of all theoretical results? [N/A] (b) Did you include complete proofs of all theoretical results? [N/A]
|
| 250 |
+
|
| 251 |
+
3. If you ran experiments...
|
| 252 |
+
|
| 253 |
+
(a) Did you include the code, data, and instructions needed to reproduce the main experimental results (either in the supplemental material or as a URL)? [No] The code is proprietary but may be open-sourced in the future. The dataset will be released shortly.
|
| 254 |
+
(b) Did you specify all the training details (e.g., data splits, hyperparameters, how they were chosen)? [Yes]
|
| 255 |
+
(c) Did you report error bars (e.g., with respect to the random seed after running experiments multiple times)? [No] The experiments in the paper are expensive to run. Moreover, we did not observe any significant fluctuations in the validation metrics between different training runs with the same hyperparameters.
|
| 256 |
+
(d) Did you include the total amount of compute and the type of resources used (e.g., type of GPUs, internal cluster, or cloud provider)? [Yes]
|
| 257 |
+
|
| 258 |
+
4. If you are using existing assets (e.g., code, data, models) or curating/releasing new assets...
|
| 259 |
+
|
| 260 |
+
(a) If your work uses existing assets, did you cite the creators? [Yes] We use data coming from a publicly available platform and we give credit to the platform in the paper.
|
| 261 |
+
(b) Did you mention the license of the assets? [N/A]
|
| 262 |
+
(c) Did you include any new assets either in the supplemental material or as a URL? [No]
|
| 263 |
+
(d) Did you discuss whether and how consent was obtained from people whose data you’re using/curating? [N/A]
|
| 264 |
+
|
| 265 |
+
(e) Did you discuss whether the data you are using/curating contains personally identifiable information or offensive content? [N/A]
|
| 266 |
+
|
| 267 |
+
5. If you used crowdsourcing or conducted research with human subjects...
|
| 268 |
+
|
| 269 |
+
(a) Did you include the full text of instructions given to participants and screenshots, if applicable? [N/A]
|
| 270 |
+
(b) Did you describe any potential participant risks, with links to Institutional Review Board (IRB) approvals, if applicable? [N/A]
|
| 271 |
+
(c) Did you include the estimated hourly wage paid to participants and the total amount spent on participant compensation? [N/A]
|
parse/train/z-X_PpwaroO/z-X_PpwaroO_content_list.json
ADDED
|
@@ -0,0 +1,1228 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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| 11 |
+
],
|
| 12 |
+
"page_idx": 0
|
| 13 |
+
},
|
| 14 |
+
{
|
| 15 |
+
"type": "text",
|
| 16 |
+
"text": "Yaroslav Ganin1∗ Sergey Bartunov1 Yujia Li1 Ethan Keller2 Stefano Saliceti1 1DeepMind 2Onshape ",
|
| 17 |
+
"bbox": [
|
| 18 |
+
197,
|
| 19 |
+
199,
|
| 20 |
+
794,
|
| 21 |
+
236
|
| 22 |
+
],
|
| 23 |
+
"page_idx": 0
|
| 24 |
+
},
|
| 25 |
+
{
|
| 26 |
+
"type": "text",
|
| 27 |
+
"text": "Abstract ",
|
| 28 |
+
"text_level": 1,
|
| 29 |
+
"bbox": [
|
| 30 |
+
462,
|
| 31 |
+
271,
|
| 32 |
+
535,
|
| 33 |
+
287
|
| 34 |
+
],
|
| 35 |
+
"page_idx": 0
|
| 36 |
+
},
|
| 37 |
+
{
|
| 38 |
+
"type": "text",
|
| 39 |
+
"text": "Computer-Aided Design (CAD) applications are used in manufacturing to model everything from coffee mugs to sports cars. These programs are complex and require years of training and experience to master. A component of all CAD models particularly difficult to make are the highly structured 2D sketches that lie at the heart of every 3D construction. In this work, we propose a machine learning model capable of automatically generating such sketches. Through this, we pave the way for developing intelligent tools that would help engineers create better designs with less effort. The core of our method is a combination of a generalpurpose language modeling technique alongside an off-the-shelf data serialization protocol. Additionally, we explore several extensions allowing us to gain finer control over the generation process. We show that our approach has enough flexibility to accommodate the complexity of the domain and performs well for both unconditional synthesis and image-to-sketch translation. ",
|
| 40 |
+
"bbox": [
|
| 41 |
+
233,
|
| 42 |
+
303,
|
| 43 |
+
766,
|
| 44 |
+
483
|
| 45 |
+
],
|
| 46 |
+
"page_idx": 0
|
| 47 |
+
},
|
| 48 |
+
{
|
| 49 |
+
"type": "text",
|
| 50 |
+
"text": "1 Introduction ",
|
| 51 |
+
"text_level": 1,
|
| 52 |
+
"bbox": [
|
| 53 |
+
174,
|
| 54 |
+
507,
|
| 55 |
+
310,
|
| 56 |
+
525
|
| 57 |
+
],
|
| 58 |
+
"page_idx": 0
|
| 59 |
+
},
|
| 60 |
+
{
|
| 61 |
+
"type": "text",
|
| 62 |
+
"text": "Computer-Aided Design (CAD) is used in the production of most manufactured objects: from cars to robots to stents to power plants. CAD has replaced pencil drawings with precise computer sketches, enabling unparalleled precision, flexibility, and speed. Despite these improvements the CAD engineer must still develop, relate and annotate all the minutiae of their designs with the same attention to detail as their draftingtable forebears. CAD productivity might be improved by the careful application of machine learning to automate predictable design tasks and free the engineer to focus on the bigger picture. The flexibility and power of deep learning is uniquely suited to the complexity of design. ",
|
| 63 |
+
"bbox": [
|
| 64 |
+
174,
|
| 65 |
+
540,
|
| 66 |
+
531,
|
| 67 |
+
733
|
| 68 |
+
],
|
| 69 |
+
"page_idx": 0
|
| 70 |
+
},
|
| 71 |
+
{
|
| 72 |
+
"type": "text",
|
| 73 |
+
"text": "Sketches are at the heart of mechanical CAD. They are the skeleton from which three dimensional forms are made. A sketch consists of various geometric entities (e.g., lines, arcs, splines and circles) related by specific constraints such as tangency, perpendicularity and symmetry. Figure 1 illustrates how entities and constraints work in tandem to create well-defined shapes. Geometric entities lie on a single plane and together form enclosed regions used by subsequent construction operations such as lofts and extrusions to generate complex ",
|
| 74 |
+
"bbox": [
|
| 75 |
+
174,
|
| 76 |
+
739,
|
| 77 |
+
529,
|
| 78 |
+
877
|
| 79 |
+
],
|
| 80 |
+
"page_idx": 0
|
| 81 |
+
},
|
| 82 |
+
{
|
| 83 |
+
"type": "image",
|
| 84 |
+
"img_path": "images/801c01a8f7ad74854fddf78e6c8c49c6d66b6df145afc636cd0e89cfc38f010b.jpg",
|
| 85 |
+
"image_caption": [
|
| 86 |
+
"Figure 1: The anatomy of a CAD sketch. Sketches are the main building block of every 3D construction. A sketch consists of entities (e.g., lines and arcs) and constraints (e.g., tangent and mirror). The dotted curve shows what happens if we drop some of the constraints — the design idea is lost. "
|
| 87 |
+
],
|
| 88 |
+
"image_footnote": [],
|
| 89 |
+
"bbox": [
|
| 90 |
+
553,
|
| 91 |
+
515,
|
| 92 |
+
812,
|
| 93 |
+
770
|
| 94 |
+
],
|
| 95 |
+
"page_idx": 0
|
| 96 |
+
},
|
| 97 |
+
{
|
| 98 |
+
"type": "image",
|
| 99 |
+
"img_path": "images/768010495993ed4419100a195bad75e3db43476e171ff7bd23282a293c1f8bdc.jpg",
|
| 100 |
+
"image_caption": [
|
| 101 |
+
"Figure 2: Interpreter-guided generation of a sketch. At each point in time, a Transformer [33] outputs a raw value which is fed into an interpreter that decides which field of a Protocol Buffers message this value corresponds to. Once the field is populated the interpreter communicates $( - )$ its decision back to the Transformer and transitions $( \\nrightarrow )$ to the next state. "
|
| 102 |
+
],
|
| 103 |
+
"image_footnote": [],
|
| 104 |
+
"bbox": [
|
| 105 |
+
176,
|
| 106 |
+
108,
|
| 107 |
+
828,
|
| 108 |
+
377
|
| 109 |
+
],
|
| 110 |
+
"page_idx": 1
|
| 111 |
+
},
|
| 112 |
+
{
|
| 113 |
+
"type": "text",
|
| 114 |
+
"text": "3D geometry. Well-chosen sketch constraints are essential to properly convey design intent [2] and facilitate the sketch’s resilience to successive parameters modifications which is often understood as a measure of the quality of a design document [8]. The dotted curve in Figure 1 shows what happens when some of the constraints are dropped – the design idea is lost. ",
|
| 115 |
+
"bbox": [
|
| 116 |
+
174,
|
| 117 |
+
460,
|
| 118 |
+
825,
|
| 119 |
+
516
|
| 120 |
+
],
|
| 121 |
+
"page_idx": 1
|
| 122 |
+
},
|
| 123 |
+
{
|
| 124 |
+
"type": "text",
|
| 125 |
+
"text": "The complexities of sketch construction are analogous to those of natural language modeling. Selecting the next constraint or entity in a sketch is like the generation of the next word in a sentence. In both contexts, the selection must function grammatically (form a consistent constraint system in the case of the sketch) and work towards some cohesive meaning (preserve design intent). Luckily, machine learning has proved highly successful in generating natural language — especially the Transformer [33] trained on vast amounts of real-world data [26, 6]. It is therefore a promising choice for adapting to the task of sketch generation. This work is our take at this adaptation. ",
|
| 126 |
+
"bbox": [
|
| 127 |
+
174,
|
| 128 |
+
522,
|
| 129 |
+
825,
|
| 130 |
+
619
|
| 131 |
+
],
|
| 132 |
+
"page_idx": 1
|
| 133 |
+
},
|
| 134 |
+
{
|
| 135 |
+
"type": "text",
|
| 136 |
+
"text": "We make the following contributions: (1) We devise a method for describing structured objects using Protocol Buffers [32] and demonstrate its flexibility on the domain of natural CAD sketches. (2) We propose several techniques for capturing distributions of objects represented as serialized Protocol Buffers. Our approach draws inspiration from recent advances in language modeling while focusing on eliminating data redundancy. (3) We collect a dataset of over $4 . 7 \\mathbf { M }$ of carefully preprocessed parametric CAD sketches and use this dataset to validate the proposed generative models. To our knowledge, the experiments presented in this work significantly surpass the scale of those reported in the literature both in terms of the amount of training data and the model capacity. ",
|
| 137 |
+
"bbox": [
|
| 138 |
+
174,
|
| 139 |
+
626,
|
| 140 |
+
825,
|
| 141 |
+
737
|
| 142 |
+
],
|
| 143 |
+
"page_idx": 1
|
| 144 |
+
},
|
| 145 |
+
{
|
| 146 |
+
"type": "text",
|
| 147 |
+
"text": "2 Related work ",
|
| 148 |
+
"text_level": 1,
|
| 149 |
+
"bbox": [
|
| 150 |
+
174,
|
| 151 |
+
760,
|
| 152 |
+
316,
|
| 153 |
+
776
|
| 154 |
+
],
|
| 155 |
+
"page_idx": 1
|
| 156 |
+
},
|
| 157 |
+
{
|
| 158 |
+
"type": "text",
|
| 159 |
+
"text": "Datasets and generative models for CAD. Until recently there were very few parametric CAD datasets large and varied enough to serve as training data for machine learning. This situation had started to change with the release of the ABC dataset [16] containing a collection of 3D shapes from the Onshape public repository [22]. Unfortunately, the main focus of [16] revolves around meshes and, as a result, the dataset is difficult to use for sketch modeling. ",
|
| 160 |
+
"bbox": [
|
| 161 |
+
174,
|
| 162 |
+
792,
|
| 163 |
+
825,
|
| 164 |
+
863
|
| 165 |
+
],
|
| 166 |
+
"page_idx": 1
|
| 167 |
+
},
|
| 168 |
+
{
|
| 169 |
+
"type": "text",
|
| 170 |
+
"text": "Several works concurrent with ours deal with the symbolic representation of CAD constructions. Seff et al. [31] center their attention on contributing a better dataset of 2D sketches but also provide a proof-of-concept model predicting a selected subset of object attributes. Willis et al. [37] use the dataset from [31] to train a modification of [21] which demonstrates a boost in generation quality but is designed to only work for sketch entities. The latter is addressed in our present work and in a subsequent paper by Para et al. [24]. While [24] employ very similar ideas to ours they do not support certain features of the CAD data and their proposed model is a more direct adaptation of [21] and therefore cannot handle arbitrary orderings of entities and constraints. In Section 5, we show that object ordering has a substantial impact on the performance. ",
|
| 171 |
+
"bbox": [
|
| 172 |
+
176,
|
| 173 |
+
869,
|
| 174 |
+
825,
|
| 175 |
+
911
|
| 176 |
+
],
|
| 177 |
+
"page_idx": 1
|
| 178 |
+
},
|
| 179 |
+
{
|
| 180 |
+
"type": "text",
|
| 181 |
+
"text": "",
|
| 182 |
+
"bbox": [
|
| 183 |
+
174,
|
| 184 |
+
90,
|
| 185 |
+
825,
|
| 186 |
+
174
|
| 187 |
+
],
|
| 188 |
+
"page_idx": 2
|
| 189 |
+
},
|
| 190 |
+
{
|
| 191 |
+
"type": "text",
|
| 192 |
+
"text": "Fusion 360 Gallery [36] attacks CAD data from a different angle. Here, the task is to recover a sequence of extrusion operations that gives rise to a particular target 3D shape. Despite dealing with 3D, this setting is deliberately limited: sketches are assumed to be given and the proposed model only decides on which sketch to extrude and to what extent. [38] considers a more general scenario where extrusion profiles are not provided and need to be synthesized from scratch. Although both of these works make initial steps towards full parametric CAD generation, they rely on significant simplifying assumptions and therefore it is unclear how well they will scale to more real-world scenarios. Our approach, on the other hand, is designed to be flexible and domain-agnostic and is only limited by the data availability. ",
|
| 193 |
+
"bbox": [
|
| 194 |
+
174,
|
| 195 |
+
181,
|
| 196 |
+
825,
|
| 197 |
+
305
|
| 198 |
+
],
|
| 199 |
+
"page_idx": 2
|
| 200 |
+
},
|
| 201 |
+
{
|
| 202 |
+
"type": "text",
|
| 203 |
+
"text": "Vector image generation and inference. Synthesizing CAD sketches bears a lot of similarities with predicting vector graphics. In this field, several recent works Carlier et al. [7] and Reddy et al. [30] using different vector object representations to define generative models of vector images. Egiazarian et al. [13] take a more traditional computer vision approach and propose a multi-stage pipeline for vectorizing technical drawings. All of these methods use highly domain-dependent architectures and, therefore, it would be a non-trivial task to adapt them for generation of complex sketch objects. CAD community has also been concerned with a similar task of image to CAD conversion [20, 34, 10, 11], largely focusing on heuristic object recognition while our work relies more on learning the recognition from data. ",
|
| 204 |
+
"bbox": [
|
| 205 |
+
174,
|
| 206 |
+
319,
|
| 207 |
+
825,
|
| 208 |
+
444
|
| 209 |
+
],
|
| 210 |
+
"page_idx": 2
|
| 211 |
+
},
|
| 212 |
+
{
|
| 213 |
+
"type": "text",
|
| 214 |
+
"text": "Transformers for sequence modeling. In our work, we employ Transfomers [33] as a computational backbone for the proposed approach. Due to its scalability and excellent performance [29, 9, 6, 27], this architecture has become the dominating approach in many sequence modeling applications. Our method can be seen as generalization of PolyGen [21], a Transformer-based generative model for 3D meshes. Similarly to [21], we use Pointer Networks [35] to relate items in the synthesized sequence. Unlike PolyGen, however, our framework can handle non-homogeneous structures of arbitrary complexity. Moreover, we simplify the architecture to use a single neural network to generate the entire object of interest. All these improvements make our approach a good fit for modeling CAD sketches and potentially other components of CAD constructions. ",
|
| 215 |
+
"bbox": [
|
| 216 |
+
174,
|
| 217 |
+
458,
|
| 218 |
+
825,
|
| 219 |
+
583
|
| 220 |
+
],
|
| 221 |
+
"page_idx": 2
|
| 222 |
+
},
|
| 223 |
+
{
|
| 224 |
+
"type": "text",
|
| 225 |
+
"text": "3 Data ",
|
| 226 |
+
"text_level": 1,
|
| 227 |
+
"bbox": [
|
| 228 |
+
174,
|
| 229 |
+
602,
|
| 230 |
+
245,
|
| 231 |
+
618
|
| 232 |
+
],
|
| 233 |
+
"page_idx": 2
|
| 234 |
+
},
|
| 235 |
+
{
|
| 236 |
+
"type": "text",
|
| 237 |
+
"text": "Formally, a CAD sketch is defined by two collections of objects: entities and constraints. Each object is generally represented as a set of attribute-value pairs where a value can be either primitive (e.g., integer or floating-point) or complex (e.g., an array or another object). Sketches that we use in this work originate from the Onshape platform [22] which provides them in JSON format [25]. As the first step in our processing pipeline we convert JSON messages into Protocol Buffers (PB) [32]. In order to keep the pipeline as domain-agnostic and as widely applicable as possible, we aim to avoid any significant changes to the data and largely retain the original structures of objects. The benefit of converting into PB is twofold: the resulting data occupies less space because unnecessary information is removed, but also, unlike JSON, PB provide a convenient way to define precise specifications for structures of arbitrary complexity. ",
|
| 238 |
+
"bbox": [
|
| 239 |
+
174,
|
| 240 |
+
632,
|
| 241 |
+
825,
|
| 242 |
+
771
|
| 243 |
+
],
|
| 244 |
+
"page_idx": 2
|
| 245 |
+
},
|
| 246 |
+
{
|
| 247 |
+
"type": "text",
|
| 248 |
+
"text": "Listing 1a shows how we represent the line entity and the mirror constraint (see Appendix A for an extensive list of supported objects). The line specification is straightforward: we first need to decide whether our entity should be treated as a construction geometry2 and then provide pairs of coordinates for the beginning and end of the segment. The MirrorConstraint is used to force an arbitrary number of pairs of geometries (i.e., mirrored_pairs) to be symmetrical with respect to some axis (i.e., mirror). Constraints rely on the Pointer data type to specify entities they act upon. In practice, a pointer is simply an index in the table of all the eligible pointees (i.e., entities and their parts). ",
|
| 249 |
+
"bbox": [
|
| 250 |
+
174,
|
| 251 |
+
777,
|
| 252 |
+
825,
|
| 253 |
+
888
|
| 254 |
+
],
|
| 255 |
+
"page_idx": 2
|
| 256 |
+
},
|
| 257 |
+
{
|
| 258 |
+
"type": "text",
|
| 259 |
+
"text": "message LineEntity { bool is_construction $\\ c = ~ 1$ ; message Vector $\\{ \\begin{array} { r l } \\end{array} / / $ 2D coordinate. double $\\texttt { x } = \\texttt { 1 }$ ; double $\\tt { y } = 2$ ; } Vector start $= ~ 2$ ; // Start point. Vector end $\\ c = \\ 3$ ; // End point. \n} \nmessage MirrorConstraint { Pointer mirror $\\ c = ~ 1$ ; // Axis of symmetry. message Pair { // Mirrored objects. Pointer first $\\ l = \\ 1$ ; Pointer second $= ~ 2$ ; } repeated Pair mirrored_pairs $= ~ 2$ ; \n} ",
|
| 260 |
+
"bbox": [
|
| 261 |
+
173,
|
| 262 |
+
95,
|
| 263 |
+
449,
|
| 264 |
+
208
|
| 265 |
+
],
|
| 266 |
+
"page_idx": 3
|
| 267 |
+
},
|
| 268 |
+
{
|
| 269 |
+
"type": "text",
|
| 270 |
+
"text": "",
|
| 271 |
+
"bbox": [
|
| 272 |
+
495,
|
| 273 |
+
102,
|
| 274 |
+
820,
|
| 275 |
+
203
|
| 276 |
+
],
|
| 277 |
+
"page_idx": 3
|
| 278 |
+
},
|
| 279 |
+
{
|
| 280 |
+
"type": "text",
|
| 281 |
+
"text": "(a) Entities and constraints have similar structures. Pointers refer to entities that constraints are applied to. ",
|
| 282 |
+
"bbox": [
|
| 283 |
+
165,
|
| 284 |
+
215,
|
| 285 |
+
823,
|
| 286 |
+
229
|
| 287 |
+
],
|
| 288 |
+
"page_idx": 3
|
| 289 |
+
},
|
| 290 |
+
{
|
| 291 |
+
"type": "text",
|
| 292 |
+
"text": "message Entity { oneof kind { LineEntity line $\\ l = \\ 1$ ; // And other entity types. } \n} \nmessage Object { oneof kind { Entity entity $\\ l = \\ 1$ ; Constraint constraint $= ~ 2$ ; } \n} \nmessage Constraint { // Defined similarly to Entity. \n} \nmessage Sketch { repeated Object objects $\\ c = ~ 1$ ; \n} ",
|
| 293 |
+
"bbox": [
|
| 294 |
+
171,
|
| 295 |
+
237,
|
| 296 |
+
405,
|
| 297 |
+
311
|
| 298 |
+
],
|
| 299 |
+
"page_idx": 3
|
| 300 |
+
},
|
| 301 |
+
{
|
| 302 |
+
"type": "text",
|
| 303 |
+
"text": "",
|
| 304 |
+
"bbox": [
|
| 305 |
+
495,
|
| 306 |
+
237,
|
| 307 |
+
730,
|
| 308 |
+
311
|
| 309 |
+
],
|
| 310 |
+
"page_idx": 3
|
| 311 |
+
},
|
| 312 |
+
{
|
| 313 |
+
"type": "text",
|
| 314 |
+
"text": "",
|
| 315 |
+
"bbox": [
|
| 316 |
+
173,
|
| 317 |
+
325,
|
| 318 |
+
428,
|
| 319 |
+
362
|
| 320 |
+
],
|
| 321 |
+
"page_idx": 3
|
| 322 |
+
},
|
| 323 |
+
{
|
| 324 |
+
"type": "text",
|
| 325 |
+
"text": "",
|
| 326 |
+
"bbox": [
|
| 327 |
+
496,
|
| 328 |
+
325,
|
| 329 |
+
730,
|
| 330 |
+
362
|
| 331 |
+
],
|
| 332 |
+
"page_idx": 3
|
| 333 |
+
},
|
| 334 |
+
{
|
| 335 |
+
"type": "text",
|
| 336 |
+
"text": "(b) A full sketch is defined as a sequence of objects each of which can be either an entity or a constraint. ",
|
| 337 |
+
"bbox": [
|
| 338 |
+
178,
|
| 339 |
+
368,
|
| 340 |
+
805,
|
| 341 |
+
382
|
| 342 |
+
],
|
| 343 |
+
"page_idx": 3
|
| 344 |
+
},
|
| 345 |
+
{
|
| 346 |
+
"type": "text",
|
| 347 |
+
"text": "Listing 1: Examples of object specifications. We represent objects using Protocol Buffers. Protocol Buffers allow us to easily write specifications for structured objects of varying complexity. ",
|
| 348 |
+
"bbox": [
|
| 349 |
+
173,
|
| 350 |
+
390,
|
| 351 |
+
823,
|
| 352 |
+
419
|
| 353 |
+
],
|
| 354 |
+
"page_idx": 3
|
| 355 |
+
},
|
| 356 |
+
{
|
| 357 |
+
"type": "text",
|
| 358 |
+
"text": "Our ultimate goal is to build a machine learning model of sketch objects. To that end, we process the data even further and represent these objects as sequences of tokens. This allows us to pose sketch generation as language modeling (LM) and take advantage of the recent progress in this area [26, 6]. To achieve this, we pack first collections of entities and constraints into one Protocol Buffer message (see Listing 1b) assuming some ordering of objects. We discuss different orderings in Section 5. ",
|
| 359 |
+
"bbox": [
|
| 360 |
+
174,
|
| 361 |
+
435,
|
| 362 |
+
825,
|
| 363 |
+
505
|
| 364 |
+
],
|
| 365 |
+
"page_idx": 3
|
| 366 |
+
},
|
| 367 |
+
{
|
| 368 |
+
"type": "text",
|
| 369 |
+
"text": "There are a few ways to obtaining a sequence of tokens from a sketch message. Arguably the most intuitive one is to format messages as text. For a line entity connecting (0.0, 0.1) and $( - 0 . 5 , 0 . 2 )$ this will result in: ",
|
| 370 |
+
"bbox": [
|
| 371 |
+
174,
|
| 372 |
+
511,
|
| 373 |
+
825,
|
| 374 |
+
553
|
| 375 |
+
],
|
| 376 |
+
"page_idx": 3
|
| 377 |
+
},
|
| 378 |
+
{
|
| 379 |
+
"type": "text",
|
| 380 |
+
"text": "{ is_construction: true, start { x: 0.0, y: 0.1 }, end { x: -0.5, y: 0.2 } } ",
|
| 381 |
+
"bbox": [
|
| 382 |
+
173,
|
| 383 |
+
563,
|
| 384 |
+
759,
|
| 385 |
+
578
|
| 386 |
+
],
|
| 387 |
+
"page_idx": 3
|
| 388 |
+
},
|
| 389 |
+
{
|
| 390 |
+
"type": "text",
|
| 391 |
+
"text": "Since this format contains both the structure and the content of the data, the resulting sequences end up being prohibitively long. Additionally, the model would have to generate valid syntax, which would take up some portion of the model’s capacity. To overcome these challenges, we work with two flavours of serialized PB messages. ",
|
| 392 |
+
"bbox": [
|
| 393 |
+
174,
|
| 394 |
+
588,
|
| 395 |
+
825,
|
| 396 |
+
643
|
| 397 |
+
],
|
| 398 |
+
"page_idx": 3
|
| 399 |
+
},
|
| 400 |
+
{
|
| 401 |
+
"type": "text",
|
| 402 |
+
"text": "The first one is a sequences of bytes obtained by calling the SerializeToString() method of a message. Such sequences are much shorter since the structure is handled by an external parser automatically generated from the data specification. The parser’s task is to interpret the incoming stream of unstructured bytes and populate the fields of PB messages. However, like the text format, not every sequence of bytes results in a valid PB message. ",
|
| 403 |
+
"bbox": [
|
| 404 |
+
174,
|
| 405 |
+
651,
|
| 406 |
+
825,
|
| 407 |
+
720
|
| 408 |
+
],
|
| 409 |
+
"page_idx": 3
|
| 410 |
+
},
|
| 411 |
+
{
|
| 412 |
+
"type": "text",
|
| 413 |
+
"text": "Going one step further, we can utilize the structure of the sketch format more directly, and build a custom interpreter, that takes as input a sequence of tokens each representing a valid choice at various decision steps [4] in the sketch creation process. We designed this interpreter in such a way that all sequences of tokens in this format lead to valid PB messages. More specifically, we represent a message as a sequence of triplets $( d _ { i } , c _ { i } , f _ { i } )$ where $i$ is an index of the token. The majority of tokens describe basic fields of the sketch objects with each token representing exactly one field. The first two positions in each triplet are allocated for a discrete value and a continuous value respectively. Since each field in a message is either discrete or continuous only one of two positions is active at a time (the other one is set to a default zero value). The third component is a boolean flag signifying the end of a repeated field3 which contains a list of elements of the same type. An example sequence for a sketch containing a line and a point placed at one of its ends is shown in Table 1 (Triplet column). ",
|
| 414 |
+
"bbox": [
|
| 415 |
+
174,
|
| 416 |
+
727,
|
| 417 |
+
825,
|
| 418 |
+
878
|
| 419 |
+
],
|
| 420 |
+
"page_idx": 3
|
| 421 |
+
},
|
| 422 |
+
{
|
| 423 |
+
"type": "table",
|
| 424 |
+
"img_path": "images/adcfd069a5f960c85bcb146cfc971043babc429a1ecbc2eb31d46ce9af854b1e.jpg",
|
| 425 |
+
"table_caption": [],
|
| 426 |
+
"table_footnote": [],
|
| 427 |
+
"table_body": "<table><tr><td>Triplet</td><td>Field</td><td></td><td>Triplet</td><td>Field</td></tr><tr><td>1.</td><td>(0,0.0,False)</td><td>objects.kind</td><td>8. (0,0.0,False)</td><td>objects.kind</td></tr><tr><td>2.</td><td>(0,0.0,False)</td><td>entity.kind</td><td>9. (1, 0.0,False)</td><td>entity.kind</td></tr><tr><td>3.</td><td>(1,0.0,False)</td><td>line.is_constr</td><td>10. (0, 0.0,False)</td><td>Point point.is_const</td></tr><tr><td>4.</td><td>(0, 0.0,False)</td><td>line.start.x</td><td>11. (0, 0.0,False)</td><td>point .x</td></tr><tr><td>5.</td><td>(0,0.1,False)</td><td>line.start.y</td><td>12. (0,0.1,False)</td><td>point.y</td></tr><tr><td>6.</td><td>(0,-0.5,False)</td><td>line.end.x</td><td>13. (0, 0.0, True)</td><td>objects.kind</td></tr><tr><td>7.</td><td>(0, 0.2,False)</td><td>line.end.y</td><td></td><td></td></tr></table>",
|
| 428 |
+
"bbox": [
|
| 429 |
+
187,
|
| 430 |
+
87,
|
| 431 |
+
805,
|
| 432 |
+
207
|
| 433 |
+
],
|
| 434 |
+
"page_idx": 4
|
| 435 |
+
},
|
| 436 |
+
{
|
| 437 |
+
"type": "text",
|
| 438 |
+
"text": "Table 1: A triplet representation of a simple sketch. The sketch contains and a line and a point. Within each triplet in the left column, the active component (the value that is actually used) is highlighted in bold. The right column shows which field of the object the triplet is associated with. ",
|
| 439 |
+
"bbox": [
|
| 440 |
+
174,
|
| 441 |
+
213,
|
| 442 |
+
825,
|
| 443 |
+
256
|
| 444 |
+
],
|
| 445 |
+
"page_idx": 4
|
| 446 |
+
},
|
| 447 |
+
{
|
| 448 |
+
"type": "text",
|
| 449 |
+
"text": "Given a sequence of such triplets, it is possible to infer which exact field each token corresponds to. Indeed, the very first token $( d _ { 1 } , c _ { 1 } , f _ { 1 } )$ is always associated with objects.kind since it is the first choice that needs to be made to create a Sketch message (see Listing 1b). The second field depends on the concrete value of $d _ { 1 }$ . If $d _ { 1 } = 0$ then the first object is an entity which means that the second token corresponds to entity.kind . The rest of the sequence is associated in a similar fashion. Field identifiers along with their locations within an object form the context of the tokens. We use this contextual information as an additional input for our machine learning models since it makes it easier to interpret the meaning of the triplet values and to be aware of the overall structure of the data. ",
|
| 450 |
+
"bbox": [
|
| 451 |
+
173,
|
| 452 |
+
265,
|
| 453 |
+
826,
|
| 454 |
+
377
|
| 455 |
+
],
|
| 456 |
+
"page_idx": 4
|
| 457 |
+
},
|
| 458 |
+
{
|
| 459 |
+
"type": "text",
|
| 460 |
+
"text": "4 Model ",
|
| 461 |
+
"text_level": 1,
|
| 462 |
+
"bbox": [
|
| 463 |
+
174,
|
| 464 |
+
396,
|
| 465 |
+
259,
|
| 466 |
+
412
|
| 467 |
+
],
|
| 468 |
+
"page_idx": 4
|
| 469 |
+
},
|
| 470 |
+
{
|
| 471 |
+
"type": "text",
|
| 472 |
+
"text": "In order to estimate the distribution $p _ { \\mathrm { d a t a } }$ of 2D sketches in a dataset $\\mathcal { D }$ , we decompose the joint distribution over the sequence of tokens [19] $\\mathbf { t } = ( t _ { 1 } , \\ldots , t _ { N } )$ in an autoregressive fashion, representing each conditional with a neural network parameterized by $\\theta$ and pose the estimation of $p _ { \\mathrm { d a t a } }$ as maximization of the log-likelihood of $\\mathcal { D }$ , i.e., ",
|
| 473 |
+
"bbox": [
|
| 474 |
+
174,
|
| 475 |
+
426,
|
| 476 |
+
826,
|
| 477 |
+
483
|
| 478 |
+
],
|
| 479 |
+
"page_idx": 4
|
| 480 |
+
},
|
| 481 |
+
{
|
| 482 |
+
"type": "equation",
|
| 483 |
+
"img_path": "images/ec608e7217825af4fed5a80aef0f730b0d4ba8b8ae594a7120a0ecbefaf95868.jpg",
|
| 484 |
+
"text": "$$\np ( t ; \\theta ) = \\prod _ { i = 1 } ^ { N } p ( t _ { i } \\mid t _ { < i } ; \\theta ) , \\quad \\sum _ { t \\in \\mathcal { D } } \\log p ( t ; \\theta ) \\to \\operatorname* { m a x } _ { \\theta } ,\n$$",
|
| 485 |
+
"text_format": "latex",
|
| 486 |
+
"bbox": [
|
| 487 |
+
318,
|
| 488 |
+
489,
|
| 489 |
+
678,
|
| 490 |
+
534
|
| 491 |
+
],
|
| 492 |
+
"page_idx": 4
|
| 493 |
+
},
|
| 494 |
+
{
|
| 495 |
+
"type": "text",
|
| 496 |
+
"text": "where $N$ is the length of the sequence and $t _ { < i }$ denotes all the tokens preceding $t _ { i }$ . ",
|
| 497 |
+
"bbox": [
|
| 498 |
+
173,
|
| 499 |
+
540,
|
| 500 |
+
709,
|
| 501 |
+
555
|
| 502 |
+
],
|
| 503 |
+
"page_idx": 4
|
| 504 |
+
},
|
| 505 |
+
{
|
| 506 |
+
"type": "text",
|
| 507 |
+
"text": "More concretely, we employ the Transformer decoder architecture [33] that takes an embedding of the token $\\pmb { e } _ { i - 1 } \\overset { \\cdot } { = } \\mathrm { e m b e d } _ { i } ^ { \\cdot } ( t _ { i - 1 } ^ { \\cdot } ) \\in \\mathbb { R } ^ { D }$ and maps it into another vector $\\boldsymbol { h } _ { i }$ of the same dimensionality. The latter is decoded into parameters of $p ( t _ { i } \\mid t _ { < i } )$ by a learned mapping $\\mathsf { d i s t } _ { i } ( \\cdot )$ .4 ",
|
| 508 |
+
"bbox": [
|
| 509 |
+
174,
|
| 510 |
+
560,
|
| 511 |
+
825,
|
| 512 |
+
603
|
| 513 |
+
],
|
| 514 |
+
"page_idx": 4
|
| 515 |
+
},
|
| 516 |
+
{
|
| 517 |
+
"type": "text",
|
| 518 |
+
"text": "Byte representation When dealing with the bytes of a PB message, each token is simply a discrete value in the range $\\{ 0 , \\dots , 2 5 5 \\} \\cup \\{ \\bar { \\bf E 0 S } \\}$ and therefore $p ( t _ { i } \\mid t _ { < i } ; \\bar { \\theta ( \\mathbf { \\Sigma } ) }$ can be modeled as a categorical distribution similar to how it’s done in typical LM approaches [5]. In this setting, for each time step $i$ of the sequence we have ",
|
| 519 |
+
"bbox": [
|
| 520 |
+
173,
|
| 521 |
+
617,
|
| 522 |
+
825,
|
| 523 |
+
672
|
| 524 |
+
],
|
| 525 |
+
"page_idx": 4
|
| 526 |
+
},
|
| 527 |
+
{
|
| 528 |
+
"type": "equation",
|
| 529 |
+
"img_path": "images/fc29416e72b54ccb357d9cd503c309b9320c76706fdd1e30b0d599d9e13d8fd0.jpg",
|
| 530 |
+
"text": "$$\n\\mathbf { e m b e d } _ { i } ( t _ { i - 1 } ) = V [ t _ { i - 1 } ] + e _ { i } ^ { \\mathrm { p o s } } ,\n$$",
|
| 531 |
+
"text_format": "latex",
|
| 532 |
+
"bbox": [
|
| 533 |
+
387,
|
| 534 |
+
671,
|
| 535 |
+
609,
|
| 536 |
+
690
|
| 537 |
+
],
|
| 538 |
+
"page_idx": 4
|
| 539 |
+
},
|
| 540 |
+
{
|
| 541 |
+
"type": "text",
|
| 542 |
+
"text": "where $[ \\cdot ]$ denotes the lookup operation and $e _ { i } ^ { \\mathrm { p o s } }$ is a position embedding for position $i$ . Both $V$ and $e _ { i } ^ { \\mathrm { p o s } }$ are learned. Moreover, $\\forall i \\ \\mathtt { d i s t } _ { i }$ is the same linear projection into $\\mathbb { R } ^ { 2 5 7 }$ (256 values and EOS) and the output is treated as logits of the distribution. ",
|
| 543 |
+
"bbox": [
|
| 544 |
+
174,
|
| 545 |
+
694,
|
| 546 |
+
825,
|
| 547 |
+
741
|
| 548 |
+
],
|
| 549 |
+
"page_idx": 4
|
| 550 |
+
},
|
| 551 |
+
{
|
| 552 |
+
"type": "text",
|
| 553 |
+
"text": "Triplet representation In case of the triplet representation, we follow a slightly more involved procedure. As outlined in Section 3, tokens can be either discrete or continuous. Additionally, different discrete tokens may have different ranges of values. For example, there are only two possible values for the object.kind token – either to an entity or a constraint. On the other hand, the range of the entity.kind token has cardinality of 4 since we support 4 different types of sketch entities. This means that we can’t naively describe each conditional in Equation 1 using the same template distribution like we did for the bytes. We circumvent this by introducing the notion of token groups. ",
|
| 554 |
+
"bbox": [
|
| 555 |
+
173,
|
| 556 |
+
755,
|
| 557 |
+
826,
|
| 558 |
+
853
|
| 559 |
+
],
|
| 560 |
+
"page_idx": 4
|
| 561 |
+
},
|
| 562 |
+
{
|
| 563 |
+
"type": "text",
|
| 564 |
+
"text": "A token group $\\mathcal { G }$ is a collection of related token types that can be handled in a similar fashion. Specifically, we use the same embedding function and the same projection for every $t$ such that ",
|
| 565 |
+
"bbox": [
|
| 566 |
+
174,
|
| 567 |
+
859,
|
| 568 |
+
825,
|
| 569 |
+
887
|
| 570 |
+
],
|
| 571 |
+
"page_idx": 4
|
| 572 |
+
},
|
| 573 |
+
{
|
| 574 |
+
"type": "image",
|
| 575 |
+
"img_path": "images/023d60da6886256697dbccdb13316caf4b192be89fcc2c3abc16679bb42ccf08.jpg",
|
| 576 |
+
"image_caption": [],
|
| 577 |
+
"image_footnote": [],
|
| 578 |
+
"bbox": [
|
| 579 |
+
191,
|
| 580 |
+
87,
|
| 581 |
+
812,
|
| 582 |
+
242
|
| 583 |
+
],
|
| 584 |
+
"page_idx": 5
|
| 585 |
+
},
|
| 586 |
+
{
|
| 587 |
+
"type": "text",
|
| 588 |
+
"text": "(a) Unconditional byte model. ",
|
| 589 |
+
"bbox": [
|
| 590 |
+
243,
|
| 591 |
+
250,
|
| 592 |
+
428,
|
| 593 |
+
262
|
| 594 |
+
],
|
| 595 |
+
"page_idx": 5
|
| 596 |
+
},
|
| 597 |
+
{
|
| 598 |
+
"type": "text",
|
| 599 |
+
"text": "(b) Unconditional triplet model. ",
|
| 600 |
+
"bbox": [
|
| 601 |
+
560,
|
| 602 |
+
250,
|
| 603 |
+
759,
|
| 604 |
+
262
|
| 605 |
+
],
|
| 606 |
+
"page_idx": 5
|
| 607 |
+
},
|
| 608 |
+
{
|
| 609 |
+
"type": "image",
|
| 610 |
+
"img_path": "images/6a078adb38e4e5126f04a58c9d202baf6dc4394bfc33aa9ce47e076d2e729d83.jpg",
|
| 611 |
+
"image_caption": [
|
| 612 |
+
"Figure 3: Synthesized sketches and data. (a)–(c) show samples from various proposed models (we use Nucleus Sampling with top- $p = 0 . 9 ,$ ). In (c), the output is rendered in a slightly thicker style. (d) demonstrates samples from the unconditional model after applying predicted constraints (the output is in blue). (e) shows examples from the dataset. "
|
| 613 |
+
],
|
| 614 |
+
"image_footnote": [],
|
| 615 |
+
"bbox": [
|
| 616 |
+
187,
|
| 617 |
+
275,
|
| 618 |
+
803,
|
| 619 |
+
452
|
| 620 |
+
],
|
| 621 |
+
"page_idx": 5
|
| 622 |
+
},
|
| 623 |
+
{
|
| 624 |
+
"type": "text",
|
| 625 |
+
"text": "$\\mathsf { t y p e } ( t ) \\in \\mathcal { G }$ . For instance, we might want to group all the tokens associated with coordinates. In the example from Table 1, tokens with indices 4–7 and 11–12 will all end up in the same $\\mathcal { G } ^ { 5 }$ . Naturally, we use the same functional form for the output distribution $p ( t _ { i } \\mid t _ { < i } ; \\boldsymbol { \\theta } )$ within each group. ",
|
| 626 |
+
"bbox": [
|
| 627 |
+
174,
|
| 628 |
+
529,
|
| 629 |
+
823,
|
| 630 |
+
571
|
| 631 |
+
],
|
| 632 |
+
"page_idx": 5
|
| 633 |
+
},
|
| 634 |
+
{
|
| 635 |
+
"type": "text",
|
| 636 |
+
"text": "We embed $t _ { i - 1 }$ that belongs to the group $\\mathcal { G }$ as (note the difference with Equation 2): ",
|
| 637 |
+
"bbox": [
|
| 638 |
+
176,
|
| 639 |
+
577,
|
| 640 |
+
725,
|
| 641 |
+
593
|
| 642 |
+
],
|
| 643 |
+
"page_idx": 5
|
| 644 |
+
},
|
| 645 |
+
{
|
| 646 |
+
"type": "equation",
|
| 647 |
+
"img_path": "images/6187811b2facd16f51c3ced7cc3f023802faef96c81beb2f67c43a83b0629102.jpg",
|
| 648 |
+
"text": "$$\nK [ \\mathbf { f i e l d } ( t _ { i - 1 } ) ] + V ^ { \\mathcal { G } } [ t _ { i - 1 } ] + e _ { n } ^ { \\mathrm { o b j } } + e _ { m } ^ { \\mathrm { r e l } } ,\n$$",
|
| 649 |
+
"text_format": "latex",
|
| 650 |
+
"bbox": [
|
| 651 |
+
352,
|
| 652 |
+
599,
|
| 653 |
+
643,
|
| 654 |
+
621
|
| 655 |
+
],
|
| 656 |
+
"page_idx": 5
|
| 657 |
+
},
|
| 658 |
+
{
|
| 659 |
+
"type": "text",
|
| 660 |
+
"text": "where field $( t )$ returns the field of $t$ (e.g., objects.kind or line.start. $\\mathtt { x }$ ) and $K$ is a collection of learnable embeddings for every possible field type. Unlike in Equation 2, instead of using global position embedding eposi w e describe the location with the index $n$ of the current object as well as the relative position $m$ of $t _ { i - 1 }$ within an object. ",
|
| 661 |
+
"bbox": [
|
| 662 |
+
173,
|
| 663 |
+
627,
|
| 664 |
+
825,
|
| 665 |
+
686
|
| 666 |
+
],
|
| 667 |
+
"page_idx": 5
|
| 668 |
+
},
|
| 669 |
+
{
|
| 670 |
+
"type": "text",
|
| 671 |
+
"text": "We handle the “end” tokens (i.e., $f _ { i } = \\mathrm { T r u e } )$ similarly to EOS in Section 4 — the output projection produces an additional logit used to compute the probability of ending the repetition. Since $f _ { i }$ is only expected to be True at particular points in the sequence (i.e., right after tokens forming a whole element of the list) we mask out the extra logit everywhere else. This ensures that the “end” token can’t be predicted prematurely and also eliminates its unnecessary contribution to the optimized objective. ",
|
| 672 |
+
"bbox": [
|
| 673 |
+
173,
|
| 674 |
+
690,
|
| 675 |
+
825,
|
| 676 |
+
775
|
| 677 |
+
],
|
| 678 |
+
"page_idx": 5
|
| 679 |
+
},
|
| 680 |
+
{
|
| 681 |
+
"type": "text",
|
| 682 |
+
"text": "One significant difference between the byte setting and the triplet setting is how we process pointer fields. In the former, pointers do not get any special treatment and are generated just like any other integer field. We rely on the model’s capability to make sense of the entity part index and relate it to the corresponding locations in the sequence via attention weights. This seems to be a viable strategy since Transformers have demonstrated an impressive referencing capacity in recent works [6]. ",
|
| 683 |
+
"bbox": [
|
| 684 |
+
174,
|
| 685 |
+
781,
|
| 686 |
+
825,
|
| 687 |
+
852
|
| 688 |
+
],
|
| 689 |
+
"page_idx": 5
|
| 690 |
+
},
|
| 691 |
+
{
|
| 692 |
+
"type": "text",
|
| 693 |
+
"text": "Since the triplet representation provides us with direct access to the semantics of tokens it’s possible to relate pointers to their pointees more explicitly by using Pointer Networks [35]. The approach we are taking here is similar to [21]. In order to compute $p ( t _ { i } \\mid t _ { < i } ; \\theta )$ , we first project the output of the Transformer $\\boldsymbol { h } _ { i }$ into the final pointer vector $p _ { i } = { W _ { \\mathrm { p t r } } h _ { i } }$ . The conditional is then obtained as follows: ",
|
| 694 |
+
"bbox": [
|
| 695 |
+
178,
|
| 696 |
+
857,
|
| 697 |
+
821,
|
| 698 |
+
886
|
| 699 |
+
],
|
| 700 |
+
"page_idx": 5
|
| 701 |
+
},
|
| 702 |
+
{
|
| 703 |
+
"type": "text",
|
| 704 |
+
"text": "",
|
| 705 |
+
"bbox": [
|
| 706 |
+
174,
|
| 707 |
+
90,
|
| 708 |
+
825,
|
| 709 |
+
133
|
| 710 |
+
],
|
| 711 |
+
"page_idx": 6
|
| 712 |
+
},
|
| 713 |
+
{
|
| 714 |
+
"type": "equation",
|
| 715 |
+
"img_path": "images/9ac78d8e1391073d825dc80ed6a0c040b7b3d2ab49408020279bca3188d51aef.jpg",
|
| 716 |
+
"text": "$$\n\\begin{array} { r } { p ( t _ { i } \\mathrm { ~ p o i n t s ~ t o ~ } t _ { i k } \\mid t _ { < i } ; \\theta ) = \\mathrm { s o f t m a x } _ { k } ( \\pmb { p } _ { i } ^ { T } H _ { i } ) , \\quad H _ { i } = [ \\pmb { h } _ { i 1 } , \\dots , \\pmb { h } _ { i k } , \\dots , \\pmb { h } _ { i M } ] , } \\end{array}\n$$",
|
| 717 |
+
"text_format": "latex",
|
| 718 |
+
"bbox": [
|
| 719 |
+
228,
|
| 720 |
+
135,
|
| 721 |
+
766,
|
| 722 |
+
154
|
| 723 |
+
],
|
| 724 |
+
"page_idx": 6
|
| 725 |
+
},
|
| 726 |
+
{
|
| 727 |
+
"type": "text",
|
| 728 |
+
"text": "where $\\operatorname { s o f t m a x } _ { k }$ is the $k$ -th element of the softmax vector and $\\boldsymbol { r } _ { i } = \\{ t _ { i 1 } , . . . , t _ { i M } \\}$ is the set of tokens that $t _ { i }$ can point to. Naturally, $\\mathbf { \\nabla } _ { \\mathbf { r } _ { i } }$ only contains tokens from $t _ { < i }$ . This is different from [35, 21] where $\\textstyle r _ { i } \\equiv r$ is external to the predicted sequence and remains immutable throughout the generation process. ",
|
| 729 |
+
"bbox": [
|
| 730 |
+
174,
|
| 731 |
+
155,
|
| 732 |
+
825,
|
| 733 |
+
210
|
| 734 |
+
],
|
| 735 |
+
"page_idx": 6
|
| 736 |
+
},
|
| 737 |
+
{
|
| 738 |
+
"type": "text",
|
| 739 |
+
"text": "In Onshape, constraints can be applied not only to whole entities but also to their subparts (e.g., the center of a circle or the end points of a line segment). To handle this, we introduce special referrable tokens decoupling pointees from the object attribute tokens. Referrables are injected after each entity and have the same identifier within each entity type. In order to let the model distinguish between different subparts, we adjust Equation 3 to use a learnable embedding of a part index instead of $V ^ { \\mathcal { G } } [ t _ { i - 1 } ]$ . As referrable tokens do not need to be predicted the respective terms are removed from Equation 1. For the same reason, in Equation 4, $\\boldsymbol { h } _ { i k }$ corresponds to the time step where $t _ { i k }$ is the output and not the input. This allows us to avoid having unused Transformer outputs. ",
|
| 740 |
+
"bbox": [
|
| 741 |
+
173,
|
| 742 |
+
217,
|
| 743 |
+
825,
|
| 744 |
+
329
|
| 745 |
+
],
|
| 746 |
+
"page_idx": 6
|
| 747 |
+
},
|
| 748 |
+
{
|
| 749 |
+
"type": "text",
|
| 750 |
+
"text": "Finally, we need to specify how we embed pointers as inputs to the Transformer network. Following [35, 21] we could reuse $h _ { j }$ for tokens that point to $t _ { j }$ . Unfortunately, this creates output-to-input connections which are extremely detrimental to the efficiency of the Transformer architecture — different time steps can no longer be processed in parallel during training. Instead, we opt for a simpler solution and employ the standard embedding scheme for discrete tokens (Equation 3). ",
|
| 751 |
+
"bbox": [
|
| 752 |
+
174,
|
| 753 |
+
334,
|
| 754 |
+
825,
|
| 755 |
+
405
|
| 756 |
+
],
|
| 757 |
+
"page_idx": 6
|
| 758 |
+
},
|
| 759 |
+
{
|
| 760 |
+
"type": "text",
|
| 761 |
+
"text": "Sampling from the model Sampling from the byte model is identical to sampling from any typical Transformer-based LM. The triplet model, on the other hand, requires slightly more bespoke handling. Figure 2 illustrates the procedure. We start by embedding and feeding a special BOS token into the Transformer. The Transformer then outputs a collection of triplets, one for each possible token group. In order to determine which concrete token needs to be emitted, we employ an interpreter (a state machine) automatically generated from the data specification. Knowing the current state allows us to choose the right token group and associate the active component of the triplet with a field in the synthesized object. Once the appropriate field is populated the interpreter transitions to the next state and produces an output token which is then fed back into the model. The process stops when the state machine receives the “end” triplet for the outermost repeated field (i.e., object.kind ). ",
|
| 762 |
+
"bbox": [
|
| 763 |
+
174,
|
| 764 |
+
417,
|
| 765 |
+
826,
|
| 766 |
+
556
|
| 767 |
+
],
|
| 768 |
+
"page_idx": 6
|
| 769 |
+
},
|
| 770 |
+
{
|
| 771 |
+
"type": "text",
|
| 772 |
+
"text": "Conditional generation In addition to the unconditional model described above, we explore a variant that allows us to translate bitmaps into sketches. Here, we simply let the main Transformer cross-attend to the features extracted from the input image by a ViT network [12]. The specific setup is detailed in Appendix C. ",
|
| 773 |
+
"bbox": [
|
| 774 |
+
174,
|
| 775 |
+
570,
|
| 776 |
+
825,
|
| 777 |
+
626
|
| 778 |
+
],
|
| 779 |
+
"page_idx": 6
|
| 780 |
+
},
|
| 781 |
+
{
|
| 782 |
+
"type": "text",
|
| 783 |
+
"text": "5 Experiments ",
|
| 784 |
+
"text_level": 1,
|
| 785 |
+
"bbox": [
|
| 786 |
+
174,
|
| 787 |
+
645,
|
| 788 |
+
312,
|
| 789 |
+
662
|
| 790 |
+
],
|
| 791 |
+
"page_idx": 6
|
| 792 |
+
},
|
| 793 |
+
{
|
| 794 |
+
"type": "text",
|
| 795 |
+
"text": "We validate our proposed approaches on the data that we obtained from the repository of documents publicly available on the Onshape platform [22]. Following the standard evaluation methodology for autoregressive generative models [23, 21] we use log-likelihood as our primary quantitative metric. Additionally, we provide a variety of random and selected model samples for qualitative assessment (Figure 3). ",
|
| 796 |
+
"bbox": [
|
| 797 |
+
174,
|
| 798 |
+
675,
|
| 799 |
+
485,
|
| 800 |
+
800
|
| 801 |
+
],
|
| 802 |
+
"page_idx": 6
|
| 803 |
+
},
|
| 804 |
+
{
|
| 805 |
+
"type": "text",
|
| 806 |
+
"text": "Dataset Unlike the majority of the existing works dealing with CAD sketch generation [31, 37, 24] we do not rely on SketchGraphs [31]. Instead, we collect the largest to date dataset of engineering sketches addressing the main disadvantage of [31], severe data duplication. The acquisition and the filtering procedures ",
|
| 807 |
+
"bbox": [
|
| 808 |
+
174,
|
| 809 |
+
814,
|
| 810 |
+
485,
|
| 811 |
+
911
|
| 812 |
+
],
|
| 813 |
+
"page_idx": 6
|
| 814 |
+
},
|
| 815 |
+
{
|
| 816 |
+
"type": "table",
|
| 817 |
+
"img_path": "images/5a1941415669c09e1aee337475dc0e5a8eb38b2c564fb3b3ad2734d5a4aa2c1a.jpg",
|
| 818 |
+
"table_caption": [
|
| 819 |
+
"Table 2: Test likelihoods of various models. The object column is computed as the average number of bits per object in a sketch averaged across test examples. The sketch column is similar except we do not divide by the number of objects. "
|
| 820 |
+
],
|
| 821 |
+
"table_footnote": [],
|
| 822 |
+
"table_body": "<table><tr><td rowspan=\"2\">Model</td><td rowspan=\"2\"> Sequence</td><td colspan=\"2\">Average bits per</td></tr><tr><td>object</td><td>sketch</td></tr><tr><td>Uniform</td><td>unord. bytes</td><td>112.23</td><td>3683.56</td></tr><tr><td></td><td>unord. triplets</td><td>25.34</td><td>847.52</td></tr><tr><td>Text</td><td>interleaved</td><td>4.622</td><td>139.687</td></tr><tr><td>Byte</td><td>concatenated</td><td>4.381</td><td>132.621</td></tr><tr><td rowspan=\"3\">Triplet</td><td>interleaved</td><td>4.252</td><td>127.495</td></tr><tr><td>concatenated</td><td>4.218</td><td>127.913</td></tr><tr><td>interleaved</td><td>4.103</td><td>123.213</td></tr><tr><td>Cond.</td><td>interleaved</td><td>1.570</td><td>53.730</td></tr></table>",
|
| 823 |
+
"bbox": [
|
| 824 |
+
500,
|
| 825 |
+
650,
|
| 826 |
+
821,
|
| 827 |
+
832
|
| 828 |
+
],
|
| 829 |
+
"page_idx": 6
|
| 830 |
+
},
|
| 831 |
+
{
|
| 832 |
+
"type": "image",
|
| 833 |
+
"img_path": "images/2059d907b811a8da4ce130202c27c31b776e49951b3446b4a44e0a7efa04fa39.jpg",
|
| 834 |
+
"image_caption": [
|
| 835 |
+
"Figure 4: Distribution of various sketch statistics for samples drawn from our unconditional models. The top- $p$ parameter for Nucleus Sampling is shown in parentheses. "
|
| 836 |
+
],
|
| 837 |
+
"image_footnote": [],
|
| 838 |
+
"bbox": [
|
| 839 |
+
186,
|
| 840 |
+
92,
|
| 841 |
+
816,
|
| 842 |
+
208
|
| 843 |
+
],
|
| 844 |
+
"page_idx": 7
|
| 845 |
+
},
|
| 846 |
+
{
|
| 847 |
+
"type": "text",
|
| 848 |
+
"text": "are detailed in Appendix D. For our experiments we split the dataset randomly into 3 parts: 4,656,607 \nexamples for the training set and 50,000 sketches for each the validation and the test set.6 ",
|
| 849 |
+
"bbox": [
|
| 850 |
+
176,
|
| 851 |
+
261,
|
| 852 |
+
825,
|
| 853 |
+
289
|
| 854 |
+
],
|
| 855 |
+
"page_idx": 7
|
| 856 |
+
},
|
| 857 |
+
{
|
| 858 |
+
"type": "text",
|
| 859 |
+
"text": "Unconditional generation. In this series of experiments, the goal is to determine how well our models capture the distribution of sketches in the dataset. We use the same network architecture for both the byte and the triplet settings.7 We compare two orderings of objects: in the first one (concatenated), constraints go after the last entity while in the second (interleaved), a constraint object is injected immediately after the entities it operates on. In both cases, the relative orderings within both the sequence of entities and the sequence of constraints are taken directly from the original JSON messages. ",
|
| 860 |
+
"bbox": [
|
| 861 |
+
174,
|
| 862 |
+
308,
|
| 863 |
+
825,
|
| 864 |
+
405
|
| 865 |
+
],
|
| 866 |
+
"page_idx": 7
|
| 867 |
+
},
|
| 868 |
+
{
|
| 869 |
+
"type": "text",
|
| 870 |
+
"text": "Table 2 shows test log-likelihoods obtained by different models. Unsurprisingly, our proposed methods (rows 4–7) significantly outperform the weak baselines (rows 1–2). The difference between the two uniform settings is due to the fact that the byte description of a PB message is usually longer than the triplet one: $2 3 9 \\nu s . 4 5 6$ tokens on average with the maximum length of 959 vs. 1987. Additionally, the tokens in the triplet representation tend to have smaller range of values $( i . e . , < 2 5 7 )$ ). ",
|
| 871 |
+
"bbox": [
|
| 872 |
+
174,
|
| 873 |
+
410,
|
| 874 |
+
825,
|
| 875 |
+
481
|
| 876 |
+
],
|
| 877 |
+
"page_idx": 7
|
| 878 |
+
},
|
| 879 |
+
{
|
| 880 |
+
"type": "text",
|
| 881 |
+
"text": "These differences between representations may partially explain why triplet models demonstrate better performance on the hold-out test set. It’s also worth emphasizing that the byte model does not receive any explicit information about the parsing state. This seem to make learning more challenging and as a result compared to the triplet model it takes roughly 3 times more network updates to reach the highest data likelihood on the validation. ",
|
| 882 |
+
"bbox": [
|
| 883 |
+
174,
|
| 884 |
+
487,
|
| 885 |
+
825,
|
| 886 |
+
556
|
| 887 |
+
],
|
| 888 |
+
"page_idx": 7
|
| 889 |
+
},
|
| 890 |
+
{
|
| 891 |
+
"type": "text",
|
| 892 |
+
"text": "Another important factor affecting the performance of the models is the choice of the object ordering. As it is evident from Table 2, the interleaved ordering consistently leads to better results. One explanation for this is that at any point in time, the model has more explicit information about the relations between the sketch entities produced so far. ",
|
| 893 |
+
"bbox": [
|
| 894 |
+
174,
|
| 895 |
+
563,
|
| 896 |
+
825,
|
| 897 |
+
617
|
| 898 |
+
],
|
| 899 |
+
"page_idx": 7
|
| 900 |
+
},
|
| 901 |
+
{
|
| 902 |
+
"type": "text",
|
| 903 |
+
"text": "In the row 3 of Table 2, we also provide the test log-likelihood for a conventional language modeling baseline trained on the text representation of PB messages (see Section 3). Here, we employ the SentencePiece tokenizer [17] with fairly aggressive settings (8000 words in the vocabulary; splitting at whitespaces switched off) to be able to keep the sequences within the budget of 1024 tokens. As can be seen from the table, the resulting Transformer model (of exactly the same architecture as other entries) despite being better than the uniform baselines is still substantially worse than the proposed methods. ",
|
| 904 |
+
"bbox": [
|
| 905 |
+
174,
|
| 906 |
+
625,
|
| 907 |
+
825,
|
| 908 |
+
720
|
| 909 |
+
],
|
| 910 |
+
"page_idx": 7
|
| 911 |
+
},
|
| 912 |
+
{
|
| 913 |
+
"type": "text",
|
| 914 |
+
"text": "In addition to measuring likelihoods, we sampled 10,000 sketches from the best performing byte and triplet models and computed distributions of various high-level statistics (Figure 4 and Figure 6 in the appendix). We repeated this procedure both with and without using Nucleus Sampling (NS) [15]. Both models follow the data distribution closely when we use samples from the unmodified model output. In this setting, however, a significant fraction of sketches is either malformed (e.g., the generated PB message cannot be parsed) or unsolvable: $3 6 \\%$ for the byte model and $1 4 \\%$ for the triplet model. NS with top- $p = 0 . 9$ skews the sample distribution and seems to have a more pronounced negative effect on the byte model. The upside is that the resulting sketches become “cleaner”: the percentage of invalid samples goes down to $2 5 \\%$ and $6 \\%$ for the byte and the triplet settings respectively. ",
|
| 915 |
+
"bbox": [
|
| 916 |
+
173,
|
| 917 |
+
728,
|
| 918 |
+
826,
|
| 919 |
+
866
|
| 920 |
+
],
|
| 921 |
+
"page_idx": 7
|
| 922 |
+
},
|
| 923 |
+
{
|
| 924 |
+
"type": "image",
|
| 925 |
+
"img_path": "images/5d620b9ee341dd09d6ee279fd7943e89afcaaee0b870754354379fa1d011f84b.jpg",
|
| 926 |
+
"image_caption": [
|
| 927 |
+
"Figure 5: Entities and constraints sampled from the unconditional (top) and the conditional (bottom) triplet models. The first column of nodes represents different entities (all parts are folded into a single node). The order of nodes (top to bottom) follows the generation order. The second column represents different constraints also ordered by their index in the sequence. Finally, the third column is reserved for constraint types, from the most to the least frequent. "
|
| 928 |
+
],
|
| 929 |
+
"image_footnote": [],
|
| 930 |
+
"bbox": [
|
| 931 |
+
173,
|
| 932 |
+
89,
|
| 933 |
+
813,
|
| 934 |
+
386
|
| 935 |
+
],
|
| 936 |
+
"page_idx": 8
|
| 937 |
+
},
|
| 938 |
+
{
|
| 939 |
+
"type": "text",
|
| 940 |
+
"text": "Figures 3a and 3b show renders of random samples from several proposed models. Overall, generated sketches look plausible and exhibit a lot of desired properties: closedness of regions, regularity, symmetry, a non-trivial amount of fine detail. We observe that the byte model produces slightly less complex samples with fewer open arcs but this could be a side effect of a particular top- $p$ value. We also note that the model does not always synthesize sensible sketches — just like any other typical autoregressive model trained with teacher forcing it suffers from not being able to recover from mistakes made early on in the sequence [28]. This can potentially be addressed by fine-tuning using, for example, reinforcement learning. ",
|
| 941 |
+
"bbox": [
|
| 942 |
+
173,
|
| 943 |
+
496,
|
| 944 |
+
825,
|
| 945 |
+
608
|
| 946 |
+
],
|
| 947 |
+
"page_idx": 8
|
| 948 |
+
},
|
| 949 |
+
{
|
| 950 |
+
"type": "text",
|
| 951 |
+
"text": "We show a more detailed sample from the triplet model in Figure 5. While not perfect, the inferred constraints are reasonable most of the time. The model does a good job at connecting entities using Coincident constraints but also successfully detects more complex relations spanning more than two primitives (e.g., Mirror). Having access to constraints gives us opportunity to correct mistakes in entity prediction by applying an external sketch solver (see Figure 3d). Although this aspect of sketching was not the main focus of this work, we believe that a tighter integration between the model and the CAD software will lead to a significant boost in generation quality. ",
|
| 952 |
+
"bbox": [
|
| 953 |
+
174,
|
| 954 |
+
613,
|
| 955 |
+
825,
|
| 956 |
+
710
|
| 957 |
+
],
|
| 958 |
+
"page_idx": 8
|
| 959 |
+
},
|
| 960 |
+
{
|
| 961 |
+
"type": "text",
|
| 962 |
+
"text": "Conditional generation. As discussed in Section 4, we also trained an image-conditional model using the same regime as for the unconditional one. As expected, it achieves a significantly better fit (the last row of Table 2) but at the same time retains a non-trivial amount of uncertainty. The latter is arising, in particular, from the fact that different permutations of entities result in the same rendered image. Image-conditional samples can be found in Figure 3c. The model was able to nearly perfectly reconstruct simpler sketches and mostly made mistakes in the presence of a large number of fine details. Additionally, we compared our system against the nearest neighbour baseline in terms of visual reconstruction error as measured by Chamfer distance. We found that the proposed method reduces the error by $\\approx 8 0 \\%$ (see Appendix H). In order to test the out-of-distribution performance, we supply the model with several custom-made drawings. Surprisingly, after minor post-processing to account for the short sequence bias the system manages to produce reasonable reconstructions (see the bottom example in Figure 5). We detail this experiment in Appendix I. ",
|
| 963 |
+
"bbox": [
|
| 964 |
+
173,
|
| 965 |
+
744,
|
| 966 |
+
825,
|
| 967 |
+
911
|
| 968 |
+
],
|
| 969 |
+
"page_idx": 8
|
| 970 |
+
},
|
| 971 |
+
{
|
| 972 |
+
"type": "text",
|
| 973 |
+
"text": "6 Discussion ",
|
| 974 |
+
"text_level": 1,
|
| 975 |
+
"bbox": [
|
| 976 |
+
173,
|
| 977 |
+
89,
|
| 978 |
+
294,
|
| 979 |
+
106
|
| 980 |
+
],
|
| 981 |
+
"page_idx": 9
|
| 982 |
+
},
|
| 983 |
+
{
|
| 984 |
+
"type": "text",
|
| 985 |
+
"text": "In this work, we have demonstrated how a combination of a general-purpose language modeling technique alongside an off-the-shelf data serialization protocol can be used to effectively solve generation of complex structured objects. We showcased the proposed system on the domain of 2D CAD drawings and developed models that can synthesize geometric primitives and relations between them both unconditionally as well as using a bitmap as a reference. These are only initial proof-of-concept experiments and we are hoping to see more applications taking advantage of the flexibility of the developed interface: conditioning on various sketch properties, inferring constraints given entities and automatically completing drawings, to name a few. ",
|
| 986 |
+
"bbox": [
|
| 987 |
+
174,
|
| 988 |
+
121,
|
| 989 |
+
825,
|
| 990 |
+
231
|
| 991 |
+
],
|
| 992 |
+
"page_idx": 9
|
| 993 |
+
},
|
| 994 |
+
{
|
| 995 |
+
"type": "text",
|
| 996 |
+
"text": "Although we focused our attention on a particular dataset we argue that the approach described in this paper is largely domain-agnostic. In order to adapt the system to a new kind of data, the algorithm designer only needs to provide an appropriate Protocol Buffer specification and if the PB language is too restrictive one can always replace it with a more powerful interpreter. As a straightforward direction for future work, we can consider extending the method to handle 3D. In Onshape, 3D operations bear a lot of similarities with sketch constraints — just like constraints, they can be represented as nested messages containing references to the geometries existing in the scene. Thus, most of the ideas from the present work can be taken verbatim to this new setting. ",
|
| 997 |
+
"bbox": [
|
| 998 |
+
174,
|
| 999 |
+
238,
|
| 1000 |
+
825,
|
| 1001 |
+
348
|
| 1002 |
+
],
|
| 1003 |
+
"page_idx": 9
|
| 1004 |
+
},
|
| 1005 |
+
{
|
| 1006 |
+
"type": "text",
|
| 1007 |
+
"text": "We hope that this work will serve as a stepping stone for further advances in the field of automated CAD but also inspire new ideas and approaches to generative modeling of arbitrary structured data. ",
|
| 1008 |
+
"bbox": [
|
| 1009 |
+
173,
|
| 1010 |
+
354,
|
| 1011 |
+
823,
|
| 1012 |
+
383
|
| 1013 |
+
],
|
| 1014 |
+
"page_idx": 9
|
| 1015 |
+
},
|
| 1016 |
+
{
|
| 1017 |
+
"type": "text",
|
| 1018 |
+
"text": "Acknowledgments and Disclosure of Funding ",
|
| 1019 |
+
"text_level": 1,
|
| 1020 |
+
"bbox": [
|
| 1021 |
+
174,
|
| 1022 |
+
401,
|
| 1023 |
+
553,
|
| 1024 |
+
420
|
| 1025 |
+
],
|
| 1026 |
+
"page_idx": 9
|
| 1027 |
+
},
|
| 1028 |
+
{
|
| 1029 |
+
"type": "text",
|
| 1030 |
+
"text": "The authors would like to thank Charlie Nash, Georg Ostrovski, and Adam Kosiorek for helping with the manuscript preparation as well as Igor Babuschkin, David Choi, Nate Kushman, Andrew Kimpton, Jake Rosenfeld, Lana Saksonov, John Rousseau, Greg Guarriello, Andy Brock, Francesco Nori, Aäron van den Oord, and Oriol Vinyals for insightful discussions and support. ",
|
| 1031 |
+
"bbox": [
|
| 1032 |
+
174,
|
| 1033 |
+
433,
|
| 1034 |
+
825,
|
| 1035 |
+
489
|
| 1036 |
+
],
|
| 1037 |
+
"page_idx": 9
|
| 1038 |
+
},
|
| 1039 |
+
{
|
| 1040 |
+
"type": "text",
|
| 1041 |
+
"text": "YG, SB, YL, and SS are funded by DeepMind. EK is funded by PTC. ",
|
| 1042 |
+
"bbox": [
|
| 1043 |
+
174,
|
| 1044 |
+
494,
|
| 1045 |
+
630,
|
| 1046 |
+
510
|
| 1047 |
+
],
|
| 1048 |
+
"page_idx": 9
|
| 1049 |
+
},
|
| 1050 |
+
{
|
| 1051 |
+
"type": "text",
|
| 1052 |
+
"text": "References ",
|
| 1053 |
+
"text_level": 1,
|
| 1054 |
+
"bbox": [
|
| 1055 |
+
174,
|
| 1056 |
+
530,
|
| 1057 |
+
266,
|
| 1058 |
+
546
|
| 1059 |
+
],
|
| 1060 |
+
"page_idx": 9
|
| 1061 |
+
},
|
| 1062 |
+
{
|
| 1063 |
+
"type": "text",
|
| 1064 |
+
"text": "[1] J. Alakuijala, A. Farruggia, P. Ferragina, E. Kliuchnikov, R. Obryk, Z. Szabadka, and L. Vandevenne. Brotli: A general-purpose data compressor. TOIS, 2018. \n[2] H. K. Ault. Using geometric constraints to capture design intent. JGG, 1999. \n[3] H. G. Barrow, J. M. Tenenbaum, R. C. Bolles, and H. C. Wolf. Parametric correspondence and chamfer matching: Two new techniques for image matching. Technical report, SRI INTERNATIONAL MENLO PARK CA ARTIFICIAL INTELLIGENCE CENTER, 1977. \n[4] R. Bavishi, C. Lemieux, R. Fox, K. Sen, and I. Stoica. AutoPandas: Neural-backed generators for program synthesis. In OOPSLA, 2019. \n[5] Y. Bengio, R. Ducharme, P. Vincent, and C. Janvin. A neural probabilistic language model. JMLR, 2003. \n[6] T. B. Brown, B. Mann, N. Ryder, M. Subbiah, J. Kaplan, P. Dhariwal, A. Neelakantan, P. Shyam, G. Sastry, A. Askell, et al. Language models are few-shot learners. arXiv preprint arXiv:2005.14165, 2020. \n[7] A. Carlier, M. Danelljan, A. Alahi, and R. Timofte. DeepSVG: A hierarchical generative network for vector graphics animation. arXiv preprint arXiv:2007.11301, 2020. \n[8] P. Company, F. Naya, M. Contero, and J. Camba. On the role of geometric constraints to support design intent communication and model reusability. Computer-Aided Design and Applications, 2019. \n[9] P. Dhariwal, H. Jun, C. Payne, J. W. Kim, A. Radford, and I. Sutskever. Jukebox: A generative model for music. arXiv preprint arXiv:2005.00341, 2020. \n[10] D. Dori and K. Tombre. From engineering drawings to 3d CAD models: are we ready now? Computer-Aided Design, 1995. \n[11] D. Dori and L. Wenyin. Automated cad conversion with the machine drawing understanding system: concepts, algorithms, and performance. SMC, 1999. \n[12] A. Dosovitskiy, L. Beyer, A. Kolesnikov, D. Weissenborn, X. Zhai, T. Unterthiner, M. Dehghani, M. Minderer, G. Heigold, S. Gelly, et al. An image is worth 16x16 words: Transformers for image recognition at scale. arXiv preprint arXiv:2010.11929, 2020. \n[13] V. Egiazarian, O. Voynov, A. Artemov, D. Volkhonskiy, A. Safin, M. Taktasheva, D. Zorin, and E. Burnaev. Deep vectorization of technical drawings. In ECCV, 2020. \n[14] Y. Ganin, T. Kulkarni, I. Babuschkin, S. A. Eslami, and O. Vinyals. Synthesizing programs for images using reinforced adversarial learning. In ICML, 2018. \n[15] A. Holtzman, J. Buys, L. Du, M. Forbes, and Y. Choi. The curious case of neural text degeneration. arXiv preprint arXiv:1904.09751, 2019. \n[16] S. Koch, A. Matveev, Z. Jiang, F. Williams, A. Artemov, E. Burnaev, M. Alexa, D. Zorin, and D. Panozzo. ABC: A big CAD model dataset for geometric deep learning. In CVPR, 2019. \n[17] T. Kudo and J. Richardson. Sentencepiece: A simple and language independent subword tokenizer and detokenizer for neural text processing. arXiv preprint arXiv:1808.06226, 2018. \n[18] A. Meurer, C. P. Smith, M. Paprocki, O. Certík, S. B. Kirpichev, M. Rocklin, A. Kumar, ˇ S. Ivanov, J. K. Moore, S. Singh, et al. SymPy: symbolic computing in Python. PeerJ Computer Science, 2017. \n[19] T. Mikolov, M. Karafiát, L. Burget, J. Cernock ˇ y, and S. Khudanpur. Recurrent neural network \\` based language model. In INTERSPEECH, 2010. \n[20] V. Nagasamy and N. A. Langrana. Engineering drawing processing and vectorization system. CVGIP, 1990. \n[21] C. Nash, Y. Ganin, S. A. Eslami, and P. Battaglia. PolyGen: An autoregressive generative model of 3D meshes. In ICML, 2020. \n[22] Onshape developers. Onshape website. https://www.onshape.com/. Accessed: 2021-03-10. \n[23] A. v. d. Oord, N. Kalchbrenner, O. Vinyals, L. Espeholt, A. Graves, and K. Kavukcuoglu. Conditional image generation with PixelCNN decoders. arXiv preprint arXiv:1606.05328, 2016. \n[24] W. R. Para, S. F. Bhat, P. Guerrero, T. Kelly, N. Mitra, L. Guibas, and P. Wonka. SketchGen: Generating constrained CAD sketches. arXiv preprint arXiv:2106.02711, 2021. \n[25] F. Pezoa, J. L. Reutter, F. Suarez, M. Ugarte, and D. Vrgoc. Foundations of JSON schema. In ˇ WWW, 2016. \n[26] A. Radford, J. Wu, R. Child, D. Luan, D. Amodei, and I. Sutskever. Language models are unsupervised multitask learners. OpenAI blog, 2019. \n[27] A. Ramesh, M. Pavlov, G. Goh, S. Gray, C. Voss, A. Radford, M. Chen, and I. Sutskever. Zero-shot text-to-image generation. arXiv preprint arXiv:2102.12092, 2021. \n[28] M. Ranzato, S. Chopra, M. Auli, and W. Zaremba. Sequence level training with recurrent neural networks. arXiv preprint arXiv:1511.06732, 2015. \n[29] A. Razavi, A. v. d. Oord, and O. Vinyals. Generating diverse high-fidelity images with VQVAE-2. arXiv preprint arXiv:1906.00446, 2019. \n[30] P. Reddy, M. Gharbi, M. Lukac, and N. J. Mitra. Im2Vec: Synthesizing vector graphics without vector supervision. arXiv preprint arXiv:2102.02798, 2021. \n[31] A. Seff, Y. Ovadia, W. Zhou, and R. P. Adams. Sketchgraphs: A large-scale dataset for modeling relational geometry in computer-aided design. arXiv preprint arXiv:2007.08506, 2020. \n[32] K. Varda. Google protocol buffers: Google’s data interchange format. Technical report, 2008. \n[33] A. Vaswani, N. Shazeer, N. Parmar, J. Uszkoreit, L. Jones, A. N. Gomez, L. Kaiser, and I. Polosukhin. Attention is all you need. arXiv preprint arXiv:1706.03762, 2017. \n[34] P. Vaxiviere and K. Tombre. Celesstin: CAD conversion of mechanical drawings. Computer, 1992. \n[35] O. Vinyals, M. Fortunato, and N. Jaitly. Pointer networks. In NeurIPS, 2015. \n[36] K. D. Willis, Y. Pu, J. Luo, H. Chu, T. Du, J. G. Lambourne, A. Solar-Lezama, and W. Matusik. Fusion 360 gallery: A dataset and environment for programmatic CAD reconstruction. arXiv preprint arXiv:2010.02392, 2020. \n[37] K. D. Willis, P. K. Jayaraman, J. G. Lambourne, H. Chu, and Y. Pu. Engineering sketch generation for computer-aided design. arXiv preprint arXiv:2104.09621, 2021. \n[38] R. Wu, C. Xiao, and C. Zheng. DeepCAD: A deep generative network for computer-aided design models. In ICCV, 2021. ",
|
| 1065 |
+
"bbox": [
|
| 1066 |
+
179,
|
| 1067 |
+
554,
|
| 1068 |
+
828,
|
| 1069 |
+
911
|
| 1070 |
+
],
|
| 1071 |
+
"page_idx": 9
|
| 1072 |
+
},
|
| 1073 |
+
{
|
| 1074 |
+
"type": "text",
|
| 1075 |
+
"text": "",
|
| 1076 |
+
"bbox": [
|
| 1077 |
+
171,
|
| 1078 |
+
55,
|
| 1079 |
+
828,
|
| 1080 |
+
914
|
| 1081 |
+
],
|
| 1082 |
+
"page_idx": 10
|
| 1083 |
+
},
|
| 1084 |
+
{
|
| 1085 |
+
"type": "text",
|
| 1086 |
+
"text": "",
|
| 1087 |
+
"bbox": [
|
| 1088 |
+
171,
|
| 1089 |
+
90,
|
| 1090 |
+
828,
|
| 1091 |
+
371
|
| 1092 |
+
],
|
| 1093 |
+
"page_idx": 11
|
| 1094 |
+
},
|
| 1095 |
+
{
|
| 1096 |
+
"type": "text",
|
| 1097 |
+
"text": "Checklist ",
|
| 1098 |
+
"text_level": 1,
|
| 1099 |
+
"bbox": [
|
| 1100 |
+
174,
|
| 1101 |
+
396,
|
| 1102 |
+
254,
|
| 1103 |
+
412
|
| 1104 |
+
],
|
| 1105 |
+
"page_idx": 11
|
| 1106 |
+
},
|
| 1107 |
+
{
|
| 1108 |
+
"type": "text",
|
| 1109 |
+
"text": "1. For all authors... ",
|
| 1110 |
+
"bbox": [
|
| 1111 |
+
214,
|
| 1112 |
+
422,
|
| 1113 |
+
339,
|
| 1114 |
+
436
|
| 1115 |
+
],
|
| 1116 |
+
"page_idx": 11
|
| 1117 |
+
},
|
| 1118 |
+
{
|
| 1119 |
+
"type": "text",
|
| 1120 |
+
"text": "(a) Do the main claims made in the abstract and introduction accurately reflect the paper’s contributions and scope? [Yes] \n(b) Did you describe the limitations of your work? [Yes] \n(c) Did you discuss any potential negative societal impacts of your work? [No] The method presented in this work is a general machine learning framework and it is not immediately obvious how it could negatively impact the society. \n(d) Have you read the ethics review guidelines and ensured that your paper conforms to them? [Yes] ",
|
| 1121 |
+
"bbox": [
|
| 1122 |
+
238,
|
| 1123 |
+
441,
|
| 1124 |
+
825,
|
| 1125 |
+
560
|
| 1126 |
+
],
|
| 1127 |
+
"page_idx": 11
|
| 1128 |
+
},
|
| 1129 |
+
{
|
| 1130 |
+
"type": "text",
|
| 1131 |
+
"text": "2. If you are including theoretical results... ",
|
| 1132 |
+
"bbox": [
|
| 1133 |
+
214,
|
| 1134 |
+
564,
|
| 1135 |
+
493,
|
| 1136 |
+
579
|
| 1137 |
+
],
|
| 1138 |
+
"page_idx": 11
|
| 1139 |
+
},
|
| 1140 |
+
{
|
| 1141 |
+
"type": "text",
|
| 1142 |
+
"text": "(a) Did you state the full set of assumptions of all theoretical results? [N/A] (b) Did you include complete proofs of all theoretical results? [N/A] ",
|
| 1143 |
+
"bbox": [
|
| 1144 |
+
238,
|
| 1145 |
+
583,
|
| 1146 |
+
738,
|
| 1147 |
+
614
|
| 1148 |
+
],
|
| 1149 |
+
"page_idx": 11
|
| 1150 |
+
},
|
| 1151 |
+
{
|
| 1152 |
+
"type": "text",
|
| 1153 |
+
"text": "3. If you ran experiments... ",
|
| 1154 |
+
"bbox": [
|
| 1155 |
+
214,
|
| 1156 |
+
618,
|
| 1157 |
+
393,
|
| 1158 |
+
632
|
| 1159 |
+
],
|
| 1160 |
+
"page_idx": 11
|
| 1161 |
+
},
|
| 1162 |
+
{
|
| 1163 |
+
"type": "text",
|
| 1164 |
+
"text": "(a) Did you include the code, data, and instructions needed to reproduce the main experimental results (either in the supplemental material or as a URL)? [No] The code is proprietary but may be open-sourced in the future. The dataset will be released shortly. \n(b) Did you specify all the training details (e.g., data splits, hyperparameters, how they were chosen)? [Yes] \n(c) Did you report error bars (e.g., with respect to the random seed after running experiments multiple times)? [No] The experiments in the paper are expensive to run. Moreover, we did not observe any significant fluctuations in the validation metrics between different training runs with the same hyperparameters. \n(d) Did you include the total amount of compute and the type of resources used (e.g., type of GPUs, internal cluster, or cloud provider)? [Yes] ",
|
| 1165 |
+
"bbox": [
|
| 1166 |
+
238,
|
| 1167 |
+
637,
|
| 1168 |
+
825,
|
| 1169 |
+
797
|
| 1170 |
+
],
|
| 1171 |
+
"page_idx": 11
|
| 1172 |
+
},
|
| 1173 |
+
{
|
| 1174 |
+
"type": "text",
|
| 1175 |
+
"text": "4. If you are using existing assets (e.g., code, data, models) or curating/releasing new assets... ",
|
| 1176 |
+
"bbox": [
|
| 1177 |
+
218,
|
| 1178 |
+
801,
|
| 1179 |
+
823,
|
| 1180 |
+
816
|
| 1181 |
+
],
|
| 1182 |
+
"page_idx": 11
|
| 1183 |
+
},
|
| 1184 |
+
{
|
| 1185 |
+
"type": "text",
|
| 1186 |
+
"text": "(a) If your work uses existing assets, did you cite the creators? [Yes] We use data coming from a publicly available platform and we give credit to the platform in the paper. \n(b) Did you mention the license of the assets? [N/A] \n(c) Did you include any new assets either in the supplemental material or as a URL? [No] \n(d) Did you discuss whether and how consent was obtained from people whose data you’re using/curating? [N/A] ",
|
| 1187 |
+
"bbox": [
|
| 1188 |
+
238,
|
| 1189 |
+
820,
|
| 1190 |
+
825,
|
| 1191 |
+
912
|
| 1192 |
+
],
|
| 1193 |
+
"page_idx": 11
|
| 1194 |
+
},
|
| 1195 |
+
{
|
| 1196 |
+
"type": "text",
|
| 1197 |
+
"text": "(e) Did you discuss whether the data you are using/curating contains personally identifiable information or offensive content? [N/A] ",
|
| 1198 |
+
"bbox": [
|
| 1199 |
+
236,
|
| 1200 |
+
92,
|
| 1201 |
+
823,
|
| 1202 |
+
119
|
| 1203 |
+
],
|
| 1204 |
+
"page_idx": 12
|
| 1205 |
+
},
|
| 1206 |
+
{
|
| 1207 |
+
"type": "text",
|
| 1208 |
+
"text": "5. If you used crowdsourcing or conducted research with human subjects... ",
|
| 1209 |
+
"bbox": [
|
| 1210 |
+
214,
|
| 1211 |
+
123,
|
| 1212 |
+
705,
|
| 1213 |
+
138
|
| 1214 |
+
],
|
| 1215 |
+
"page_idx": 12
|
| 1216 |
+
},
|
| 1217 |
+
{
|
| 1218 |
+
"type": "text",
|
| 1219 |
+
"text": "(a) Did you include the full text of instructions given to participants and screenshots, if applicable? [N/A] \n(b) Did you describe any potential participant risks, with links to Institutional Review Board (IRB) approvals, if applicable? [N/A] \n(c) Did you include the estimated hourly wage paid to participants and the total amount spent on participant compensation? [N/A] ",
|
| 1220 |
+
"bbox": [
|
| 1221 |
+
238,
|
| 1222 |
+
142,
|
| 1223 |
+
826,
|
| 1224 |
+
232
|
| 1225 |
+
],
|
| 1226 |
+
"page_idx": 12
|
| 1227 |
+
}
|
| 1228 |
+
]
|
parse/train/z-X_PpwaroO/z-X_PpwaroO_middle.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/train/z-X_PpwaroO/z-X_PpwaroO_model.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
vlm/train/5CGPY2VeEGb/0.png
ADDED
|
Git LFS Details
|
vlm/train/5CGPY2VeEGb/1.png
ADDED
|
Git LFS Details
|
vlm/train/5CGPY2VeEGb/10.png
ADDED
|
Git LFS Details
|
vlm/train/5CGPY2VeEGb/11.png
ADDED
|
Git LFS Details
|
vlm/train/5CGPY2VeEGb/12.png
ADDED
|
Git LFS Details
|
vlm/train/5CGPY2VeEGb/2.png
ADDED
|
Git LFS Details
|
vlm/train/5CGPY2VeEGb/3.png
ADDED
|
Git LFS Details
|
vlm/train/5CGPY2VeEGb/4.png
ADDED
|
Git LFS Details
|
vlm/train/5CGPY2VeEGb/5.png
ADDED
|
Git LFS Details
|
vlm/train/5CGPY2VeEGb/6.png
ADDED
|
Git LFS Details
|
vlm/train/5CGPY2VeEGb/7.png
ADDED
|
Git LFS Details
|
vlm/train/5CGPY2VeEGb/8.png
ADDED
|
Git LFS Details
|
vlm/train/5CGPY2VeEGb/9.png
ADDED
|
Git LFS Details
|
vlm/train/6MaBrlQ5JM/0.png
ADDED
|
Git LFS Details
|
vlm/train/6MaBrlQ5JM/1.png
ADDED
|
Git LFS Details
|
vlm/train/6MaBrlQ5JM/2.png
ADDED
|
Git LFS Details
|
vlm/train/6MaBrlQ5JM/3.png
ADDED
|
Git LFS Details
|
vlm/train/6MaBrlQ5JM/4.png
ADDED
|
Git LFS Details
|
vlm/train/6MaBrlQ5JM/5.png
ADDED
|
Git LFS Details
|
vlm/train/6MaBrlQ5JM/6.png
ADDED
|
Git LFS Details
|
vlm/train/6MaBrlQ5JM/7.png
ADDED
|
Git LFS Details
|
vlm/train/6MaBrlQ5JM/8.png
ADDED
|
Git LFS Details
|
vlm/train/6MaBrlQ5JM/9.png
ADDED
|
Git LFS Details
|
vlm/train/79zWncwO2p/0.png
ADDED
|
Git LFS Details
|
vlm/train/79zWncwO2p/1.png
ADDED
|
Git LFS Details
|
vlm/train/79zWncwO2p/10.png
ADDED
|
Git LFS Details
|
vlm/train/79zWncwO2p/11.png
ADDED
|
Git LFS Details
|
vlm/train/79zWncwO2p/12.png
ADDED
|
Git LFS Details
|
vlm/train/79zWncwO2p/13.png
ADDED
|
Git LFS Details
|
vlm/train/79zWncwO2p/2.png
ADDED
|
Git LFS Details
|