# Deep Learning using Rectified Linear Units (ReLU)

Sigmoid activations stop deep networks learning while ReLU and Tanh keep training

Abien Fred Agarap · arXiv · 2018-3-22

- **Problem** Sigmoid activations shrink gradients in deep convolutional networks, so early layers stop learning. Researchers had not compared ReLU, Tanh and Sigmoid under identical settings across several tasks.
- **Method** The authors keep each model and training recipe fixed and change only the hidden-layer activation among ReLU, Tanh and Sigmoid. Each setting runs 10 times with different random seeds.
- **Results** On MNIST, Sigmoid scored 11.35 compared to 99.22 for ReLU. Tanh and ReLU stay close on most datasets, with the ranking changing from one dataset to the next.

## Why saturating activations stall learning

A network learns by passing errors from the output layer back through its layers, and each layer's update depends on the gradient it receives. The authors trace part of the early failure of deep networks to activations with a small output range, together with network depth. With a logistic activation, the gradient keeps shrinking until the network effectively stops learning, a failure called the vanishing gradient problem.

The Sigmoid derivative peaks at 0.25, so every backpropagated gradient gets multiplied by fractions.

In a deep convolutional stack, those fractions compound, and the first layers end up with almost no usable error signal. The study therefore asks whether the choice of activation can change whether such classifiers learn at all. A second question concerns credit: which earlier work introduced ReLU into hidden layers, and that question sets up the next section.

## Who introduced ReLU into hidden layers

The authors trace the piecewise linear idea back to early biological network models and to visual feature extraction work. Later work on dynamical networks gave these functions a stronger biological motivation. The authors credit Nair and Hinton (2010) with bringing ReLU into modern deep learning, because they argued it eases optimization and keeps relative intensity across layers.

A later study is credited with showing that ReLU prevents vanishing gradients in deep feedforward networks.

The authors say the 2018 version of this paper was often cited as the origin of ReLU, and they call this a mis-citation. That version put ReLU at the classification layer in place of Softmax, so it never made ReLU a hidden-layer activation. So the authors reassign the hidden-layer credit to Nair and Hinton and repeat the correction in the conclusion.

## One fixed protocol, three activations

The key idea is to hold the model family and training recipe fixed for each task and change only the hidden-layer activation among ReLU, Tanh and Sigmoid. Each task gets a generic architecture, so a gap between activations can be read as an activation effect rather than a design choice. Image classification uses an Image CNN, a VGG-style stack of 3×3 convolutions with max-pooling and a 256-unit linear layer before the output.

Text classification uses a TextCNN with a Conv1D layer of 128 outputs, and reconstruction uses a convolutional autoencoder with a 1024-unit latent space.

Each configuration was run 10 times with different random seeds for initialization and data shuffling. Image classifiers used SGD with a maximum learning rate of 1e−1, while the text and reconstruction models used AdamW with maxima of 0.01 and 0.003. All runs followed the OneCycle schedule with bfloat16 mixed precision, and the CIFAR images received random crops and horizontal flips during training.

The data split gave 50% to training and 5% to validation, and a withheld test set produced the final scores. Classification scores are reported as means and standard deviations over the 10 runs, and a Kruskal-Wallis H test at alpha 0.05 checks whether the activations differ.

## Image classification: Sigmoid never learns

On all four image datasets the Sigmoid runs failed to converge, as the loss curves show. Their final accuracies sit at chance, roughly 10% on the 10-class sets and 1% on CIFAR100. On MNIST the table scores Sigmoid at 11.35, compared to 99.22 for ReLU. This matches the earlier account: the fractional gradients decay, so the first layers never receive a useful update.

ReLU and Tanh both trained on all four datasets, and on FashionMNIST and CIFAR10 they land close together. On CIFAR10 ReLU scored 79.72 and Tanh 79.60, while on FashionMNIST Tanh scored 91.37 compared to 91.35 for ReLU. The ordering flips on CIFAR100, where Tanh scored 48.53 compared to 41.91 for ReLU. The authors read the activation differences as significant at alpha 0.05 on all four datasets, with p-values between 1.52e-06 and 4.01e-05.

So the gap to Sigmoid is large everywhere, while the ReLU and Tanh gap changes sign from one dataset to the next.

## Text classification and early overfitting

On IMDB the pattern changes, since Sigmoid and Tanh also drove the training loss down alongside ReLU. The authors credit the shallower TextCNN, which has fewer layers between the embedding and the output, so fewer fractional gradient products build up. ReLU scored 83.33%, compared to 79.90 for Sigmoid and 78.74 for Tanh. The Kruskal-Wallis H test gave a p-value of 4.60e-06 for this comparison.

The average loss curves show validation loss bottoming out around epoch 3 for all three activations. After that, validation loss rises while training loss keeps falling, and Tanh climbs most steeply. So the TextCNN memorizes the training set, and the authors suggest early stopping could lift every configuration, though the reported runs don't test it.

The authors also attribute ReLU's edge to its constant gradient on the positive side and to activation sparsity, and they did not measure these separately.

## Reconstruction: Tanh scores highest on PSNR

The autoencoder downsamples three times with stride 2 to a 4×4×64 map and a 1024-unit latent space. Reconstructions are scored with MSE, MAE and PSNR, where a higher PSNR means better fidelity. On MNIST, Tanh scored 33.19 dB, compared to 32.11 dB for ReLU. On CIFAR10 the gap is wider: Tanh scored 29.64 dB, compared to 25.42 dB for ReLU.

Sigmoid came last on both datasets, at 12.15 dB on MNIST and 22.31 dB on CIFAR10. The authors offer Tanh's zero-centred output as a partial reason, since it softens saturation a little. They present this as interpretation, not as a separately measured result. The error metrics don't all agree: Tanh's MAE on MNIST is 0.011207, above ReLU's 0.010673.

## Limitations

The abstract says ReLU had the highest mean accuracy on image classification, but Table 1 gives Tanh 48.53 on CIFAR100, compared to 41.91 for ReLU. Tanh also edges ReLU on FashionMNIST, 91.37 compared to 91.35, so the image ranking isn't uniform. So the claim that ReLU is the most robust and performant choice across domains goes further than the evidence, since Tanh led on PSNR too.

The IMDB comparison is a single TextCNN with a 15-epoch training cycle. Reconstruction covers only MNIST and CIFAR10, each with one generic autoencoder. The early-stopping idea for IMDB was not tested in the reported runs, so its effect on the ranking is unknown.

## Paper info

- **Authors**: Abien Fred Agarap
- **Venue**: arXiv · Preprint
- **First published**: 2018-3-22
- **Added**: 2026-11-12
- **Updated**: 2026-4-14
- **Version**: v3
- **arXiv**: 1803.08375
- **Category**: cs.NE · cs.CV · cs.LG · stat.ML
- **Original paper terms**: [CC BY-NC-SA 4.0](https://creativecommons.org/licenses/by-nc-sa/4.0/)
- **What we show**: Paper info and commentary

[Original paper ↗](https://arxiv.org/abs/1803.08375v3) · [PDF ↗](https://arxiv.org/pdf/1803.08375v3)

AI commentary is a separate explanation from the original paper and may contain errors. The original paper and figures follow each source's terms of use and any rights noted separately.

## Quote from the paper

Abien Fred Agarap (2018). Deep Learning using Rectified Linear Units (ReLU). arXiv:1803.08375v3. https://arxiv.org/abs/1803.08375v3

**BibTeX**

```
@misc{agarap2018deep,
  title = {{Deep Learning using Rectified Linear Units (ReLU)}},
  author = {Abien Fred Agarap},
  year = {2018},
  eprint = {1803.08375},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1803.08375v3}
}
```

## Other paper commentary

- [PointPillars: Fast Encoders for Object Detection from Point Clouds](https://refivu.com/en/papers/93807b29-2d87-4d5c-b316-3d54142077f5-pointpillars-fast-encoders-for-object-detection-from-point.md)
- [Instant Neural Graphics Primitives with a Multiresolution Hash Encoding](https://refivu.com/en/papers/b4180f7f-7d22-475c-8add-12309c2b51a3-instant-neural-graphics-primitives-with-a-multiresolution.md)
- [Medical Image Segmentation: Foundation Model Adaptation versus Task-Specific Training](https://refivu.com/en/papers/d5e6d956-8d45-41ee-a229-cfa12c77a62f-medical-image-segmentation-foundation-model-adaptation.md)
- [Semantic Image Segmentation with Deep Convolutional Nets and Fully Connected CRFs](https://refivu.com/en/papers/551829fd-0dd3-4274-8bd3-cb4438cd4b78-semantic-image-segmentation-with-deep-convolutional-nets-and.md)
- [VoxelNet: End-to-End Learning for Point Cloud Based 3D Object Detection](https://refivu.com/en/papers/96419e97-366d-4b0f-b7db-232e374f7e8c-voxelnet-end-to-end-learning-for-point-cloud.md)
- [The Kinetics Human Action Video Dataset](https://refivu.com/en/papers/a2b572fe-2c51-40af-87d9-956918d52119-the-kinetics-human-action-video-dataset.md)
- [Empirical Analysis of Predictive Algorithms for Collaborative Filtering](https://refivu.com/en/papers/bc628fe8-827d-4576-8126-05c09f333880-empirical-analysis-of-predictive-algorithms-for.md)
- [Spectral Networks and Locally Connected Networks on Graphs](https://refivu.com/en/papers/c8d7ac6f-ca53-43f2-b5f6-9ac71d5ca32d-spectral-networks-and-locally-connected-networks-on-graphs.md)
- [An Introduction to Convolutional Neural Networks](https://refivu.com/en/papers/6b236b8c-8750-484a-8c31-87433f51f2eb-an-introduction-to-convolutional-neural-networks.md)

## Terms in this paper

- [MNIST](https://refivu.com/en/terms/28b9bb66d1c6-mnist)
- [Stochastic Gradient Descent](https://refivu.com/en/terms/a49650824022-stochastic-gradient-descent)
- [ReLU](https://refivu.com/en/terms/7b22f5612f6c-relu)
- [mean squared error](https://refivu.com/en/terms/e8df98e6d7b7-mean-squared-error)
- [Mean Absolute Error](https://refivu.com/en/terms/2117321fb36f-mean-absolute-error)
- [Sigmoid](https://refivu.com/en/terms/9f3c5f7726af-sigmoid)
- [AdamW optimizer](https://refivu.com/en/terms/390ee6da73bf-adamw-optimizer)
- [vanishing gradient problem](https://refivu.com/en/terms/69def7dda930-vanishing-gradient-problem)
- [image reconstruction](https://refivu.com/en/terms/5e7ec373d1ec-image-reconstruction)
- [text classification](https://refivu.com/en/terms/6cc868aade44-text-classification)

---

AI-written text can contain mistakes. [Refivu](https://refivu.com/en/papers/4e034521-d72a-4a39-b21e-3bb07bebd837-deep-learning-using-rectified-linear-units-relu)
