Post-synaptic potential regularization has potential

07/19/2019 ∙ by Enzo Tartaglione, et al. ∙ 0

Improving generalization is one of the main challenges for training deep neural networks on classification tasks. In particular, a number of techniques have been proposed, aiming to boost the performance on unseen data: from standard data augmentation techniques to the ℓ_2 regularization, dropout, batch normalization, entropy-driven SGD and many more. In this work we propose an elegant, simple and principled approach: post-synaptic potential regularization (PSP). We tested this regularization on a number of different state-of-the-art scenarios. Empirical results show that PSP achieves a classification error comparable to more sophisticated learning strategies in the MNIST scenario, while improves the generalization compared to ℓ_2 regularization in deep architectures trained on CIFAR-10.



There are no comments yet.


page 1

page 2

page 3

page 4

This week in AI

Get the week's most popular data science and artificial intelligence research sent straight to your inbox every Saturday.

1 Introduction

In the last few years artificial neural network (ANN) models received huge interest from the research community. In particular, their potential capability of solving complex tasks with extremely simple training strategies has been the initial spark, while convolutional neural networks (CNNs), capable of self-extracting relevant features from images, have been the fuel for the burning flame which is the research around ANNs. Furthermore, thanks to the ever-increasing computational capability of machines with the introduction of GPUs (and, recently, TPUs) in the simulation of neural networks, ANNs might be embedded in many portable devices and, potentially, used in everyday life.

State-of-the-art ANNs are able to learn very complex classification tasks: from the nowadays outdated MNIST [15]

, moving to CIFAR-10 and then even the ImageNet classification problem. In order to overcome the complexity of these learning tasks, extremely complex architectures have been proposed: some examples are VGG 

[20] and ResNet [10]. However, due to their extremely high number of parameters, these models are prone to over-fitting the data; hence, they are not able to generalize as they should. In this case, the simple learning strategies (like SGD) are no longer able to guarantee the network to learn the relevant features from the training set and other strategies need to be adopted.
In order to improve the generalization of ANNs, several approaches have been proposed. One of the most typical relies on the introduction of a “regularization” term, whose aim is to add an extra constraint to the overall objective function to be minimized. Recently, other approaches have been proposed: from the introduction of different optimizers [13] to data augmentation techniques, the proposal of new techniques like dropout [22] and even changing the basic architecture of the ANN [10].
In this work, we propose a regularization term inspired by a side effect of the regularization (also known ad weight decay) on the parameters. In particular, we are going to show that, naturally, weight decay makes the post-synaptic potential dropping to zero in ANN models. From this observation, a post-synaptic potential regularization (PSP) is here proposed. Differently from regularization, its effect on the parameters is not local: parameters belonging to layers closer to the input feel the effect of the regularization on the forward layers. Hence, this regularization is aware of the configuration of the whole network and tunes the parameters using a global information. We show that the standard regularization is a special case of the proposed regularizer as well. Empirically we show that, when compared to the standard weight decay regularization, PSP generalizes better.
The rest of this paper is organized as follows. In Sec. 2 we review some of the most relevant regularization techniques aiming at improving generalization. Next, in Sec. 3 we introduce our proposed regularization, starting from some simple considerations on the effect of the regularization on the post synaptic potential and analyzing the potential effects on the learning dynamics. Then, in Sec. 4 we show some empirical results and some extra insights of the proposed regularization. Finally, in Sec. 5 the conclusions are drawn.

2 Related work

Regularization is one of the key features a learning algorithm should particularly take care of in deep learning, in order to prevent data over-fit and boosting the generalization 

[8]. Even though such a concept is more general and older than the first ANN models [24]

, we are going to focus on what regularization for deep architectures (trained on finite datasets via supervised learning) is. We can divide the regularization strategies in our context under four main categories 


  • regularization via data: some examples include (but are not limited to) the introduction of gaussian noise to the input [7], dropout to the input [22], data augmentation [1] [4], batch normalization [11].

  • regularization via network architecture: in this case, the architecture is properly selected in order to fit the particular dataset we are aiming to train. It can involve the choice of single layers (pooling, convolutional [15], dropout [22]), it can involve the insertion of entire blocks (residual blocks [10]), the entire structure can be designed on-purpose [5] [2] [9] or even pruned [27] [23].

  • regularization via optimization: an optimizer can determine the nature of the local minima and avoid “bad” local minima (if any [12]), boosting the generalization [13] [3]. The initialization also seemed to cover an important role [6], together with cross-validation based techniques like early-stopping [18].

  • regularization via regularization term: here a regularization term is added to the loss, and a global objective function (sum of loss and regularization term (4) ) is minimized. This is the scope of our work.

One of the ground-breaking regularization techniques, proposed few years ago, is dropout. Srivava et al. [22]

proposed, during the training process, to stochastically set a part of the activations in an ANN to zero according to an a-priori set dropout probability. Empirically it was observed that, applying dropout on fully-connected architecture, was significantly improving the generalization, while its effectiveness was less evident in convolutional architectures. Such a technique, however, typically requires a longer training time, and sometimes a proper choice of the dropout probability may change the effectiveness of the technique. However, dropout has many variants aiming to the same goal: one of the most used is dropconnect by Wan 

et al. [26].

A completely different approach to boost the generalization is to focus the attention on some regions of the loss functions. It has been suggested by Lin 

et al. [16] that “sharp” minima of the loss function does not generalize as well as “wide” minima. According to this, the design of an optimizer which does not remain stuck in sharp minima helps in the generalization. Towards this end, some optimizers like SGD or Adam [13] are already implicitly looking for these kind of solutions. Recently, a specially-purposed optimizer, Entropy-SGD, designed by Chaudhari et al. [3], showed good generalization results. However, more sophisticated optimizers increase the computational complexity significantly.
A regularization technique, proposed about 30 years ago by Weigend et al. and just recently re-discovered, is weight elimination [27]

: a penalty term is added to the loss function and the total objective function is minimized. The aim of the regularization term is here to estimate the “complexity” of the model, which is minimized together with the loss function. The learning complexity for an object increases with its number of parameters: there should exist an optimal number of parameters (or, in other words, configuration) for any given classification problem. Supporting this view, while using their

sensitivity-driven regularization [23] aiming to sparsify deep models, Tartaglione et al. observed an improvement of the generalization for low compression ratios.
Any of the proposed regularization techniques, however, is typically used jointly to the regularization. Such a technique is broadly used during most of the ANN trainings and, despite its simple formulation, under a wide range of different scenarios, it improves the generalization. Furthermore, many recent works suggest that there is a correspondence between regularization and other techniques: for example, Wager et al. [25] showed an equivalence between dropout and weight decay. Is there something else to understand about regularization? What’s under the hood? This will be our starting point, to be discussed more in details in Sec. 3.2.

3 Post-synaptic potential regularization

In this section we first analyze the effect of weight decay on the output of any neuron in an ANN model. We show that

regularization makes the post-synaptic potential drop to zero. Hence, a regularization over the post-synaptic potential is formulated (PSP). Next, the parameters update term is derived and some considerations for multi-layer architectures are drawn. Finally, we show the concrete effect of post-synaptic potential regularization on both the output of a single neuron and its parameters.

3.1 Notation

Figure 1: Representation of the -th neuron of the -th layer of an ANN. The input is weighted by the parameters , passes through some affine function producing the post-synaptic potential

which is fed to the activation function

, producing the output

In this section we introduce the notation to be used in the rest of this work. Let us assume we work with an acyclic, multi-layer artificial neural network composed of layers, where layer is the input layer and the output layer. The ensemble of all the trained parameters in the ANN will be indicated as . Each of the layers is made of neurons (or filters for convolutional layers). Hence, the -th neuron () in the -th layer has:

  • as its own output.

  • as input vector.

  • as its own parameters: are the weights (from which we identify the -th as ) and is the bias.

Each of the neurons has its own activation function to be applied after some affine function which can be convolution, dot product, adding residual blocks, batch normalization or any combination of them. Hence, the output of a neuron can be expressed by


We can simplify (1) if we define the post-synaptic potential (or equivalently, the pre-activation potential) as


As we are going to see, the post-synaptic potential will be central in our method and analysis and encloses the true essence of the proposed regularization strategy. A summary of the introduced notation is graphically represented in Fig. 1.

3.2 Effect of weight decay on the post-synaptic potential

Most of the learning strategies use the well-known regularization term


Eq. (3) is minimized together with the loss function ; hence, the overall minimized function is


where is the desired output and are positive real numbers, and commonly in range . All the update contributions are computed using the standard back-propagation strategy. Let us focus here, for sake of simplicity, on the regularization term (3). Minimizing it corresponds to adopt the commonly named weight decay strategy for which we have the following update rule:


This generates a perturbation of the output for the corresponding neuron resulting in a perturbation of the post-synaptic potential:


How does the regularization affect ?
Clearly, minimizing (3) means that . Now, if we have an input pattern for our network , it is straightforward, according to (2) and (5), that , as all the parameters will be zero.
Under this assumption, we can say that the weight decay strategy implicitly aims to focus on peculiar regions of the mostly-used activation functions: in the case we use sigmoid or hyperbolic tangent, we have the maximum value for the derivative for

; while for the ReLU activation we are close to the function discontinuity. Is this the real essence of weight decay and one of the reasons it helps in the generalization?

Starting from these very simple observation, we are now going to formulate a regularization term which explicitly minimizes .

3.3 Post-synaptic regularization

In the previous section we have observed that, in the typical deep learning scenario, weight decay minimizes the post-synaptic potential, focusing the output of the neuron around some particular regions, which might help in the signal back-propagation and, indirectly, favor the generalization.
If we wish to explicitly drive the output of the neuron, or better, its post-synaptic potential, we can impose an regularization on :


where is an index ranging for all the neurons in the -th layer. We can split (7) for each of the neurons in the -th layer:


In case we desire to apply the regularization (8

), we can use the chain rule to check what is the update felt by the parameters of our model:


Expanding (9), we have


Here we need to differentiate between bias and weight cases: if is the bias then (10) can be easily written as


while, if is one of the weights,


From (12) it is possible to recover the usual weight decay assuming and completely neglecting the contribution coming from the other parameters for the same neuron.
The variation in the parameter value, according to (9), is


where as usual. As we are minimizing (7), we can say that is a bounded term. Furthermore, looking at , we need to distinguish two cases:

  • : in this case, represents the input, which we impose to be a bounded quantity.

  • : here we should recall that is the output of the -th layer: if we minimize the post-synaptic potentials also in those layers, for the commonly-used activation functions, we guarantee it to be a bounded quantity.

Hence, as product of bounded quantities, also (13) is a limited quantity.
However, what we aim to minimize is not (8), but the whole summation in (7). If we explicitly wish to write what the regularization contribution to the parameter is, we have


Here, three different cases can be analyzed:

  • : in this case, the gradient term is and the entire contribution is zero.

  • : here, the gradient term if , zero otherwise.

  • : this is the most interesting case: regularization on the last layers affects all the previous ones, and such a contribution is automatically computed using back-propagation.

Hence, in the most general case, the total update contribution resulting from the minimization of (7) on the -th weight belonging to the -th neuron at layer is indeed




In this section we have proposed a post-synaptic potential regularization which explicitly minimizes in all the neurons of the ANN. In particular, we have observed that the update term for the single parameter employs a global information coming from forward layers, favoring the regularization. In the next section, results from some simulations in which PSP regularization is tested are shown.

4 Experiments

In this section we show the performance reached by some of the mostly-used ANNs with our post-synaptic potential regularization (PSP) and we compare it to the results obtained with weight decay. We have tested our regularization on three different datasets: MNIST, Fashion-MNIST and CIFAR-10 on LeNet5, ResNet-18 [10], MobileNet v2 [19] and All-CNN-C [21]

. All the simulationsare performed using the standard SGD with CUDA 8 on a Nvidia Tesla P-100 GPU. Our regularization has been implemented using PyTorch 1.1.

111All the source code is publicly available at

4.1 Simulations on MNIST

As very first experiments, we attempted to train the well-known LeNet-5 model over the standard MNIST dataset [15] (60k training images and 10k test images, all the images are 28x28 pixels, grey-scale). We use SGD with a learning parameter , minibatch size 100. In Fig. 1(a), we show a typically observed scenario in our experimental setting, where we compare standard SGD with no regularization, the effect of regularization () and our pre-activation signal potential regularization (PSP, ). While the weight decay average performance is 0.64% (showing improvements from the standard SGD, which is about 0.71%), PSP final performance is about 0.50%, with peaks reaching 0.46%. We would like to emphasize that, to the best of our knowledge, we hit the best ever recorded performance for the current dataset with the same architecture [3].
We find interesting the behavior of for all the three techniques (Fig. 1(b)). In the case of standard SGD, the averaged value, as it is not controlled, typically grows until the gradient on the loss will not be zero. For regularization, interestingly, it slowly grows until it reaches a final plateau. Finally, in PSP regularization, the value is extremely low, and still slowly decreases. According to the results in Fig. 1(a), this is helping in the generalization.

(a) Error on the test set
(b) Average of values
Figure 2: Performance comparison in LeNet5 trained on MNIST (same initialization seed): standard SGD (no regu), regularization and post synaptic potential regularization (PSP)

At this point we can have a further look at what is happening at the level of the distribution of the parameters layer-by-layer. A typical trained parameters distribution for LeNet5, trained on MNIST, is shown in Fig. 3. While regularization typically shrinks the parameters around zero, PSP regularization does not constrain the parameters with the same strength, while still constrains the pre-activation signal (Fig. 1(b)). However, contrarily to this, the first convolutional layer, with regularization, is less constrained around zero than with PSP (Fig. 2(a)). Such a behavior can be explained by (15): all the regularization contributions coming from all the forward layers (in this case, conv2, fc1 and fc2) affect the parameters in conv1, which are directly conditioning all the computed in forward layers.

(a) First convolutional layer (conv1)
(b) Second convolutional layer (conv2)
(c) First fullyconnected layer (fc1)
(d) Output layer (fc2)
Figure 3: Distribution of the parameters in a LeNet5 trained on MNIST with regularization () and with post synaptic potential regularization (PSP)

4.2 Simulations on Fashion-MNIST

We have decided, as a further step, to test LeNet-5 on a more complex dataset: hence, we have chosen the Fashion-MNIST dataset [28]. It is made of 10 classes of 28x28 grey-scale images representing various pieces of clothing. They are divided in 60k examples for the training set and 10k for the test set. Such a dataset has two main advantages: the problem dimensionality (input, output) is the same as MNIST; hence, the same ANN can be used for both problems, and it is not as trivial as MNIST to solve.

Technique Test set error[%]
SGD+ 8.9
Table 1: LeNet-5 on Fashion-MNIST.

Training results are shown in Table 1. The simulations are performed with , batch size and for regularization while for PSP. Here, the difference in the generalization between

and PSP is wider than the one presented for MNIST: we are able, with the same architecture, to improve the performance by around the 1% without any other heuristics.

4.3 Simulations on CIFAR-10

Moving towards deep architectures, we decided to use CIFAR-10 as dataset. It is made of 32x32 color images (3 channels) divided in 10 classes. The training set is made of 50k images and the test set of 10k samples. This dataset is a good compromise to make the first tests on deep architectures as the training is performed from scratch.
Three convolutional architectures have been here tested: MobileNet v2 [19], ResNet-18 [10] and All-CNN-C [21]. In order to separate the contribution of our regularizer towards other state-of-the-art regularizers, we are going to compare our results with our baseline (same data augmentation, no dropout). All these networks were pre-trained with

for 150 epochs and then learning rate decay policy was applied (drop to 10% every 100 epochs) for 300 epochs. Minibatch size was set to

and momentum to . For standard training, the was set to while for PSP regularization to .
As we can observe in Table 2, using PSP-based regularization shows improvements from the baseline and from regularization. We speculate that with a proper setting of , PSP can potentially match, or even overcome, top performance marked by state-of-the-art regularizers.

Architecture Baseline test error[%] PSP test error [%]
ResNet-18 5.1 4.6
MobileNet v2 7.0 6.4
All-CNN-C 9.1 8.6
Table 2: Performances on CIFAR-10

5 Conclusion

In this work we have proposed a post-synaptic potential regularizer for supervised learning problems. Starting from the observation that weight decay indirectly shrinks the post-synaptic potential to zero, we have formulated the new PSP regularization. Contrarily to weight decay, it uses a global information coming from other parameters affecting the post-synaptic potential. We have also shown that regularization is a special case of our PSP regularization. Looking at the computational complexity, if the autograd [17] package is used for back-propagation, no significant computational overhead is added.

Empirical results show that PSP regularization improves the generalization on both simple and more complex problems, boosting the performance also on deep architectures. Future work includes the application of PSP to recurrent neural networks, tests on networks using non-linear activation functions and the definition of a proper decay policy for PSP regularization.