Noisy Activation Functions

03/01/2016 ∙ by Caglar Gulcehre, et al. ∙ 0

Common nonlinear activation functions used in neural networks can cause training difficulties due to the saturation behavior of the activation function, which may hide dependencies that are not visible to vanilla-SGD (using first order gradients only). Gating mechanisms that use softly saturating activation functions to emulate the discrete switching of digital logic circuits are good examples of this. We propose to exploit the injection of appropriate noise so that the gradients may flow easily, even if the noiseless application of the activation function would yield zero gradient. Large noise will dominate the noise-free gradient and allow stochastic gradient descent toexplore more. By adding noise only to the problematic parts of the activation function, we allow the optimization procedure to explore the boundary between the degenerate (saturating) and the well-behaved parts of the activation function. We also establish connections to simulated annealing, when the amount of noise is annealed down, making it easier to optimize hard objective functions. We find experimentally that replacing such saturating activation functions by noisy variants helps training in many contexts, yielding state-of-the-art or competitive results on different datasets and task, especially when training seems to be the most difficult, e.g., when curriculum learning is necessary to obtain good results.

READ FULL TEXT VIEW PDF

Authors

page 1

page 2

page 3

page 4

Code Repositories

noisy_units

Codes for the "Noisy Activation Functions" paper.


view repo

Activations

A list of current activation functions in deep learning.


view repo
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

The introduction of the piecewise-linear activation functions such as ReLU and Maxout

Goodfellow et al. (2013) units had a profound effect on deep learning, and was a major catalyst in allowing the training of much deeper networks. It is thanks to ReLU that for the first time it was shown (Glorot et al., 2011) that deep purely supervised networks can be trained, whereas using nonlinearity only allowed to train shallow networks. A plausible hypothesis about the recent surge of interest on these piecewise-linear activation functions (Glorot et al., 2011)

, is due to the fact that they are easier to optimize with SGD and backpropagation than smooth activation functions, such as

and

. The recent successes of piecewise linear functions is particularly evident in computer vision, where the ReLU has become the default choice in convolutional networks.

We propose a new technique to train neural networks with activation functions which strongly saturate when their input is large. This is mainly achieved by injecting noise to the activation function in its saturated regime and learning the level of noise. Using this approach, we have found that it was possible to train neural networks with much wider family of activation functions than previously. Adding noise to the activation function has been considered for ReLU units and was explored in Bengio et al. (2013); Nair & Hinton (2010)

for feed-forward networks and Boltzmann machines to encourage units to explore more and make the optimization easier.

More recently there has been a resurgence of interest in more elaborated “gated” architectures such as LSTMs Hochreiter & Schmidhuber (1997) and GRUs Cho et al. (2014), but also encompassing neural attention mechanisms that have been used in the NTM Graves et al. (2014), Memory Networks Weston et al. (2014), automatic image captioning Xu et al. (2015), video caption generation Yao et al. (2015) and wide areas of applications LeCun et al. (2015). A common thread running through these works is the use of soft-saturating non-linearities, such as the sigmoid or softmax, to emulate the hard decisions of digital logic circuits. In spite of its success, there are two key problems with this approach.

  1. Since the non-linearities still saturate there are problems with vanishing gradient information flowing through the gates; and

  2. since the non-linearities only softly saturate they do not allow one to take hard decisions.

Although gates often operate in the soft-saturated regime Karpathy et al. (2015); Bahdanau et al. (2014); Hermann et al. (2015) the architecture prevents them from being fully open or closed. We follow a novel approach to address both of these problems. Our method addresses the second problem through the use of hard-saturating nonlinearities, which allow gates to make perfectly on or off decisions when they saturate. Since the gates are able to be completely open or closed, no information is lost through the leakiness of the soft-gating architecture.

By introducing hard-saturating nonlinearities, we have exacerbated the problem of gradient flow, since gradients in the saturated regime are now precisely zero instead of being negligible. However, by introducing noise into the activation function which can grow based on the magnitude of saturation, we encourage random exploration.

At test time the noise in the activation functions can be removed or replaced with the expectation, and as our experiments show, the resulting deterministic networks outperform their soft-saturating counterparts on a wide variety of tasks, and allow to reach state-of-the-art performance by simple drop-in replacement of the nonlinearities in existing training code.

The technique that we propose, addresses the difficulty of optimization and having hard-activations at the test time for gating units and we propose a way of performing simulated annealing for neural networks.

Hannun et al. (2014); Le et al. (2015) used ReLU activation functions with simple RNNs. In this paper, we successfully show that, it is possible to use piecewise-linear activation functions with gated recurrent networks such as LSTM and GRU’s.

2 Saturating Activation Functions

Definition 2.1.

(Activation Function). An activation function is a function that is differentiable almost everywhere.

Definition 2.2.

(Saturation). An activation function with derivative is said to right (resp. left) saturate if its limit as (resp. ) is zero. An activation function is said to saturate (without qualification) if it both left and right saturates.

Most common activation functions used in recurrent networks (for example, and ) are saturating. In particular they are soft saturating, meaning that they achieve saturation only in the limit.

Definition 2.3.

(Hard and Soft Saturation). Let be a constant such that implies and left hard saturates when implies , . We say that hard saturates (without qualification) if it both left and right hard saturates. An activation function that saturates but achieves zero gradient only in the limit is said to soft saturate.

We can construct hard saturating versions of soft saturating activation functions by taking a first-order Taylor expansion about zero and clipping the results to an appropriate range.

For example, expanding and around , with , we obtain linearized functions and of and respectively:

(1)
(2)

Clipping the linear approximations result to,

(3)
(4)

The motivation behind this construction is to introduce linear behavior around zero to allow gradients to flow easily when the unit is not saturated, while providing a crisp decision in the saturated regime.

Figure 1: The plot for derivatives of different activation functions.

The ability of the hard-sigmoid and hard-tanh to make crisp decisions comes at the cost of exactly 0 gradients in the saturated regime. This can cause difficulties during training: a small but not infinitesimal change of the pre-activation (before the nonlinearity) may help to reduce the objective function, but this will not be reflected in the gradient.

In the rest of the document we will use to refer to a generic activation function and use to denote its linearization based on the first-order Taylor expansion about zero. saturates when or and saturates when or . We denote the threshold by . Absolute values of the threshold are for and for the .

Remark.

Let us note that both , and are all contractive mapping. , becomes a contractive mapping only when its input is greater than the threshold. An important difference among these activation functions is their fixed points. has a fixed point at . However the fixed-point of is . Any between and can be the fixed-point of , but the fixed-point of is . and have point attractors at their fixed-points. Those mathematical differences among the saturating activation functions can make them behave differently with RNNs and deep networks.

The highly non-smooth gradient descent trajectory may bring the parameters into a state that pushes the activations of a unit towards the gradient regime for a particular example, from where it may become difficult to escape and the unit may get stuck in the gradient regime.

When units saturate and gradients vanish, an algorithm may require many training examples and a lot of computation to recover.

3 Annealing with Noisy Activation Functions

Consider a noisy activation function in which we have injected iid noise , to replace a saturating nonlinearity such as the and introduced in the previous section. In the next section we describe the proposed noisy activation function which has been used for our experiments, but here we want to consider a larger family of such noisy activation functions, when we use a variant of stochastic gradient descent (SGD) for training.

Let

have variance

and mean . We want to characterize what happens as we gradually anneal the noise, going from large noise levels () to no noise at all .

Furthermore, we will assume that is such that when the noise level becomes large, so does its derivative with respect to :

(5)

Figure 2: An example of a one-dimensional, non-convex objective function where a simple gradient descent will behave poorly. With large noise , SGD can escape from saddle points and bad local-minima as a result of exploration. As we anneal the noise level , SGD will eventually converge to one of the local-minima .

In the noise limit, we recover a deterministic nonlinearity, , which in our experiments is piecewise linear and allows us to capture the kind of complex function we want to learn. As illustrated in Figure 2, in the large noise limit, large gradients are obtained because backpropagating through gives rise to large derivatives. Hence, the noise drowns the signal: the example-wise gradient on parameters is much larger than it would have been with . SGD therefore just sees noise and can move around anywhere in parameter space without “seeing” any trend.

Annealing is also related to the signal to noise ratio where can be defined as the ratio of the variance of noise and , . If , the model will do pure random exploration. As we anneal will increase, and when converges to

, the only source of exploration during the training will come from the noise of Monte Carlo estimates of stochastic gradients.

This is precisely what we need for methods such as simulated annealing (Kirkpatrick et al., 1983) and continuation methods (Allgower & Georg, 1980) to be helpful, in the context of the optimization of difficult non-convex objectives. With high noise, SGD is free to explore all parts of space. As the noise level is decreased, it will prefer some regions where the signal is strong enough to be “visible” by SGD: given a finite number of SGD steps, the noise is not averaged out, and the variance continues to dominate. Then as the noise level is reduced SGD spends more time in “globally better” regions of parameter space. As it approaches to zero we are fine-tuning the solution and converging near a minimum of the noise-free objective function. A related approach of adding noise to gradients and annealing the noise was investigated in Neelakantan et al. (2015) as well. Ge et al. (2015) showed that SGD with annealed noise will globally converge to a local-minima for non-convex objective functions in polynomial number of iterations. Recently, Mobahi (2016)

propose an optimization method that applies Gaussian smoothing on the loss function such that annealing weight noise is a Monte Carlo estimator of that.

4 Adding Noise when the Unit Saturate

A novel idea behind the proposed noisy activation is that the amount of noise added to the nonlinearity is proportional to the magnitude of saturation of the nonlinearity. For and , due to our parametrization of the noise, that translates into the fact that the noise is only added when the hard-nonlinearity saturates. This is different from previous proposals such as the noisy rectifier from Bengio (2013) where noise is added just before a rectifier (ReLU) unit, independently of whether the input is in the linear regime or in the saturating regime of the nonlinearity.

The motivation is to keep the training signal clean when the unit is in the non-saturating (typically linear) regime and provide some noisy signal when the unit is in the saturating regime.

refer to hard saturation activation function such as the hard-sigmoid and hard-tanh introduced in Sec. 2, we consider noisy activation functions of the following form:

(6)

and . Here

is an iid random variable drawn from some generating distribution, and the parameters

and (discussed below) are used to generate a location scale family from .

Intuitively when the unit saturates we pin its output to the threshold value and add noise. The exact behavior of the method depends on the type of noise and the choice of and , which we can pick as functions of in order to let some gradients be propagated even when we are in the saturating regime.

A desirable property we would like to approximately satisfy is that, in expectation, it is equal to the hard-saturating activation function, i.e.

(7)

If the distribution has zero mean then this property can be satisfied by setting , but for biased noise it will be necessary to make other choices for . In practice, we used slightly biased with good results.

Intuitively we would like to add more noise when is far into the saturated regime, since a large change in parameters would be required desaturate . Conversely, when is close to the saturation threshold a small change in parameters would be sufficient for it to escape. To that end we make use of the difference between the original activation function and its linearization

(8)

when choosing the scale of the noise. See Eqs.1 for definitions of for the and respectively. The quantity is zero in the unsaturated regime, and when saturates it grows proportionally to the distance between and the saturation threshold . We also refer as the magnitude of the saturation.

We experimented with different ways of scaling with , and empirically found that the following formulation performs better:

(9)

In Equation 9 a free scalar parameter is learned during the course of training. By changing , the model is able to adjust the magnitude of the noise and that also effects the sign of the gradient as well. The hyper-parameter

changes the scale of the standard deviation of the noise.

4.1 Derivatives in the Saturated Regime

In the simplest case of our method we draw from an unbiased distribution, such as a standard normal. In this case we choose to satisfy Equation 7 and therefore we will have,

Figure 3: A simple depiction of adding Gaussian noise on the linearized activation function, which brings the average back to the hard-saturating nonlinearity , in bold. Its linearization is and the noisy activation is . The difference is

which is a vector indicates the discrepancy between the linearized function and the actual function that the noise is being added to

. Note that, will be zero, at the non-saturating parts of the function where and matches perfectly.

Due to our parameterization of , when our stochastic activation function behaves exactly as the linear function , leading to familiar territory. Because will be

. Let us for the moment restrict our attention to the case when

and saturates. In this case the derivative of is precisely zero, however, if we condition on the sample we have

(10)

which is non-zero almost surely.

In the non-saturated regime, where the optimization can exploit the linear structure of near the origin in order to tune its output. In the saturated regime the randomness in drives exploration, and gradients still flow back to since the scale of the noise still depends on . To reiterate, we get gradient information at every point in spite of the saturation of , and the variance of the gradient information in the saturated regime depends on the variance of .

4.2 Pushing Activations towards Linear Regime

An unsatisfying aspect of the formulation with unbiased noise is that, depending on the value of occasionally the gradient of will point the wrong way. This can cause a backwards message that would push in a direction that would worsen the objective function on average over . Intuitively we would prefer these messages to “push back” the saturated unit towards a non-saturated state where the gradient of can be used safely.

A simple way to achieve this is to make sure that the noise is always positive and adjust its sign manually to match the sign of . In particular we could set

where and are as before and is the sign function, such that is if is greater than or equal to otherwise it is . We also use the absolute value of

in the reparametrization of the noise, such that the noise is being sampled from a half-Normal distribution. We ignored the sign of

, such that the direction that the noise pushes the activations are determined by and it will point towards . Matching the sign of the noise to the sign of would ensure that we avoid the sign cancellation between the noise and the gradient message from backpropagation. is required to push the activations towards when the bias from is introduced.

In practice we use a hyperparameter

that influences the mean of the added term, such that near 1 approximately satisfies the above condition, as seen in Fig. 4. We can rewrite the noisy term in a way that the noise can either be added to the linearized function or . The relationship between , and is visualized Figure 3 can be expressed as in Eqn 11.

We have experimented with different types of noise. Empirically, in terms of performance we found, half-normal and normal noise to be better. In Eqn 11, we provide the formulation for the activation function where if the noise is sampled from half-normal distribution, if the noise is sampled from normal distribution.

(11)

By using Eqn 11, we arrive at the noisy activations, which we used in our experiments.

(12)

As can be seen in Eqn 12, there are three paths that gradients can flow through the neural network, the linear path (), nonlinear path () and the stochastic path (). The flow of gradients through these different pathways across different layers makes the optimization of our activation function easier.

At test time, we used the expectation of Eqn 12 in order to get deterministic units,

(13)

If , then is . Otherwise if , then is .

1:  
2:  
3:  
4:  
5:  
Algorithm 1 Noisy Activations with Half-Normal Noise for Hard-Saturating Functions

To illustrate the effect of and noisy activation of the , We provide plots of our stochastic activation functions in Fig 4.

Figure 4: Stochastic behavior of the proposed noisy activation function with different values and with noise sampled from the Normal distribution, approximating the nonlinearity (in bold green).

5 Adding Noise to Input of the Function

Adding noise with fixed standard deviation to the input of the activation function has been investigated for ReLU activation functions Nair & Hinton (2010); Bengio et al. (2013).

(14)

In Eqn 14, we provide a parametrization of the noisy activation function. can be either learned as in Eqn 9 or fixed as a hyperparameter.

The condition in Eqn 5 is satisfied only when is learned. Experimentally we found small values of to work better. When is fixed and small, as gets larger and further away from the threshold , noise will less likely be able to push the activations back to the linear regime. We also investigated the effect of injecting input noise when the activations saturate:

(15)

6 Experimental Results

In our experiments, we used noise only during training: at test time we replaced the noise variable with its expected value. We performed our experiments with just a drop-in replacement of the activation functions in existing experimental setups, without changing the previously set hyper-parameters. Hence it is plausible one could obtain better results by performing a careful hyper-parameter tuning for the models with noisy activation functions. In all our experiments, we initialized uniform randomly from the range .

We provide experimental results using noisy activations with normal (NAN), half-normal noise (NAH), normal noise at the input of the function (NANI), normal noise at the input of the function with learned (NANIL) and normal noise injected to the input of the function when the unit saturates (NANIS). Codes for different types of noisy activation functions can be found at https://xx.

6.1 Exploratory Analysis

As a sanity-check, we performed small-scale control experiments, in order to observe the behavior of the noisy units. In Fig 5, we showed the learning curves of different types of activations with various types of noise in contrast to the and units. The models are single-layer MLPs trained on MNIST for classification and we show the average negative log-likelihood . In general, we found that models with noisy activations converge faster than those using and activation functions, and to lower NLL than the network.

We trained layer MLP on a dataset generated from a mixture of Gaussian distributions with different means and standard deviations. Each layer of the MLP contains -hidden units. Both the model with and noisy activations was able to solve this task almost perfectly. By using the learned values, in Figure 6 and 7, we showed the scatter plot of the activations of each unit at each layer and the derivative function of each unit at each layer with respect to its input.

Figure 5:

Learning curves of a single layer MLP trained with RMSProp with different noise types and activation functions

Figure 6: Derivatives of each unit at each layer with respect to its input for a three-layered MLP trained on a dataset generated by three normal distributions with different means and standard deviations. In other words learned at the end of training for unit at layer. is sampled from Normal distribution with .
Figure 7: Activations of each unit at each layer of a three-layer MLP trained on a dataset generated by three normal distributions with different means and standard deviations. In other words learned at the end of training for unit at layer. is sampled from Half-Normal distribution with .
Figure 8: We show the learning curves of a simple character-level GRU language model over the sequences of length on PTB. NANI and NAN, have very similar learning curves. NANIS in the beginning of the training has a better progress than NAN and NANIS, but then training curve stops improving.

We further investigated the performances of network with activation functions using NAN, NANI and NANIS on penntreebank (PTB) character-level language modeling. We used a GRU language model over sequences of length . We used the same model and train all the activation functions with the same hyperparameters except we ran a grid-search for for NANI and NANIS from with values. We choose the best based on the validation bit-per-character (BPC). We have not observed important difference among NAN and NANI in terms of training performance as seen on Figure 8.

6.2 Learning to Execute

The problem of predicting the output of a short program introduced in Zaremba & Sutskever (2014) 111The code is residing at https://github.com/wojciechz/learning_to_execute. We thank authors for making it publicly available. proved challenging for modern deep learning architectures. The authors had to use curriculum learning (Bengio et al., 2009) to let the model capture knowledge about the easier examples first and increase the level of difficulty of the examples further down the training.

We replaced all and

non-linearities in the reference model with their noisy counterparts. We changed the default gradient clipping to

from in order to avoid numerical stability problems. When evaluating a network, the length (number of lines) of the executed programs was set to and nesting was set to , which are default settings in the released code for these tasks. Both the reference model and the model with noisy activations were trained with “combined” curriculum which is the most sophisticated and the best performing one.

Our results show that applying the proposed activation function leads to better performance than that of the reference model. Moreover it shows that the method is easy to combine with a non-trivial learning curriculum. The results are presented in Table 1 and in Figure 10

Model name Test Accuracy
Reference Model 46.45%
Noisy Network(NAH) 48.09%
Table 1: Performance of the noisy network on the Learning to Execute / task. Just changing the activation function to the proposed noisy one yielded about 2.5% improvement in accuracy.
Figure 9: Learning curves of validation perplexity for the LSTM language model on word level on Penntreebank dataset.
Figure 10: Training curves of the reference model (Zaremba & Sutskever, 2014) and its noisy variant on the “Learning To Execute” problem. The noisy network converges faster and reaches a higher accuracy, showing that the noisy activations help to better optimize for such hard to optimize tasks.

6.3 Penntreebank Experiments

We trained a layer word-level LSTM language model on Penntreebank. We used the same model proposed by Zaremba et al. (2014)222We used the code provided in https://github.com/wojzaremba/lstmWe simply replaced all and units with noisy and units. The reference model is a well-finetuned strong baseline from Zaremba et al. (2014). For the noisy experiments we used exactly the same setting, but decreased the gradient clipping threshold to from . We provide the results of different models in Table 2. In terms of validation and test performance we did not observe big difference between the additive noise from Normal and half-Normal distributions, but there is a substantial improvement due to noise, which makes this result the new state-of-the-art on this task, as far as we know.

Valid ppl Test ppl
Noisy LSTM + NAN 111.7 108.0
Noisy LSTM + NAH 112.6 108.7
LSTM (Reference) 119.4 115.6
Table 2: Penntreebank word-level comparative perplexities. We only replaced in the code from Zaremba et al. (2014) the and by corresponding noisy variants and observe a substantial improvement in perplexity, which makes this the state-of-the-art on this task.
BLEU -1 BLEU-2 BLEU-3 BLEU-4 METEOR Test NLL
Soft Attention (Sigmoid and Tanh) (Reference) 67 44.8 29.9 19.5 18.9 40.33
Soft Attention (NAH Sigmoid & Tanh) 66 45.8 30.69 20.9 20.5 40.17
Soft Attention (NAH Sigmoid & Tanh wo dropout) 64.9 44.2 30.7 20.9 20.3 39.8
Soft Attention (NANI Sigmoid & Tanh) 66 45.0 30.6 20.7 20.5 40.0
Soft Attention (NANIL Sigmoid & Tanh) 66 44.6 30.1 20.0 20.5 39.9
Hard Attention (Sigmoid and Tanh) 67 45.7 31.4 21.3 19.5 -
Table 3: Image Caption Generation on Flickr8k. This time we added noisy activations in the code from Xu et al. (2015) and obtain substantial improvements on the higher-order BLEU scores and the METEOR metric, as well as in NLL. Soft attention and hard attention here refers to using backprop versus REINFORCE when training the attention mechanism. We fixed for NANI and for both NAN and NANIL.

6.4 Neural Machine Translation Experiments

We have trained a neural machine translation (NMT) model on the Europarl dataset with the neural attention model

Bahdanau et al. (2014).333Again, we have used existing code, provided in https://github.com/kyunghyuncho/dl4mt-material, and only changed the nonlinearities We have replaced all and units with their noisy counterparts. We have scaled down the weight matrices initialized to be orthogonal scaled by multiplying with . Evaluation is done on the newstest2011 test set. All models are trained with early-stopping. We also compare with a model with and units and our model using noisy activations was able to outperform both, as shown in Table 4. Again, we see a substantial improvement (more than BLEU points) with respect to the reference for English to French machine translation.

Valid nll BLEU
Sigmoid and Tanh NMT (Reference) 65.26 20.18
Hard-Tanh and Hard-Sigmoid NMT 64.27 21.59
Noisy (NAH) Tanh and Sigmoid NMT 63.46 22.57
Table 4: Neural machine Translation on Europarl. Using existing code from Bahdanau et al. (2014) with nonlinearities replaced by their noisy versions, we find much improved performance (2 BLEU points is considered a lot for machine translation). We also see that simply using the hard versions of the nonlinearities buys about half of the gain.

6.5 Image Caption Generation Experiments

We evaluated our noisy activation functions on a network trained on the Flickr8k dataset. We used the soft neural attention model proposed in Xu et al. (2015) as our reference model.444We used the code provided at https://github.com/kelvinxu/arctic-captions. We scaled down the weight matrices initialized to be orthogonal scaled by multiplying with . As shown in Table 3, we were able to obtain better results than the reference model and our model also outperformed the best model provided in Xu et al. (2015) in terms of Meteor score.

(Xu et al., 2015)’s model was using dropout with the ratio of on the output of the LSTM layers and the context. We have tried both with and without dropout, as in Table 3, we observed improvements with the addition of dropout to the noisy activation function. But the main improvement seems to be coming with the introduction of the noisy activation functions since the model without dropout already outperforms the reference model.

6.6 Experiments with Continuation

We performed experiments to validate the effect of annealing the noise to obtain a continuation method for neural networks.

We designed a new task where, given a random sequence of integers, the objective is to predict the number of unique elements in the sequence. We use an LSTM network over the input sequence, and performed a time average pooling over the hidden states of LSTM to obtain a fixed-size vector. We feed the pooled LSTM representation into a simple (one hidden-layer) ReLU MLP in order to predict the unique number of elements in the input sequence. In the experiments we fixed the length of input sequence to and the input values are between and . In order to anneal the noise, we started training with the scale hyperparameter of the standard deviation of noise with and annealed it down to with the schedule of where is being incremented at every minibatch updates. When noise annealing is combined with a curriculum strategy (starting with short sequences first and gradually increase the length of the training sequences), the best models are obtained.

Test Error %
LSTM+MLP(Reference) 33.28
Noisy LSTM+MLP(NAN) 31.12
Curriculum LSTM+MLP 14.83
Noisy LSTM+MLP(NAN) Annealed Noise 9.53
Noisy LSTM+MLP(NANIL) Annealed Noise 20.94
Table 5: Experimental results on the task of finding the unique number of elements in a random integer sequence. This illustrates the effect of annealing the noise level, turning the training procedure into a continuation method. Noise annealing yields better results than the curriculum.

As a second test, we used the same annealing procedure in order to train a Neural Turing Machine (NTM) on the associative recall task

Graves et al. (2014). We trained our model with a minimum of items and a maximum of items. We show results of the NTM with noisy activations in the controller, with annealed noise, and compare with a regular NTM in terms of validation error. As can be seen in Figure 11, the network using noisy activation converges much faster and nails the task, whereas the original network failed to approach a low error.

Figure 11: Validation learning curve of NTM on Associative recall task evaluated over items of length and . The NTM with noisy controller converges much faster and solves the task.

7 Conclusion

Nonlinearities in neural networks are both a blessing and a curse. A blessing because they allow to represent more complicated functions and a curse because that makes the optimization more difficult. For example, we have found in our experiments that using a hard version (hence more nonlinear) of the sigmoid and nonlinearities often improved results. In the past, various strategies have been proposed to help deal with the difficult optimization problem involved in training some deep networks, including curriculum learning, which is an approximate form of continuation method. Earlier work also included softened versions of the nonlinearities that are gradually made harder during training. Motivated by this prior work, we introduce and formalize the concept of noisy activations as a general framework for injecting noise in nonlinear functions so that large noise allows SGD to be more exploratory. We propose to inject the noise to the activation functions either at the input of the function or at the output where unit would otherwise saturate, and allow gradients to flow even in that case. We show that our noisy activation functions are easier to optimize. It also, achieves better test errors, since the noise injected to the activations also regularizes the model as well. Even with a fixed noise level, we found the proposed noisy activations to outperform their sigmoid or counterpart on different tasks and datasets, yielding state-of-the-art or competitive results with a simple modification, for example on PennTreebank. In addition, we found that annealing the noise to obtain a continuation method could further improved performance.

References

Acknowledgements

The authors would like to acknowledge the support of the following agencies for research funding and computing support: NSERC, Calcul Québec, Compute Canada, Samsung, the Canada Research Chairs and CIFAR. We would also like to thank the developers of Theano 

555http://deeplearning.net/software/theano/, for developing such a powerful tool for scientific computing. Caglar Gulcehre also thanks to IBM Watson Research and Statistical Knowledge Discovery Group at IBM Research for supporting this work during his internship.