TL;DR
Kaiming He, Xiangyu Zhang, Shaoqing Ren and Jian Sun made two changes to rectifier networks in 2015. The first is the parametric ReLU (PReLU): a ReLU whose negative-side slope is a number the network learns, one per channel, at almost no extra cost. The second is a starting-weight rule that accounts for the fact that a ReLU throws away the negative half of its input. With that rule, a 30-layer network trains from scratch. Their ensemble reached 4.94% top-5 error on ImageNet, below the 5.1% human figure reported by the dataset authors.
Where you'll see it: the He-normal initializers (kaiming_normal_ in PyTorch, HeNormal in Keras) that set the starting weights of almost every ReLU network, and PReLU layers available as drop-in activations in the major frameworks.
The problem
By 2014 the rectifier had replaced sigmoid-like units in most deep networks. A ReLU is cheap to compute, speeds up training, and leads to better solutions than the older units. Two problems were still open.
The first was the shape of the activation. A ReLU sets every negative input to zero. The slope on the negative side is fixed at zero, and nothing lets the network choose a different response.
The second was getting very deep networks to start learning at all. The authors observed that a convolutional network whose weights are drawn from a Gaussian with a fixed standard deviation of 0.01 has trouble converging once it has more than about 8 convolutional layers. The VGG team worked around this by pre-training a shallow network and using it to initialize a deeper one, which costs training time and may land in a poorer local optimum. Other groups added auxiliary classifiers to middle layers to help gradients reach the early layers.
The principled alternative was Xavier (Glorot) initialization, which scales the weight variance by the layer's fan-in and fan-out (the paper compares against the forward-only form, ). Its derivation assumes the activations are linear. A ReLU is not linear, and the paper argues that this assumption breaks for rectifier networks. The field needed a starting-weight rule derived for rectifiers, so that networks of 20 to 30 layers could be trained directly.
Key idea
The paper makes two observations, and each one leads to a piece of the method.
The first is that the negative slope of the rectifier should be learned. If the slope is a parameter, training can move it anywhere between zero (a ReLU) and one (a plain linear unit). The network decides, layer by layer and channel by channel, how much negative signal to keep. Figure 1 of the paper shows the two shapes side by side: ReLU is a hard corner at zero, while PReLU has a learned tilt on the negative side.
The second is that initialization has to respect the fact that a ReLU keeps only about half of its signal. When you track how the variance of the activations changes from layer to layer, that halving is a factor of 1/2 at every layer. Over 30 layers that factor compounds. The paper derives the starting variance that cancels it, and the derivation gives a scale that is larger than Xavier's by a factor of per layer.
The method
The PReLU activation
For the input on channel , the activation is
Equivalently, . Here is the slope on the negative side. When this is a ReLU. A fixed is the leaky ReLU studied by Maas et al. The PReLU makes a parameter that is trained with the rest of the network.
There are two ways to share the parameter. The channel-wise version has one per channel, so a layer with 64 channels has 64 extra parameters. The channel-shared version has one for the whole layer. Either way the number of extra parameters is tiny compared with the weights of the convolution filters, so the authors expect little risk of overfitting.
Learning the slope
The gradient of the loss with respect to the slope is found by the chain rule. The derivative of the activation with respect to is zero where and equal to where . So the gradient is a sum over every position of the feature map,
The authors update with momentum, , where is the momentum and is the learning rate. Two choices in this update matter.
First, there is no weight decay on . Weight decay pulls parameters toward zero, and for that means pulling the unit back toward a ReLU. The paper says that even without regularization the learned values rarely exceed 1 in magnitude.
Second, is not constrained to be positive or below one. The activation can become non-monotonic if training pushes the slope below zero. The paper initializes every to 0.25.
Starting-weight rule for the forward pass
The layer response is , where . A filter with spatial size over input channels sees inputs. The derivation assumes that the weights are independent with zero mean, and that the inputs are independent of the weights. Then the variance of one output element is
The step that differs from Xavier is the second moment . For a zero-mean input, . A ReLU output is not zero-mean, so the two quantities differ. If is symmetric around zero and , then is symmetric around zero. A ReLU then satisfies , which gives
Chaining this over layers gives . The signal stays at a sensible scale if every factor in the product is 1, so the rule is
The standard deviation is . Biases start at zero. Xavier's rule has instead, which is off by exactly the factor of 2 that ReLU removes.
Starting-weight rule for the backward pass
Gradients flow backward through the transposed filters. Writing for the number of outputs that touch one gradient element, with the number of filters, the same argument gives
The two rules differ only in versus . The paper notes that either one is enough to keep the signal from exploding or vanishing, because if the forward pass is scaled correctly, the backward pass is too in most architectures. For the ImageNet experiments the authors used the backward version, Eq. (14) in the paper.
Generalizing to PReLU
If the starting value of the PReLU slope is , the ReLU factor becomes :
When this is the ReLU rule. When the unit is linear and the rule reduces to Xavier's.
Checking the scale on a real model
The paper checks the rule against the VGG team's model B, which has 10 convolutional layers with filters. The filter counts are 64, 128, 256 and 512 across four groups of layers. With , the rule gives standard deviations of about 0.059, 0.042, 0.029 and 0.021. A fixed standard deviation of 0.01 is much too small for the deeper groups. The paper estimates that the gradient reaching conv2 is then smaller than the derived value by a factor of about . That is consistent with the diminishing gradients seen in the VGG experiments.
Results
PReLU on a small network
The first experiment uses a 14-layer model, model E of the authors' earlier constrained-cost paper. The baseline uses ReLU and reaches 33.82% top-1 and 13.34% top-5 error on ImageNet 2012, with 10-view testing. Replacing every ReLU with a PReLU and training from scratch gives the following.
| Activation | top-1 error | top-5 error |
|---|---|---|
| ReLU | 33.82 | 13.34 |
| PReLU, channel-shared | 32.71 | 12.87 |
| PReLU, channel-wise | 32.64 | 12.75 |
The channel-shared version adds only 13 parameters to the whole network, and it still gains 1.1 points of top-1 error (the channel-wise version gains 1.18, which the paper rounds to 1.2). The paper reads this as evidence that learning the shape of the activation matters even when the number of parameters is small.
The learned slopes are informative. In the channel-wise version the first convolution layer ends with slopes of about 0.6 to 0.7. The authors read this as the filters, which look like edge and texture detectors, keeping both the positive and negative responses. The slopes in deeper layers are generally smaller, which suggests that the network becomes more nonlinear as depth increases.
PReLU on a large network
On the 19-layer model A, the paper reports the following ImageNet 2012 validation results with dense testing over multiple scales.
| Model A | top-1 error | top-5 error |
|---|---|---|
| ReLU, multi-scale | 24.02 | 6.51 |
| PReLU, multi-scale | 22.97 | 6.28 |
PReLU lowers top-1 error by 1.05 points and top-5 error by 0.23 points, at almost no extra computational cost.
Initialization on deep networks
Training a 22-layer model with the new initialization and with Xavier's both converges, but the new initialization starts reducing error earlier. On the 14-layer ReLU model the accuracies are close: 33.82/13.34 for the new rule and 33.90/13.44 for Xavier.
The difference appears with depth. The paper builds a 30-layer model, 27 convolutional and 3 fully connected layers, by adding up to sixteen 256-filter convolutions to the 14-layer model. Xavier's initialization stalls completely and the gradients diminish. The new initialization converges. The 30-layer model reaches 38.56% top-1 and 16.59% top-5 error, which is worse than the 14-layer model. The authors say this is not a fault of the initialization. They suspect that depth alone does not help on ImageNet, or that the task is not complex enough to reward it.
Single models and the ensemble
Single models are tested with multi-scale and multi-view or dense testing. The baseline model A with ReLU reaches 6.51% top-5 error. The best single model, model C with PReLU, reaches 5.71% top-5 error (24.27% top-1 and 7.38% top-5 with plain 10-view testing, against 9.33% top-5 for VGG-16 under the same test), which the authors state is better than all the earlier multi-model results. Model C is a wider version of model B, with about 2.3 times the computational cost. The authors chose width over depth because they observed that very deep models degraded in early training.
The final result is an ensemble of six models, evaluated by the ILSVRC test server because the test labels are not published. It reaches 4.94% top-5 error. The 2014 winner GoogLeNet had 6.66%, so the result is about 26% relative better. The authors also compare it with a later Baidu result at 5.98%.
Comparison with humans
Russakovsky et al. reported a human top-5 error of 5.1% on ImageNet. That figure comes from a single annotator who was trained on the validation images and given a special test interface, on a random subset of 1500 test images. The authors say their 4.94% is the first published result on this challenge to beat that figure. They are careful about what it means. The errors humans make are mostly fine-grained classes such as dog breeds, and the network does well there, but the network still makes mistakes that are easy for humans, especially ones that need context. The paper does not claim that machines see better than humans in general.
Error analysis
The per-class breakdown is also useful. The ensemble has zero top-5 error on 113 classes. The hardest three are "letter opener" at 49%, "spotlight" at 38% and "restaurant" at 36%, mostly because of multiple objects, small objects, or large variation within a class. Compared with the authors' own 2014 entry at 8.06% average top-5 error, the error fell in 824 classes, stayed the same in 127, and rose in 49.
Why it mattered
PReLU is a small change to an activation function, and it became a standard option. Its main lesson is that a few learned parameters, placed in the right spot, can improve accuracy with almost no cost. Most later activations take this further by making the nonlinearity itself adaptive or by changing its shape.
The initialization rule had a larger and more lasting effect. It became the default starting scale for ReLU networks in the major frameworks, and the factor of 2 is now the rule most practitioners use without thinking about it. The paper also showed that the choice of initialization can decide whether a deep network trains at all, which shaped how later architectures were designed.
The paper left one problem open. A 30-layer plain network trained, but it did not do better than a shallower one. The authors said the initialization "paves a foundation" for studying depth and hoped it would help on harder tasks. A later paper by the same first author, on residual networks, addressed exactly that problem by adding identity shortcut connections so that extra layers do not have to learn anything to be harmless. See residual connections for the idea.
Reading guide
Read the paper in this order and use these lessons as the prerequisites for each part.
- Section 1, Introduction. Needs Convolutional Neural Network, Activation Function and Rectified Linear Unit (ReLU). The only vocabulary is the rectifier and the overfitting trade-off.
- Section 2.1, Parametric Rectifiers. Needs Parametric ReLU (PReLU), Backpropagation for the chain rule that gives the slope gradient, Stochastic Gradient Descent, and Momentum for the update rule on .
- Section 2.2, Forward propagation case. Needs Mean and Variance and Gaussian (Normal) Distribution for the variance argument and for the Gaussian initialization. The idea is in He (Kaiming) Initialization.
- Section 2.2, Backward propagation case. Same prerequisites, plus Vanishing Gradient Problem, because this is the reason the backward factor matters.
- Section 2.2, Comparisons with Xavier. Needs Xavier (Glorot) Initialization, which is the baseline the paper is correcting.
- Section 2.3 and Section 3. Needs Convolutional Neural Network, Dropout (the 50 percent dropout in the first two fully connected layers) and Stochastic Gradient Descent for the training schedule.
- Section 4, Experiments. Only the error metrics are needed. Top-5 error is the fraction of test images whose correct label is not among the five highest-scoring predictions.
Check yourself
QuestionWhat is the negative-side slope of a PReLU when a is 0, when a is 0.01, and when a is 1?Show answer
When it is a ReLU, which sets all negative inputs to zero. When it is a leaky ReLU with a small fixed slope. When it is the identity on the negative side, so the unit is linear.
QuestionA convolution layer has 3 by 3 filters and 256 input channels. Using the forward-pass rule with , what standard deviation should its weights start with?Show answer
The number of inputs is . The rule gives a standard deviation of . Xavier's rule would give .
QuestionIf the PReLU slope starts at a = 0.25, what variance should the weights start with, compared with the ReLU rule of 2 over n?Show answer
The generalized rule is . With , , so . That is slightly smaller than the ReLU value of , because the PReLU passes a little signal through its negative side.
QuestionWhy does the paper not apply weight decay to the PReLU slopes, and why is that a sensible choice?Show answer
Weight decay pulls each parameter toward zero. For a slope, zero means a ReLU, so weight decay would push every PReLU back toward the ReLU it was meant to generalize. Leaving the slopes unregularized lets the data decide the shape of each activation. The paper reports that the learned values rarely exceed 1 in magnitude even without regularization.
QuestionXavier's initialization stalled on the 30-layer model while the new rule trained. Using the paper's argument, roughly how much does a ReLU-only network under Xavier shrink the signal over 30 layers?Show answer
Each ReLU layer roughly halves the variance that Xavier's derivation assumed it would keep. The paper puts it as Xavier's weight standard deviation being of the derived one, so over layers the signal is scaled by about . The signal and its gradients fade to almost nothing, so the deep network cannot learn. The new rule cancels the factor of 1/2 at each layer, so the scale stays roughly constant. Note that the same paper found Xavier still converged for models up to 22 layers (a factor of ), only more slowly at the start, so this estimate is an order-of-magnitude argument rather than a sharp threshold.
Sources
- He, Zhang, Ren and Sun, Delving Deep into Rectifiers, 2015: arxiv.org/abs/1502.01852
- Russakovsky et al., ImageNet Large Scale Visual Recognition Challenge, 2014: arxiv.org/abs/1409.0575
- Rectifier (neural networks), Wikipedia: en.wikipedia.org/wiki/Rectifier_(neural_networks)