###### Abstract  
Accurate water demand forecasting is crucial for optimizing the strategies across multiple water sources. This paper proposes the Ensemble Empirical Mode Decomposition Granger causality test Dynamic Graph Attention Transformer Network (EG-DGATN) for multi-sensor cross-temporal granularity water demand forecasting, which combines the Transformer and Graph Neural Networks. It employs the EEMD-Granger test to delineate the interconnections among sensors and extracts the spatiotemporal features within the causal domain by stacking dynamical graph spatiotemporal attention layers. The experimental results demonstrate that compared to baseline models, the EG-DGATN improves the MAPE metrics by 2.12%, 4.33%, and 6.32% in forecasting intervals of 15 min, 45 min, and 90 min, respectively. The model achieves an R2 score of 0.97, indicating outstanding predictive accuracy and exceptional explanatory power for the target variable. This research highlights significant potential applications in predictive tasks within smart water management systems. Granger causality test; graph neural networks; transformer; time series data; water demand forecasting +
Footnote †: journal:  
solve complex water demand forecasting [6]. While these methods can depict nonlinear relationships, their models rely on intricate feature engineering. Deep learning models exhibit greater versatility than machine learning models as they can autonomously learn the relationships between features. Consequently, more researchers are considering deep learning for water demand forecasting applications. [PERSON] et al. utilized the LSTM model for short-term urban water demand forecasting [7]. In contrast, [PERSON] et al. designed an ensemble model incorporating simple recurrent networks (SRNNs), LSTM, and gated recurrent unit networks (GRU), applied to water demand forecasting at 1 h and 24 h intervals [8]. These methods mainly focus on analyzing the temporal autocorrelation within individual series. This practice significantly diverges from the reality of multiple sensors contributing to complex multivariate time series in real water supply networks. Researchers have aggregated sensor data for synchronous prediction to align with practical water network scenarios. For instance, [PERSON] et al. combined two-dimensional convolution with Bi-LSTM models for synchronous forecasting across various sensor data over time and space, thereby improving the model accuracy [9]. However, this modeling approach relies on processed grid data, reducing the model's versatility. Due to the excellent performance of graphical convolutional neural networks (GCN) in handling tasks involving correlations among multiple sensors, researchers have applied them to water demand forecasting. For instance, [PERSON] et al. utilized the GraphWave network to effectively enhance the accuracy of short-term water demand forecasting in water supply networks by optimizing the topological features of objects and extracting spatiotemporal features [10]. These methods achieve spatial information aggregation using graph convolutional neural networks and still rely on RNN models stacking multiple predictions in time to attain multi-granularity prediction; this inevitably creates the problem of error stacking and gradient explosion. The Transformer model utilizes self-attention mechanisms to capture temporal relationships between different time steps, avoiding the error propagation issues associated with sequential processing. This has led to its widespread application in various scenarios of time series prediction tasks [11]. For instance, [PERSON] et al. applied the Transformer model to the field of traffic flow prediction, and the independence of location coding is utilized to improve long-time series prediction performance [12]. Combining the Transformer model with graph convolutional neural networks for spatiotemporal prediction has gradually become the focus of academic research. For example, [PERSON] et al.