Abstract
This study investigates the efficacy of hybrid artificial neural network (ANN) methods, incorporating metaheuristic algorithms such as particle swarm optimization (PSO), genetic algorithm (GA), gray wolf optimizer (GWO), Aquila optimizer (AO), Runge–Kutta (RUN), and the novel ANN-based Runge–Kutta with Aquila optimizer (LSTM-RUNAO). The key novelty of this research lies in the developing and applying the LSTM-RUNAO model, which combines Runge–Kutta and Aquila optimizer to enhance streamflow prediction accuracy. The models’ performance is compared against the conventional ANN method, analyzing monthly streamflow prediction across three data split scenarios (50–50%, 60–40%, and 75–25%). Results show that the LSTM-RUNAO model outperformed conventional ANN methods, achieving a 28.7% reduction in root mean square error (RMSE) and a 20.3% reduction in mean absolute error (MAE) compared to standard ANN models. In addition, the model yielded a Nash–Sutcliffe Efficiency (NSE) improvement of 12.4% and an R-squared value increase of 7.8%. The study advocates for the 75–25% train-test data splitting scenario for optimal performance in data-driven methodologies. Furthermore, it elucidates the nuanced influence of input variables on prediction accuracy, emphasizing the importance of thoughtful consideration during model development. In summary, this research contributes valuable insights and introduces an innovative hybrid model to enhance the reliability of streamflow prediction models for practical applications.
Similar content being viewed by others
Explore related subjects
Discover the latest articles, news and stories from top researchers in related subjects.Avoid common mistakes on your manuscript.
1 Introduction
Streamflow and river flow prediction have been widely employed in flood control projects, surface wetlands, and reservoir management, explaining drought prevention policies and water distribution. In the last decades, hydrologists and water managers have utilized distinct methodologies for streamflow prediction, such as numerical computation [45], stochastic models [36], physical rainfall–runoff approaches [34], and stage–discharge approaches [32]. Although distributed physical-based models (e.g., rainfall–runoff models) that properly describe hydrologic processes remain the majority of streamflow modeling, data-driven models can be beneficial when there is limited data on physical watershed processes but lengthy precipitation and streamflow time series. Nevertheless, in the last 2 decades, substantial research into new approaches for data-driven streamflow prediction has been spurred by the development of increasingly powerful machine learning (ML) algorithms and the tremendous rise in computational performance.
ML deals with studying and analyzing various methods (viz. artificial intelligence algorithms) that can automatically improve via training based on the data provided (herein streamflow, Q, precipitation, P, and temperature, T, data). In the field of hydrological modeling, several well-known ML approaches have been successfully employed artificial neural networks (ANNs) [14], neuro-fuzzy [22], support vector regression (SVR) [20], tree-based models [26], KNN-based models [33], and genetic programming (GP) [16].
Among the most commonly used ML models, neurocomputing, accordingly, ANNs have been demonstrated to be effective tools for simulating, predicting, and exploratory data analysis, particularly in complicated, nonlinear systems [55]. Several researchers have employed different types of ANN models, including the multi-layer perceptron neural networks (MLPNN) [47], generalized regression neural networks (GRNN) [24], radial basis function neural networks (RBFNN) [13], group method of data handling (GMDH) [23], extreme learning machine [48], recurrent neural networks (RNN) [9], wavelet neural network (WNN) [27], multivariate nonlinear autoregressive eXogenous (NARX) [17], long short-term memory (LSTM) [43], recurrent neural network (RNN) [7], and deep neural networks (DNN) [8] in the field of streamflow perdition.
Wu et al. [47] estimated stream and watershed runoff using MLPNN for multi-step flow prediction. According to the study, one-step predictions were more accurate than two-, three- and four-step predictions. The authors also determined that MLPNNs are useful for simulating watersheds and streams. Yaseen et al. [50] investigated and evaluated the potential of MLPNN and RBFNN models for daily streamflow forecasting, demonstrating that the RBNN model outperformed the MLPNN model. Alizadeh et al. [7] assessed several ML models, such as ANNs, SVR, RNN, and KNN, to predict monthly flow for two case studies. Regarding the correlation coefficient, the findings demonstrated that the KNN outperformed the other neural network configurations in the first case study, while the RBFNN model exceeded the others in the second case study. Shoaib et al. [43] conducted comprehensive research evaluating the performance of different wavelet-based neural networks (WNN) models, including MLPNN, GRNN, RBNN, MNN, and NFNN. According to the results, the WNN models outperformed their traditional equivalents. In another study, Hussain and Khan [20] investigated the performance of the MLP, SVR, and RF machine learning models for forecasting one-month ahead river flow. In general, it has been concluded that RF performed better than the other models, followed by the SVR and MLPNN. Ganesan et al. [14] applied DNN to monitor the river flow characteristics using river images from multispectral satellites. The study outcomes were used to develop digital elevation maps of river drainage features and guide disaster preparedness.
Excessive parameterization of ANNs (particularly in MLPNNs and DNNs) might result in overfitting models that are unfit for new data. Moreover, some reports demonstrate that traditional ANN models might face the drawback of getting trapped in local minima [12]. Most of these approaches have been developed to cope with the over-training problems in traditional ANNs dealing with highly nonlinear data. In addition, since the streamflow prediction consists of both base flow and peak flows, most traditional models fail to provide acceptable results for the peak flows. Due to these shortcomings of traditional stand-alone ANNs, other novel and upgraded types of ANNs have been introduced and applied for modeling sophisticated problems. One of the main novel ANN categories is integrative (hybrid) metaheuristic ANN models [42]. Briefly, metaheuristic algorithms are computational intelligence paradigms in artificial intelligence employed explicitly for complex problem-solving in optimization. Several studies have previously proved the potency and efficacy of using metaheuristic algorithms in ML models to produce more robust and accurate results [53].
In this regard, some researchers have found the beneficial traits of metaheuristic algorithms embedded with ANNs for streamflow and river flow modeling [5, 10, 15, 21, 37]. Zounemat-Kermani et al. [54] conducted thorough research to evaluate several types of integrative and stand-alone ANNs for forecasting daily flow in the Thames River in the United Kingdom. The results indicated that all neural network models acceptably forecasted the daily flow rate. It was reported that the integrative ML and ANN models embedded with the optimization algorithms such as particle swarm optimization (PSO) and genetic algorithm (GA) (e.g., MLPNN-PSO and MLPNN GA) provided more accurate results than the stand-alone ANN models such as MLPNN, RBFNN, GRNN, GMDH, Neuro-fuzzy, WNN, and DNN [2, 4, 6, 29, 30, 39, 41, 44, 52].
Feng and Niu [12] developed an integrative cooperation search algorithm (CSA) with ANN, namely CSA-ANN, to predict river flow time series. It was shown that the CSA-ANN acted better than the ANN,for instance, it made 11.10% and 5.42% improvements in the Nash–Sutcliffe efficiency and correlation coefficient values compared to the stand-alone ANN. Wee et al. [46] employed the bat algorithm (BA), a metaheuristic technique, to improve the weights and biases of the ANN model. The suggested hybrid model was verified in five distinct research areas. The first findings of the statistical testing demonstrated that the hybrid BA-ANN was superior to forecasting the streamflow in all five specified research regions. Zanial et al. [51] used a stand-alone ANN model and an integrative ANN model, namely the Cuckoo search method (CS-ANN), to forecast river flow behavior in Malaysia based on changing rainfall patterns. The statistical indices findings reveal that the proposed hybrid CS-ANN model outperformed the ANN model regarding R2 and RMSE values. The findings showed that the suggested model outperformed the stand-alone model in accurately estimating river flow.
Several metaheuristic search methods inspired by natural events of biological evolution and animal behaviors have been widely and successfully applied to optimize the computational parameters of the ANNs in hydrological phenomena. Several integrative ANN models have been developed and appraised in the present study. The stand-alone ANN model, which served as the study’s core model, was first constructed as a way of forecasting river flow using several input strategies (Q, T, and P) and a single output (Q at a time step ahead). In the next step, four integrative ANN models are developed to form ANN-AO (Aquila optimizer), ANN-GA (genetic algorithm), ANN-PSO (particle swarm optimization), and ANN-GWO (gray wolf optimizer). Comparing the results of these models will provide a valuable contribution to the application of conventional (ANN-GA, ANN-PSO, and ANN-GWO) and new integrative (ANN-AO) ML models in hydrology. In addition to the models above, an integrative advanced ML model, viz., ANN with Runge–Kutta improved by Aquila optimizer (ANN-RUNAO), was also developed to challenge the robustness and accuracy of the new hybrid model, which highlights the novelty of the research.
2 Case Study
The Jialing River Basin (JRB) of China is selected as a case study for the current study, as shown in Fig. 1. JRB is the second key largest tributary of the Yangtze River, and it is situated between 29° 18′ N–34° 33′ N and 102° 39′ E–109° 01′ E. The total catchment area of the JRB region is 144,122 km2 (accounting for 9% of the Yangtze basin area) with a 1345 km river span length. The JRB runs across three key provinces and one municipality, i.e., Shanxi, Gansu, Sichuan, and Chongqing. The region has a subtropical humid monsoon climate and has an uneven rainfall pattern throughout the year with an average annual rainfall of 873 mm (60–70% occurs from July to September) and an average annual temperature of 16–18 °C with a maximum temperature is 26.1 °C, and a minimum temperature is 4.4 °C [15, 40]. The upstream area of JRB is more mountainous and sloppy and, therefore, often faces floods. Therefore, robust, accurate estimation of river flows is crucial for this basin. Due to the narrow channel and fast movement of river flows, many key reservoirs have been constructed in this basin. Therefore, precise measurement of river flows is also essential for adequately scheduling these reservoirs. For this purpose, the main outlet of the JRB region, i.e., Beibei hydraulic station, is selected in this study.
For the JRB streamflow, forecasting, daily time series data of streamflow, precipitation, and temperature is obtained from the Hydrological Yearbooks of the People’s Republic of China for the duration of 2007 to 2015. For better visualization of different model’s performance, three splitting techniques are adopted, i.e., M1 (50 training and 50% testing), M2 (60 training and 40% testing), and M3 (75 training and 25% testing). A brief statistical summary of the utilized streamflow data is reported in Table 1.
3 Artificial Neural Network (ANN)
The structure of an artificial neural network (ANN) with the standard feed-forward architecture can be represented in Fig. 2. The ANN is composed of an ensemble of elements working in parallel, i.e., the neurons, similar to the biological neurons in nervous human systems. Generally speaking, any ANN structure comprises successive layers, starting with an input layer and an ensemble of hidden layers. Finally, the acquired information reaches the end of the process at the single neuron in the output layer. The available information for solving a nonlinear problem is collected in the input layer and used to generate a nonlinear correlation, referred to as a regression problem. The collected information in the input layer is sent to the hidden layer, and each neuron in the hidden layer computes the weighted sum of the inputs and adds a bias value. Before sending the collected information to the output layer, a sigmoidal transformation function is used. In brief, the connections between input neurons and hidden neurons are called weights “Wij”, and between hidden and output neurons are called “Wjk” (Fig. 2). These parameters are determined during the training process using the backpropagation training algorithm.
3.1 Artificial Neural Network-Optimized Genetic Algorithm (ANN-GA)
The Genetic Algorithm (GA) was proposed by Holland [18, 19], and this technique works by simulating the biological genetic evolution process. The GA comprises selection, reproduction, crossover, and mutation operators, and the GA is used to search the best ANN topology using an initial population randomly generated and searching through the spaces of the problem for the best possible solution. The GA uses a fitness function to determine the suitable individual in the population that can reproduce and survive. In the present study, the GA is employed to search the optimal values of the weights for the ANN model. This includes generating an initial population, coding the chromosomes, determining the length of chromosomes, defining the fitness function, and finally applying the process of selection, crossover and mutation operations [11]. Therefore, in ANN-GA, the model is optimized with GA instead of the well-known backpropagation algorithm. Thus, the weights and biases are optimized rather than randomly generated.
3.2 Artificial Neural Network Particle Swarm Optimization (ANN-PSO)
The particle swarm optimization (PSO) is an evolutionary social–psychological metaphor algorithm proposed by Kennedy and Eberhart [28], and it is mainly proposed for global optimization problems. The PSO uses an ensemble of particles that form a population. The PSO algorithm can be summarized as follows. Each particle “i” has three components, i.e., the position (xi), the velocity (vi), and the best possible position (pi). As a global position exists (pg), each individual moves toward its best solution and simultaneously in the direction of the global best position (pg); thus, the (pi) and (pg) are used for updating the position of each particle (Fig. 3). Consequently, we can argue that there is competition among the individuals of the population, and if someone among the members of the population discovers a good position, all other members move closer to it [29, 30, 49]:
In the above equations, L1, L2, M1, and M2 correspond to the acceleration constants and the uniform random values ranging from zero to one ([0, 1]). δ is the inertia weight factor, \(v_{i}^{t + 1}\) and \(x_{i}^{t + 1}\) are the velocity and position of the particle “i” at the iteration (t + 1). The overall PSO algorithm can be summarized as follows: (i) the population with position and velocity are randomly initialized, (ii) the fitness evaluation, (iii) update the velocity of each particle, (iv) the construction phase, during which the particle updates the position; and (v) finally stop the algorithm if the criterion is satisfied. The present study uses the PSO to train the ANN model, and optimize the weights, i.e., the “Wij” and “Wjk” as stated in Fig. 2. The PSO algorithm starts by randomly initializing weights' values, and the model's training starts. During training, the algorithm compares several fitness value, i.e., the mean squared error (MSE), to the global best solution, considered the optimum fitness values. We conclude by highlighting that, using the PSO algorithm, each neuron is represented by two components: the position and the velocity. The position is the neuron’s weight, while the velocity updates the weights during training [29, 30, 49].
3.3 ANN Optimized Using Gray Wolf Optimization Algorithm (ANN-GWO)
Mirjalili et al. [35] introduced the gray wolf optimization (GWO) algorithm. The idea of the GWO is based on simultaneously simulating the hierarchical relationship and the hunting activity of the gray wolves in nature. According to Mirjalili et al. [35], there are four types of wolves: alpha (α), beta (β), delta (δ) and omega (ω), and the algorithm is composed of four steps, namely the “hierarchy”, “tracking”, “encircling” and “attacking” process. The top of the hierarchy is occupied by the alpha, which is responsible for making the decisions regarding the course of the hunting operation, as its success will be key to the design of the survival of the wolves’ colony in the future. The second place is occupied by the beta, which receives the command from alpha and transmits orders to the following entity (i.e., the delta and omega) for execution; thus, sometimes, beta helps alpha make some critical decisions. The third place is occupied by delta, which dominates omega and reports to alpha and beta. Finally, omega is ranked the lowest among all wolves and plays the role of scapegoat. The GWO can be summarized as follows. The hunting process is triggered by encircling the prey, which can be formulated as follows [35]:
In the above equations, \(\overrightarrow {{X_{P} }}\) and \(\vec{X}\) are the current positions of the prey and the gray wolves, respectively, \(\vec{A}\) and \(\vec{C}\) are the coefficient vectors. The hunting can be formulated as follows:
As reported above, the performance of the ANN model depends on two kinds of parameters, i.e., the weights “Wij” and “Wjk”, in addition to the values of biases. The random initialization of the se parameters can cause low generalization performances. Therefore, the GWO is used for model parameters optimization using the means squared error as a cost function. For example, for an ANN model with six input variables, ten hidden neurons and one output neuron, the total number of parameters to be optimized can be calculated as follows:
Therefore, 81 optimization parameters are involved in the GWO optimization problem. The ANN training algorithm starts and the fitness value is then calculated. After each iteration, the fitness value is compared with the previous one, and if it is better, we proceed to update the candidates' positions. This optimization process will be continued until the maximal number of iterations is reached. The optimized parameters will be used as the final model.
3.4 ANN-Optimized Runge–Kutta Algorithm (ANN-RUN)
The Runge–Kutta Optimizer (RUN) is a relatively optimization algorithm proposed by Ahmadianfar et al. [3], and it is inspired from the idea of solving the ordinary differential equations of Kutta and Runge [38, 31]. According to Ahmadianfar et al. [3], RUN is composed of four parts including of “initialization step”, the “root of search mechanism”, the “updating solutions”, and the “enhanced solution quality”. During the first step of the algorithm, i.e., the initialization, and similar to the major optimization algorithms, an initial population “N” equal to the number of positions is created. It evolves in response to a fixed number of iterations. The initial position is created according to the following equation:
where rand is a random number in the range of [0, 1], \(U_{l}\) and \(L_{l}\) are the upper and lower bounds. During the second step, i.e., the “root of search mechanism” the first order RK, i.e., the RK4 is adopted for the search mechanism. During this second step, the four Kutta number designated as k1, k2, k3 and k4 are calculated using the equations expressed as follows:
In the above equations, a rand is a random number in the range of [0, 1], xb is the best position around xn, xw is the worst position around xn, the “u” is simply a random number introduced to promote the xb, Stp is the step size determined by the difference between xb and xavg (the average of all solution at each iteration), and γ is a scale factor. By introducing the so-called Δx, the k2, k3 and k4 can be expressed as follows:
where rand1 and rand2 are two random numbers in the range of [0, 1]. Finally, the leading search mechanism in RUN can be formulated as follows:
The third step is “updating solutions”. During this step, and at each iteration, there is a continuous update of the positions of individuals using the RK. The global “exploration” and local “exploitation” search can be formulated as follows:
The following equations can be formulated:
where μ and randn are the random numbers, φ is a random number in the range of [0, 1], xbest is the “best so far” solution and xlbest is the “best position” calculated sat each iteration, xr1, xr2, xr3 are the three random solutions. The SF can be formulated as follows:
where a and b are two constant numbers, i is the number of iterations, and Maxi is the maximum number of iterations. The two Eqs. 18 and 19 can be reformulated as follows:
where r is an integer number, which is “1” or “-1” and “g” is a random number in the range [0, 2].
The “enhanced solution quality” is the last step of the optimization algorithm. During this step, the “enhanced solution quality (ESQ)” is introduced to improve the “quality of solution”. Using the ESQ, the mean value of three random solutions “xavg” and the best position will be combined together for calculating a new solution called “xnew1”, thus a new solution “xnew2” is created as follows:
where “w”, “xavg” and “xnew1” can be calculated as follows:
Another solution can be proposed, i.e., the “xnew3” and formulated as follows:
where \(\rho\) is a random number with a value of 2 × rand. The flowchart of the RUN is presented in Fig. 4.
In the present study, the weights and biases of the ANN were optimized using RUN and by choosing the MSE as the cost function. The steps can be summarized as follows: selecting the number of hidden neurons and the number of input variables, selecting the activation function, and creating the initial population according to the total number of parameters, and the total number of iterations.
3.5 ANN-Optimized Runge–Kutta-Improved Aquila Optimizer (ANN-RUNAO)
Abualigah et al. [1] proposed the Aquila Optimizer (AO) algorithm. The AO algorithm was formulated by simulating Aquila’s hunting behavior. The AO algorithm was formulated and expressed by considering four different hunting methods as reported hereafter as X1, X2, X3 and X4. The X1 corresponds to the “high soar with a vertical stoop”, the X2 corresponds to the “contour flight with short glide attack”, the X3 corresponds to the “low flight with a slow descent attack”, and the X4 corresponds to the “walking and grab prey”. Similar to the well-known optimization algorithms, the AO uses the concepts of population of candidate solutions (X), and two limits are fixed, i.e., the upper “UB” and lower “LB” bounds. The population X can be expressed as follows:
In the above equation, X corresponds to an ensemble of probable solutions randomly generated using the equation expressed hereafter:
where “Xi” is a probable position for the ith probable solution, “N” the total number of individuals in the presented population, and “Dim” denotes the dimension of the problem to be resolved, rand is a random number, and rand is a random number.
During the first step, i.e., the “expanded exploration” or the “high soar with a vertical stoop”, the solution generated by the first search method can be expressed as follows:
where t and T are, respectively, the actual and the maximum number of iterations, X1(t + 1) corresponds to the solution after the iteration number “t”, the Xbest (t) corresponds to the “best” solution, the XM (t) is calculated as the mean value for the location of the actual solution, and the rand is ranged from 0 to 1:
The second possible hunting method is called “narrowed exploration” or the “contour flight with short glide attack”, calculated as follows:
where X2(t + 1) corresponds to the solution of the second method after the iteration number “t”, D is the dimension space, Levy (D) denotes the “levy flight distribution function”, XR(t) is ranged from 1 to N at the ith iteration. The Levy (D) can be calculated as follows:
In the above equations, β is equal to 1.5, U is equal to 0.00565, ω is equal to 0.005, r1 ranges from 1 to 20, D1 ranges from 1 to Dim.
During the third step, i.e., the “expanded exploitation” or the “low flight with a slow descent attack”, the X3 can be formulated as follows:
In the above equation, α and δ were fixed to 0.1.
The fourth and last method is the “Narrowed exploitation” or the “walking and grabing prey”, the X4 can be expressed as follows:
where the QF is the is calculated as follows:
The flowchart of the Aquila optimizer (AO) algorithm is presented in Fig. 5. The present study combined the AO algorithm with the RUN to optimize the ANN parameters. The proposed RUNAO is presented in Fig. 6 and starts by generating an ensemble of “N” individual’s “X”, which corresponds to the ANN parameters (i.e., the weights and biases). As the data are divided into training and testing set, the training part of the data is used for checking and updating the quality of each parameter, i.e., ach weight by selecting the mean squared error “MSE” as the fitness function, calculated between the measured and the predicted data. In addition, the value corresponding to the best weight, “Xbest” is updated; consequently, all other parameters were updated. The optimization procedure is repeated several times, which can lead to the adjustment of the position of particles and, therefore, the smallest fitness values can be obtained.
4 Models’ Assessments
The performance of standard ANN and hybrid ANN-PSO, ANN-GA, ANN-GWO, ANN-AO, ANN-RUN, ANN-RUNAO methods in streamflow prediction was evaluated using four different statistical methods and various visual graphic approaches such as violin and Taylor diagrams. The formulas for the used statistics are as follows:
where \(Q_{o}\) and \(Q_{c}\) refer to observed and computed streamflow, \(\overline{Q}_{o}\) and \(N\), respectively, are mean streamflow and data quantity.
5 Results and Discussion
5.1 Results
The viability of the hybrid ANN-RUNAO method was compared with hybrid ANN-PSO, ANN-GA, ANN-GWO, ANN-AO, ANN-RUN, ANN-RUNAO and standard ANN methods in streamflow prediction using different input scenarios of streamflow, precipitation and temperature. Three distinct data split cases (50–50%, 60–40% and 75–-25% train-test) were employed to observe the training data length on each method's model accuracy. Table 2 reports the train-test statistics of the standard ANN methods in streamflow prediction. First, previous discharge values were used as input combinations and then previous precipitation and temperature data were added. It is clear from Table 2 that the best accuracies of the ANN models belong to the input scenarios involving all three variables, Q, P and T which tell us that all these data are needed for better streamflow prediction. Among the different split scenarios, 75–25% provides the best accuracy in streamflow prediction with the lowest RMSE and MAE and the highest R2 and NSE in both training and testing stages. The increasing training data from 50 to 75%, respectively, improve the model accuracy by 23.7%, 20.6%, 12.3 and 17.5% concerning mean RMSE, MAE, R2and NSE in the testing stage. The best input combination consists of two lagged streamflow, three lagged precipitation and two lagged temperatures in all three data split cases. Even though the ANN model of the second split scenario (M2, 60–40%) has lower RMSE compared to the model of the third scenario, the MAE, R2 and NSE of the latter model are superior to the first model.
The accuracies of the hybrid ANN methods in streamflow prediction are summed up in Tables 3, 4, 5, 6, 7 and 8. Similar to the standard ANN method, the hybrid methods also provide the best accuracies in the 75–25% train-test split case and confirm that the increasing training data length improves the ANN-based models in streamflow prediction. Increasing training data from 50 to 75% increases the RMSE and MAE from 1517.7 m3/s and 642.9 m3/s to 1145.6 m3/s and 521.9 m3/s for ANN-PSO (Table 3), from 1503.8 m3/s and 654.1 m3/s to 1123.2 m3/s and 511.1 m3/s for ANN-GA (Table 4), from 1483.1 m3/s and 640.4 m3/s to 1069 m3/s and 503.7 m3/s for ANN-GWO (Table 5), from 1470.1 m3/s and 626.4 m3/s to 1056.4 m3/s and 501.4 m3/s for ANN-AO (Table 6), from 1460.1 m3/s and 622.4 m3/s to 1047.1 m3/s and 496.1 m3/s for ANN-RUN (Table 7) and from 1451.7 m3/s and 614.5 m3/s to 1034.7 m3/s and 489.6 m3/s for ANN-RUNAO (Table 8) in the testing stage.
According to the average statistics provided in tables (see Tables 2, 3, 4, 5, 6, 7, 8), the ANN-PSO model improves the prediction accuracy of single ANN by 1, 4.1, 0.4 and 4.3% concerning RMSE, MAE, R2 and NSE in the testing stage of 50–50% split case while the corresponding improvements are 1.2, 4.2, 0.4 and 0.9% for the 60–40% case and 2.2, 1.9, 1.4 and 1.6% for the 75–25% case, respectively. Using GA as a training algorithm in ANN, more improvements are obtained; increments in RMSE, MAE, R2 and NSE, respectively, are 1.9, 2.4, 2.4 and 5.9% for the 50–50% split case, 2.6, 7.8, 1.9 and 1% for the 60–40% and 4.1, 3.9, 1.8 and 0.7% for the 75–25% case in the testing stage. In the case of a 50–50% split scenario, the improvements in RMSE, MAE, R2 and NSE of the standard ANN model in predicting monthly streamflow are 3.3, 4.4, 3.2 and 6.3% by applying ANN-GWO, 4.1, 6.5, 5 and 8.4% using ANN-AO, 4.8, 7.1, 5.9 and 10.8% by employing ANN-RUN, 5.3, 8.3, 7.8 and 12.4% by utilizing ANN-RUNAO, respectively. The corresponding improvements in the test stage of the 60–40% split scenario separately are 3.3, 8.5, 2.8 and 3.3% for the ANN-GWO, 4.0, 9.4, 3.4 and 3.9% for the ANN-AO, 4.6, 10, 4.1 and 4.6% for the ANN-RUN and 6, 11.2, 4.4 and 4.9% for the ANN-RUNAO, whereas the RMSE, MAE, R2 and NSE of the standard ANN model were improved by 8.7, 5.3, 2.6, 2.8%; 9.8, 5.7, 3.1, 3.1%; 10.6, 6.7, 3.5, 3.6% and 11.6, 7.9, 5.5, 5.5% employing ANN-GWO, ANN-AO, ANN-RUN and ANN-RUNAO models.
It is clear from Tables 2, 3, 4, 5, 6, 7 and 8 that adding precipitation and temperature inputs improves the prediction accuracy of all models in all train-test split cases. Here, we will evaluate the best split case of 75–25%. By adding precipitation input, the accuracy of ANN is improved by 3.0, 3.3, 2.1 and 2.4% with respect to RMSE, MAE, R2 and NSE in the test stage, respectively, while the corresponding improvements are 3.8, 3, 1.5 and 1.6% for the ANN-PSO, 1.1, 3.5, 1.1 and 0.1% for the ANN-GA, 2.6, 2.4, 0.9 and 1% for the ANN-GWO, 1.1, 2.2, 0.9 and 0.8% for the ANN-AO, 0.9, 1.3, 1.0 and 0.9% for the ANN-RUN and 1.9, 2.2, 3.6 and 3.3% for the ANN-RUNAO models. It is clear from the outcomes of the models that temperature input is more effective in streamflow. By considering temperature input, the RMSE, MAE, R2 and NSE of ANN are improved in the test stage by 5.5, 7.1, 3.2 and 3.6% whereas the corresponding improvements are 5.6, 5.5, 2.1 and 2.2% for the ANN-PSO, 2.3, 5.6, 2.1 and 2.6% for the ANN-GA, 4.7, 3.8, 2.0 and 1.9% for the ANN-GWO, 3.9, 3.8, 2.4 and 2.1% for the ANN-AO, 4.7, 3.1, 2.7 and 2.6% for the ANN-RUN and 5.4, 4.4, 5.2 and 5.1% for the ANN-RUNAO models, respectively.
The results of the best ANN-based models are compared using scatterplots in Fig. 7. It is clear that the use of metaheuristic algorithms in ANN tuning improves its accuracy and the RUNAO is superior to the other alternatives in predicting monthly streamflow. The outcomes of the best models are further assessed in Figs. 8 and 9 based on Taylor and violin charts which are very useful in evaluating various statistics and distribution together. It is clear from the figures that the RUNAO has the lowest RMSE and the highest correlation and its standard deviation is closer to the observed one than that of other models.
5.2 Discussion
The ANN-RUNAO model exhibited the highest accuracy, particularly in the 75–25% train-test split scenario, reducing RMSE by 28.7% compared to standard ANN models. This improvement is likely due to the enhanced ability of the Aquila optimizer (AO) and Runge–Kutta method to overcome local minima traps, a common limitation in conventional ANN models [12]. Previous studies have also highlighted the benefit of hybrid metaheuristic approaches in optimizing ANN performance, particularly in hydrological modeling [55]. Our findings are consistent with this trend, further supporting the use of advanced algorithms in improving predictive accuracy.
Our results align with prior studies that have demonstrated the superiority of hybrid ANN models in hydrological predictions. For example, Zounemat-Kermani et al. [54] found that hybrid ANN models integrating PSO and GA significantly improved streamflow prediction. Similarly, our ANN-RUNAO model outperformed traditional ANN and other hybrid models, further validating the efficacy of combining AO and Runge–Kutta for this prediction task. This is a notable improvement, as previous research has often cited the difficulty of predicting peak flows accurately [7].
Integrating metaheuristic algorithms such as PSO, GA, GWO, and AO into ANN models significantly enhances predictive accuracy because these algorithms are particularly effective at navigating complex, high-dimensional search spaces [2]. Including the Runge–Kutta method further stabilizes the learning process, ensuring that the model is less prone to overfitting on the training data while maintaining high performance in the testing phase. This combination is especially critical in hydrological applications, where the data often exhibit nonlinear patterns that are difficult to capture with traditional methods.
The 75–25% train-test data split consistently yielded the best prediction accuracy in our study. This outcome can be attributed to a larger training dataset, allowing the model to better learn the underlying patterns in streamflow data, particularly for more complex, nonlinear systems. This result is in agreement with the findings of Kisi [25], who emphasized that increasing the size of the training dataset improves the robustness and generalizability of ANN-based models. In addition, a larger training dataset helps mitigate the impact of noise and outliers, leading to a more reliable model calibration.
While the ANN-RUNAO model demonstrated high accuracy in streamflow prediction, it should be noted that it was only tested in the Jialing River Basin. As such, its applicability to other basins with different hydrological characteristics still needs to be tested. Future research should explore the transferability of this model across various geographical regions and climatic conditions to ensure its robustness in diverse environments. In addition, while the metaheuristic algorithms used in this study significantly improved prediction accuracy, their computational cost remains relatively high. Optimizing these algorithms for real-time applications should be a focus of future work.
The results of this study have important practical implications for water resource management, particularly in regions prone to flooding. The superior accuracy of the ANN-RUNAO model in predicting streamflow, especially during peak flow events, makes it a valuable tool for flood forecasting and reservoir management. By improving the accuracy of flow predictions, decision-makers can better allocate resources and mitigate the impacts of extreme weather events, thereby enhancing the resilience of water infrastructure.
6 Conclusions and Recommendations
Integrating metaheuristic algorithms, including PSO, GA, GWO, AO, RUN, significantly enhances streamflow prediction accuracy when compared to the standard ANN method. Among the hybrid models, ANN-RUNAO demonstrated the highest accuracy, exhibiting superior performance in RMSE, MAE, R2, and NSE. The study confirms a positive relationship between an increased training dataset and improved model accuracy. Models consistently benefited from larger training sizes, enhancing predictive efficiency across different scenarios. The 75–25% train-test data splitting scenario consistently yielded the best accuracy in streamflow prediction, emphasizing the importance of a substantial dataset for accurate calibration in data-driven models. Despite the promising results, the study has certain limitations. First, the analysis was conducted using data from a single basin (Jialing River Basin), which may limit the generalizability of the findings to other basins or regions with different hydrological conditions. In addition, while the hybrid models showed superior performance, the computational cost associated with these metaheuristic algorithms can be substantial, particularly in the case of larger datasets or real-time applications. Furthermore, the selection of input variables, though carefully considered, might still impact the accuracy of the models if applied to more complex or dynamic systems where additional hydrological variables are relevant.
Future research should focus on testing the developed hybrid models in a broader range of geographical areas and under different climatic conditions to evaluate their robustness and transferability. Further studies could also explore optimizing computational efficiency through parallel computing or simplified versions of metaheuristic algorithms, to reduce the processing time while maintaining model accuracy. In addition, investigating the impact of including more diverse input variables (e.g., soil moisture and evaporation rates) could enhance the performance of these models in more complex hydrological environments. Finally, future work should consider real-time data assimilation and model updates to improve further these models' applicability for practical water resource management.
Data availability
Data will be made available on request.
References
Abualigah, L., Yousri, D., Abd Elaziz, M., Ewees, A.A., Al-Qaness, M.A., Gandomi, A.H.: Aquila optimizer: a novel meta-heuristic optimization algorithm. Comput. Ind. Eng. 157, 107250 (2021). https://doi.org/10.1016/j.cie.2021.107250
Ahmadi, F., Tohidi, M., Sadrianzade, M.: Streamflow prediction using a hybrid methodology based on variational mode decomposition (VMD) and machine learning approaches. Appl Water Sci 13(6), 135 (2023)
Ahmadianfar, I., Heidari, A.A., Gandomi, A.H., Chu, X., Chen, H.: RUN beyond the metaphor: an efficient optimization algorithm based on Runge Kutta method. Expert Syst. Appl. 181, 115079 (2021). https://doi.org/10.1016/j.eswa.2021.115079
Adnan, R.M., Liang, Z., Yuan, X., Kisi, O., Akhlaq, M., Li, B.: Comparison of LSSVR, M5RT, NF-GP, and NF-SC models for predictions of hourly wind speed and wind power based on cross-validation. Energies 12, 329 (2019). https://doi.org/10.3390/en12020329
Adnan, R.M., Liang, Z., Trajkovic, S., Zounemat-Kermani, M., Li, B., Kisi, O.: Daily streamflow prediction using optimally pruned extreme learning machine. J. Hydrol. 577, 123981 (2019). https://doi.org/10.1016/j.jhydrol.2019.123981
Adnan, R.M., Dai, H.-L., Ewees, A.A., Shiri, J., Kisi, O., Zounemat-Kermani, M.: Application of improved version of multi verse optimizer algorithm for modeling solar radiation. Energy Rep. 8, 12063–12080 (2022). https://doi.org/10.1016/j.egyr.2022.09.015
Alizadeh, Z., Yazdi, J., Kim, J.H., Al-Shamiri, A.K.: Assessment of machine learning techniques for monthly flow prediction. Water 10(11), 1676 (2018)
Aljahdali, S., Sheta, A., Turabieh, H.: River flow forecasting: a comparison between feedforward and layered recurrent neural network. In: Innovation in Information Systems and Technologies to Support Learning Research: Proceedings of EMENA-ISTL 2019, vol. 3, pp. 523–532. Springer (2020)
Chang, L.C., Chang, F.J., Chiang, Y.M.: A two-step-ahead recurrent neural network for stream-flow forecasting. Hydrol. Process. 18(1), 81–92 (2004)
Chau, K.W.: Use of meta-heuristic techniques in rainfall-runoff modelling. Water 9(3), 186 (2017)
Davoodi, S., Thanh, H.V., Wood, D.A., Mehrad, M., Rukavishnikov, V.S.: Combined machine-learning and optimization models for predicting carbon dioxide trapping indexes in deep geological formations. Appl. Soft Comput. 143, 110408 (2023). https://doi.org/10.1016/j.asoc.2023.110408
Feng, Z.K., Niu, W.J.: Hybrid artificial neural network and cooperation search algorithm for nonlinear river flow time series forecasting in humid and semi-humid regions. Knowl.-Based Syst. 211, 106580 (2021)
Fernando, D.A., Shamseldin, A.Y.: Investigation of internal functioning of the radial-basis-function neural network river flow forecasting models. J. Hydrol. Eng. 14(3), 286–292 (2009)
Ganesan, V., Talluru, T., Challapalli, M., Seelam, C.: Identifying river drainage characteristics by deep neural network. In: Smart Technologies in Data Science and Communication: Proceedings of SMART-DSC 2022, pp. 71–79. Singapore: Springer Nature Singapore (2023)
Guo, W., Jiao, X., Zhou, H., Zhu, Y., Wang, H.: Hydrologic regime alteration and influence factors in the Jialing River of the Yangtze River, China. Sci. Rep. 12(1), 11166 (2022)
Ghorbani, M.A., Khatibi, R., Mehr, A.D., Asadi, H.: Chaos-based multigene genetic programming: a new hybrid strategy for river flow forecasting. J. Hydrol. 562, 455–467 (2018)
Hayder, G., Iwan Solihin, M., Najwa, M.R.N.: Multi-step-ahead prediction of river flow using NARX neural networks and deep learning LSTM. H2Open J. 5(1), 43–60 (2022)
Holland, J.H.: Adaptation in Natural and Artificial Systems: An Introductory Analysis with Applications to Biology, Control, and Artificial Intelligence. MIT Press (1992)
Holland, J.H.: Adaptation in Natural and Artificial Systems. The University of Michigan Press, Ann Arbor (1975)
Hussain, D., Khan, A.A.: Machine learning techniques for monthly river flow forecasting of Hunza River, Pakistan. Earth Sci. Inf. 13, 939–949 (2020)
Karimi, S., Shiri, J., Kisi, O., Xu, T.: Forecasting daily streamflow values: assessing heuristic models. Hydrol. Res. 49(3), 658–669 (2018)
Keskin, M.E., Taylan, D., Terzi, O.: Adaptive neural-based fuzzy inference system (ANFIS) approach for modelling hydrological time series. Hydrol. Sci. J. 51(4), 588–598 (2006)
Khodakhah, H., Aghelpour, P., Hamedi, Z.: Comparing linear and non-linear data-driven approaches in monthly river flow prediction, based on the models SARIMA, LSSVM, ANFIS, and GMDH. Environ. Sci. Pollut. Res. 29(15), 21935–21954 (2022)
Kişi, Ö.: River flow forecasting and estimation using different artificial neural network techniques. Hydrol. Res. 39(1), 27–40 (2008)
Kisi, O.: Machine learning with metaheuristic algorithms for sustainable water resources management. Sustainability 13, 8596 (2021). https://doi.org/10.3390/su13158596
Kisi, O., Genc, O., Dinc, S., Zounemat-Kermani, M.: Daily pan evaporation modeling using chi-squared automatic interaction detector, neural networks, classification and regression tree. Comput. Electron. Agric. 122, 112–117 (2016)
Krishna, B., Satyaji, Y.R., Nayak, P.C.: Time series modeling of river flow using wavelet neural networks. J. Water Resour. Prot. 3, 50–59 (2011)
Kennedy, J., Eberhart, R.: Particle swarm optimization. In: Proceedings of ICNN'95-International Conference on Neural Networks, vol. 4, pp. 1942–1948. IEEE (1995). https://doi.org/10.1109/ICNN.1995.488968
Kumar, L., Pandey, M., Ahirwal, M.K.: Parallel global best-worst particle swarm optimization algorithm for solving optimization problems. Appl. Soft Comput. 142, 110329 (2023). https://doi.org/10.1016/j.asoc.2023.110329
Kumar, V., Kedam, N., Sharma, K.V., Mehta, D.J., Caloiero, T.: Advanced machine learning techniques to improve hydrological prediction: a comparative analysis of streamflow prediction models. Water 15(14), 2572 (2023)
Kutta, W.: Beitrag zur näherungsweisen Integration totaler Differentialgleichungen. Teubner (1901)
Le Coz, J.: A literature review of methods for estimating the uncertainty associated with stage-discharge relations. WMO Rep. PO6a, 21 (2012)
Lee, T., Ouarda, T.B., Yoon, S.: KNN-based local linear regression for the analysis and simulation of low flow extremes under climatic influence. Clim. Dyn. 49, 3493–3511 (2017)
Liu, Z., Todini, E.: Towards a comprehensive physically-based rainfall-runoff model. Hydrol. Earth Syst. Sci. 6(5), 859–881 (2002)
Mirjalili, S., Mirjalili, S.M., Lewis, A.: Grey wolf optimizer. Adv. Eng. Softw. 69, 46–61 (2014). https://doi.org/10.1016/j.advengsoft.2013.12.007
Musarat, M.A., Alaloul, W.S., Rabbani, M.B.A., Ali, M., Altaf, M., Fediuk, R., Vatin, N., Klyuev, S., Bukhari, H., Sadiq, A., Farooq, W.: Kabul river flow prediction using automated ARIMA forecasting: a machine learning approach. Sustainability 13(19), 10720 (2021)
Riahi-Madvar, H., Dehghani, M., Memarzadeh, R., Gharabaghi, B.: Short to long-term forecasting of river flows by heuristic optimization algorithms hybridized with ANFIS. Water Resour. Manag. 35, 1149–1166 (2021)
Runge, C.: Über die numerische Auflösung von Differentialgleichungen. Mathematische Annalen 46(2), 167–178 (1895)
Samantaray, S., Das, S.S., Sahoo, A., Satapathy, D.P.: Monthly runoff prediction at Baitarani river basin by support vector machine based on Salp swarm algorithm. Ain Shams Eng. J. 13(5), 101732 (2022)
Shao, Y., He, Y., Mu, X., Zhao, G., Gao, P., Sun, W.: Contributions of climate change and human activities to runoff and sediment discharge reductions in the Jialing River, a main tributary of the upper Yangtze River, China. Theor. Appl. Climatol. 145, 1437–1450 (2021)
Shi, J., Guo, J., Zheng, S.: Evaluation of hybrid forecasting approaches for wind speed and power generation time series. Renew. Sustain. Energy Rev. 16, 3471–3480 (2012)
Seo, Y., Kim, S., Singh, V.P.: Comparison of different heuristic and decomposition techniques for river stage modeling. Environ. Monit. Assess. 190, 1–22 (2018)
Shoaib, M., Shamseldin, A.Y., Khan, S., Khan, M.M., Khan, Z.M., Sultan, T., Melville, B.W.: A comparative study of various hybrid wavelet feedforward neural network models for runoff forecasting. Water Resour. Manag. 32, 83–103 (2018)
Tao, H., Abba, S.I., Al-Areeq, A.M., Tangang, F., Samantaray, S., Sahoo, A., Yaseen, Z.M.: Hybridized artificial intelligence models with nature-inspired algorithms for river flow modeling: A comprehensive review, assessment, and possible future research directions. Eng. Appl. Artif. Intell. 129, 107559 (2024)
Tritthart, M.: Three-dimensional numerical modelling of turbulent river flow using polyhedral finite volumes. Doctoral dissertation (2005)
Wee, W.J., Chong, K.L., Ahmed, A.N., Malek, M.B.A., Huang, Y.F., Sherif, M., Elshafie, A.: Application of augmented bat algorithm with artificial neural network in forecasting river inflow in Malaysia. Appl Water Sci 13(1), 30 (2023)
Wu, J.S., Han, J., Annambhotla, S., Bryant, S.: Artificial neural networks for forecasting watershed runoff and stream flows. J. Hydrol. Eng. 10(3), 216–222 (2005)
Yadav, B., Ch, S., Mathur, S., Adamowski, J.: Discharge forecasting using an online sequential extreme learning machine (OS-ELM) model: a case study in Neckar River, Germany. Measurement 92, 433–445 (2016)
Yang, X., Li, H., Huang, Y.: An adaptive dynamic multi-swarm particle swarm optimization with stagnation detection and spatial exclusion for solving continuous optimization problems. Eng. Appl. Artif. Intell. 123, 106215 (2023). https://doi.org/10.1016/j.engappai.2023.106215
Yaseen, Z.M., El-Shafie, A., Afan, H.A., Hameed, M., Mohtar, W.H.M.W., Hussain, A.: RBFNN versus FFNN for daily river flow forecasting at Johor River, Malaysia. Neural Computing and Applications 27, 1533–1542 (2016)
Zanial, W.N.C.W., Malek, M.B.A., Reba, M.N.M., Zaini, N., Ahmed, A.N., Sherif, M., Elshafie, A.: River flow prediction based on improved machine learning method: cuckoo search-artificial neural network. Appl Water Sci 13(1), 28 (2023)
Zhang, D., Peng, X., Pan, K., Liu, Y.: A novel wind speed forecasting based on hybrid decomposition and online sequential outlier robust extreme learning machine. Energy Convers. Manag. 180, 338–357 (2019)
Zounemat-Kermani, M., Kisi, O., Piri, J., Mahdavi-Meymand, A.: Assessment of artificial intelligence-based models and metaheuristic algorithms in modeling evaporation. J. Hydrol. Eng. 24(10), 04019033 (2019)
Zounemat-Kermani, M., Mahdavi-Meymand, A., Hinkelmann, R.: A comprehensive survey on conventional and modern neural networks: application to river flow forecasting. Earth Sci. Inf. 14, 893–911 (2021)
Zounemat-Kermani, M., Matta, E., Cominola, A., Xia, X., Zhang, Q., Liang, Q., Hinkelmann, R.: Neurocomputing in surface water hydrology and hydraulics: a review of two decades retrospective, current status and future prospects. J. Hydrol. 588, 125085 (2020)
Acknowledgements
This work was supported by the National Natural Science Foundation of China (52350410465), and the General Projects of Guangdong Natural Science Research Projects (2023A1515011520).
Funding
This research received no specific grant from any funding agency.
Author information
Authors and Affiliations
Contributions
Conceptualization: R.M.A., W.M., and O.K.; formal analysis: A.A.E.; validation: R.M.A., A.A.E., O.K.; supervision: O.K. and W.M.; writing—original draft: R.M.A., R.R.M., S.H., O.K., and M.Z.K.; visualization: R.M.A. and S.H.; investigation: R.M.A., and O.K. All authors have read and agreed to the published version of the manuscript.
Corresponding authors
Ethics declarations
Conflict of interest
The authors declare no conflict of interest.
Additional information
Publisher's Note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Rights and permissions
Open Access This article is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License, which permits any non-commercial use, sharing, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if you modified the licensed material. You do not have permission under this licence to share adapted material derived from this article or parts of it. The images or other third party material in this article are included in the article’s Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article’s Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
About this article
Cite this article
Adnan, R.M., Mo, W., Ewees, A.A. et al. Enhancing Streamflow Prediction Accuracy: A Comprehensive Analysis of Hybrid Neural Network Models with Runge–Kutta with Aquila Optimizer. Int J Comput Intell Syst 17, 293 (2024). https://doi.org/10.1007/s44196-024-00699-y
Received:
Accepted:
Published:
DOI: https://doi.org/10.1007/s44196-024-00699-y