TL;DR
This paper investigates how the choice of activation function (specifically ReLU vs. Leaky-ReLU) and network architecture impacts the performance of supervised neural networks. They found that ReLU generally performs better with more parameters, while Leaky-ReLU can be beneficial in transfer learning scenarios. The study also introduces entropy as a metric to quantify information flow within shallow networks, linking it to nonlinearity and training dynamics.
What Problem Does This Paper Address?
Deep learning models owe their success to the composition of linear layers with nonlinear activation functions. While common activation functions like ReLU and its variants (e.g., Leaky-ReLU) are widely used and empirically improve accuracy, there's a lack of deep understanding regarding why and when specific nonlinearities are most effective. This paper aims to bridge this gap by systematically exploring the interplay between activation function nonlinearity, network architecture (depth, width, shape), and performance across various data domains. They also address the challenge of interpreting the internal workings of neural networks, particularly shallow ones, by proposing entropy as a measure of information flow.
Methods
The authors employ a systematic experimental approach to evaluate the performance of neural networks under different conditions. Key methods include:
- Varying Activation Functions: Comparing Rectified Linear Unit (ReLU) with Leaky-ReLU (L-ReLU), where L-ReLU introduces a tunable linearity factor ($\alpha$).
- Exploring Network Architectures: Testing five distinct network shapes (Figure 1) with varying depths and widths, and analyzing the impact of parameter count.
- Data Domain Analysis: Evaluating performance on diverse datasets, including continuous data and categorical image data (MNIST, Fashion-MNIST, EMNIST).
- Transfer Learning Evaluation: Investigating the role of activation functions in the classification layers of models that utilize pre-trained feature extractors.
- Entropy as an Information Flow Metric: Calculating the entropy of hidden layer outputs during training to quantify randomness and information flow. This is done by dividing layer outputs into 100 bins and computing the entropy of the resulting distribution.
- Performance Metrics: Primarily using maximum validation accuracy and validation loss.
Datasets
The study utilizes several publicly available datasets:
- MNIST: A dataset of handwritten digits.
- Fashion-MNIST: A dataset of clothing articles, serving as a more challenging alternative to MNIST.
- EMNIST-letters: A dataset of handwritten letters.
- Continuous Data: Simulated datasets with varying dimensions (8, 16, and 24 features) to represent regression tasks.
- Image Classification Datasets for Transfer Learning: FOOD-11, CIFAR-10, and Dog Breeds datasets were used in conjunction with pre-trained models.
Key Insights and Ideas
- Parameter Count is King (Mostly): For shallow neural networks, the number of trainable parameters appears to be a more significant factor for model accuracy than the specific network architecture shape, especially when using ReLU.
- ReLU Dominance with Scale: ReLU tends to be the preferred activation function when networks have a sufficient number of parameters. This suggests that with ample capacity, ReLU's simplicity and efficiency are advantageous.
- Leaky-ReLU's Niche in Transfer Learning: In image classification tasks employing transfer learning, Leaky-ReLU in the final fully connected layers can lead to improved accuracy compared to ReLU. This might be because it preserves more information from the pre-trained bottleneck features.
- Entropy as a Window into Information Flow: The entropy of hidden layer outputs can serve as a useful metric to visualize and quantify the information flow within shallow neural networks. It reflects the randomness and complexity of the learned representations.
- Nonlinearity and Entropy Correlation: Increasing the nonlinearity of L-ReLU (i.e., decreasing $\alpha$) generally leads to higher entropy in hidden layer outputs, indicating increased randomness and potentially more information being processed.
- Training Dynamics and Entropy: As a network trains, the entropy of its hidden layers typically decreases, reflecting the transition from a disordered initial state to a more ordered and stabilized function space.
Key Results
- For shallow networks trained on MNIST and Fashion-MNIST, Leaky-ReLU with a small $\alpha$ (closer to 0) improved accuracy when the number of parameters was small. As the number of parameters increased, ReLU became the better choice.
- In transfer learning scenarios for image classification, L-ReLU consistently outperformed ReLU in the classification layers across multiple datasets (FOOD-11, CIFAR-10, Dog Breeds).
- For continuous data, validation loss increased significantly with increasing $\alpha$ in L-ReLU, suggesting that strong nonlinearity (closer to ReLU) is often necessary for regression tasks, especially with more features. The loss could become unstable for $\alpha > 0.6$.
- For categorical image data, the dependence of validation loss on $\alpha$ was weaker, possibly due to the presence of a softmax activation in the final layer. ReLU was found to be most efficient when the number of classes in the dataset was large.
- The study showed that the entropy of hidden layers generally increases with increasing $\alpha$ (decreasing nonlinearity) in L-ReLU.
Limitations and Future Work
- Limited Architecture Exploration: While five shapes were explored, the study focused on shallow networks. Future work could investigate deeper architectures and more complex network designs.
- Entropy Interpretation: While entropy was shown to correlate with nonlinearity and training dynamics, a direct, strong relationship between entropy variations and overall model performance was not consistently observed. The authors suggest exploring other established metrics like Kullback–Leibler Divergence for a more comprehensive understanding of information flow.
- Hyperparameter Optimization: The study acknowledges the existence of Auto-ML tools for hyperparameter optimization and suggests that comparing their findings with results from such tools could provide further validation.
- Generalizability of Entropy: Further research could explore the applicability of entropy as an information flow metric in more complex deep learning models and diverse tasks.
Summary updated