Year: 2020

Abstract:
In this paper, we present our recent research about the computational efficiency in convolution. Convolution operation is the most critical component in recent surge of deep learning research. Conventional 2D convolution takes O(CKHW ) to calculate, where C is the channel size, K is the kernel size, while H and W are the output height and width. Such computation has become really costly considering that these parameters increased over the past few years to meet the needs of demanding applications. Among various implementations of the convolution, separable convolution has been proven to be more efficient in reducing the computational demand. For example, depth separable convolution reduces the complexity to O(CHW · (C + K)) while spatial separable convolution reduces the complexity to O(CKHW ). However, these are considered an ad hoc design which cannot ensure that they can in general achieve optimal separation. In this research, we propose a novel operator called optimal separable convolution which can be calculated at O(C 3 2KHW ) by optimal design for the internal number of groups and kernel sizes for general separable convolutions. When there is no restriction in the number of separated convolutions, an even lower complexity at O(CHW · log(CK)) can be achieved. Experimental results demonstrate that the proposed optimal separable convolution is able to achieve an improved accuracyFLOPs and accuracy-#Params trade-offs over both conventional and depth/spatial separable convolutions.

text: In this paper, we present our recent research about the computational efficiency in convolution. Convolution operation is the most critical component in recent surge of deep learning research. Conventional 2D convolution takes O(C2K2HW ) to calculate, where C is the channel size, K is the kernel size, while H and W are the output height and width. Such computation has become really costly considering that these parameters increased over the past few years to meet the needs of demanding applications. Among various implementations of the convolution, separable convolution has been proven to be more efficient in reducing the computational demand. For example, depth separable convolution reduces the complexity to O(CHW · (C + K2)) while spatial separable convolution reduces the complexity to O(C2KHW ). However, these are considered an ad hoc design which cannot ensure that they can in general achieve optimal separation. In this research, we propose a novel operator called optimal separable convolution which can be calculated at O(C 3 2KHW ) by optimal design for the internal number of groups and kernel sizes for general separable convolutions. When there is no restriction in the number of separated convolutions, an even lower complexity at O(CHW · log(CK2)) can be achieved. Experimental results demonstrate that the proposed optimal separable convolution is able to achieve an improved accuracyFLOPs and accuracy-#Params trade-offs over both conventional and depth/spatial separable convolutions.

heading: 1 INTRODUCTION
text: Tremendous progresses have been made in recent years towards more accurate image analysis tasks, such as image classification, with deep convolutional neural networks (DCNNs) (Krizhevsky et al., 2012; Srivastava et al., 2015; He et al., 2016; Real et al., 2019; Tan & Le, 2019; Dai et al., 2020). However, the computational complexity for state-of-the-art DCNN models has also become increasingly high and computationally expensive. This can significantly defer their deployment to real-world applications, such as mobile platforms and robotics, where the resources are highly constrained (Howard et al., 2017; Dai et al., 2020). It is very much desired that a DCNN could achieve better performance with less computation and fewer model parameters.
The most time-consuming building block of a DCNN is the convolutional layer. There have been many previous works aiming at reducing the amount of computation in the convolutional layer. Historically, researchers apply Fast Fourier Transform (FFT) (Nussbaumer, 1981; Quarteroni et al., 2010) to implement convolution and they gain great speed up for large convolutional kernels. For small convolutional kernels, a direct application is often still cheaper (Podlozhnyuk, 2007). Researchers also explore low rank approximation (Jaderberg et al., 2014; Ioannou et al., 2015) to implement convolutions. However, most of the existing methods start from a pre-trained model and mainly focus on network pruning and compression.
In this research, we study how to design a separable convolution to achieve an optimal implementation in terms of computational complexity. Enabling convolution separable has been proven to be an efficient way to reduce the computational complexity (Sifre & Mallat, 2014; Howard et al., 2017; Szegedy et al., 2016). Comparing to the FFT and low rank approximation approaches, a welldesigned separable convolution shall be efficient for both small and large kernel sizes and shall not require a pre-trained model to operate on.
In the DCNN research, two most well-known separable convolutions are depth separable (Sifre & Mallat, 2014) and spatial separable (Szegedy et al., 2016) convolutions. Both are able to reduce the computational complexity of a convolution. The complexity of a conventional 2D convolution is quadratic with three hyper-parameters: number of channels (C), kernel size (K), and spatial dimensions (H or W ), and its computational complexity is actually O(C2K2HW ). Depth separable convolution is constructed as a depth-wise convolution followed by a point-wise convolution, where depth-wise convolution is a group convolution with its number of groups g = C and point-wise convolution is a 1× 1 convolution. Spatial separable convolution replaces a K ×K kernel to K × 1 and 1 ×K kernels. Different types of convolutions and their computational costs are summarized in Table 1. From this table, we can easily verify that depth separable convolution has a complexity of O(CHW · (C +K2)) and spatial separable convolution has a complexity of O(C2KHW ). Both depth separable and spatial separable convolutions follow an ad hoc design. They are able to reduce the computational cost to some degree but normally will not achieve an optimal separation. A separable convolution in general has three sets of parameters: the internal number of groups, channel size, and kernel size of each separated convolution. Instead of setting these parameters in an ad hoc fashion, we design a scheme to achieve an optimal separation. The resulting separable convolution is called optimal separable convolution in this research.
To prevent the proposed optimal separable convolution from being degenerated, we assume that the internal channel size is in an order of O(C) and propose the following volumetric receptive field condition. As illustrated in Fig. 1a, similar to the receptive field (RF) of a convolution which is defined as the region in the input space that a particular CNN’s feature is looking at (or affected by) (Lindeberg, 2013), we define the volumetric RF of a convolution to be the volume in the input space that affects CNN’s output. The volumetric RF condition requires that a properly decomposed separable convolution maintains the same volumetric RF as the original convolution before decomposition. Hence, the proposed optimal separable convolution will be equivalent to optimizing the internal number of groups and kernel sizes to achieve the computational objective (measured in FLOPs1) while satisfying the volumetric RF condition. Formally, the objective function is defined by Equation (2) under the constraints defined by Equations (3)-(6). The solution to this optimization problem will be described in detail in Section 2.
1In this research, similar to (He et al., 2016), FLOPs are measured in number of multiply-adds.
We shall show that the proposed optimal separable convolution can be calculated at the order of O(C 3 2KHW ). This is at least a factor of √ C more efficient than the depth separable and spatial separable convolutions. The proposed optimal separable convolution is able to be easily generalized into an N -separable case, where the number of separated convolutions N can be optimized further. In such a generalized case, an even lower complexity at O(CHW · log(CK2)) can be achieved. Extensive experiments are carried out to demonstrate the effectiveness of the proposed optimal separable convolution. As illustrated in Fig. 3, on the CIFAR10 dataset (Krizhevsky et al., 2009), the proposed optimal separable convolution achieves a better Pareto-frontier2 than both conventional and depth separable convolutions using the ResNet (He et al., 2016) architecture. To demonstrate that the proposed optimal separable convolution generalizes well to other DCNN architectures, we adopt the DARTS (Liu et al., 2018) architecture by replacing the depth separable convolution with the proposed optimal separable convolution. The accuracy is improved from 97.24% to 97.67% with fewer parameters. On the ImageNet dataset (Deng et al., 2009), the proposed optimal separable convolution also achieves an improved performance. For the DARTS architecture, the proposed approach achieves 74.2% top1 accuracy with only 4.5 million parameters.

heading: 2 THE PROPOSED APPROACH

heading: 2.1 CONVOLUTION AND ITS COMPUTATIONAL COMPLEXITY
text: A convolutional layer takes an input tensor Bl−1 of shape (Cl−1, Hl−1,Wl−1) and produces an output tensor Bl of shape (Cl, Hl,Wl), where C∗, H∗, W∗ are input and output channels, feature heights and widths. The convolutional layer is parameterized with a convolutional kernel of shape (Cl, Cl−1,K H l ,K W l ), where K ∗ l are the kernel sizes, and the superscript indicates whether it is aligned with the features in height or width. In this research, we take C∗ = O(C), H∗ = O(H), W∗ = O(W ), and K H|W ∗ = O(K) for complexity analysis. Formally, we have
Bl(cl, hl, wl) = ∑ cl−1 ∑ kHl ∑ kWl Bl−1(cl−1, hl−1, wl−1) · Fl(cl, cl−1, kHl , kWl ), (1)
where hl = hl−1 + kHl and wl = wl−1 + k W l . Hence, the number of FLOPs (multiply-adds) for convolution is ClHlWl · Cl−1KHl KWl = O(C2K2HW ) and the number of parameters is ClCl−1K H l K W l = O(C 2K2).
For a group convolution, we have g convolutions with kernels of shape (Cl/g, Cl−1/g,KHl ,K W l ). Hence, it has O(C2K2HW/g) FLOPs and O(C2K2/g) parameters, where g is the number of groups. A depth-wise convolution is equivalent to a group convolution with g = C∗ = C. A pointwise convolution is a 1×1 convolution. A depth separable convolution is composed of a depth-wise convolution and a point-wise convolution. A spatial separable convolution replaces a K ×K kernel with K × 1 and 1 ×K kernels. Different types of convolutions are summarized in Table 1. From this table, their FLOPs and number of parameters can be easily verified.

heading: 2.2 RETHINKING CONVOLUTION AND THE VOLUMETRIC RECEPTIVE FIELD CONDITION
text: Separable convolution has been proven to be efficient in reducing the computational demand in convolution. However, existing approaches including both depth separable and spatial separable convolutions follow an ad hoc design. They are able to reduce the computational cost to some extent but will not normally achieve an optimal separation. In this research, we shall design an efficient convolution operator achieving the computational objective by optimal design of its internal hyperparameters. The resulting operator is called optimal separable convolution.
One difficulty is that if we do not pose any restriction to a separable convolution, optimizing the FLOPs target will resulting in a separable convolution being equivalent to a degenerated channel scaling operator3. Hence, we propose the following volumetric receptive field condition.
2In multi-objective optimization, a Pareto-frontier is the set of parameterizations (allocations) that are all Pareto-optimal. An allocation is Pareto-optimal if there is no alternative allocation where improvement can be made to one participant’s well-being without sacrificing any other’s. Here, Pareto-frontier represents the curve of the accuracies we are able to achieve for different FLOPs/#Params.
3From Table 1, let g = C and K = 1, a convolution will have C parameters and CHW FLOPs. This is in fact a channel scaling operator. Composition of such operators is not meaningful because the composition itself is equivalent to a single channel scaling operator.
As illustrated in Fig. 1a, the receptive field (RF) of a convolution is defined to be the region in the input space that a particular CNN’s feature is affected by (Lindeberg, 2013). We define the channel RF to be the channels that affect CNN’s output and define the volumetric RF to be the Cartesian product of the RF and channel RF of this convolution. The volumetric RF of a convolution is actually the volume in the input space that affects CNN’s output. The volumetric RF condition requires that a properly decomposed separable convolution maintains (at least) the same volumetric RF as the original convolution before decomposition. Hence, the proposed optimal separable convolution will be equivalent to optimizing its internal parameters while satisfying the volumetric RF condition.

heading: 2.3 OPTIMAL SEPARABLE CONVOLUTION
text: In this section, we discuss the case of two-separable convolution. We present the discussion informally to gain intuition into the proposed approach. In the next section, we shall provide a formal proof. Suppose that the shape of the original convolutional kernel is (Cout, Cin,KH ,KW ), where Cin, Cout are the input and output channels, and (KH ,KW ) is the kernel size. Let C1 = Cin, and C3 = Cout. For the proposed optimal separable convolution, we optimize the FLOPs as computational objective while maintaining the original convolution’s volumetric RF. Formally, the computational demand of the proposed separable convolution is
f(g1, g2, C2,K H|W ∗ ) =
C2C1K H 1 K W 1 HW
g1 + C3C2K
H 2 K W 2 HW
g2 (2)
In order to satisfy the volumetric RF condition, the following three conditions need to be satisfied4: KH1 +K H 2 − 1 = KH (Receptive F ield Condition) (3)
KW1 +K W 2 − 1 = KW (4) g1 · g2 ≤ C2 (Channel Condition) (5)
min(Cl, Cl+1) ≥ gl (Group Convolution Condition) (6) We have three sets of parameters: the number of groups g1, g2, the internal channel size C2, and the internal kernel sizes KH|W∗ . In this research, we shall assume that the internal channel size C2 is in an order of O(C) and is preset according to a given policy. Otherwise, g1 = g2 = C2 = 1 will be a trivial solution. This could lead the separable convolution to be over-simplified and not applicable in practice. Typical policies of presetting C2 include C2 = min(C1, C3) (normal architecture), C2 = (C1 + C3)/2 (linear architecture), C2 = max(C1, C3)/4 (bottleneck architecture (He et al., 2016)), or C2 = 4 min(C1, C3) (inverted residual architecture (Sandler et al., 2018)).
The proposed problem is a constrained optimization. It is usually hard to solve it directly . However, we shall show that the optimal solution shall be g1, g2 ∼ √ C. For large channel sizes, the optimal solution is usually an interior point in the solution space rather than on the boundary. Let KH|W∗ be constants, by substituting g2 = C2/g15 and setting f ′(g1) = 0, one can derive that
g1 =
√ C1C2KH1 K W 1
C3KH2 K W 2
∼ √ C, (7)
and
min g1
f(g1) = 2 · √ C1C2C3KH1 K W 1 K H 2 K W 2 HW (8)
= O(C 3 2KHW )
if we set KH|W1 = K H|W and KH|W2 = 1.
One interesting fact is that we can optimize the internal number of groups g1, g2 and internal kernel sizes KH|W∗ simultaneously. For simplicity, we assume that kernel sizes aligned in height and
4The channel condition (5) g1 · g2 ≤ C2 ⇔ C1g1 · C2 g2 ≥ C1 means the product C1g1 · C2 g2 needs to occupy each node in the input channel C1 = Cin to maintain the volumetric receptive field. This is further explained for the channel condition general case (13) in Section 2.4.
5It is trivial to verify that, for any solution (g1, g2) with g1 · g2 < C2, (g1, g̃2 = C2/g1 > g2) shall be another feasible solution with a smaller FLOPs target. Hence, the optimal solution must satisfy g1 · g2 = C2.
width are equal. By setting f ′(g1) = 0 and f ′(K1) = 0, one can derive that g1 is the same as Equation (7) and K1 = K2 = K+12 , substituting them into Equation (8), one can get f(g1,K1) = O(C 3 2K2HW ). This results in a higher complexity than O(C 3 2KHW ). In fact, the solution to f ′(g1) = 0 and f ′(K1) = 0 is a saddle point. As illustrated in Fig. 2, given the input channel C1 = 64 and output channel C3 = 64, kernel size (KH ,KW ) = (5, 5), we take C2 = min(C1, C3) = 64. By setting f ′(g1) = 0, f ′(K1) = 0, the solution g1 = √ 64 = 8, K1 = 5+12 = 3 is a saddle point.

heading: 2.4 OPTIMAL SEPARABLE CONVOLUTION (GENERAL CASE)
text: In this section, we shall generalize the proposed optimal separable convolution from N = 2 to an optimal N and shall provide a formal proof. Suppose that the shape of the original convolutional kernel is (Cout, Cin,KH ,KW ). Let C1 = Cin, and CN+1 = Cout (CN+1 = C3 for N = 2). The computational demand of an N -separable convolution is
f({g∗}, {KH|W∗ }) = C2C1K
H 1 K W 1 HW
g1 + · · ·+ CN+1CNK
H NK W N HW
gN (9)
For ease of analysis, we first introduce the notation channels per group nl = Clgl , which simply means: channels per group × number of groups = the number of channels. Then, we have
f({n∗}, {KH|W∗ }) = C2n1KH1 KW1 HW + · · ·+ CN+1nNKHNKWN HW (10) satisfying the volumetric RF condition
KH1 +K H 2 + · · · = KH + (N − 1) (Receptive F ield Condition) (11)
KW1 +K W 2 + · · · = KW + (N − 1) (12)
n1 · · ·nN ≥ C1 ⇔ g1 · · · gN ≤ C2 · · ·CN (Channel Condition) (13)
nl ≥ max(1, Cl+1 Cl )⇔ gl ≤ min(Cl, Cl+1) (Group Convolution Condition) (14)
We keep both notations gl and nl. This is because, for the channel condition, it is intuitive that n1 · · ·nN ≥ C1 means that the product of n1 · · ·nN needs to occupy each node in the input channel C1 = Cin. This is equivalent to the less intuitive condition g1 · · · gN ≤ C2 · · ·CN . Similarly, for the group convolution condition, gl ≤ min(Cl, Cl+1) means the number of groups can not exceed the input and output channels of this group convolution, while nl ≥ max(1, Cl+1Cl ) is less intuitive.
For Equation (10), apply an arithmetic-geometric mean inequality, we can get f({n∗}, {KH|W∗ }) ≥ N N √ C1C22 · · ·C2NCN+1KH1 · · ·KHNKW1 · · ·KWN
g1 · · · gN HW (15)
≥ N N √ C1 · · ·CN+1KH1 · · ·KHNKW1 · · ·KWN HW (16)
The equality holds if and only if C2n1KH1 K W 1 = · · · = CN+1nNKHNKWN . Let nl = βln1, where
βl = C2K
H 1 K W 1
Cl+1KHl K W l
. Let β = Πβi, we can solve n1 = N √ C1 β = N √ ΠCiΠKHi ΠK W i
C2KH1 K W 1
and
nl =
N √ ΠN+1i=1 CiΠ N i=1K H i Π N i=1K W i
Cl+1KHl K W l
∼ N √ C. (17)
Note that the inequality (16) holds for arbitrary KH|W∗ . We need to further optimize K H|W ∗ . From the arithmetic-geometric mean inequality again, we can get KH1 · · ·KHN ≤ ( KH1 +···+K H N N ) N = (K H+N−1 N ) Nand the equality holds if and only if KH1 = · · · = KHN = K H+N−1 N . However, we want the inequality reversed, instead of finding the maximum of this product, we expect to find its minimum. This still gives us a hint, the maximum is achieved when the internal kernel sizes are as even as possible, so the minimum should be achieved when the internal kernel sizes are as diverse as possible. In the extreme case, one of the internal kernel sizes should takeKHand all the rest takes 1. A formal proof of this claim can be derived. Hence, we have
f({n∗}, {KH|W∗ }) ≥ N N √ C1 · · ·CN+1KHKWHW = O(NC1+ 1 NK 2 NHW ). (18)
It can be verified that, for N = 2, Equation (8) and Equation (18) match with the same complexity. By setting f ′(N) = 0, we can derive that N = log(CK2), and
min f({n∗}, {KH|W∗ }) = eCHW · log(CK2) = O(CHW · log(CK2)) (19) where e = 2.71828... is the natural logarithm constant.
The proposed optimal separable convolution can have a spatial separable configuration: a single kernel takes (KH ,KW ) or two kernels take (KH , 1) and (1,KW ). Besides, the proposed optimal separable convolution allows using a mask of the internal number of groups and solve for an M - separable sub-problem (M < N). Details are discussed in Appendix A, where the implementation of the proposed optimal separable convolution is also presented in Algorithm 1.

heading: 3 EXPERIMENTAL RESULTS
text: In this section, we carry out extensive experiments on benchmark datasets to demonstrate the effectiveness of the proposed optimal separable convolution scheme. In the proposed experiments, we use a prefix d- or o- to indicate that the conventional or depth separable convolutions in the baseline networks are replaced with depth separable (dsep) or the proposed optimal separable (osep) convolutions. In this research, we set the number of separated convolutions N = 2. The details of the training settings for the proposed experiments are described in Appendix B.

heading: 3.1 EXPERIMENTAL RESULTS ON CIFAR10
text: CIFAR10 (Krizhevsky et al., 2009) is a dataset consist of 50,000 training images and 10,000 testing images. These images are with a resolution of 32× 32 and are categorized into 10 object classes. In the proposed experiments, we use ResNet (He et al., 2016) as baselines and replace the conventional convolutions in ResNet with dsep and osep convolutions, resulting in d-ResNet and o-ResNet.
The proposed osep scheme can significantly reduce FLOPs/#Params. In Section 2, we proved that this reduction factor can be √ CK in theory6. As illustrated by the solid lines in Fig. 3 (a) and (b), the orange solid curve lies in a region with significantly smaller x-values than the blue solid curve.
6For optimal separable, √ CK = C 2K2HW
C3/2KHW . For depth separable, 1 1/K2+1/C = C 2K2HW CHW (C+K2) < K2.
This indicates that o-ResNet shall have significantly smaller FLOPs and fewer parameters than the ResNet baseline. For example, o-ResNet110 has even lower FLOPs (0.033 billion vs 0.041 billion) and fewer parameters (0.177 million vs 0.270 million) than ResNet20, yet with noticeable higher accuracy (92.12% vs 91.25%). This demonstrates that the proposed osep scheme could significantly reduce both computational cost and number of parameters for conventional convolutions. For dsep, this reduction factor is 11/K2+1/C , which is bounded by K
2. For 3 × 3 kernels, this reduction can be at most 9. Whereas for the proposed osep scheme, no such bounds exist. The advantage of the proposed osep scheme over dsep is illustrated in Fig. 3 (a) and (b) by the orange and green solid curves. From which, we can see the proposed osep scheme is more efficient7 with smaller x-values.
The proposed o-ResNets can have 8x-16x smaller FLOPs and 10x-18x fewer parameters than the ResNet baselines in the proposed experiments. For fair comparisons, we introduce the channel multiplier in order to approximately match the FLOPs. We use the suffix “ m<multiplier>”8 to indicate the channel multiplier. Note that FLOPs/#Params is proportional to channel multiplier3/2 for osep. As illustrated in Fig. 3, from which we can see, the proposed optimal separable convolution scheme is much more efficient than conventional convolutions. The orange curve, including both solid and dashed parts, achieved a better accuracy-FLOPs Pareto-frontier than the blue curve. It is worth noting that even under the same FLOPs, the number of o-ResNet parameters is also smaller than that of ResNet by a large margin. This could result in a more regularized network with fewer parameters to prevent over-fitting and possibly contribute to the final performance. In Fig. 3, we also present the d-ResNet curves in dashed green by replacing the conventional convolutions with depth separable convolutions. As can be seen, d-ResNet achieves good accuracy-FLOPs balances for small networks (e.g. d-ResNet20 and d-ResNet32), but performs comparable or no better than conventional convolutions for large ones (e.g. d-ResNet56 and d-ResNet110). In summary, the proposed optimal separable convolution achieves better accuracy-FLOPs and accuracy-#Params Pareto-frontiers than both conventional and depth separable convolutions.
To demonstrate that the proposed osep scheme generalizes well to other DCNN architectures, we adopt the DARTS (V2) (Liu et al., 2018) network as the baseline. The DARTS evaluation network has 20 cells and 36 initial channels, we increase the initial channels to 42 to match the FLOPs. By replacing the dsep convolutions in DARTS with the proposed osep convolutions, as illustrated in Table 2, the resulting o-DARTS improved the accuracy from 97.24% to 97.67% with fewer parameters (3.25 million vs 3.35 million). It is worth noting that it is very hard to significantly improve the DARTS search space. In Table 2, we also include three variants of DARTS, i.e. P-DARTS (Chen et al., 2019), PC-DARTS (Xu et al., 2019), and GOLD-DARTS (Bi et al., 2020), with more advanced search strategies for comparison. As can be seen, o-DARTS even achieved higher accuracies than these advanced network architectures.
Ablation Studies We carry out ablation studies on the effects of the internal BatchNorms and nonlinearities, and the spatial separable configuration. We conclude that internal BatchNorms and nonlinearities have no effects on the results yet introduce extra computation and parameters, while the spatial separable configuration leads to a slightly worse performance. Hence, they are not adopted in this research. Details are presented in Table 5 with discussion in Appendix C.

heading: 3.2 EXPERIMENTAL RESULTS ON IMAGENET
text: We evaluate the proposed optimal separable convolution scheme on the benchmark ImageNet (Deng et al., 2009) dataset, which contains 1.28 million training images and 50,000 testing images.

heading: 3.2.1 IMAGENET40
text: Because carrying out experiments directly on the ImageNet dataset can be resource- and timeconsuming, we resized all the images into 40×40 pixels. A 32×32 patch is randomly cropped and a random horizontal flip with a probability of 0.5 is applied before feeding into the network. No extra data augmentation strategies are used. The baseline ResNet architecture is a modified version of that used on the CIFAR10 dataset, except that the channel sizes are set to be 4× larger, the features are
7Because there is an overhead and the channels are relatively small (e.g. 16) for CIFAR10 models, the advantage margin is noticeable but is not remarkable. This margin of advantage can be bigger for larger channels.
8We usually omit this channel multiplier suffix for simplicity when it is clear from the context that we are comparing different schemes under the same FLOPs/#Params and there are no confusions.
calculated on scales of [16, 8, 4], and the last fully-connected (FC) layer outputs 1000 categories for classification. We make this modification because the ImageNet dataset has significantly more training samples than the CIFAR10 dataset. Experimental results are illustrated in Table 3, as can be seen, by substituting conventional convolutions with the proposed optimal separable convolutions, the resulting o-ResNet achieved 4-5% (e.g. 49.97% vs 44.93% for 56-layer and 50.72% vs 46.74% for 110-layer) performance gains comparing against the ResNet baselines. This demonstrates that the proposed optimal separable convolution scheme is much more efficient. For o-ResNet56 and oResNet110, they also have fewer parameters that could contribute to a more regularized model. For o-ResNet20 and o-ResNet32, they have slightly more parameters because the last FC layer accounts for a great portion of overhead for 1000 classes.

heading: 3.2.2 FULL IMAGENET
text: Similar to the experiments on CIFAR10, we replace the dsep convolutions in the DARTS (V2) network with the proposed osep convolutions to demonstrate that the proposed approach is able to generalize to other network architectures. The experiment is carried out on the full ImageNet dataset. The DARTS evaluation network has 14 cells and 48 initial channels, we increase the initial channel size to 56 to match the FLOPs. The resulting network is called o-DARTS. Experimental results are illustrated in Table 4. It can be seen that, with fewer parameters (4.50 million vs 4.72 million), the proposed o-DARTS network achieved higher accuracies in both top1 (74.2% vs 73.3%) and top5 (91.9% vs 91.3%) accuracies than the DARTS baseline. This indicates that the proposed osep is able to achieve better accuracy-FLOPs and accuracy-#Params balances than dsep convolutions.
It is worth noting that in the proposed experiments, we adopt ResNet and DARTS as the baselines because these are two most well-known architectures. In practice, one may simply replace the conventional or depth separable convolutions with the proposed optimal separable convolutions in a DCNN to reduce the computation and model parameters. By increasing the channel sizes, better-performing models can be expected. The proposed optimal separable convolution achieved improved accuracy-FLOPs and accuracy-#Params Pareto-frontiers than both conventional and depth separable convolutions. Hence, one can either match the accuracy to get a smaller model with reduced computation and model parameters, or match the FLOPs to get a better-performing model.

heading: 4 CONCLUSIONS
text: In this paper, we have presented a novel scheme called optimal separable convolution to improve the computational efficiency in convolution. Conventional convolution took a costly complexity at O(C2K2HW ). The proposed optimal separable convolution scheme is able to achieve
its complexity at O(C 3 2KHW ), which is even lower than that of depth separable convolution at O(CHW · (C +K2)). Hence, the proposed optimal separable convolution has the full potential to replace the usage of depth separable convolutions in a DCNN. Examples include but are not limited to the ResNet and DARTS architectures. The proposed optimal separable convolution also has a spatial separable configuration. A generalized N -separable case can achieve better performance at O(CHW · log(CK2)). Another potential impact of the proposed optimal separable convolution is for the AutoML community. The proposed novel operator is able to increase the neural architecture search space. In a multi-objective optimization formulation, where both accuracy and FLOPs are optimized, we expect a more efficient network architecture can be discovered in the future using the proposed optimal separable convolution operator.

heading: A ALGORITHMIC DETAILS OF THE PROPOSED OPTIMAL SEPARABLE CONVOLUTION
text: For the proposed optimal separable convolution, one of the internal kernel sizes can take KH|W , while the rest takes 1. In this research, we simply select the middle kernel size as (KH ,KW ). In a spatial separable configuration, we select the middle two to have their kernel sizes as (KH , 1) and (1,KW ). It is worth noting that all these configurations have the same FLOPs. Unlike the spatial separable convolution where the spatial separable configuration is able to reduce the complexity from K2 to 2K. This is because the complexity has already been reduced to O(K) for the proposed optimal separable convolution. Another interesting property of the proposed optimal separable convolution is that it prefers large kernel sizes over small ones.
For the proposed optimal separable convolution, we are able to preset the internal convolutional kernel sizes according to a custom policy, and optimize the internal number of groups only. Furthermore, we are able to preset a portion of the internal number of groups to certain values, and optimize only the remaining internal number of groups. Suppose that the internal channel and kernel sizes are given. Without loss of generality, we assume that gM+1, · · · , gN are preset. The proposed optimal separable problem will be an M -separable convolution sub-problem (M < N ):
f({n∗}, {KH|W∗ }) = C2n1KH1 KW1 HW + · · ·+ CM+1nMKHMKWMHW + const (20) satisfying the volumetric RF condition
KH1 + · · ·+KHM = KH + const (Receptive F ield Condition)
(21)
KW1 + · · ·+KWM = KW + const (22)
n1 · · ·nM ≥ C1
nM+1 · · ·nN ⇔ g1 · · · gM ≤ C2 · · ·CN gM+1 · · · gN
(Channel Condition)
(23)
nl ≥ max(1, Cl+1 Cl
)⇔ gl ≤ min(Cl, Cl+1) (Group Convolution Condition) (24)
This M -separable sub-problem can be solved by the same algorithm. A detailed implementation of the proposed optimal separable convolution is described by Algorithm 1.

heading: B TRAINING SETTINGS
text: Experiments on CIFAR10 for the ResNet architecture The images are padded with 4 pixels and randomly cropped into 32×32 to feed into the network. A random horizontal flip with a probability of 0.5 is also applied. All the networks are trained with a standard SGD optimizer for 200 epochs. The initial learning rate is set to 0.1, with a decay of 0.1 at the 100 and 150 epochs. The batch size is 128. A weight decay of 0.0001 and a momentum of 0.9 are used.
Experiments on CIFAR10 for the DARTS architecture We follow the same training settings in (Liu et al., 2018): the network is trained with a standard SGD optimizer for 600 epochs with a batch size of 96. The initial learning rate is set to 0.025 with a cosine learning rate scheduler. A weight decay of 0.0003 and a momentum of 0.9 are used. Additional enhancements include cutout, path dropout of probability 0.2, and auxiliary towers with weight 0.4.
Experiments on ImageNet40 for the ResNet architecture Each network is trained with a standard SGD optimizer for 20 epochs with the initial learning rate set to 0.1, and a decay of 0.1 at the 10 and 15 epochs. The batch size is 256, the weight decay is 0.0001 and the momentum is 0.9.
Experiments on full ImageNet for the DARTS architecture We follow the training settings in (Chen et al., 2019) for multi-GPU training: the images are random resized crop into 224 × 224 patches with a random scale in [0.08, 1.0] and a random aspect ratio in [0.75, 1.33]. Random horizontal flip and color jitter are also applied. The network is trained from scratch for 250 epochs with batch size 1024 on 8 GPUs. An SGD optimizer with an initial learning rate of 0.5, a momentum of 0.9, and a weight decay of 3e-5. The learning rate is decayed linearly after each epoch. Additional enhancements include label smoothing with weight 0.1 and auxiliary towers with weight 0.4.

heading: C ABLATION STUDIES
text: Internal BatchNorm and Non-linearity For a DCNN, it is generally a good practice to add a BatchNorm (BN) (Ioffe & Szegedy, 2015) and a non-linearity after each convolution. For the proposed optimal separable convolution, we wonder if it is still necessary to add such a BN and a non-linearity after each of the internal separated convolutions. Experimental results are illustrated in Table 5. Comparing the “Internal BN and Non-linearity” column against the “Accuracy” column, we are able to conclude that with or without internal BN and non-linearity, similar results with only statistical variances can be generated. This is reasonable because the network has already been regularized by outer BN and non-linearity layers from the macro architecture. Internal ones shall offer little to no additional improvements. Because internal BN and non-linearity could introduce extra computation and parameters, in the proposed research, we shall not use internal BN and non-linearity.
Spatial Separable Another variation of the proposed optimal separable convolution scheme is the spatial separable configuration. For Equation (16), the optimal solution is achieved when one of
the internal kernel sizes takes KH|W and all the rest takes 1. It does not matter which one of the internal kernel sizes takes KH|W . Hence, we have this spatial separable variant: a single kernel takes (KH ,KW ) or two kernels take (KH , 1) and (1,KW ). The detailed implementation is illustrated in Algorithm 1. While spatial separable or not affects neither the FLOPs nor the number of parameters for the proposed optimal separable convolution, the results could be slightly different. As illustrated by the column “Spatial Separable” in Table 5, the spatial separable configuration leads to slightly worse performances. The reason might be that spatial separation fuses horizontal and vertical features separately, which could be less efficient than fusing them simultaneously.
D INFERENCE TIME FOR THE PROPOSED OPTIMAL SEPARABLE CONVOLUTION
FLOPs measures the best possible theoretical speed we are able to achieve. In this Section, we further report the wall-clock inference time of the proposed optimal separable convolution scheme. The inference time is measured on a laptop computer with Windows 10 operating system and Intel i5-8250 CPU, which we use to simulate a mobile platform. The results are illustrated in Table 6. As can be seen, for ResNet20, o-ResNet20 m3.875, and d-ResNet20 m2.75, they have a similar FLOPs (≈0.0405 billion), yet o-ResNet20 m3.875 and d-ResNet20 m2.75 take a slightly longer inference time (0.0468s vs 0.0310s). This is because current implementation of grouped convolution in PyTorch is not optimized. From Table 6, we can also conclude that under the same FLOPs, o-ResNet has slightly better performance than d-ResNet (e.g. o-ResNet32 takes 0.0937s while d-ResNet32 takes 0.1154s). This might because the proposed optimal separable convolution scheme usually has smaller “groups” hyper-parameters than depth separable convolution. Similar conclusions can also be drawn for deeper ResNet32, ResNet56, and ResNet110 networks.

heading: E RELATED WORK
text: There have been many previous works aiming at reducing the amount of computation in convolution. Historically, researchers apply Fast Fourier Transform (FFT) (Nussbaumer, 1981; Quarteroni et al., 2010) to implement convolution. For 1D convolution, FFT reduces the number of computations for H points from O(H2) to O(H logH). For 2D convolution, FFT-2D reduces the computational complexity fromO(HW ·K2) toO(HW ·(logH+logW )) (Podlozhnyuk, 2007). Hence, it can be easily concluded that FFT gains great speed up for large convolutional kernels. For small convolutional kernels (K << H or W ), a direct application is often still cheaper. Researchers also explore low rank approximation (Jaderberg et al., 2014; Ioannou et al., 2015) to implement convolutions. However, most of the existing methods obtain moderate efficiency improvements, and they usually require a pre-trained model and mainly focus on network pruning and compression. In recent state-of-the-art deep CNN models, several heuristics are adopted to reduce the heavy computation in convolution. For example, in (He et al., 2016), the authors use a bottleneck structure. Yet in (Sandler et al., 2018), the authors adopt an inverted bottleneck structure. Such heuristics may require further ad hoc design to work in practice, however, they are not solid and shall become less convincing.
Among various implementations of convolution, separable convolution has been proven to be more efficient in reducing the computational demand. Depth separable convolution is explored extensively in modern DCNNs (Howard et al., 2017; Sandler et al., 2018; Howard et al., 2019; Liu et al., 2018; Tan & Le, 2019). It reduces the computational cost of a conventional convolution from O(C2K2HW ) to O(CHW · (C +K2)). However, the proposed optimal separable convolution is even more efficient than depth separable convolution. It can be calculated at O(C 3 2KHW ) and has the full potential to replace the usage of depth separable convolutions. A second advantage of the proposed optimal separable convolution is that it can be applied to fully connected layers if we view them as 1 × 1 convolutional layers, whereas depth separable convolution cannot. Further, depth separable convolution requires the middle channel size to be equal to the input channel size, whereas for the proposed optimal separable convolution, the middle channel size can be freely set.
Spatial separable convolution was originally developed to speed up image processing operations. For example, a Sobel kernel is a 3 × 3 kernel and can be written as (1, 2, 1)T · (−1, 0, 1). Spatial separable will require 6 instead of 9 parameters while doing the same operation. Spatial separable convolution is also adopted in the design of modern DCNNs. For example, in (Szegedy et al., 2016), the authors introduce spatial separation to the GoogLeNet (Szegedy et al., 2015) architecture. For the proposed optimal separable convolution, there is also a spatial separable configuration.
In the body of literature, separable convolution is also referred to factorized convolution or convolution decomposition. In this research, the proposed scheme is called optimal separable convolution following the naming conventions of depth and spatial separable convolutions.

Review summaries:
This paper proposes a novel type of convolution called optimal separable convolution. Compared with existing separable convolutions like depth separable and spatial separable convolutions, the authors design a scheme to achieve an optimal separation. To prevent the proposed convolution from being degenerated, the authors define the volumetric receptive field to be the volume in the input space that affects CNN’s output. The volumetric RF condition requires that a properly decomposed separable convolution maintains the same volumetric RF as the original convolution before decomposition.

This paper proposes a novel analysis for optimal separable convolution considering the number of parameters and FLOPs. The idea is to constraint the input information consumed stationery throughout the optimization of the parameters for separable convolutions. More specifically, this paper proposes the notion of volumetric receptive field and by holding it constant throughout optimization, one can arrive at a constrained optimization problem for solving the parameters for the optimal separable convolution. Empirical results of replacing common convolution with optimal convolution in various modern CNNs have demonstrated the effectiveness of the proposed optimal separable convolution.