## 4 Experiments and Results
### Quantitative Performance Evaluation of the Framework
#### 4.1.2 Congestion Prediction  
Evaluation Metrics  
To measure the accuracy of congestion prediction, the mean squared error (MSE) between the node feature matrix of the predicted graph sequence and of the true sequence is used as an evaluation metric of prediction accuracy. The MSE loss measures the difference between the predicted node feature matrices \(\hat{X}(T_{obs}+1),\ldots,\hat{X}\Big{(}T_{pred}\Big{)}\) and the true node feature matrices \(X(T_{obs}+1),\ldots,\ X\Big{(}T_{pred}\Big{)}\). Denoting each element of a matrix \(X(t)\) as \(x_{it}\) and \(\hat{X}(t)\) as \(\hat{x}_{it}\), the MSE is computed as  
\[\text{MSE}=\frac{1}{NT}\sum_{i=1}^{N}\sum_{t=1}^{T_{pred}}(x_{it}-\hat{x}_{it} )^{2} \tag{13}\]  
MSE, with the squared error, places more penalization on larger errors, and could therefore be more susceptible to outliers. As a result, another metric reported to evaluate model performance is the mean absolute error (MAE), which measures the average of magnitude difference between the prediction and the true node feature matrices:  
\[\text{MAE}=\frac{1}{NT}\sum_{i=1}^{N}\sum_{t=1}^{T_{pred}}|x_{it}-\hat{x}_{it}| \tag{14}\]  
Implementation Details  
Unlike the trajectory generation experiments in the preceding section, the experimented models are trained from scratch (rather than pre-trained on a different dataset). The GCN-GRU model uses a 3-layer GCN to learn the spatial representations, and a 2-layer GRU to learn the temporal representations. The node features chosen are the aggregated crowd count and timestamp for each egress region, rendering a node feature length of \(D=2\). The embedding dimension of the GCN encoder is \(H_{GCN}=128\). The embedding dimension of the GRU is \(H_{GRU}=64\). We use \(T_{obs}=20\) and \(T_{pred}=20\) in the study and split the CMGraph sequences from the GCS dataset into train and test sets following a 70/30 ratio. The graph data is batched into mini-batches of size 32 for training. The Adam optimizer with a learning rate of 0.001 is used to train the GCN-GRU model as well as each baseline model for at most 40 epochs. The loss function used is MSE loss, as detailed in Equation (13). The training and inference were conducted on the same computer, equipped with an Intel Core i7-7820X processor and an NVIDIA GeForce GTX 1080 Ti GPU. The code repository is publicly available at [46]. \begin{table}
\begin{tabular}{c c c c c c} \hline \hline
**Detector** & **Tracker** & **MOTA** & **MODA** & **Recall** & **Precision** \\ \hline YOLOv7-tiny & DeepSORT & **73.7** & **81.2** & **86.2** & **94.6** \\ Faster R-CNN & DeepSORT & 64.2 & 71.3 & 82.2 & 88.2 \\ \hline \hline \end{tabular}
\end{table} 
Table 2: CLEAR MOT metrics of YOLOv7-tiny and Faster-RCNN detectors with the DeepSORT tracker. We compare our experimental results with two baseline models: T-GCN [40] and A3T-GCN [38], which are GCN-based models previously only applied to highway vehicle flow prediction. These two baseline models are selected based on two criteria: (1) The models are among state-of-the-art graph-based traffic forecasting models. In particular, A3T-GCN is the best-performing model with the task of road taxi traffic speed [47], and (2) The models are open-sourced and therefore can be tested on the dataset of this experiment. The results are tabulated in Table 3. It can be observed from the table that the GCN-GRU model presented in this paper outperforms the baseline models in both MSE and MAE scores, indicating that the GCN-GRU model can well learn the crowd dynamics and forecast crowd flows. Additionally, a sequence of predicted crowd flow is plotted in Figure 7, where it is shown that the baseline models tend to over-smoothen predictions, which may be the underlying reason why GCN-GRU outperforms in forecasting accuracy.