Hyperparameter Tuning of Artificial Neural Network-Based Machine Learning to Optimize Number of Hidden Layers and Neurons in Metal Forming
Ebrahim Seidi, Farnaz Kaviari, Scott F. Miller
Cold rolling is widely recognized as a key industrial process for enhancing the mechanical properties of materials, particularly hardness, through strain hardening. Despite its importance, accurately predicting the final hardness remains a challenge due to the inherently nonlinear nature of the deformation. While several studies have employed artificial neural networks to predict mechanical properties, architectural parameters still need to be investigated to understand their effects on network behavior and model performance, ultimately supporting the design of more effective architectures. This study investigates hyperparameter tuning in artificial neural networks trained using Resilient Backpropagation by evaluating the impact of varying number of hidden layers and neurons on the prediction accuracy of hardness in 70-30 brass specimens subjected to cold rolling. A dataset of 1000 input–output pairs, containing dimensional and hardness measurements from multiple rolling passes, was used to train and evaluate 819 artificial neural network architectures, each with a different configuration of 1 to 3 hidden layers and 4 to 12 neurons per layer. Each configuration was tested over 50 runs to reduce the influence of randomness and enhance result consistency. Enhancing the network depth from one to two hidden layers improved predictive performance. Architectures with two hidden layers achieved better performance metrics, faster convergence, and lower variation than single-layer networks. Introducing a third hidden layer did not yield meaningful improvements over two-hidden-layer architectures in terms of performance metrics. While the top three-layer model converged in fewer epochs, it required more computational time due to increased model complexity and weight elements.