Soft Computing in Water Engineering

Soft Computing in Water Engineering

Estimating Riverine Nitrate Concentrations from Discharge History with Bidirectional LSTM and GWO/WOA-Optimized XGBoost: The Choptank River, Chesapeake Bay Watershed

Document Type : Original Article

Authors
1 Technology Expert, Isfahan University of Technology, Isfahan, Iran
2 Ph.D. Student in Knowledge and Information Science, University of Isfahan, Isfahan, Iran
10.22034/scwe.2026.603255.1016
Abstract
Nitrate export from agricultural watersheds is a major cause of eutrophication in the Chesapeake Bay, but nitrate is usually sampled only a few times per month. This study estimates nitrate-plus-nitrite concentrations of the Choptank River near Greensboro, Maryland (USGS 01491000), from daily discharge history and seasonality, using 606 samples collected between 1979 and 2011. A LOADEST-type regression, random forest (RF), extreme gradient boosting (XGBoost), a multilayer perceptron (MLP), a bidirectional long short-term memory network (BiLSTM) fed with 90-day discharge sequences, and two hybrid models in which XGBoost was tuned by the grey wolf optimizer (XGB-GWO) and the whale optimization algorithm (XGB-WOA) were trained on water years 1981–2002, validated on 2003–2006 and tested on 2007–2011. The jack-knife estimates of the Weighted Regressions on Time, Discharge and Season (WRTDS) model were used as an external reference. Concentrations increased significantly over the record (Mann–Kendall Z = 3.66), so the test period lay above most training values. Among the causal models, the BiLSTM performed best (R² = 0.785, RMSE = 0.267 mg N/L, NSE = 0.645), followed by MLP (NSE = 0.488) and the two hybrids (NSE ≈ 0.43). Metaheuristic tuning reduced the test RMSE of XGBoost by 16%. The LOADEST-type regression failed to extrapolate its quadratic time trend (NSE = -0.30), and all tree-based models underestimated the test concentrations by about 0.2–0.3 mg N/L. The WRTDS jack-knife estimates (NSE = 0.709) remained the most accurate, but they use samples from before and after each estimated day. Antecedent discharge at daily to annual scales was the main predictor, which is consistent with the dilution of groundwater-derived nitrate during high flows.
Keywords
Subjects