BioFilter-MoE: Multi-Task Mixture-of-Experts Transformer for Textile Wastewater Prediction and Treatment Recommendation

Main Article Content

Nusrat Yasmin Nadia
Habibor Rahman Rabby
Md Habibul Arif
Abdur Rahman Lindon
Hafiz Aziz Khan

Abstract

Textile dyeing effluents exhibit highly non-linear physicochemical dynamics that render conventional rule-based treatment optimization inadequate for real-time control. Existing data-driven approaches address effluent forecasting in isolation, neglecting the operational necessity of simultaneous treatment prescriptions. This study proposes BioFilter-MoE, a Multi-Task Tabular Transformer with Sparse Mixture-of-Experts (MoE) routing, trained jointly to predict multi-parameter effluent quality and recommend optimal biofilter media configurations from a single unified architecture. A Fourierbased numerical tokenization scheme encodes continuous thermodynamic variables alongside categorical media constraints into a shared embedding space, while sparse MoE layers dynamically route distinct influent states to specialized expert sub-networks, revealing chemically coherent specialization without post-hoc attribution. Dual Cross-Attention task heads support simultaneous regression and classification, with multi-task loss balanced via homoscedastic uncertainty weighting. Under five-fold cross-validation, BioFilter-MoE achieves BOD R² = 0.7914 ± 0.0225 and COD R² = 0.8081 ± 0.0205. On the held-out test set, it attains a Macro F1 of 0.9948 [0.9833, 1.000] and ROC-AUC of 0.9998 for biofilter media recommendation, compared to Macro F1 scores of 0.046 for both Random Forest and XGBoost. Ablation studies confirm that removing the Fourier tokenizer causes the largest single-component degradation, reducing mean R² from 0.655 to 0.597. BioFilter-MoE thus establishes a prescriptive decision-support framework for regulatory-compliant, real-time textile wastewater management with architecture-embedded interpretability.

Article Details

Section
Articles