A Hybrid Mechanistic–Machine Learning Framework for Refinery Wastewater Compliance Prediction and Seasonal Risk Assessment

Given the complex influent composition and variability in operating conditions, reliable predictive tools are essential for maintaining regulatory compliance in refinery wastewater treatment systems. This study developed a hybrid mechanistic–machine learning framework to estimate effluent chemical oxygen demand (COD) and facilitate refinery wastewater management. The framework was validated using 2,192 operational records obtained from a full-scale refinery effluent treatment plant in Kuwait between 2022 and 2024. The contribution of this framework lies not in introducing hybrid modeling as a general concept, but in integrating an auditable low-complexity mechanistic baseline, residual XGBoost learning, chronological independent validation, uncertainty assessment, SHAP-based operational interpretation, and seasonal compliance-risk analysis within a full-scale refinery wastewater application. The mechanistic component represented baseline biological degradation using hydraulic retention time and temperature adjustment, while XGBoost accounted for nonlinear residual variability using influent and operational factors. To prevent information leakage, final-effluent COD was excluded from all predictors and used only as the response variable. The standalone mechanistic model outperformed all standalone machine-learning models evaluated, indicating the value of incorporating physically meaningful treatment-process information for this dataset. The hybrid framework achieved the highest predictive performance on the independent test dataset, with R² = 0.894, RMSE = 3.00 mg/L, and MAE = 2.40 mg/L, representing a 50.8% reduction in RMSE relative to ANN, the strongest standalone machine-learning model. The model also demonstrated nonlinear operational responses linked to hydraulic stress, oxygen deficiency, clarifier instability, and increased organic loading. The proposed framework provides an accurate and interpretable approach for predicting refinery wastewater compliance and supporting operational decisions. The framework was developed and chronologically validated at a single refinery wastewater treatment facility; transfer to other facilities requires recalibration and independent external validation.

Authors

Institutions

Publication Details

Journal
Journal of Hazardous Materials Advances
Published
2026-12-01
DOI
https://doi.org/10.1016/j.hazadv.2026.101828
Primary Topic
Water Quality Monitoring and Analysis
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
NOV
article

A Hybrid Mechanistic–Machine Learning Framework for Refinery Wastewater Compliance Prediction and Seasonal Risk Assessment

Nayef Z. Al-Mutairi, Bader Jamal
Journal of Hazardous Materials Advances
Water Quality Monitoring and Analysis
article

A Hybrid Mechanistic–Machine Learning Framework for Refinery Wastewater Compliance Prediction and Seasonal Risk Assessment

Nayef Z. Al-Mutairi, Bader Jamal
article en

Abstract

Given the complex influent composition and variability in operating conditions, reliable predictive tools are essential for maintaining regulatory compliance in refinery wastewater treatment systems. This study developed a hybrid mechanistic–machine learning framework to estimate effluent chemical oxygen demand (COD) and facilitate refinery wastewater management. The framework was validated using 2,192 operational records obtained from a full-scale refinery effluent treatment plant in Kuwait between 2022 and 2024. The contribution of this framework lies not in introducing hybrid modeling as a general concept, but in integrating an auditable low-complexity mechanistic baseline, residual XGBoost learning, chronological independent validation, uncertainty assessment, SHAP-based operational interpretation, and seasonal compliance-risk analysis within a full-scale refinery wastewater application. The mechanistic component represented baseline biological degradation using hydraulic retention time and temperature adjustment, while XGBoost accounted for nonlinear residual variability using influent and operational factors. To prevent information leakage, final-effluent COD was excluded from all predictors and used only as the response variable. The standalone mechanistic model outperformed all standalone machine-learning models evaluated, indicating the value of incorporating physically meaningful treatment-process information for this dataset. The hybrid framework achieved the highest predictive performance on the independent test dataset, with R² = 0.894, RMSE = 3.00 mg/L, and MAE = 2.40 mg/L, representing a 50.8% reduction in RMSE relative to ANN, the strongest standalone machine-learning model. The model also demonstrated nonlinear operational responses linked to hydraulic stress, oxygen deficiency, clarifier instability, and increased organic loading. The proposed framework provides an accurate and interpretable approach for predicting refinery wastewater compliance and supporting operational decisions. The framework was developed and chronologically validated at a single refinery wastewater treatment facility; transfer to other facilities requires recalibration and independent external validation.

Journal of Hazardous Materials Advances
Kuwait Petroleum Corporation (Kuwait) (KW), Kuwait University (KW)
Water Quality Monitoring and Analysis
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.

Laika access coming soon