Abstract
Marine primary production is regulated by interacting environmental processes, making it challenging to distinguish biomass-associated variability from changes in production independent of phytoplankton biomass. We combined Random Forest models with SHAP-based explainable artificial intelligence in comparison with linear regression model to investigate the influence of environmental drivers on chlorophyll-a (Chl-a, used as a proxy of phytoplankton biomass) and primary production (PP) in a coastal marine ecosystem. The analysis was based on 2201 observations collected during 314 sampling campaigns between 1992 and 2018. Predictor variables included physical and chemical parameters and event time and sampling depth. Random Forest consistently outperformed linear regression, with the biomass-informed model explaining 58.8% of the variance in primary production (R2 = 0.588). SHAP analysis identified sampling depth, nitrate, and temperature as the strongest environmental correlates of chlorophyll-a, whereas Chl-a dominated PP predictions, followed by depth and photosynthetically active radiation (PAR). The predictive contribution of temperature declined markedly after chlorophyll-a was included (Temperature Mediation Index = 0.642), indicating that much of the temperature-associated predictive signal was shared with biomass variability. The mean absolute SHAP contribution of temperature decreased markedly after chlorophyll-a was included as a predictor of PP (Temperature Mediation Index, TMI = 0.642). This index quantifies the relative attenuation of temperature’s predictive importance between the two model configurations and does not constitute evidence of a causal mediation pathway through phytoplankton biomass. To distinguish the environmental drivers of total primary production from those associated with the component of production not explained by phytoplankton biomass we performed a decoupling analysis. Residuals from a chlorophyll-a-only predictive model were analysed using Random Forest regression and SHAP and identified depth and PAR as the dominant predictors of PP variability unexplained by Chl-a, potentially reflecting multiple sources of variation, including photoacclimation, phytoplankton community composition, unmeasured processes and environmental drivers, and observational error. Therefore, they should not be interpreted as a direct measure of biomass-specific photosynthetic efficiency. Our results demonstrate how explainable machine learning can disentangle complementary pathways linking environmental variability, phytoplankton biomass, and marine primary production while providing ecologically interpretable predictive models.