Title: NONPARAMETRICALLY LEARNING ACTIVATION FUNCTIONS IN DEEP NEURAL NETS

Abstract: We provide a principled framework for nonparametrically learning activation functions in deep neural networks. Currently, state-of-the-art deep networks treat choice of activation function as a hyper-parameter before training. By allowing activation functions to be estimated as part of the training procedure, we expand the class of functions that each node in the network can learn. We also provide a theoretical justification for our choice of nonparametric activation functions and demonstrate that networks with our nonparametric activation functions generalize well. To demonstrate the power of our novel techniques, we test them on image recognition datasets and achieve up to a 15% relative increase in test performance compared to the baseline.

1. INTRODUCTION:

Deep learning techniques have proven particularly useful in the classification setting, recently surpassing even human performance on some image-classification tasks. We seek to advance the state of the art by learning not only weights between neurons in the network but also part of the network structure itself -the activation functions. Current deep learning literature largely focuses on improving architectures and adding regularization to the training process.

By contrast, the realm of learning the network structure itself is relatively unexplored. Current best practice often treats network size, shape and choice of activation function as a hyper-parameter to be chosen empirically. Instead, we propose to learn the activation functions through nonparametric estimation. We introduce a class of nonparametric models for activation functions. Importantly, we ensure that our technique can be incorporated into the back-propagation framework. This is crucial because it means our method can be easily added to current practice. To this end, we propose learning functions via basis expansion. In particular, we find that using a Fourier basis works well in practice and offers improved performance over the baseline on several benchmark datasets. We see relative improvements in test error rates of up to 15%. Nonparametric activation functions in dropout nets are especially successful.

We also introduce a two-stage training process. First, a network without nonparametric activation functions is trained. Then, the learned network is used as an initialization for an identical network with nonparametric activation functions. This method of initializing the network yields considerable improvements in performance for convolution neural networks on image classification tasks.

Lastly, we consider the algorithmic stability approach to accessing generalization bounds. We use this to demonstrate that feed-forward networks with our method of nonparametrically estimating activation functions generalize well.

To summarize, our contributions are the following:

• A theoretically justified framework for learning activation functions in a neural network,

• Provable bounds on the generalization error of networks where the activation functions are learned, and

• An optional two-stage training process that can greatly improve results for certain network architectures, specifically those with convolution layers.

2. RELATED WORKS:

Recent work from Agostinelli et al. (2015) describes piecewise linear activation functions. Theoretically speaking, our approach improves upon this by fully exploring the space of possible activation functions -not merely considering those which are piecewise linear.

Learning activation functions, in conjunction with the weights in the layer transformations, allows for the fitting of an arbitrary function of the output of the previous layer. A similar idea is Network in Network, due to Lin et al. (2013) . There the authors propose to replace standard convolution layers with what they call mlpconv layers. Traditional convolution layers, if using a sigmoid activation, are essentially learning a generalized linear model of the previous layer's output. Their innovation is to use a more general nonlinear function estimator as the filter -a multilayer perceptron. Thus, their scheme fits in the back-propagation framework and so is easy to implement. Our approach is different because though we are learning arbitrary functions of the previous layer, our activation function approach can be used in any layer of the network and in networks without convolution layers, which theirs cannot. Maclaurin et al. (2015) propose to learn the hyper-parameters of a neural net through reverse gradient descent. This is similar to the work we present here in that they also provide a method for learning parameters of the network.

3. NONPARAMETRIC ACTIVATION FUNCTIONS:

Here we describe our main contribution: the nonparametric activation function model. We also provide justification for a weight tying scheme to use nonparametric activations in conjunction with convolution layers, a regularization which proves powerful empirically (see Section 5).

3.1. FOURIER BASIS EXPANSION FOR ACTIVATION FUNCTIONS:

For the nonparametric estimation we use a Fourier series basis expansion. One concern, however, with Fourier basis expansion is that function approximation over a fixed interval often exhibits poor tail behavior. To combat that, we fit the approximation over an interval [-L, L] and then use it over truncation of the interval, [-L + T, L + T ]. The designation NPF stands for Nonparametric Fourier Basis Expansion for Activation Functions. 

f (x) =      a 0 + k i=1 a i cos((-L + T )iπx/L) + b i sin((-L + T )iπx/L) x < -L + T a 0 + k i=1 a i cos(iπx/L) + b i sin(iπx/L) -L + T ≤ x ≤ L -T a 0 + k i=1 a i cos((L -T )iπx/L) + b i sin((L -T )iπx/L)

x > L -T k grows with sample size n and is given by k = n 1/7 .

We choose to present basis expansion of arbitrary functions on the interval [-L, L] because it is thought to be advantageous in practice to train neural networks with activation functions that are antisymmetric through the origin (LeCun et al., 1998) . Though the nonparametric activation functions learned may not be symmetric about the origin, this approach will hopefully result in them being as close to symmetric as possible.

Each node in the fully connected layers estimates a potentially different activation function. However, in the convolution layers one activation function is learned per filter. The power of a convolution net is the weight tying scheme in the convolution layer, and we preserve that by only estimating one activation function per filter. In Section 5 the effectiveness of this approach can be seen.

NPFC(L, T:

) is the notation for the nonparametrically estimated activation functions in convolution layers. Figure 1 shows some examples of activation functions learned on the CIFAR-10 dataset. One point that is not immediately clear is how to initialize NPF(L, T ) activation functions. A good initialization, of any parameter in the network, is crucial to the success of fitting the model. We choose to initialize them to the Fourier series approximation of the tanh function. This works quite well as will be seen in Section 5. Also left to choice is how to perform both stages of training. Of particular interest is the training method used for the second stage. We explored the following two approaches:

• In stage 2, train only the nonparametric activation functions, holding the remainder of the network constant.

• In stage 2, train all weights in the network together.

We discovered that both methods are successful, but allowing for the activations and weights in the network to be trained together gave slightly better results empirically, so it is those that are reported in Section 5.

Figure 2a shows the training path for a convolution network on the CIFAR-10 dataset. The network has three convolution layers followed by two fully connected layers. It is initially trained with rectified linear units as activations in the convolution layers and with NPF(4, 1) activations in the fully connected layers. 

4. ALGORITHMIC STABILITY APPROACH TO GENERALIZATION BOUNDS:

For our model to be theoretically sound, its generalization error should vanish with a sufficiently large sample size. This is true for standard neural networks, and such generalization bounds are well known (for example via VC bounds (Bartlett & Anthony, 1999) ). However, because we expand the function class, we can not naively apply the traditional results. Instead of the VC bound route, we take the algorithmic stability approach.

In recent work from Hardt et al. (2015) the authors explore a class of bounds for stochastic gradient methods. They build on the definition of stability given in Bousquet & Elisseeff (2002) . Denote by f (w, z) some loss function of the output of a model, where w indicates the parameters of the learned model and z is an example from X × Y , the space of data and labels. A is an algorithm and D is the training data. Denote w = A(D) as the parameters of the model learned by the algorithm A. We take the following definition from Hardt et al. (2015) . Definition 4.1. An algorithm is -uniformly stable if for all data sets D, D ∈ (X × Y ) n such that D, D differ in at most one example, we have sup

z E A [f (A(D), z) -f (A(D ), z)] ≤ .

The expectation is taken with respect to any randomness present in the algorithm itself. By stab (A, n) be the infimum over all for which the statement holds.

Both Bousquet & Elisseeff (2002) ; Hardt et al. (2015) present Theorem 4.2 regarding the generalization ability of -uniformly stable algorithms is given Theorem 4.2. Take some algorithm -uniformly stable algorithm A.

Then |E D,A [R D [A(D)] -R[A(D)]]| ≤ .

The notation R D [w] signifies the empirical risk when the loss function depends on w in addition to z. Likewise for the notation R D [A(D)]. Lastly, we have Theorem 4.5 also from Hardt et al. (2015) that will allow us to derive a generalization bound for our model trained with stochastic gradient descent.

Definition 4.3. A function f is L-Lipschitz if for all points u, v ∈ dom(f ), |f (u) -f (v)| ≤ L||u -v||. Definition 4.4. A function f : Ω → R is β-smooth if for all u, v ∈ Ω, ||∇f (u) -∇f (v)|| ≤ β||u -v||.

Theorem 4.5. Assume that f (,z) ∈ [0, 1] is an L-Lipschitz and β-smooth loss function for every z. Suppose that we run SGM for T steps with monotonically non increasing step sizes α t ≤ c/t. Then SGM has uniform stability with

stab ≤ 1 + 1/βc n -1 (2cL 2 ) 1 βc+1 T βc βc+1 .

In particular, up to some constant factors, the following relationship approximately holds stab ≤

T 1-1/(βc+1) n . (Hardt et al., 2015) In order to apply the theorem, we demonstrate our network architecture and choice of loss function meets this requirement. Once -stability is established, generalization follows by Theorem 4.2.

4.1. FEED-FORWARD NETWORKS WITH NPF(T, L) ACTIVATIONS:

For the full proofs of results in this section, see Appendix A. Assume a network architecture of Q fully connected hidden layers (affine transformation layers) fed into a softmax layer which classifies into one of c classes. The weight vector for the network w should be viewed as the all parameters of the affine transformations and activation functions.

The loss function is the negative log-likelihood of the network output, which is a softmax over c classes. We treat the softmax layer as two layers for the purposes of demonstrating the generalization bound. One layer is an affine transformation of the output of the lower layers in the network to c nodes. We will denote the result of this computation at each node i in the affine transformation layer within the softmax layer as g Q+1 (w, x) i . The second layer maps the outputs at these c nodes to c nodes -this will be the network output. It computes at the the i th node

o i (w, x) = exp g Q+1 (w, x) i c i=1 exp g Q+1 (w, x) i .

Thus, on some training example (x, y), the negative log-likelihood of the network output is

f (w, (x, y)) = -log(o i (w, x)) = -g Q+1 (w, x) y + log c i=1 exp g Q+1 (w, x) c .

If we can demonstrate that this f has the desired properties, then the generalization bound given in Section 4 will apply.

One point to note is that in order to control the gradients of the various transformations in the layers in the network, we need to control the norm of the weight matrices W and biases b in the affine layers and the coefficients of the activations NPF(L, T ). This is a common technique and is compatible with the framework in Hardt et al. (2015) , as it only makes updates less expansive. Note that though f does not have range [0, 1], it is bounded due to the max-norm constraints and can be rescaled. Some smoothing is assumed in order achieve the bound, but in practice the smoothing is not a concern as it can be assumed to take place in an -neighborhood of the transition from one piece of the activation function to another. The smoothed nonparametric activation functions are denoted NPF (L, T ). Recall that k = n 1/7 . Theorem 4.6. Consider a fully connected network with a softmax output layer and NPF (L, T ) activation functions. Assume we use SGD with a max-norm constraint on the weight matrix and biases in the affine layers and on the coefficients of the activation functions to train the network. Then there exists some K such that the loss function as given in Section 4.1 is K-Lipschitz. Specifically, for any such network where the number of hidden layers Q ≥ 1 and there are p nodes per layer,

K = max O √ Q(p Q+1 k 3Q +p (2Q+1)/2 k 3Q-1 L) Q , O √ Q(p Q+1 k 3Q +p (2Q+1)/2 k 3Q-1 L) Q L Q .

Proof. The full proof is in Appendix A. The proof idea is to bound the first partial derivatives of the loss function f with respect to each parameter in the network. Then we can proceed recursively down through the network to obtain a bound. From there the gradient can be bounded, implying the loss function f is Lipschitz.

Theorem 4.7. Consider a fully connected network with a softmax output layer and NPF (L, T ) activation functions. Assume we use SGD with a max-norm constraint on the weight matrix and biases in the affine layers and on the coefficients of the activation functions to train the network. Then there exists some K such that the loss function as given in Section 4.1 is β-smooth. Specifically, for any such network where the number of hidden layers Q ≥ 1 and there are p nodes per layer,

β = max O Q p 3Q+5/2 k 9Q-2 L 2Q 3Q-1 , O Q p 2 Q +Q+2 k 5×2 Q +3Q L 2 Q-1 +1 2 Q +Q .

Proof. The full proof is in Appendix A. The proof idea is to bound the second partial derivatives of f with respect to each of the parameters in the network. Then we can bound |λ max (∇ 2 f )| and thus the largest singular value. This gives an upper bound of

β on ||∇ 2 f || 2 , implying f is β-smooth.

Theorem 4.8. Consider a fully connected network with a softmax output layer and NPF (L, T ) activation functions. Assume we use SGD with a max-norm constraint on the weight matrix and biases in the affine layers and on the coefficients of the activation functions to train the network.

Then, for all practical values of L,T , ,Q and p, the resulting Lipschitz constant K and smoothness constant β are sufficiently large that

stab ≤ T n -1 . Thus if T = O( √ n), stab → 0 as sample size n → ∞.

Proof. By Theorems 4.5, 4.6, and 4.7 the result is immediate.

5. EXPERIMENTAL RESULTS:

In this section we provide empirical results for our novel nonparametric deep learning model. The goal of these experiments is to demonstrate its efficacy when used with several different architectures and on several different datasets, not to beat the current best result on either dataset. Crucially, our experiments provide an apples to apples comparison between networks with identical architectures and employing the same regularization techniques where the only difference is choice of activation function. The generalization results from the Section 4 are directly relevant to the experimental results here. In all experiments listed in this section, the reported testing error is an estimation of the generalization error because the final training error was zero in all cases.

5.1. IMPLEMENTATION, REGULARIZATION AND ARCHITECTURES:

To implement the various deep architectures, we use the Python CPU and GPU computing library Theano (Bergstra et al., 2010) . We use Theano as an interface to the powerful CUDA and CuDNN libraries (John Nickolls, 2008; Chetlur et al., 2014) enabling fast training for our neural networks. We ran our simulations on Princeton's SMILE server and TIGER computing cluster. The SMILE server was equipped with a single Tesla K40c GPU, while the TIGER cluster has 200 K20 GPUs.

We use early stopping and dropout as regularization techniques (Srivastava et al., 2014; Hardt et al., 2015) . The error rate reported for each experiment is the lowest testing error seen during training.

A common deep network architecture consists 3 stacked convolutional layers with 2 fully connected layers on top (Srivastava et al., 2014; Agostinelli et al., 2015) . The convolutional layers have 96, 128, and 256 filters each and each layer has a 5 × 5 filter size that is applied with stride 1 in both directions. The max pooling layers pool 3 × 3 fields and are applied with a stride of 2 in both directions. We use this architecture for the more challenging CIFAR-10 dataset.

5.2. MNIST:

This dataset consists of 60,000 training and 10,000 testing images. Images are 28 × 28 rasterized grayscale images -that is they have one channel. All data points are normalized before training by taking the entire combined dataset, finding the maximum and minimum entry, then centering and rescaling. The dataset is from Lecun & Cortes (1999) .

The experiments investigate the effects of our techniques on standard multilayer neural networks as well as convolutional neural networks. Specifically, for the standard neural networks we use networks with three fully connected hidden layers with 2048 units in each layer fed into a 10-way softmax.

The convolutional neural networks in these experiments have two convolutional layers with 32 and 64 filters respectively. Filters are 5 × 5 and these layers are followed by a max pooling layer with 2 × 2 pool size. The feed-forward networks consist of 3 fully connected layers with 2048 units each.

A mini-batch size of 250 was used for all experiments. Learning activation functions via Fourier basis expansion offers sizable improvements on the MNIST dataset as can be seen in Table 2 . No experiments were done using our two-stage tech- nique, as it proved unnecessary on this comparatively easy to learn dataset. Notice that the weight tying in the NPFC activation makes a considerable difference for the convolution nets, especially when dropout is used in conjunction with learning the activation functions. The biggest improvement is in learning activations for both convolution and fully connected layers and using dropout -a relative 15% improvement over the baseline. Using ReLU activations in the convolution layers with nonparametric activations in the fully connected layers also offered sizable performance improvements over the baseline.

In feedforward networks with three fully connected layers there also is an improvement in the test error rate. Here again the improvement is more pronounced with dropout, from 1.35% to 1.10% versus 1.66% to 1.60%.

5.3. CIFAR-10:

The CIFAR-10 dataset is due to Krizhevsky (2009) . This dataset consists of 50,000 training and 10,000 test images. The images are three channel color images with dimension 32 × 32. Thus each image can be viewed either as a 3 × 32 × 32 tensor or a vector of length 3072. These images belong to one of ten classes. We apply ZCA whitening and global contrast normalization to the dataset as in Srivastava et al. (2014) . The architecture described at the beginning of Section 5 is used for all experiments. For dropout nets we follow Srivastava et al. (2014) and use a dropout of 0.9 on the input, 0.75 in the convolution layers and 0.5 in the fully connected layers. The baseline results can be found in Table 3 . Mini-batch sizes between 125 and 250 are used, depending upon memory constraints. In Table 4 , one-stage training corresponds to standard back-propagation as in the baseline experiments. The two-stage procedure is the one we introduce to train convolution nets with learned activation functions described in Section 3.2. As can be seen in Table 4 , one stage training does not work when learning nonparametric activations in convolution layers -test error is worse than the baseline result. However, by using the two-stage process we see a relative 5% boost in performance without dropout and a relative 9% boost with dropout! In absolute terms we achieve up to a 1.3% improvement in generalization performance using learned activations.

Also in Table 4 , we can see that we achieved improved performance both with and without dropout when using ReLU activations for convolution layers and NPF(4, 1) for fully connected layers. Furthermore, Figure 2b shows that in terms of number of weight updates required, adding nonparametric activations did not slow training.

6. DISCUSSION AND CONCLUSIONS:

As can be seen in Section 5, nonparametric activation functions offer a meaningful improvement in the generalization performance of deep neural nets in practice. We achieve relative improvements in performance of up to 15% and absolute improvements of up to 1.3% on two benchmark datasets.

Equally importantly, networks with the activation functions NPF(L, T ) and NPFC(L, T ) can be trained as fast as their baseline comparison. To realize these improvements on more challenging datasets such as CIFAR-10 we introduced a two-stage training procedure. Our nonparametric activation functions are principled in that they have the necessary properties to guarantee vanishing generalization error in the sense of Bousquet & Elisseeff (2002) . Specifically, it was shown in Theorem 4.8, from Section 4.1, that for any feed-forward network architecture using NPF(L, T ) activation functions, we achieve vanishing generalization error as sample size increases.

One interesting direction for future work is to investigate why Fourier basis expansion is successful where other methods, such as polynomial basis expansion (which we also explored), were not. Both can be theoretically justified, yet only one works well in practice. Further study of how to eliminate the two-stage process is needed.

Ultimately, we improve upon other approaches of expanding the function class which can be learned by deep neural networks. An important previous work on learning more general function approximations at each node is that of Lin et al. (2013) . Their result offers a new type of convolution filter that can learn a broader function class, and in practice their technique also works well. It is limited however in that its use is restricted to convolution layers in convolution neural networks. Ours is applicable to any network architecture and, in Section 5, we demonstrate its success on multiple datasets.

A GENERALIZATION BOUND FOR FULLY CONNECTED NETWORKS WITH FOURIER BASIS ACTIVATION FUNCTIONS:

This is an extension of Section 4.1. For the purposes of this section assume that all data x are vectors in [-1, 1] m , which is permissible because we classify input that is bounded. Furthermore, we assume that the network architecture is a series of Q fully connected hidden layers (affine transformation layers) fed into a softmax layer which classifies into one of c classes. The weight vector for the network w should be viewed as the all parameters of the affine transformations and activation functions.

The loss function is the negative log-likelihood of the network output, which is a softmax over c classes. The softmax layer in our framework should be treated as two layers for the purposes of demonstrating the generalization bound. One layer is an affine transformation of the output of the lower layers in the network to c nodes. We will denote the result of this computation at each node i in the affine transformation layer within the softmax layer as g Q+1 (w, x) i . The second layer maps the outputs at these c nodes to c nodes -this will be the network output. It computes at the the i th node

o i (w, x) = exp g Q+1 (w, x) i c i=1 exp g Q+1 (w, x) i .

Thus, on some training example (x, y), the negative log-likelihood of the network output is

f (w, (x, y)) = -log(o i (w, x)) = -g Q+1 (w, x) y + log c i=1 exp g Q+1 (w, x) c .

If we can demonstrate that this f has the desired properties, then the generalization bound given in Section 4 will apply.

For clarity, we refer to network of stacked affine transformation layers as a fully connected network. These layers compute W x + b, where x is either the input layer (so x ∈ R m ) or it is the output of the previous layer in the network (in which case x ∈ R p , p being the number of nodes in that layer).

Regarding notation::

• w is a vector denoting all the parameters in the network, so it consists of all parameters noted below.

• W i denotes a portion of the parameter vector, corresponding to the affine transformation of the p i-1 -dimensional output of the (i -1) th layer to the p i -dimensional input to the i th layer in the network.

• W i,j denotes the j t h row of the matrix W i .

• W i,j,k refers to the weight of the edge from node j in the (i -1) th layer to edge c in the i th layer.

• b i denotes the constant term in the affine transformation from the (i -1) th layer to the i th layer.

• b i,j denotes the j th component of the vector b i .

• a i,j 0 , (a i,j 1 , . . . , a i,j k ) and (b i,j 1 , . . . , b i,j k ) denote the parameters of activation function of the j th node in the i th layer.

The 0 th layer is the input layer. Let Q be the number of layers in the network; if i = Q + 1, it refers to weights on edges in the affine transformation contained within the softmax layer. 

(x) =      a 0 + k i=1 a i cos((-L + T )iπ/L) + b i sin((-L + T )iπ/L) x < -L + T a 0 + k i=1 a i cos(iπx/L) + b i sin(iπx/L) -L + T ≤ x ≤ L -T a 0 + k i=1 a i cos((L -T )iπ/L) + b i sin((L -T )iπ/L)

x > L -T k grows with sample size n and is given by k = n 1/7 .

We need to control the norm of the weight matrices W and biases b in the affine transformations.

In addition, we also need to control the magnitude of the coefficients in the basis expansion. This does not affect the applicability of the results from Hardt et al. (2015) , as it at most reduces the expansivity of the updates.

Furthermore, for the analysis of their properties we assume a slightly modified version of the activation functions -in an epsilon neighborhood about the points where the pieces of the function connect we smooth their joint by taking a convex combination of the two pieces to smoothly transition from one to the other. To this end define the following functions

L(x) = a 0 + k i=1 a i cos((-L + T )iπ/L) + b i sin((-L + T )iπ/L), M (x) = a 0 + k i=1 a i cos(iπx/L) + b i sin(iπx/L), U (x) = a 0 + k i=1 a i cos((L -T )iπ/L) + b i sin((L -T )iπ/L).

for given L, T, k, (a 0 , . . . 

f (x) =              L(x) x < -L + T -[Case 1] x+L-T + 2 M (x) + -L+T + -x 2 L(x) -L + T -≤ x ≤ -L + T + [Case 2] M (x) -L + T + ≤ x ≤ L -T -[Case 3] L-T + -x 2 M (x) + x-L+T + 2 U (x) L -T -≤ x ≤ L -T + [Case 4] U (x) x > L -T + [Case 5]

k grows with sample size n and is given by k = n 1/7 .

Since we are concerned with behavior as is made small -because we are approximating NPF(T, L) with NPF (T, L) -assume without loss of generality that ≤ 1.

A.1 LIPSCHITZ CONSTANT:

We proceed layer by layer to obtain bounds on the first partial derivatives of the loss functionwhich will allow us to bound the gradient. Lemma A.3 gives bounds for the first layer. The notation a(w, x) denotes the output of a layer-wide activation transformation. g(w, x) denotes the output of a layer-wide affine transformation.

Lemma A.3. Assume x ∈ [-a, a] m . Now, consider the affine transformation g 1 (w) = W 1 x + b 1 from R m → R p , thus W 1 ∈ R m×p and b ∈ R p . Denoting by g 1 (w, x) i = W 1,i x + b 1,i , it follows

that g 1 has first partial derivatives bounded by max{1, a}.

Proof. Clearly, ∇g 1 (w, x) i = [1, . . . , 1; x; 0, . . . , 0]. Thus it has first partial derivatives bounded by max{1, a}.

What if we have instead as input to the affine transformation a function of x rather than x itself? Then we have the Lemma A.4.

Lemma A.4. Let a i-1 (w, x) ∈ [-a, a] pi-1 , the output of the (i -1) th layer in the network. Now, consider the affine transformation

g i (w, x) = W i a i-1 (w, x) + b i . from R pi-1 → R pi . b i ∈ R d .

If we have the following assumptions:

• a i (w, x) q has first partial derivatives bounded by B, and

• ||W i,j || 2 ≤ N .

Denoting by g i (w, x) j = W i,j a i-1 (w, x) + b i,j , it follows that g i (w, x) j has first partial derivatives bounded by max{1, a, √ nN L}.

Proof. We need to first examine

∂g i (w, x) j ∂b i,j = ∂b i,j ∂b i,j + ∂ ∂b i,j n q=1 W i,j,q a i-1 (w, x) q = 1 + 0 = 1. Next we have for any m, ∂g i (w, x) j ∂W i,j,m = ∂b i,j ∂W i,j,m + ∂ ∂W i,j,m n q=1 W i,j,q a i-1 (w, x) q = 0 + a i-1 (w, x) m + q =m W i,j,q ∂a i-1 (w, x) q ∂W i,j,m = a i-1 (w, x) m .

Partial derivatives with respect to all other parameters from the i th layer are clearly 0. If l > i, partial derivatives with respect to all parameters from the l t h layer are clearly 0. If l < i,

∂g i (w, x) j ∂W l,m,q = ∂b i,j ∂W l,m,q + ∂ ∂W l,m,q pi-1 r=1 W i,j,r a i-1 (w, x) r = 0 + pi-1 r=1 W i,j,r ∂a i-1 (w, x) r ∂W l,m,q ≤ N pi-1 r=1 ∂a i-1 (w, x) r ∂W l,m,q 2 (Cauchy-Schwartz) ≤ √ p i-1 N B.

Likewise,

| ∂g i (w, x) j ∂b l,q | ≤ √ p i-1 N B

and for the partial derivatives with respect to activation function parameters. It follows that the transformations g i (w, x) j have first partial derivatives bounded by max{1, a, √ p i-1 N B}.

Lemma A.5 provides a bound on the range of affine transformations of outputs of NPF (T, L) activations.

Lemma A.5. Consider the affine transformation in layer i, g i (w, x). Assume

• All layers in the network have NPF (L, T ) activations and that coefficients in these activations are bounded by M ,

• For all i and j, ||W i,j || 2 ≤ N , and

• For all i and j, |b i,j | ≤ O.

Then, for all j,

|g i (w, x) j | ≤ √ p i-1 (2k + 1)N M + O = O( √ p i-1 k).

Under review as a conference paper at ICLR 2017 Proof. Recall that g i (w, x) j = W i,j a i-1 (w, x) + b i,j , thus by Cauchy-Schwartz and that im(sin

) = im(cos) = [-1, 1], |g i (w, x) j | ≤ √ p i-1 (2k + 1)N M + O = O( √ p i-1 k).

Next, we bound the component functions of NPF (L, T ). In addition, to derive asymptotic bounds, we assume N ,M , and O are constants as they are part of the training procedure and not the network structure. We are more concerned with how the smoothness and continuity properties change as n,k,L,T ,Q and p i change. Also note that for the activation function NPF (L, T ) to be well defined, it must be that ≤ L. We also assume ≤ 1.

Lemma A.6. Assume g i (w, x) ∈ [-a, a] pi and that g i (w, x) j has first partial derivatives bounded by B. Further assume that |a d | ≤ M and define f (w, x) = a d cos dπgi(w,x)j L

. Then f (w, x) has first partial derivatives bounded by max{ dπM B L , 1}.

Proof. Taking the derivative of f with respect to a d yields

∂f ∂a d = cos dπg i (w, x) j L ≤ 1.

Next if we take the derivative of f with respect to any weight from elsewhere in the network -some z -we get

∂f ∂z = - dπa d L ∂g i (w, x) j ∂z sin dπg i (w, x) j L ,

and therefore that

∂f ∂z ≤ dπa d L ∂g i (w, x) j ∂z ≤ dπM B L ,

and so the partial derivatives of f are bounded by max{ dπM B L , 1}.

Immediately from the proof to Lemma A.6 we see that an identical result holds if we replaced cos with sin.

Lemma A.7. Let g i (w, x) ∈ [-a, a] pi-1 and assume

• g i (w, x) j has first partial derivatives bounded by B,

• All layers in the network have NPF (L, T ) activations and that coefficients in these activations are bounded by M ,

• For all i and j, ||W i,j || 2 ≤ N , and

• For all i and j, |b i,j | ≤ O.

Consider the layer-wide activation transformation a i (w, x) where a i (w, x) j is given by a function of the type NPF (L, T ). a i (w, x) j then has first partial derivatives with bound

B = O max √ p i-1 k 3 B + k 2 L L , √ p i-1 k 3 B + k 2 L .

Proof. To bound the partial derivatives, first consider Cases 1 and 5, clearly the derivative with respect to some parameter z is 0. For Case 3, by Lemma A.6,

∂M (g i (w, x) j ) ∂z ≤ (k 2 + k)M Bπ L + (k 2 + k) = (k 2 + k)(M B + L)π L = O k 2 + k 2 B L .

Next consider Case 2, we have ∂ ∂z

g i (w, x) j + L -T + 2 M (g i (w, x) j ) + -L + T + -g i (w, x) j 2 L(g i (w, x) j ) = ∂ ∂z g i (w, x) j + L -T + 2 M (g i (w, x) j ) - ∂g i (w, x) j ∂z 1 2 L(g i (w, x) j ) = 1 2 ∂g i (w, x) j ∂z M (g i (w, x) j ) + g i (w, x) j + L -T + 2 ∂M (g i (w, x) j ) ∂z - ∂g i (w, x) j ∂z 1 2 L(g i (w, x) j ) = M (g i (w, x) j ) -L(g i (w, x) j ) 2 ∂g i (w, x) j ∂z + g i (w, x) j + L -T + 2 ∂M (g i (w, x) j ) ∂z .

Both M (x) and L(x) are trivially bounded above by

(k 2 + k + 1)M . Therefore ∂ ∂z g i (w, x) j + L -T + 2 M (g i (w, x) j ) + -L + T + -g i (w, x) j 2 L(g i (w, x) j = M (g i (w, x) j ) -L(g i (w, x) j ) 2 ∂g i (w, x) j ∂z + g i (w, x) j + L -T + 2 ∂M (g i (w, x) j ) ∂z ≤ (k 2 + k + 1)BM + √ p i-1 (2k + 1)N M + O + L + 2 (k 2 + k)(M B + L)π L = O max √ p i-1 k 3 B + k 2 L L , √ p i-1 k 3 B + k 2 L .

By symmetry, we have the same bound for Case 4. Thus overall, the bound on the first partial derivatives of a i (w, x) j is

O(max √ p i-1 k 3 B + k 2 L L , √ p i-1 k 3 B + k 2 L ),

as for all values of k,B,L, and p i-1 the bound for Cases 2 and 4 dominates the bound for Case 3.

Finally, we turn to the top layer of the network. Lemma A.8. With the notation established in Section A, assume there are c classes, the network has Q layers of affine transformations, and each g L (w, x) j has first partial derivatives bounded by

B. Then the loss function f is 2B (p l + 1)c + Q i=1 p i (p i-1 + 1)-Lipschitz. If all layers have p nodes, then f is 2B (Q -1)p 2 + (c + m + Q)p + c-Lipschitz. In asymptotic notation, it is K-Lipschitz with K = O(Bp √ Q).

Proof. Consider the partial derivative of f with respect to an arbitrary parameter z

∂f ∂z = ∂g L (w, x) y ∂z + 1 c j=1 exp(g L (w, x) j ) c j=1 ∂g L (w, x) j ∂z exp(g L (w, x) j ).

By the assumption

| ∂g L (w,x)y ∂z | ≤ Q. Therefore the following holds ∂f ∂z = ∂g L (w, x) y ∂z + 1 c j=1 exp(g L (w, x) j ) c j=1 ∂g L (w, x) j ∂z exp(g j ) ≤ ∂g L (w, x) y ∂z + 1 c j=1 exp(g L (w, x) j ) k j=1 ∂g L (w, x) j ∂z exp(g L (w, x) j ) ≤ B + max j ∂g L (w, x) j ∂z ≤ 2B.

If layer i has p i nodes there are p i × p i-1 + p i = p i (p i-1 + 1) parameters corresponding to the affine transformation from layer i -1 to layer i. Recall layer 0 is the input layer, so p 0 = m. Furthermore, the affine transformation in the softmax has p l × c + c parameters. Thus the total number of parameters in the network is

(p l + 1)c + Q i=1 p i (p i-1 + 1), which implies that f is 2B (p l + 1)c + Q i=1 p i (p i-1 + 1)-Lipschitz.

If all layers have the same number of nodes, then the total number of parameters in the network is

(Q -1)p 2 + (c + m + Q)p + c

and so in this case

f is 2B (Q -1)p 2 + (c + m + Q)p + c-Lipschitz. In asymptotic notation, it is K-Lipschitz with K = O(Bp √ Q).

Combining all the results above we have Theorem A.9. Theorem A.9. Consider a fully connected network with a softmax output layer and NPF (L, T ) activation functions. Assume we use SGD with a max-norm constraint on the weight matrix and biases in the affine layers and on the coefficients of the activation functions to train the network. Then there exists some K such that the loss function as given in Section A is K-Lipschitz. Specifically, for any such network, where the number of hidden layers Q ≥ 1 and there are p nodes per layer,

K = max O √ Q(p Q+1 k 3Q + p (2Q+1)/2 k 3Q-1 L) Q , O √ Q(p Q+1 k 3Q + p (2Q+1)/2 k 3Q-1 L) Q L Q .

Proof. By Lemmas A.3, A.4, A.7 and A.8 such an K must exist. Note that the output of a

NPF (T, L) activation is in [-(k 2 + k + 1)N, (k 2 + k + 1)N ].

Then, the computation is as follows, using the aforementioned theorems:

• g 1 -B = 1 • a 1 -B = max O √ pk 3 +k 2 L , O √ pk 3 +k 2 L L • g 2 -B = max O pk 3 + √ pk 2 L , O pk 3 + √ pk 2 L L • a 2 -B = max O p 3/2 k 6 +pk 5 L 2 , O p 3/2 k 6 +pk 5 L 2 L 2 • g 3 -B = max O p 2 k 6 +p 3/2 k 5 L 2 , O p 2 k 6 +p 3/2 k 5 L 2 L 2 • a 3 -B = max O p 5/2 k 9 +p 2 k 8 L 3 , O p 5/2 k 9 +p 2 k 8 L 3 L 3

Above the transformations are listed with the bounds on their first partial derivatives. A simple inductive argument yields for i ≥ 2

• g i - B = max O p i-1 k 3(i-1) + p (2i-3)/2 k 3i-4 L i-1 , O p i-1 k 3(i-1) + p (2i-3)/2 k 3i-4 L i-1 L i-1 • a i - B = max O p (2i-1)/2 k 3i + p i-1 k 3i-1 i , O p (2i-1)/2 k 3i + p i-1 k 3i-1 i L i

Using Lemma A.8 gives

K = max O √ Q(p Q+1 k 3Q + p (2Q+1)/2 k 3Q-1 L) Q , O √ Q(p Q+1 k 3Q + p (2Q+1)/2 k 3Q-1 L) Q L Q .

concluding the proof.

A.2 β-SMOOTHNESS:

To derive the smoothness constant, we begin at the top of the network and work down, bounding partial second derivatives of transformations in the network. Lemma A.10. With the notation established in Section A, assume there are c classes and each g j has first partial derivatives bounded by B 1 and second partial derivatives bounded by B 2 . Then the loss function f is 2((p l + 1)c +

Q i=1 p i (p i-1 + 1))(B 2 1 + B 2 )-smooth. If all layers have p nodes, then f is 2((Q -1)p 2 + (c + m + Q)p + c)(B 2 1 + B 2 )-smooth.

Proof. We begin by recalling from the proof of Lemma A.8 that for some arbitrary parameter z,

∂f ∂z = ∂g L (w, x) y ∂z + 1 c l=1 exp(g j ) c l=1 ∂g L (w, x) l ∂z exp(g L (w, x) l ).

Therefore differentiating again with respect to another parameter x yields

∂ 2 f ∂z∂x = ∂ 2 g L (w, x) y ∂z∂x - c l=1 ∂g L (w, x) l ∂z exp(g L (w, x) l ) c l=1 ∂g L (w, x) l ∂x exp(g L (w, x) l ) × c l=1 exp(g L (w, x) l ) -2 + c l=1 ∂ 2 g L (w, x) l ∂z∂x + ∂g L (w, x) l ∂z ∂g L (w, x) l ∂x exp(g L (w, x) l ) × c l=1 exp(g L (w, x) l ) -1

.

If we take the absolute value of both sides we can see that

∂ 2 f ∂z∂x ≤ 2B 2 1 + 2B 2 .

And therefore by Theorem C.2 it follows that

|λ max (∇ 2 f )| ≤ 2((p l + 1)c + Q i=1 p i (p i-1 + 1))(B 2 1 + B 2 ).

Because ∇ 2 f is symmetric, its singular values are just the absolute values of its eigenvalues. Therefore

||∇ 2 f || 2 ≤ 2n(B 2 1 + B 2 ). By Lemma D.2, we have that f is 2(2(p l + 1)c + Q i=1 p i (p i-1 + 1))(B 2 1 + B 2 )-smooth.

If all layers have the same number of nodes, then

|λ max (∇ 2 f )| ≤ 2((Q -1)p 2 + (c + m + Q)p + c)(B 2 1 + B 2 ) and so f is 2((Q -1)p 2 + (c + m + Q)p + c)(B 2 1 + B 2 )-smooth.

Next, it is necessary to control the second partial derivatives of the affine transformations as the first derivatives are bounded in Lemma A.4. This leads to Lemma A.11. Lemma A.11. Let a i-1 (w, x) ∈ [-a, a] pi-1 , the output of the (i -1) th layer in the network. Now, consider the affine transformation

g i (w, x) = W i a i-1 (w, x) + b i , from R pi-1 → R pi . b i ∈ R d .

If we have the following assumptions:

• a i (w, x) q has first partial derivatives bounded by B 1 ,

• a i (w, x) q has second partial derivatives bounded by B 2 , and

• ||W i,j || 2 ≤ N .

Denoting by g i (w, x) j = W i,j a i-1 (w, x) + b i,j , it follows that g i (w, x) j has second partial derivatives bounded by max{B 1 , N √ p i-1 B 2 }.

Proof. From the proof of Lemma A.4 we have that ∂g i (w, x) j ∂b i,j = 1 and for any m ∂g i (w, x) j ∂W i,j,m = a i-1 (w, x) m .

For some m = j and any q, ∂g i (w, x) j ∂W i,m,q = 0.

And, lastly, that the partial derivatives with respect to any parameter z in layer l < i

∂g i (w, x) j ∂z = pi-1 q=1 W i,j,q ∂a i-1 (w, x) q ∂z .

We see then that for the first and third cases the second partial derivatives are zero. For the second case above, the second partial derivatives are either 0 or bounded by B 1 . What remains then is to check the fourth case. If we differentiate with respect to b i,j , ∂ 2 g i (w, x) j ∂z∂b i,j = 0.

If we differentiate with respect to W i,m,q , for m = j, ∂ 2 g i (w, x) j ∂z∂W i,m,q = 0.

If we differentiate with respect to W i,j,q , ∂ 2 g i (w, x) j ∂z∂W i,j,q = ∂a i-1 (w, x) q ∂z .

Thus the only remaining case is if we differentiate with respect to some parameter z from a layer l < i:

∂ 2 g i (w, x) j ∂z∂z = pi-1 q=1 ∂ ∂z W i,j,q ∂a i-1 (w, x) q ∂z = pi-1 q=1 W i,j,q ∂ 2 a i-1 (w, x) q ∂z∂z .

If we take the absolute value of both sides we get that

∂ 2 g i (w, x) j ∂z∂z = pi-1 q=1 W i,j,q ∂ 2 a i-1 (w, x) q ∂z∂z ≤ N pi-1 q=1 ∂ 2 a i-1 (w, x) q ∂z∂z 2 (Cauchy-Schwartz) ≤ N √ p i-1 B 2

And therefore g i (w, x) j has second partial derivatives bounded by max{B 1 , N √ p i-1 B 2 }.

We also consider affine transformations on the input -although this is covered by Lemma A.11, we can obtain a better bound directly.

Lemma A.12. Assume x ∈ [-a, a] m . Now, consider the affine transformation g Next if we take the derivative of ∂f (w,x) ∂z with respect to a d we get the same as above. Lastly we take the derivative of ∂f (w,x) ∂z with respect to some z which gives

1 (w) = W 1 x + b 1 from R m → R p , thus W 1 ∈ R m×p and b ∈ R p . Denoting by g 1 (w, x) i = W 1,i x + b 1,i ,

∂ 2 f (w, x) ∂z∂z = - dπa d L ∂ 2 g i (w, x) j ∂z∂z sin dπg i (w, x) j L - d 2 π 2 a d L 2 ∂g i (w, x) j ∂z ∂g i (w, x) j ∂z cos dπg i (w, x) j L ,

which we can bound as

∂ 2 f (w, x) ∂z∂z ≤ dπM B 2 L + d 2 π 2 M B 2 1 L 2 = dπM LB 2 + d 2 π 2 M B 2 1 L 2 .

Therefore the second partial derivatives of f are bounded by max

dπM LB2+d 2 π 2 M B 2 1 L 2 , dπB1 L .

Lemma A.14. Let g i (w, x) ∈ [-a, a] pi-1 and assume

• g i (w, x) j has first partial derivatives bounded by B 1 ,

• g i (w, x) j has first partial derivatives bounded by B 2 ,

• All layers in the network have NPF (L, T ) activations and that coefficients in these activations are bounded by M ,

• For all i and j, ||W i,j || 2 ≤ N , and

• For all i and j, |b i,j | ≤ O.

Consider the layer-wide activation transformation a i (w, x) where a i (w, x) j is given by a function of the type NPF (L, T ). a i (w, x) j then has second partial derivatives bounded by

B = O B 2 2 k 2 + B 1 k 2 + √ p i-1 k 3 (B 1 + B 2 ) L + k 4 B 2 1 L 2 + k 3 B 2 1 L .

Proof. Without loss of generality we can assume that if B i = 0 that B i ≥ 1, as these are upper bounds. To bound the second partial derivatives, first note that Cases 1 and 5 have partial second derivatives of 0 with respect to all parameters in the network. Next, in Case 3 we see from Lemma A.13 that 

∂ 2 M (g i (w, x) j ) ∂z∂z ≤ 2 k d=1 dπM LB 2 + d 2 π 2 M B 2 1 L 2 + dπB 1 L = (k 2 + k)πM LB 2 L 2 + k 3 3 + k 2 2 + k 6 π 2 M B 2 1 L 2 + (k 2 + k)πB 1 L = O k 2 (B 1 + B 2 ) L + k 3 B

L + k 4 B 2 1 L 2 + k 3 B 2 1 L + k 2 (B 1 + B 2 ) L + k 3 B 2 1 L 2 = O B 2 2 k 2 + B 1 k 2 + √ p i-1 k 3 (B 1 + B 2 ) L + k 4 B 2 1 L 2 + k 3 B 2 1 L .

Since this bound dominates the one for Case 3, we are done.

Combining all the results above we have Theorem A.15. Theorem A.15. Consider a fully connected network with a softmax output layer and NPF (L, T ) activation functions. Assume we use SGD with a max-norm constraint on the weight matrix and biases in the affine layers and on the coefficients of the activation functions to train the network. Then there exists some K such that the loss function as given in Section A is β-smooth. Specifically, for any such network where the number of hidden layers Q ≥ 1 and and there are p nodes per layer,

β = max O Q p 3Q+5/2 k 9Q-2 L 2Q 3Q-1 , O Q p 2 Q +Q+2 k 5×2 Q +3Q L 2 Q-1 +1 2 Q +Q .

Proof. By Lemmas A.3, A.4, A.7, A.10, A.11, A.14 and A. 12 such a β must exist.

To compute this β, the aforementioned results can be used as well as the computations from the proof of Theorem A.9. The computation is as follows, using the aforementioned results,

• g 1 -B = 0

• a 1 -B = max O √ pk 3 L + k 4 L 2 , O k 2 + √ pk 3 L + k 4 L 2 • g 2 -B = max O pk 3 L + √ pk 4 L 2 , O √ pk 3 + k 2 L + pk 3 L + √ pk 4 L 2 • a 2 -B = max O p 2 k 1 0 L 4 3 , O p 2 k 1 0L 2 2 • g 3 -B = max O p 4 k 1 6 L 6 5

, O p 5/2 k 1 0L 2 2 Above, next to each transformation, is the bound B on its second partial derivatives. The bounds are computed with respect to L ≤ 1 and L > 1, and then the maximum is taken over both cases. By a simple inductive argument for i ≥ 2,

• g i -

B = max O p 2i-3/2 k 6i-8 L 2i-2 2i-3 , O p 2 i-1 -1/2 k 5×2 i-1 L 2 i-2 2 i-1

• a i -

B = max O p 2i-2 k 6i-2 L 2i 2i-1 , O p 2 i -1 k 5×2 i L 2 i-1 2 i

Using the bounds derived above, the bounds from Theorem A.9 and Lemma A.10 gives

β = max O Q p 3Q+5/2 k 9Q-2 L 2Q 3Q-1 , O Q p 2 Q +Q+2 k 5×2 Q +3Q L 2 Q-1 +1 2 Q +Q .

A.3 GENERALIZABILITY:

With the necessary properties demonstrated, we arrive at Theorem A.16. By p denote the number of nodes per layer and Q the number of hidden layers.

Theorem A.16. Consider a fully connected network with a softmax output layer and NPF (L, T ) activation functions. Assume we use SGD with a max-norm constraint on the weight matrix and biases in the affine layers and on the coefficients of the activation functions to train the network.

Then, for all practical values of L,T , ,Q and p, the resulting Lipschitz constant K and smoothness constant β are sufficiently large that where z is some point on the line segment connecting x, y. Here Df represents the Frechet derivative of f , which can be represented in matrix form by the Jacobian.

:



Figures and Tables:

Given some sample size n, an interval [-L, L] and tail truncation T where 0 ≤ T ≤ L, the activation function NPF(L, T ) is parametrized by (a 0 , . . . , a k ) and (b 1 , . . . , b k ) given by

Figure 1: Examples of activation functions learned for convolution layers on CIFAR-10. Specifically these are of the type NPFC(4, 1). k = 5

Intuitively, our choice of network topology and use of NPF(L, T ) activation function should have the necessary properties to apply Theorem 4.5. The definition of NPF(L, T ) is repeated below for clarity. Definition A.1. Given some sample size n, an interval [-L, L] and tail truncation T where 0 ≤ T ≤ L, the activation function NPF(L, T ) is parametrized by (a 0 , . . . , a k ) and (b 1 , . . . , b k ) given by f

, a k ), and (b 1 , . . . , b k ). Then the -neighborhood smoothed nonparametric activation functions are given by Definition A.2. Definition A.2. Given some sample size n, an interval [-L, L] and tail truncation T where 0 ≤ T ≤ L, the activation function NPF (L, T ) is parametrized by (a 0 , . . . , a k ) and (b 1 , . . . , b k ) given by

stab → 0 as sample size n → ∞.Proof. By Theorems 4.5, A.9, and A.15 the result is immediate.B RESULTS FOR FUNCTIONS OVER R nWithout proof we give the mean value inequality for vector valued function in Theorem B.1.Theorem B.1. Let f be a differentiable vector valued function, that is f : A ⊂ R n → R m . Then for x, y ∈ A, we have that ||f (x) -f (y)|| ≤ ||Df (z)(x -y)||,

contains the results from the MNIST baseline experiments.

Table content: <table><tr><td colspan="3">Table 1: MNIST baseline comparisons</td><td/><td/></tr><tr><td>Name</td><td colspan="4">Layers (Units) Activation Best Error Mean Error</td></tr><tr><td>Baseline Neural Net</td><td>3 (2048)</td><td>tanh</td><td>1.66%</td><td>1.79%</td></tr><tr><td>Baseline Neural Net</td><td>3 (2048)</td><td>ReLU</td><td>1.65%</td><td>1.76%</td></tr><tr><td>Baseline NN with Dropout</td><td>3 (2048)</td><td>ReLU</td><td>1.35%</td><td>1.42%</td></tr><tr><td>Baseline CNN</td><td>N/A</td><td>ReLU</td><td>0.88%</td><td>0.96%</td></tr><tr><td>Baseline CNN with Dropout</td><td>N/A</td><td>ReLU</td><td>0.78%</td><td>0.84%</td></tr></table>

MNIST experiments with Fourier basis expansion. Conv. Act. is the activation function in the convolutional layers (if present). F.C. Act. is the activation function in the fully connected layers. Epochs is the mean number of epochs in training. Results of note appear in bold.

Table content: <table><tr><td colspan="2">Architecture Dropout</td><td>Conv. Act.</td><td>F.C. Act.</td><td colspan="3">Best Error Mean Error Epochs</td></tr><tr><td>NN</td><td>No</td><td>N/A</td><td>NPF(4, 1)</td><td>1.60%</td><td>1.64%</td><td>35</td></tr><tr><td>NN</td><td>Yes</td><td>N/A</td><td>NPF(4, 1)</td><td>1.10%</td><td>1.20%</td><td>119</td></tr><tr><td>CNN</td><td>No</td><td>ReLU</td><td>NPF(4, 1)</td><td>0.82%</td><td>0.87%</td><td>39</td></tr><tr><td>CNN</td><td>Yes</td><td>ReLU</td><td>NPF(4, 1)</td><td>0.66%</td><td>0.74%</td><td>72</td></tr><tr><td>CNN</td><td>No</td><td>NPF(4, 1)</td><td>NPF(4, 1)</td><td>0.78%</td><td>0.86%</td><td>40</td></tr><tr><td>CNN</td><td>Yes</td><td>NPF(4, 1)</td><td>NPF(4, 1)</td><td>0.77%</td><td>0.95%</td><td>80</td></tr><tr><td>CNN</td><td>No</td><td colspan="2">NPFC(4, 1) NPF(4, 1)</td><td>0.77%</td><td>0.84%</td><td>37</td></tr><tr><td>CNN</td><td>Yes</td><td colspan="2">NPFC(4, 1) NPF(4, 1)</td><td>0.64%</td><td>0.69%</td><td>81</td></tr></table>

CIFAR-10 baseline results. Epochs is average number of epochs trained. There were five runs of each experiment.

Table content: <table><tr><td>Name</td><td colspan="4">Activation Best Error Mean Error Epochs</td></tr><tr><td>Baseline CNN</td><td>ReLU</td><td>19.23%</td><td>19.46%</td><td>64</td></tr><tr><td>Baseline CNN + Dropout</td><td>ReLU</td><td>14.52%</td><td>15.20%</td><td>147</td></tr></table>

CIFAR10 experiments with Fourier basis. Conv. Act. is the activation function in the convolutional layers. F.C. Act. is the activation function in the fully connected layers. In both cases it is the activation in the final stage of training (if two stages are used). For two stage training, error rates and epochs for both first and second stages are given. Results of note appear in bold.

Table content: <table><tr><td>Training</td><td>Dropout</td><td>Conv. Act.</td><td>F.C. Act.</td><td colspan="3">Best Error Mean Error Epochs</td></tr><tr><td>One Stage</td><td>No</td><td colspan="2">NPFC(4, 1) NPF(4, 1)</td><td>20.09%</td><td>20.35%</td><td>36</td></tr><tr><td>One Stage</td><td>No</td><td>ReLU</td><td>NPF(4, 1)</td><td>18.58%</td><td>19.00%</td><td>68</td></tr><tr><td>One Stage</td><td>Yes</td><td>ReLU</td><td>NPF(4, 1)</td><td>14.04 %</td><td>14.77%</td><td>124</td></tr><tr><td>Two Stage</td><td>No</td><td colspan="2">NPFC(4, 1) NPF(4, 1)</td><td>18.26%</td><td>18.79%</td><td>60/61</td></tr><tr><td>Two Stage</td><td>Yes</td><td colspan="2">NPFC(4, 1) NPF(4, 1)</td><td>13.22%</td><td>13.56%</td><td>140/64</td></tr></table>

it follows that g 1 has second partial derivatives bounded by 0.Lemma A.13. Assume g i (w, x) ∈ [-a, a] pi and that g i (w, x) j has first partial derivatives bounded by B 1 and second partial derivatives bounded by B 2 . Further assume that |a d | ≤ M and define f (w, x) = a d cos

Table content: <table><tr><td/><td/><td/><td colspan="2">dπgi(w,x)j L</td><td colspan="2">. Then f (w, x) has second partial derivatives bounded by</td></tr><tr><td>max</td><td colspan="2">dπM LB2+d 2 π 2 M B 2 1 L 2</td><td>, dπB1 L</td><td>.</td><td/></tr><tr><td colspan="7">Proof. Recall from the proof of Lemma A.6 that taking the derivative of f (w, x) with respect to a d</td></tr><tr><td>yields</td><td/><td/><td/><td/><td/></tr><tr><td/><td/><td/><td colspan="4">∂f (w, x) ∂a d</td><td>= cos</td><td>dπg i (w, x) j L</td><td>,</td></tr><tr><td colspan="7">and that if we take the derivative of f (w, x) with respect to any weight from elsewhere in the network</td></tr><tr><td colspan="3">-some z -we get</td><td/><td/><td/></tr><tr><td/><td/><td colspan="2">∂f (w, x) ∂z</td><td colspan="2">= -</td><td>dπa d L</td><td>∂g i (w, x) j ∂z</td><td>sin</td><td>dπg i (w, x) j L</td></tr><tr><td colspan="7">Now, if we take the derivative of ∂f (w,x) ∂a d</td><td>with respect to a d we get 0. If we take the derivative of</td></tr><tr><td colspan="2">∂f (w,x) ∂a d</td><td colspan="4">with respect to some z we get</td></tr><tr><td/><td/><td colspan="2">∂ 2 f (w, x) ∂a d ∂z</td><td colspan="3">= -sin</td><td>dπg i (w, x) j L</td><td>dπ L</td><td>∂g i (w, x) j ∂z</td></tr><tr><td colspan="3">and we can bound this as</td><td/><td/><td/></tr><tr><td/><td/><td/><td/><td/><td/><td>∂ 2 f (w, x) ∂a d ∂z</td><td>≤</td><td>dπB 1 L</td><td>.</td></tr></table>

L 2 for any two parameters z and z . Denotec 1 = L -T + and c 2 = -L + T + . In Case 5 then, we can compute ∂ 2 a i (w, x) j M (g i (w, x) j ) ∂z∂z g i (w, x) j + c 1 2 -∂ 2 g i (w, x) j ∂z∂z L(g i (w, x) j )2 and then bound it, using B 3 and B 4 as bounds on the first and second partial derivatives of M , respectively, ∂ 2 a i (w, x) j

Table content: <table><tr><td/><td/><td/><td/><td/><td/><td/><td/><td>2 1</td></tr><tr><td>∂z∂z</td><td>=</td><td colspan="2">∂ ∂z</td><td colspan="3">∂g i (w, x) j ∂z</td><td colspan="2">M (g i (w, x) j ) 2</td><td>+</td><td>∂M (g i (w, x) j ) ∂z</td><td>g i (w, x) j + c 1 2</td></tr><tr><td/><td/><td>-</td><td colspan="3">∂g i (w, x) j ∂z</td><td colspan="2">L(g i (w, x) j ) 2</td></tr><tr><td/><td>=</td><td colspan="4">∂ 2 g i (w, x) j ∂z∂z</td><td colspan="2">M (g i (w, x) j ) 2</td><td>+</td><td>∂g i (w, x) j ∂z</td><td>∂M (g i (w, x) j ) ∂z</td><td>1 2</td></tr><tr><td colspan="9">+ ∂ 2 ∂z∂z ∂g i (w, x) j ∂z ∂M (g i (w, x) j ) ∂z 1 2 + ≤ B 2 2 (k 2 + k + 1)M + a + c 1 B 1 B 3 + B 4 2</td></tr><tr><td>= O</td><td/><td colspan="2">B 2 2 k 2</td><td>+</td><td colspan="2">B 1 k 2</td><td/></tr></table>

Peer review (iclr2017):
This paper describes an approach to learning the non-linear activation function in deep neural nets. This is achieved by representing the activation function in a basis of non-linear functions and learning the coefficients. Authors use Fourier basis in the paper. A theoretical analysis of the proposed approach is also presented, using algorithmic stability arguments, to demonstrate good generalization behavior (vanishing generalization error with large data sets) of networks with learnt non-linearities. The main question I have about this paper is that writing a non-linear activation function as a linear or affine combination of other non-linear basis functions is equivalent to making a larger network whose nodes have the basis functions as non-linearities and whose weights have certain constraints on them. Thus, the value of the proposed approach of learning non-linearities over optimizing network capacity for a given task (with fixed non-linearities) is not clear to me. Or could it be argued that the constrained implied by learnt non-linearity approach are somehow good thing to do? Another question - In the two stage training process for CNNs, when ReLU activation is replaced by NPFC(L,T), is the NPFC(L,T) activation initialized to approximate ReLU, or is it initialized using random coefficients? Few minor corrections/questions: - Pg 2. “ … the interval [-L+T, L+T] …” should be “ … the interval [-L+T, L-T] … “ ? - Pg 2., Equation for f(x), should it be “ (-L+T) i pi x / L “ in both sin and cos terms, or without “ x “ ? - Theorem 4.2 “ … some algorithm eps-uniformly stable …” remove the word “algorithm” - Theorem 4.5. SGM undefined