ABSTRACT The growing reliance on fossil fuels for energy generation has raised concerns about their significant contribution to global warming and the associated risks of supply instability. Anaerobic Digestion (AD) within Wastewater Treatment Plants (WWTPs) offers a renewable alternative by producing biogas, while effective operational optimisation requires accurate forecasting of biogas yields under varying conditions. This study addresses this challenge by developing, tuning and evaluating five Deep Learning (DL) architectures for biogas production prediction: one‐dimensional Convolutional Neural Network (1D‐CNN), Long Short‐Term Memory (LSTM), Gated Recurrent Unit (GRU), Transformers and Residual Encoding. Among these, the GRU model demonstrated superior performance, achieving a Root Mean Square Error (RMSE) of 139.1 m 3 /day and a Mean Absolute Error (MAE) of 135.9 m 3 /day. The adaptability of the GRU model to different datasets was examined through Transfer Learning (TL), revealing a clear difference in performance depending on the TL approach used: the retrained model achieved a RMSE of 230.1 m 3 /day and a MAE of 229.9 m 3 /day, whereas the model without retraining exhibited higher errors of 358.7 and 358.8 m 3 /day, respectively. A key contribution of this work lies in its comprehensive Explainable Artificial Intelligence (XAI) analysis, which applied both ante hoc attention mechanisms and post hoc interpretability techniques such as SHAP and LIME. The XAI methods consistently identified biogas production, the study's target variable, as the most influential feature in the model's predictions. Among the remaining features, some changes were observed in their impact on model predictions. Moreover, the study highlighted how TL affects prediction performance and the stability and consistency of feature importance, thereby improving the transparency and trustworthiness of the forecasting models.
Oliveira et al. (Fri,) studied this question.