summaries: This paper shows that there is a one-to-one correspondence between pixel-shift based data augmentation and average pooling operations in CNN-NNGP/NTK based ridge regression. Interestingly, the authors show that standard average pooling + flatten can lead to a better performance than simple global average pooling. This paper further shows that using the data pre-processing step proposed in (Coates et al., 2011) can boost performance of CNN-NNGP/NTK based ridge regression by ~7% which allowed the authors to achieve classification accuracy in high 80s which is AFAIK SOTA on CIFAR-10 when not using learned representations. This paper considers architectures that do not involve learning (up to the classification layer) and tries to improve their accuracies. They're based on CNTK and CNN-GP works. This is purely a numerical paper and its contribution is to show that despite being not learned, the obtained representations are competitive with supervised neural networks. This paper builds on recent developments of CNN-GP and CNTKs in multiple fronts obtaining significant performance boost on CIFAR-10 dataset (and some mild boost on Fashion-MNIST). One way is by usage of Local Average Pooling (LAP) layers which interpolates between Global Average Pooling (GAP) and no Pooling layer. The authors also introduce flip data augmentation by doubling the dataset. With the help of additional feature extractor, this paper obtained 89% classification accuracy on CIFAR-10 which is the best among methods not using trained neural networks. 
abstractText: Recent research shows that for training with `2 loss, convolutional neural networks (CNNs) whose width (number of channels in convolutional layers) goes to infinity correspond to regression with respect to the CNN Gaussian Process kernel (CNN-GP) (Novak et al., 2019) if only the last layer is trained, and correspond to regression with respect to the Convolutional Neural Tangent Kernel (CNTK) if all layers are trained. An exact algorithm to compute CNTK (Arora et al., 2019) yielded the finding that classification accuracy of CNTK on CIFAR-10 is within 6-7% of that of the corresponding CNN architecture (best figure being around 78%) which is interesting performance for a fixed kernel. Here we show how to significantly enhance the performance of these kernels using two ideas. (1) Modifying the kernel using a new operation called Local Average Pooling (LAP) which preserves efficient computability of the kernel and inherits the spirit of standard data augmentation using pixel shifts. Earlier papers were unable to incorporate naive data augmentation because of the quadratic training cost of kernel regression. This idea is inspired by Global Average Pooling (GAP), which we show for CNN-GP and CNTK is equivalent to full translation data augmentation. (2) Representing the input image using a pre-processing technique proposed by Coates et al. (2011), which uses a single convolutional layer composed of random image patches. On CIFAR-10, the resulting kernel, CNN-GP with LAP and horizontal flip data augmentation, achieves 89% accuracy, matching the performance of AlexNet (Krizhevsky et al., 2012) , and outperforms the best previous classifier that is not a trained neural network (Mairal, 2016). Similar improvements are obtained for Fashion-MNIST.
references.authors: Zeyuan Allen-Zhu Yuanzhi Li Zhao Song
references.title: A convergence theory for deep learning via overparameterization
references.venue: arXiv preprint arXiv:1811.03962,
references.authors: Sanjeev Arora Simon S Du Wei Hu Zhiyuan Li Ruslan Salakhutdinov Ruosong Wang
references.title: On exact computation with an infinitely wide neural net
references.authors: Olivier Chapelle Jason Weston Léon Bottou Vladimir Vapnik
references.title: Vicinal risk minimization
references.venue: In Advances in neural information processing systems,
references.authors: Shuxiao Chen Edgar Dobriban Jane H Lee
references.title: Invariance reduces variance: Understanding data augmentation in deep learning and beyond
references.authors: Adam Coates Andrew Ng Honglak Lee
references.title: An analysis of single-layer networks in unsupervised feature learning
references.venue: In Proceedings of the fourteenth international conference on artificial intelligence and statistics,
references.authors: Tri Dao Albert Gu Alexander J Ratner Virginia Smith Christopher De Sa Christopher Ré
references.title: A kernel theory of modern data augmentation
references.venue: arXiv preprint arXiv:1803.06084,
references.authors: Simon S Du Jason D Lee Haochuan Li Liwei Wang Xiyu Zhai
references.title: Gradient descent finds global minima of deep neural networks
references.venue: arXiv preprint arXiv:1811.03804,
references.authors: Simon S. Du Kangcheng Hou Barnabás Póczos Ruslan Salakhutdinov Ruosong Wang Keyulu Xu
references.title: Graph neural tangent kernel: Fusing graph neural networks with graph kernels
references.venue: ArXiv, abs/1905.13192,
references.authors: Simon S. Du Xiyu Zhai Barnabas Poczos Aarti Singh
references.title: Gradient descent provably optimizes over-parameterized neural networks
references.venue: In International Conference on Learning Representations,
references.authors: Adrià Garriga-Alonso Carl Edward Rasmussen Laurence Aitchison
references.title: Deep convolutional networks as shallow gaussian processes
references.venue: In International Conference on Learning Representations,
references.authors: Kaiming He Xiangyu Zhang Shaoqing Ren Jian Sun
references.title: Deep residual learning for image recognition
references.venue: In Proceedings of the IEEE conference on computer vision and pattern recognition,
references.authors: Gao Huang Zhuang Liu Laurens Van Der Maaten Kilian Q Weinberger
references.title: Densely connected convolutional networks
references.venue: In Proceedings of the IEEE conference on computer vision and pattern recognition,
references.authors: Arthur Jacot Franck Gabriel Clément Hongler
references.title: Neural tangent kernel: Convergence and generalization in neural networks
references.venue: arXiv preprint arXiv:1806.07572,
references.authors: Alex Krizhevsky
references.title: Learning multiple layers of features from tiny images
references.authors: Alex Krizhevsky Ilya Sutskever Geoffrey E Hinton
references.title: Imagenet classification with deep convolutional neural networks. In Advances in neural information processing
references.authors: Jaehoon Lee Jascha Sohl-dickstein Jeffrey Pennington Roman Novak Sam Schoenholz Yasaman Bahri
references.title: Deep neural networks as gaussian processes
references.venue: In International Conference on Learning Representations,
references.authors: Yuanzhi Li Yingyu Liang
references.title: Learning overparameterized neural networks via stochastic gradient descent on structured data
references.venue: arXiv preprint arXiv:1808.01204,
references.authors: Julien Mairal
references.title: End-to-end kernel learning with supervised convolutional kernel networks
references.venue: In Advances in neural information processing systems,
references.authors: Alexander G de G Matthews Mark Rowland Jiri Hron Richard E Turner Zoubin Ghahramani
references.title: Gaussian process behaviour in wide deep neural networks
references.venue: arXiv preprint arXiv:1804.11271,
references.authors: Radford M Neal
references.title: Priors for infinite networks. In Bayesian Learning for Neural Networks, pp. 29–53
references.authors: Roman Novak Lechao Xiao Yasaman Bahri Jaehoon Lee Greg Yang Daniel A. Abolafia Jeffrey Pennington Jascha Sohl-dickstein
references.title: Bayesian deep convolutional networks with many channels are gaussian processes
references.venue: In International Conference on Learning Representations,
references.authors: Edouard Oyallon Stéphane Mallat
references.title: Deep roto-translation scattering for object classification
references.venue: In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition,
references.authors: Benjamin Recht Rebecca Roelofs Ludwig Schmidt Vaishaal Shankar
references.title: Do imagenet classifiers generalize to imagenet
references.venue: arXiv preprint arXiv:1902.10811,
references.authors: Bernhard Schölkopf Chris Burges Vladimir Vapnik
references.title: Incorporating invariances in support vector learning machines
references.venue: In International Conference on Artificial Neural Networks,
references.authors: Jocelyn Sietsma Robert JF Dow
references.title: Creating artificial neural networks that generalize
references.venue: Neural networks,
references.authors: Jost Tobias Springenberg Alexey Dosovitskiy Thomas Brox Martin Riedmiller
references.title: Striving for simplicity: The all convolutional net
references.venue: arXiv preprint arXiv:1412.6806,
references.authors: Richard Szeliski
references.title: Computer vision: algorithms and applications
references.venue: Springer Science & Business Media,
references.authors: Han Xiao Kashif Rasul Roland Vollgraf
references.title: Fashion-mnist: a novel image dataset for benchmarking machine learning algorithms, 2017
references.authors: Greg Yang
references.title: Scaling limits of wide neural networks with weight sharing: Gaussian process behavior, gradient independence, and neural tangent kernel derivation
references.authors: Difan Zou Yuan Cao Dongruo Zhou Quanquan Gu
references.title: Stochastic gradient descent optimizes over-parameterized deep ReLU networks
references.venue: arXiv preprint arXiv:1811.08888,
sections.text: Recent research shows that for training with `2 loss, convolutional neural networks (CNNs) whose width (number of channels in convolutional layers) goes to infinity correspond to regression with respect to the CNN Gaussian Process kernel (CNN-GP) (Novak et al., 2019) if only the last layer is trained, and correspond to regression with respect to the Convolutional Neural Tangent Kernel (CNTK) if all layers are trained. An exact algorithm to compute CNTK (Arora et al., 2019) yielded the finding that classification accuracy of CNTK on CIFAR-10 is within 6-7% of that of the corresponding CNN architecture (best figure being around 78%) which is interesting performance for a fixed kernel. Here we show how to significantly enhance the performance of these kernels using two ideas. (1) Modifying the kernel using a new operation called Local Average Pooling (LAP) which preserves efficient computability of the kernel and inherits the spirit of standard data augmentation using pixel shifts. Earlier papers were unable to incorporate naive data augmentation because of the quadratic training cost of kernel regression. This idea is inspired by Global Average Pooling (GAP), which we show for CNN-GP and CNTK is equivalent to full translation data augmentation. (2) Representing the input image using a pre-processing technique proposed by Coates et al. (2011), which uses a single convolutional layer composed of random image patches. On CIFAR-10, the resulting kernel, CNN-GP with LAP and horizontal flip data augmentation, achieves 89% accuracy, matching the performance of AlexNet (Krizhevsky et al., 2012) , and outperforms the best previous classifier that is not a trained neural network (Mairal, 2016). Similar improvements are obtained for Fashion-MNIST.
sections.heading: 1 INTRODUCTION
sections.text: Recent research shows that for training with `2 loss, convolutional neural networks (CNNs) whose width (number of channels in convolutional layers) goes to infinity, correspond to regression with respect to the CNN Gaussian Process kernel (CNN-GP) if only the last layer is trained (Novak et al., 2019; Garriga-Alonso et al., 2019), and correspond to regression with respect to the Convolutional Neural Tangent Kernel (CNTK) if all layers are trained (Jacot et al., 2018; Allen-Zhu et al., 2018; Du et al., 2019b; Arora et al., 2019). Novak et al. (2019); Garriga-Alonso et al. (2019) also implemented CNN-GP and tested its empirical performance. An efficient exact algorithm was given (Arora et al., 2019) to compute CNTK for CNN architectures, as well as those that include a Global Average Pooling (GAP) layer (defined below). This is a fixed kernel that inherits some benefits of CNNs, including exploitation of locality via convolution, as well as multiple layers of processing. For CIFAR-10, incorporating GAP into the kernel improves classification accuracy by up to 10% compared to pure convolutional CNTK.
  While this performance is encouraging for a fixed kernel, the best accuracy is still under 78%, which is disappointing even compared to AlexNet. One hope for improving the accuracy further is to somehow capture modern innovations such as batch normalization, data augmentation, residual layers, etc. in CNTK. The current paper shows how to incorporate simple data augmentation. Specifically, the idea of creating new training images from existing images using pixel translation and flips, while assuming that these operations should not change the label. Since deep learning uses stochastic gradient descent (SGD), it is trivial to do such data augmentation on the fly. However, it’s
  unclear how to efficiently incorporate data augmentation in kernel regression, since training time is quadratic in the number of training images. 1
  Thus somehow data augmentation has to be incorporated into the computation of the kernel itself. The main observation here is that the above-mentioned algorithm for computing CNTK involves a dynamic programming whose recursion depth is equal to the depth of the corresponding finite CNN. It is possible to impose symmetry constraints at any desired layer during this computation. In this viewpoint, it can be shown that prediction using CNTK/CNN-GP with GAP is equivalent to prediction using CNTK/CNN-GP without GAP but with full translation data augmentation with wraparound at the boundary. The translation invariance property implicitly assumed in data augmentation is exactly equivalent to an imposed symmetry constraint in the computation of the CNTK which in turn is derived from the pooling layer in the CNN. See Section 4 for more details.
  Thus GAP corresponds to full translation data augmentation scheme, but in practice such data augmentation creates unrealistic images (cf. Figure 2) and training on them can harm performance. However, the idea of incorporating symmetry in the dynamic programming leads to a variant we call Local Average Pooling (LAP). This implicitly is like data augmentation where image labels are assumed to be invariant to small translation, say by a few pixels. Interestingly, LAP corresponds to a average pooling layer for CNNs, named box filtering (Szeliski, 2010).
  Experimentally, we find LAP significantly enhances the performance as discussed below.
  • In extensive experiments on CIFAR-10 and Fashion-MNIST, we find LAP consistently improves performance of CNN-GP and CNTK. In particular, we find CNN-GP with LAP achieves 81% on CIFAR-10 dataset, outperforming the best previous kernel predictor by 3%. • When using the technique proposed by Coates et al. (2011), which uses randomly sampled patches from training data as filters to do pre-processing,2 CNN-GP with LAP and horizontal flip data augmentation achieves 89% accuracy on CIFAR-10, matching the performance of AlexNet (Krizhevsky et al., 2012) and is the strongest classifier that is not a trained neural network.3 • We also test performance of CNNs with an extra layer corresponding to LAP and observe that it improves the performance on certain architectures.
sections.heading: 2 RELATED WORK
sections.text: Data augmentation has long been known to improve the performance of neural network and kernel methods (Sietsma & Dow, 1991; Schölkopf et al., 1996). Theoretical study of data augmentation dates back to Chapelle et al. (2001). Recently, Dao et al. (2018) proposed a theoretical framework for understanding data augmentation and showed data augmentation with a kernel classifier can have feature averaging and variance regularization effects. More recently, Chen et al. (2019) quantitatively shows in certain settings, data augmentation provably improves the classifier performance. For more comprehensive discussion on data augmentation and its properties, we refer readers to Dao et al. (2018); Chen et al. (2019) and references therein.
  CNN-GP and CNTK correspond to infinitely wide CNN with different training strategies (only training the top layer or training all layers jointly). The correspondence between infinite neural networks and kernel machines was first noted by Neal (1996). More recently, this was extended to deep and convolutional neural networks (Lee et al., 2018; Matthews et al., 2018; Novak et al., 2019; Garriga-Alonso et al., 2019). These kernels correspond to infinitely wide neural networks where only the last layer is trained. A recent line of work studied overparameterized neural networks where all layers are trained (Allen-Zhu et al., 2018; Du et al., 2019b; 2018; Li & Liang, 2018; Zou et al., 2018). Their proofs imply the gradient kernel is close to a fixed kernel which only depends the training data and neural network architecture. These kernels thus correspond to infinitely wide neural networks where are all layers are trained. Jacot et al. (2018) named this kernel, neural tangent kernel (NTK). Arora et al. (2019) formally proved infinitely wide neural net predictor trained by
  1For CIFAR 10, the bottleneck of using CNN-GP and CNTK is not solving least square but constructing kernel. The time complexity is O(p2n2) where p is the number of pixels in each image and n is number of data point.
  2See Section 6.2 for the precise procedure. 3https://benchmarks.ai/cifar-10
  gradient descent is equivalent to NTK predictor. Recently, NTKs induced by various neural network architectures are derived and shown to achieve strong empirical performance (Arora et al., 2019; Yang, 2019; Du et al., 2019a).
  Global Average Pooling (GAP) was first proposed in Lin et al. (2013) and is common in modern CNN design (Springenberg et al., 2014; He et al., 2016; Huang et al., 2017). However, current theoretical understanding on GAP is still rather limited. It has been conjectured in Lin et al. (2013) that GAP reduces the number of parameters in the last fully-connected layer and thus avoids overfitting, and that GAP is more robust to spatial translations of the input since it sums out the spatial information. In this work, we study GAP from the CNN-GP and CNTK perspective, and draw an interesting connection between GAP and data augmentation.
  Here we are interested in methods that are not trained neural networks. If the features are predefined before seeing the data, Oyallon & Mallat (2015) proposed the scattering network which achieves 82% classification accuracy on CIFAR-10. If one uses unsupervised learning methods to extract features, the method proposed in Coates et al. (2011) is one of the best-performing approaches on CIFAR-10 preceding modern CNNs. To our knowledge, the best result via unsupervised learning method in this line is by Mairal (2016), who used the convolutional kernel network to achieve 86% accuracy on CIFAR-10. In this work we combine CNTK with LAP and the idea in Coates et al. (2011) to achieve the best performance for classifiers that are not trained neural networks.
sections.heading: 3 PRELIMINARIES
sections.heading: 3.1 NOTATION
sections.text: We use bold-faced letters for vectors, matrices and tensors. For a vector a, let [a]i be its i-th entry; for a matrix A, let [A]i,j be its (i, j)-th entry; for an order 4 tensor T , let [T ]ij,i′j′ be its (i, j, i′, j′)-th entry. For a symmetric tensor, wet let tr (T ) = ∑ i,j Tij,ij . For an order d tensor T ∈ RC1×C2×...×Cd and an integer α ∈ [Cd], we use T(α) ∈ RC1×C2×...×Cd−1 to denote the order d− 1 tensor formed by fixing the coordinate of the last dimension of T to be α.
  3.2 CNN, CNN-GP AND CNTK
  In this section we give formal definitions of CNN, CNN-GP and CNTK that we study in this paper. Throughout the paper, we let P be the width and Q be the height of the image. We use q ∈ Z+ to denote the filter size. In practice, q = 1, 3, 5 or 7.
  Padding Schemes. In the definition of CNN, CNTK and CNN-GP, we may use different padding schemes. Let x ∈ RP×Q be an matrix. For a given index pair (i, j) with i ≤ 0, i ≥ P + 1, j ≤ 0 or j ≥ Q+ 1, different padding schemes define different value for [x]i,j . For circular padding, we define [x]i,j to be [x]i mod P,j mod Q. For zero padding, we simply define [x]i,j to be 0. Note the difference between circular padding and zero padding occurs only on the boundary of images. We will prove our theoretical results for the circular padding scheme to avoid boundary effects.
  CNN. Now we describe CNN with and without GAP. For any input image x, after L intermediate layers, we obtain x(L) ∈ RP×Q×C(L) where C(L) is the number of channels of the last layer. See Section A for the definition of x(L). For the output, there are two choices: with and without GAP.
  • Without GAP: the final output is defined as f(θ,x) = ∑C(L) α=1 〈 W (L+1) (α) ,x (L) (α) 〉 where x(L)(α) ∈
  RP×Q, andW (L+1)(α) ∈ R P×Q is the weight of the last fully-connected layer. • With GAP: the final output is defined as f(θ,x) = 1PQ ∑C(L) α=1 W (L+1) (α) · ∑ (i,j)∈[P ]×[Q] [ x (L) (α) ] i,j
  whereW (L+1)(α) ∈ R is the weight of the last fully-connected layer.
  CNN-GP and CNTK. Now we describe CNN-GP and CNTK. Let x,x′ be two input images. We denote the L-th layer’s CNN-GP kernel as Σ(L) (x,x′) ∈ R[P ]×[Q]×[P ]×[Q] and the L-th layer’s CNTK kernel as Θ(L) (x,x′) ∈ R[P ]×[Q]×[P ]×[Q]. See Section A for the precise definitions of
  Σ(L) (x,x′) and Θ(L) (x,x′). For the output kernel value, again, there are two choices, without GAP (equivalent to using a fully-connected layer) or with GAP.
  • Without GAP: the output of CNN-GP is ΣFC (x,x′) = tr ( Σ(L)(x,x′) ) and the output of
  CNTK is ΘFC (x,x′) = tr ( Θ(L)(x,x′) ) .
  • With GAP: the output of CNN-GP is ΣGAP (x,x′) = 1
  P 2Q2 ∑ i,j,i′,j′∈[P ]×[Q]×[P ]×[Q] [ Σ(L) (x,x′) ] i,j,i′,j′
  , and the output of CNTK is ΘGAP (x,x ′) = 1P 2Q2 ∑ i,j,i′,j′∈[P ]×[Q]×[P ]×[Q] [ Θ(L) (x,x′) ] i,j,i′,j′ .
  Kernel Prediction. Lastly, we recall the formula for kernel regression. For simplicity, throughout the paper, we will assume all kernels are invertible. Given a kernel K (x,x′) and a dataset (X,y) with data {(xi, yi)}Ni=1, define KX ∈ RN×N where [KX]i,j = K(xi,xj). The prediction for unseen data x′ is ∑N i=1 αiK(x ′,xi), where α = K−1X y.
sections.heading: 3.3 DATA AUGMENTATION SCHEMES
sections.text: In this paper we consider two types of data augmentation schemes: translation and horizontal flip.
  Translation. Given (i, j) ∈ [P ] × [Q], we define the translation operator Tij : RP×Q×C → RP×Q×C : for an image x ∈ RP×Q×C , [Tij (x)]i′,j′,c = [x]i′+i,j′+j,c for (i
  ′, j′, c) ∈ [P ] × [Q] × [C]. Here the precise definition of [x]i′+i,j′+j,c depends on the padding scheme. Given a dataset D = {(xi, yi)}Ni=1, the full translation data augmentation scheme creates a new dataset DT = {(Tij (xi) , yi)}(i,j,n)∈[P ]×[Q]×[N ] and training is performed on DT .
  Horizontal Flip. Flip operator F : RP×Q×C → RP×Q×C : for an image x ∈ RP×Q×C , [F (x)]i,j,c = [x]P+1−i,j,c for (i, j, c) ∈ [P ] × [Q] × [C]. Given a dataset D = {(xi, yi)} N i=1, the horizontal flip augmentation scheme creates a new dataset of the form DF = {(F (xi) , yi)}Ni=1 and training is performed on DF ∪D.
sections.heading: 4 EQUIVALENCE BETWEEN AUGMENTED KERNEL AND DATA AUGMENTATION
sections.text: In this section, we demonstrate the equivalence between using data augmentation and using a augmented kernel. To formally discuss the equivalence, we use group theory to describe translation and horizontal flip operators. We provide the definition of group in Section B for completeness.
  It is easy to verify that {F , I}, {Ti,j}(i,j)∈[P ]×[Q], {Ti,j ◦ F}(i,j)∈[P ]×[Q] ∪ {Ti,j}(i,j)∈[P ]×[Q] are groups, where I is the identity map. From now on, given a dataset (X,y) with data {(xi, yi)}Ni=1 and a group G, the augmented dataset (XG ,yG) is defined to be {g(xi), yi}g∈G,i∈[N ]. For kernel prediction for unseen data x′ on the augmented dataset, we have the following formula:∑ i∈[N ],g∈G α̃i,gK(x ′, g(xi)), where α̃ = K−1XGyG .
  To proceed, we define the concept of augmented kernel. Let G be a finite group. Define the augmented kernel KG as KG(x,x′) = Eg∈GEg′∈GK(g(x), g′(x′)) where x,x′ are two inputs images. A key observation is that for CNTK and CNN-GP, when circular padding and GAP is adopted, these are actually the augmented kernels with the group G = {Ti,j}(i,j)∈[P ]×[Q]. Formally, we have ΣGAP (x,x ′) = 1PQΣ G FC (x,x ′) and ΘGAP (x,x′) = 1PQΘ G FC (x,x
  ′). The proof for these two equations is just by checking the formula of these kernels and using definition of circular padding. By similar proof, one can observe the following invariance property of ΣGAP,ΣFC,ΘGAP and ΘFC, under all groups mentioned above, including {F , I} and {Ti,j}(i,j)∈[P ]×[Q]. Definition 4.1. A kernel K is invariant under a group G if and only if for any g ∈ G, K(g(x), g(x′)) = K(x,x′).
  Now the following theorem formally states the equivalence between using an augmented kernel on the dataset and using the kernel on the augmented dataset.
  Theorem 4.1. Given a group G and a kernel K such that K is invariant under G, then the prediction of augmented kernel KG with dataset (X,y) is equal to that of kernel K and augmented dataset (XG ,yG). Namely, for any x′ ∈ RP×Q×C , ∑N i=1 αiK G(x′,xi) = ∑ i∈[N ],g∈G α̃i,gK(x ′, g(xi))
  where α = ( KGX )−1 y, α̃ = (KXG ) −1 yG .
  The proof is deferred to Appendix B. Two corollaries are directly followed. Corollary 4.1. For G = {Ti,j}(i,j)∈[P ]×[Q], for any given dataset D, the prediction of ΣGAP (or ΘGAP) with dataset D is equal to the prediction of ΣFC (or ΘFC) with augmented dataset DT . Corollary 4.2. For G = {F , I}, for any given dataset D, the prediction of ΣGGAP (or Θ G GAP) with dataset D is equal to the prediction of ΣGAP (or ΘGAP) with augmented dataset DF ∪D.
  Now we discuss implications of Theorem 4.1 and its corollaries. Naively applying data augmentation, with full translation on CNTK or CNN-GP for example, one needs to create a P 2Q2 times larger kernel matrix since there are PQ translation operators, which is often computationally infeasible. Instead, we can directly use the augmented kernel (ΣGAP or ΘGAP for the case of full translation on CNTK or CNN-GP) for prediction, for which one only needs to create a kernel matrix that is as large as the original one. For horizontal flip, although the augmentation kernel is not as conveniently computed as full translation, Corollary 4.2 still provides a more efficient method for computing kernel value and solving kernel regression, since the augmented dataset is twice as large as the original dataset.
sections.heading: 5 LOCAL AVERAGE POOLING
sections.text: In this section, we introduce a new operation called Local Average Pooling (LAP). As discussed in the introduction, full translation data augmentation can create unrealistic images. A natural idea is to do local translation data augmentation, i.e., restricting the distance of translation. More specifically, we only allow translation operations T∆i,∆j (cf. Section 3.3) for (∆i,∆j) ∈ [−c, c]×[−c, c] where c is a parameter to control the amount of allowed translation. With a proper choice of the parameter c, translation data augmentation will not create unrealistic images (cf. Figure 2). However, naive local translation data augmentation is computationally infeasible for kernel methods, even for moderate choice of c. To remedy this issue, in this section we introduce LAP, which is inspired by the connection between full translation data augmentation and GAP on CNN-GP and CNTK. Here, for simplicity, we assume P = Q and derive the formula only for CNTK. Our formula can be generalized to CNN-GP in a straightforward manner.
  Recall that for two given images x and x′, without GAP, the formula for output of CNTK is tr (Θ(x,x′)). With GAP, the formula for output of CNTK is 1 P 4 ∑ i,j,i′,j′∈[P ]4 [Θ (x,x
  ′)]i,j,i′,j′ . With circular padding, the formula can be rewritten as 1P 2 E∆i,∆′i,∆j ,∆′j∼[P ]4 ∑ i,j∈[P ]×[P ] [Θ (x,x ′)]i+∆i,j+∆j ,i+∆′i,j+∆′j , which is again equal to
  1 P 2 E∆i,∆′i,∆j ,∆′j∼[P ]4 tr ( Θ ( T∆i,∆j (x), T∆′i,∆′j (x ′) ))
  . We ignore the 1/P 2 scaling factor since it plays no role in kernel regression.
  Now we consider restricted translation operations T∆i,∆j with (∆i,∆j) ∈ [−c, c] × [−c, c] and derive the formula for LAP. Assuming circular padding, we have
  E∆i,∆′i,∆j ,∆′j∼[−c,c]4 tr ( Θ ( T∆i,∆j (x), T∆′i,∆′j (x ′) ))
  = 1
  (2c+ 1)4 ∑ ∆i,∆′i,∆j ,∆ ′ j∈[−c,c]4 ∑ i,j∈[P ]2 [Θ(x,x′)]i+∆i,j+∆j ,i+∆′i,j+∆′j . (1)
  Now we have derived the formula for LAP which is given in Equation 1. Notice that the formula in Equation 1 is a well-defined quantity for all padding schemes. In particular, assuming zero padding, when c = P , LAP is equivalent to GAP. When c = 0, LAP is equivalent to no pooling layer. Another advantage of LAP is that it does not incur significant additional computational cost, since the formula in Equation 1 can be rewritten as ∑ i,j,i′,j′∈[P ]4 [w]i,j,i′,j′ · [Θ(x,x′)]i,j,i′,j′ where each entry in the weight tensor w can be calculated in O(1) time.
  Note that the GAP operation in CNN-GP and CNTK corresponds to the GAP layer in CNNs. Here we observe the following box filtering layer that corresponds to LAP in CNNs. Box filtering layer
  (BF) is a function RP×Q → RP×Q such that [BF(x)]i,j = 1(2c+1)2 ∑
  ∆i,∆j∈[−c,c]2 xi+∆i,j+∆j . This is in fact a standard average pooling layer but with stride 1 and pooling size 2c+ 1. We prove the equivalence between LAP and box filtering layer in Appendix C. In Section 6.3, we test BF on CNNs to verify its effectiveness.
sections.heading: 6 EXPERIMENTS
sections.text: In this section we present our empirical findings on CIFAR-10 (Krizhevsky, 2009) and FashionMNIST (Xiao et al., 2017). The detailed experimental setup is reported in Appendix D. When reporting test accuracies, the best result on the test set is in boldface and the result that corresponds to the hyper-parameter chosen by cross-validation is underlined.
sections.heading: 6.1 ABLATION STUDY ON CIFAR-10 AND FASHION-MNIST
sections.text: We perform experiments to study the effect of different values of the c parameter in LAP and horizontal flip data argumentation on CNTK and CNN-GP. For experiments in this section we set the bias term in CNTK and CNN-GP to be β = 0 (cf. Section A). We use the same architecture for CNTK and CNN-GP as in Arora et al. (2019). I.e., we stack multiple convolutional layers before the final pooling layer. We use d to denote the number of convolutions layers, and in our experiments we set d to be 5, 8, 11 or 14, to study the effect of depth on CNTK and CNN-GP. For CIFAR-10, we set the c parameter in LAP to be 0, 4, . . . , 32, while for Fashion-MNIST we set the c parameter in LAP to be 0, 4, . . . , 28. Notice that when c = 32 for CIFAR-10 or c = 28 for Fashion-MNIST, LAP is equivalent to GAP, and when c = 0, LAP is equivalent to no pooling layer. Results on CIFAR-10 are reported in Tables 1 and 3. Due to space constraint, results on Fashion-MNIST are reported in Tables 5 and 6 in Appendix E. In each table, for each combination of c and d, the first number is the test accuracy without horizontal flip data augmentation (in percentage), and the second number (in parentheses) is the test accuracy with horizontal flip data augmentation. To perform cross-validation to choose the hyper-parameters, we use the last 10000 samples in the training set of CIFAR-10 and Fashion-MNIST as the validation set and the rest samples as the training set. We then use the full training set to report the test accuracy. To perform cross-validation, we choose c, d, CNN or CNN-GP, and whether or not to adopt horizontal flip based on the validation accuracy (shown in Appendix F). With cross-validation, the resulting accuracy is 82.09% on CIFAR-10 and 94.07% on Fashion-MNIST.
  We made the following observations regarding our experimental results.
  • LAP with a proper choice of the parameter c significantly improves the performance of CNTK and CNN-GP. On CIFAR-10, the best-performing value of c is c = 12 or 16, while on FashionMNIST the best-performing value of c is c = 4. We suspect this difference is due to the nature of the two datasets: CIFAR-10 contains real-life images and thus allow more translation, while Fashion-MNIST contains images with centered clothes and thus allow less translation. For both datasets, the best-performing value of c is consistent across all settings (depth, CNTK or CNNGP) that we have considered. • Horizontal flip data augmentation is less effective on Fashion-MNIST than on CIFAR-10. There are two possible explanations for this phenomenon. First, most images in Fashion-MNIST are nearly horizontally symmetric (e.g., T-shirts and bags). Second, CNTK and CNN-GP have already achieved a relatively high accuracy on Fashion-MNIST, and thus it is reasonable for horizontal flip data augmentation to be less effective on this dataset. • Finally, for CNTK, when c = 0 (no pooling layer) and c = 32 (GAP) our reported test accuracies are close to those in Arora et al. (2019) on CIFAR-10. For CNN-GP, when c = 0 (no pooling layer) our reported test accuracies are close to those in Novak et al. (2019) on CIFAR-10 and Fashion-MNIST. This suggests that we have reproduced previous reported results.
sections.heading: 6.2 IMPROVING PERFORMANCE ON CIFAR-10 USING RANDOM PATCHES LAYER
sections.text: Finally, we explore another interesting question: what is the best performance achievable via a method that is not a trained neural network? To further improve the performance, we combine CNTK and CNN-GP with LAP, together with the unsupervised learning approach developed in Coates et al. (2011). Here we use the variant implemented in Recht et al. (2019). More specifically, we first sample 2048 random image patches with size 5× 5 from all training images. Then for the sampled images patches, we subtract the mean of the patches, then normalize them to have unit
  norm, and finally perform ZCA transformation to the resulting patches. We use the resulting patches as 2048 filters of a convolutional layer with kernel size 5, stride 1 and no dilation or padding. For an input image x, we use conv(x) to denote the output of the convolutional layer. As in the implementation in Recht et al. (2019), we use ReLU(conv(x) − βfeature) and ReLU(−conv(x) − βfeature) as the input feature for CNTK and CNN-GP. Here we fix βfeature = 1 as in Recht et al. (2019) and the bias term β in CNTK and CNN-GP to be β = 1. To make the output kernel value invariant under horizontal flip (cf. Defintion 4.1), for each image patch, we horizontally flipped it and add the flipped patch into the convolutional layer as a new filter. Thus, for an input CIFAR-10 image of size 32×32, the dimension of the output feature is 8192×28×28. To isolate the effect of randomness in the choices of the image patches, we fix the random seed to be 0 throughout the experiment. In this experiment, we set the value of the c parameter in LAP to be 4, 8, 12, . . . , 20 to avoid small and large values of c. The results are reported in Tables 2 and 4. Similar to the experiments in Section 6.1, again we set the hyper-parameters by cross-validation, and the resulting accuracy is 88.91%. See Appendix F for the validation accuracy for different hyper-parameters.
  From our experimental results, it is evident that combining CNTK or CNN-GP with additional feature extractor can significantly improve upon the performance of using solely CNTK or CNNGP, and that of using solely the feature extractor Coates et al. (2011). Previously, it has been reported in Recht et al. (2019) that using solely the feature extractor Coates et al. (2011) (together with appropriate pooling layer) can only achieve a test accuracy of 84.2% using 256, 000 image patches, or 83.3% using 32, 000 image patches. Even with the help of horizontal data augmentation, the feature extractor Coates et al. (2011) can only achieve a test accuracy of 85.6% using 256, 000 image patches, or 85.0% using 32, 000 image patches. Here we use significantly less image patches (only 2048) but achieve a much better performance, with the help of CNTK and CNN-GP. In particular, we achieve a performance of 88.91% on CIFAR-10, matching the performance of AlexNet on the same dataset. In the setting reported in Coates et al. (2011), increasing the number of sampled image patches will further improve the performance. Here we also conjecture that in our setting, further increasing the number of sampled image patches can improve the performance and get close to modern CNNs. However, due the limitation on computational resources, we leave exploring the effect of number of sampled image patches as a future research direction.
  6.3 EXPERIMENTS ON CNN WITH BOX FILTERING LAYER
  In Figure 1, we verify the effectiveness of BF on a 10-layer CNN (with Batch Normalization) on CIFAR-10. The setting of this experiment is reported in Appendix G. Our network structure has no pooling layer except for the BF layer before the last fully-connected layer. The fully-connected layer is fixed during the training. Our experiment illustrates that even with a fixed last FC layer, using
  GAP could improve the performance of CNN. Our experiments also show that BF with appropriate choice of c achieves better performance than GAP.
sections.heading: 7 CONCLUSION
sections.text: In this paper, inspired by the connection between full translation data augmentation and GAP, we derive a new operation, LAP, on CNTK and CNN-GP, which consistently improves the performance on image classification tasks. Combining CNN-GP with LAP and the pre-processing technique proposed by Coates et al. (2011), the resulting kernel achieves 89% accuracy on CIFAR-10, matching the performance of AlexNet and is the strongest classifier that is not a trained neural network.
  Here we list a few future research directions. Is it possible to develop analogs of CNTK or CNNGP incorporating modern techniques such as batch norm and residual layers, to further improve the performance? Moreover, it is an interesting direction to study other components in modern CNNs through the lens of CNTK and CNN-GP.
sections.heading: B ADDITIONAL DEFINITION AND PROOF FOR SECTION 4
sections.text: Definition B.1 (Group). (G, ◦) is a group, if and only if
sections.heading: 1. each element g ∈ G is a operator: RP×Q×C → RP×Q×C;
sections.text: 2. ∀g1, g2 ∈ G, g1 ◦ g2 ∈ G, where (g1 ◦ g2)(x) is defined as g1(g2(x)). 3. ∀g1, g2, g3 ∈ G, (g1 ◦ g2) ◦ g3 = g1 ◦ (g2 ◦ g3). 4. ∃e ∈ G, such that ∀g ∈ G, e ◦ g = g ◦ e = g. 5. ∀g1 ∈ G, ∃g2 ∈ G, such that g1 ◦ g2 = g2 ◦ g1 = e. We denote g2 as the inverse of g1, namely, g−11 .
  Proof of Theorem 4.1. Since we assume KGX and KXG are invertible, both α and α̃ are uniquely defined. Now we claim α̃g = {α̃i,g}i∈[N ] ∈ RN is equal to α|G| for all g ∈ G.
  By the invariance of K under G, for all j ∈ [N ] and g′ ∈ G,∑ i∈[N ],g∈G αi |G| K(g′(xj), g(xi)) = ∑ i∈[N ],g∈G αi |G| K((g−1 ◦ g′)(xj),xi)
  = ∑ i∈[N ] αiEg∈GK(g(xj),xi)
  = ∑ i∈[N ] αiK G(xj ,xi)
  = yj .
  Note that α̃ is defined as the unique solution of KXG α̃ = yG , the claim has been verified.
  Similarly, we have∑ i∈[N ],g∈G αi |G| K(x′, g(xi)) = ∑ i∈[N ] αiEg∈GK(g−1(x′),xi) = ∑ i∈[N ] αiK G(x′,xi).
  C EQUIVALENCE BETWEEN LAP AND BOX FILTERING LAYER.
  For a CNN with a box filtering layer before the final fully-connected layer, the final output is defined as f(θ,x) = ∑C(L) α=1 〈 W (L+1) (α) ,BF ( x (L) (α) )〉 , where x(L)(α) ∈ R P×Q, and W (L+1)(α) ∈ R P×Q is the weight of the last fully-connected layer.
  Now we establish the equivalence between BF and LAP on CNTK. The equivalence on CNNGP can be derived similarly. Let ΘBF (x,x′) ∈ R[P ]×[Q]×[P ]×[Q] be the CNTK kernel of BF ( x
  (L) (α)
  ) . Since BF is just a linear operation, we have
  [ΘBF (x,x ′)]i,j,i′,j′ =
  1
  (2c+ 1)4 ∑ ∆i,∆j ,∆′i,∆ ′ j∈[−c,c]4 [ Θ(L) (x,x′) ] i+∆i,j+∆j ,i′+∆′i,j ′+∆′j .
  By the formula of the output kernel value for CNTK without GAP, we obtain
  tr (ΘBF (x,x ′)) =
  1
  (2c+ 1)4 ∑ ∆i,∆′i,∆j ,∆ ′ j∈[−c,c]4 ∑ i,j∈[P ]×[Q] [Θ(x,x′)]i+∆i,j+∆j ,i+∆′i,j+∆′j .
sections.heading: D EXPERIMENTAL SETUP IN SECTION 6
sections.text: For both CIFAR-10 and Fashion-MNIST we use the full training set and report the test accuracy on the full test set. Throughout this section we only consider 3×3 convolutional filters with stride 1 and no dilation. In the convolutional layers in CNTK and CNN-GP, we use zero padding with pad size 1 to ensure the input of each layer has the same size. We use zero padding for LAP throughout the experiment. We perform standard preprocessing (mean subtraction and standard deviation division) for all images.
  In all experiments, we perform kernel ridge regression to utilize the calculated kernel values4. We normalize the kernel matrices so that all diagonal entries are ones. Equivalently, we ensure all features have unit norm in RKHS. Since the resulting kernel matrices are usually ill-conditioned, we set the regularization term λ = 5× 10−5, to make inverting kernel matrices numerically stable. We use one-hot encodings of the labels as regression targets. We use scipy.linalg.solve to solve the corresponding kernel ridge regression problem.
  The kernel value of CNTK and CNN-GP are calculated using the CuPy package. We write native CUDA codes to speed up the calculation of the kernel values. All experiments are performed on Amazon Web Services (AWS), using (possibly multiple) NVIDIA Tesla V100 GPUs. For efficiency considerations, all kernel values are computed with 32-bit precision.
  One unique advantage of the dynamic programming algorithm for calculating CNTK and CNNGP is that we do not need repeat experiments for, say, different values of c in LAP and different depths. With our highly-optimized native CUDA codes, we spend roughly 1,000 GPU hours on calculating all kernel values for each dataset.
  4We also tried kernel SVM but found it significantly degrading the performance, and thus do not include the results.
  E TEST ACCURACY OF CNTK AND CNN-GP ON FASHION-MNIST
  F VALIDATION ACCURACY OF CNTK AND CNN-GP ON CIFAR-10 AND FASHION-MNIST
sections.heading: G SETTING OF THE EXPERIMENT IN SECTION 6.3
sections.text: The total number of training epochs is 80, and the learning rate is 0.1 initially, decayed by 10 at epoch 40 and 60 respectively. The momentum is 0.9 and the weight decay factor is 0.0005. In Figure 1, the blue line reports the average test accuracy of the last 10 epochs, while the red line reports the best test accuracy of the total 80 epochs. Each experiment is repeated for 3 times. We use circular padding for both convolutional layers and the BF layer. The last data point with largest x-coordinate reported in Figure 1 corresponds to GAP.
title: ENHANCED CONVOLUTIONAL NEURAL KERNELS