KF-T-GCN: Knowledge-Driven Traffic Forecasting
- The paper introduces KF-T-GCN, a framework that integrates heterogeneous external knowledge (e.g., POI, weather) with spatial-temporal GCNs to enhance traffic prediction accuracy.
- It employs a KR-EAR module to learn structured entity and relation embeddings and a KF-Cell to adaptively fuse static and dynamic features with traffic data.
- Empirical results demonstrate that KF-T-GCN reduces RMSE and MAE compared to baselines, highlighting its improved robustness in urban traffic forecasting.
The Knowledge-Driven Spatial-Temporal Graph Convolutional Network (KF-T-GCN, also denoted KST-GCN) is a framework for traffic forecasting that systematically incorporates heterogeneous external knowledge—such as point-of-interest (POI) distributions, weather conditions, and time—into spatial-temporal graph neural networks. By fusing structured knowledge graph representations with standard spatial-temporal backbones (such as T-GCN or DCRNN), KF-T-GCN achieves improved predictive performance and robustness over conventional models that consider only traffic time series and road topology (Zhu et al., 2020).
1. Model Architecture and Data Representations
KF-T-GCN extends spatial-temporal graph convolutional networks by integrating a City Knowledge Graph (CKG) capturing both structural and attribute-dependent externalities. The inputs consist of the adjacency matrix for road sections, historical node features (e.g., traffic speed), and the CKG—a triple set encompassing:
- : road adjacency ,
- : road-attribute triples (static, e.g. POI, or dynamic, e.g. weather/time),
- : attribute co-occurrence .
KF-T-GCN comprises three principal modules: (1) the KR-EAR knowledge representation extractor, (2) a Knowledge Fusion Cell (KF-Cell), and (3) a spatial-temporal GCN+GRU backbone for predictive modeling. The CKG encodes interdependencies both between roads and among external factors affecting traffic conditions.
2. Knowledge Representation via KR-EAR
The KR-EAR module learns embeddings for entities (roads), relations, and attribute values by maximizing
0
where 1 uses a TransR framework:
2
with scoring function
3
For attribute triples:
4
5
with 6 a nonlinearity, typically 7.
The overall knowledge representation loss is
8
3. Knowledge Fusion Cell (KF-Cell)
The KF-Cell performs per-road adaptive fusion of dynamic and static knowledge. Let 9 denote per-road features at time 0; the knowledge embeddings 1 are split into static (2) and dynamic (3) components. The fusion proceeds as:
4
where 5 is row-wise multiplication (road-adaptive weighting), and 6 denotes concatenation. The fusion enables the GCN backbone to integrate context from external factors (e.g., road-specific POI density or weather) at every time step.
4. Spatial-Temporal Graph Convolution Backbone
KF-T-GCN supports any spatial-temporal GCN backbone; the principal instantiation uses T-GCN with a GRU-based temporal module. Each GCN layer operates as
7
where 8.
The temporal GRU gates operate on per-time step fused features 9 and previous hidden state 0:
1
After 2 steps, the final hidden state is decoded via a dense layer to produce the traffic forecast 3.
5. Training Procedure and Losses
Training alternates or jointly optimizes the knowledge representation loss 4 and the prediction loss:
5
where 6 is the ground-truth. KR-EAR is often pre-trained and fixed; only the backbone and KF-Cell parameters are subsequently trained end-to-end. Model optimization uses Adam with learning rate 7.
The training/inference algorithm follows:
- Construct CKG from input triples.
- Train KR-EAR to yield 8.
- Initialize backbone parameters 9.
- For each mini-batch, at each time 0 within the sequence window:
- Fuse 1 KF-Cell2,
- Compute GCN+GRU step to update hidden state,
- Predict 3 and compute loss,
- Backpropagate and update parameters.
- At inference, perform only steps 4a–4b.
6. Empirical Evaluation
Dataset and Baselines
Experiments were conducted on Shenzhen Luohu District data (1–31 January 2015), with 4 road sections at 15-min granularity. External features include POI counts across 9 categories per road (static), and weather (five classes) with time (dynamic).
Baselines for comparison:
- SVR, ARIMA, plain GCN, plain GRU,
- Backbone GCNs: DCRNN, T-GCN,
- Knowledge-enhanced: KF-DCRNN, KF-T-GCN.
Evaluation metrics include RMSE, MAE, Accuracy, 5, and Variance.
Main Predictive Results
KF-T-GCN demonstrates improvements over all baselines. At a 15-min horizon, results are summarized:
| Method | RMSE | MAE | Accuracy | 6 | Variance |
|---|---|---|---|---|---|
| SVR | 7.2203 | 4.7762 | 0.7060 | 0.8367 | 0.8375 |
| ARIMA | 6.7708 | 4.6656 | 0.3852 | — | 0.0111 |
| GCN | 5.6419 | 4.2265 | 0.6119 | 0.6678 | 0.6679 |
| GRU | 5.0649 | 2.5988 | 0.7243 | 0.8322 | 0.8322 |
| DCRNN | 4.1243 | 2.7514 | 0.7127 | 0.8441 | 0.8441 |
| KF-DCRNN | 4.0635 | 2.7206 | 0.7169 | 0.8487 | 0.8491 |
| T-GCN | 4.0696 | 2.7460 | 0.7165 | 0.8388 | 0.8388 |
| KF-T-GCN | 4.0443 | 2.7090 | 0.7306 | 0.8400 | 0.8400 |
KF-T-GCN achieves a 0.63% RMSE reduction relative to T-GCN; KF-DCRNN outperforms DCRNN by 1.47%. Similar gains persist over multi-horizon forecasts (15/30/45/60 minutes).
Ablation and Perturbation Studies
Ablation shows the incremental benefit of including static (POI) versus dynamic (weather) knowledge, and their combination. Full KG yields the lowest RMSE and MAE. The architecture maintains robustness under synthetic Gaussian/Poisson noise (7 up to 2, 8 up to 16).
| Model | RMSE | MAE | Accuracy | 9 | Variance |
|---|---|---|---|---|---|
| T-GCN | 4.0696 | 2.7460 | 0.7165 | 0.8388 | 0.8388 |
| KF-T-GCN (weather) | 4.0501 | 2.7357 | 0.7215 | 0.8388 | 0.8389 |
| KF-T-GCN (POI) | 4.0489 | 2.7428 | 0.7208 | 0.8381 | 0.8381 |
| KF-T-GCN (full KG) | 4.0443 | 2.7090 | 0.7206 | 0.8400 | 0.8400 |
7. Interpretations, Limitations, and Future Directions
KF-Cell enables fine-grained, road-level adaptation of spatial-temporal filters by conditioning on external context (POI density, weather) via embedding modulations. The modeling of attribute co-occurrences in KR-EAR (e.g., joint effects of POI composition and weather on flow) further differentiates this approach relative to prior GCN-based systems (Zhu et al., 2020).
Current CKG construction is limited to POI and weather/time attributes; extension to other factors (e.g., events, holidays, regulatory constraints, incidents) is a natural avenue for enhancement. Further, the present fusion in (13) is linear with a ReLU activation; integrating attention or multiplicative gating mechanisms represents another promising improvement. The original formulation assumes static graph topology and single-city settings; relaxing these constraints to permit dynamic graphs and multi-city transfer learning is an open direction.
KF-T-GCN’s framework demonstrates how principled knowledge integration can incrementally—but consistently—improve spatial-temporal graph-based traffic forecasting, supporting future research in knowledge-driven modeling for urban spatiotemporal prediction tasks (Zhu et al., 2020).