ABSTRACT Spur dikes are pivotal elements in river training, serving to mitigate the dynamic alterations induced by river degradation and aggradation. Traditionally, scour prediction models have relied on regression techniques, but the advent of soft computing and machine learning has offered opportunities for enhanced accuracy. This study focuses on the development of hybrid machine-learning models, including eXtreme Gradient Boosting (XGBoost), random forest (RF), convolutional neural network–long short-term memory, and artificial neural network, optimized using genetic algorithms to predict both temporal scour depth variation and maximum scour depth around the initial spur dike in a series. The analysis reveals strong associations between scour depth and various parameters such as non-dimensional time, spacing, channel width, time-averaged velocity, and densimetric Froude number. The models are established through an iterative process involving four predictor combinations. Results demonstrate XGBoost as the top-performing model, consistently exhibiting superior performance with R2 of 0.99, root mean square error (RMSE) of 0.012, and mean absolute error of 0.008 during training, and R2 of 0.96, RMSE of 0.044, and Kling–Gupta efficiency of 0.98 during testing for predicting temporal scour depth. For non-dimensional maximum scour depth, it reached R2 of 0.99 and RMSE of 0.005 in training, with R2 > 0.91 across all combinations during testing. Although RF showcases commendable accuracy, it slightly lags in precision compared to XGBoost.