TL;DR
This paper introduces a practical and efficient implementation of Newton's method for training Convolutional Neural Networks (CNNs), addressing the limitations of standard Stochastic Gradient Descent (SGD) in terms of robustness. By detailing the necessary building blocks and providing a concise MATLAB implementation, the authors demonstrate that Newton's method can achieve competitive test accuracy for CNNs.
What Problem Does This Paper Address?
Deep learning models, particularly Convolutional Neural Networks (CNNs), are trained by solving complex, non-convex optimization problems. While Stochastic Gradient Descent (SGD) and its variants are the dominant optimization techniques, they can sometimes lack robustness. Newton's method, a second-order optimization technique, has shown promise for improving robustness in fully-connected neural networks. However, applying Newton's method to CNNs is significantly more complex due to the intricate operations involved. Existing research has largely overlooked this area, leaving a gap in understanding and implementing Newton's method for CNNs. This paper aims to bridge this gap by providing a comprehensive breakdown of the necessary components and a practical implementation.
Methods
The core contribution of this paper lies in the detailed derivation and implementation of the building blocks required for Newton's method applied to CNNs. This includes:
- Function, Gradient, and Jacobian Evaluation: The paper meticulously outlines how to compute these essential components for CNNs.
- Gauss-Newton Matrix-Vector Products: This is a crucial element for Hessian-free Newton methods, allowing for efficient computation without explicitly forming the Hessian matrix. The paper details how to compute these products for CNNs.
- MATLAB Implementation: A key outcome is a surprisingly concise MATLAB implementation (just a few hundred lines of code) that integrates these building blocks. This demonstrates the feasibility and practicality of the approach.
- Subsampled Hessian: To manage computational costs, the paper leverages subsampled Hessian techniques, where only a subset of the data is used for Hessian approximation.
- Mini-batching: For function and gradient evaluations, a mini-batch approach is adopted to reduce memory consumption, especially for large datasets.
Datasets
The paper uses the following publicly available datasets for experiments:
- MNIST: A benchmark dataset for handwritten digit recognition.
- SVHN (Street View House Numbers): A dataset of colored house numbers.
- CIFAR10: A dataset of colored images for classification.
- smallNORB: A dataset for 3D object recognition.
All datasets were pre-processed using min-max normalization and zero-centering.
Key Insights and Ideas
- Feasibility of Newton's Method for CNNs: The paper demonstrates that Newton's method, despite its complexity, is indeed implementable for CNNs and can yield competitive results.
- Importance of Building Blocks: The detailed breakdown of function, gradient, Jacobian, and Gauss-Newton matrix-vector products highlights their critical role not just for implementation but also for future research and development of Newton-based methods for CNNs.
- Concise Implementation: The availability of a short MATLAB implementation is a significant practical contribution, making the approach accessible to researchers.
- Robustness Advantage: While not extensively quantified in the provided text, the abstract and introduction suggest that Newton's method offers improved robustness compared to SGD, which is a crucial aspect for reliable deep learning models.
- Parameter Sensitivity: The preliminary comparison suggests Newton's method is less sensitive to parameter tuning than SGD, which can simplify the training process.
Key Results
- Competitive Test Accuracy: The subsampled Newton method achieved test accuracy comparable to SGD across various datasets and network architectures (3-layer and 5-layer CNNs). For instance, on MNIST with a 3-layer CNN, Newton achieved 99.28% accuracy compared to SG's 99.22%.
- Efficient Implementation: A MATLAB implementation requiring only a few hundred lines of code was developed.
- Slower but Not Significantly Slower: Preliminary timing comparisons indicated that Newton's method is slower per iteration than SG, but the difference is not significant. However, when considering the cross-validation required for SG's learning rate selection, the overall cost of SG might be higher.
Limitations and Future Work
- Computational Cost: While the paper focuses on implementation and demonstrates competitive accuracy, the computational cost of Newton's method, especially for large networks and datasets, remains a significant consideration. The paper discusses memory and computational costs in detail, highlighting that Jacobian evaluation and Gauss-Newton matrix-vector products are the main bottlenecks.
- RELU Non-Differentiability: The paper acknowledges that the RELU activation function is not twice differentiable, which is a requirement for standard Newton methods. They adopt a common workaround by assuming its derivative is 1 for positive inputs and 0 otherwise, leaving a differentiable approximation for future investigation.
- Timing Comparison: A thorough timing comparison between Newton and SG methods, especially considering the full training pipeline for SG (including hyperparameter tuning), is suggested as a future research issue.
- Further Enhancements: The authors believe their work provides a foundation for further enhancing Newton methods for CNNs.
Summary updated