The denitrifying sulfur (S) conversion-associated enhanced biological phosphorus removal (DS-EBPR) process for treating saline wastewater is characterized by its unique microbial ecology that integrates carbon (C), nitrogen (N), phosphorus (P), and S biotransformation. However, operational instability arises due to the numerous parameters and intricates bacterial interactions. This study introduces a two-stage interpretable machine learning approach to predict S conversion-driven P removal efficiency and optimize DS-EBPR process. Stage one utilized the XGBoost regression model, achieving an