Deep Temporal Clustering for Short-Term Traffic Flow Prediction at Urban Intersections

Deep Temporal Clustering for Short-Term Traffic Flow Prediction at Urban Intersections

Introduction

Traffic congestion in urban areas remains a persistent challenge, particularly at intersections where complex traffic patterns emerge due to varying road structures, traffic regulations, and dynamic flow behaviors. Accurate short-term traffic flow prediction is crucial for intelligent transportation systems (ITS) to optimize signal control, reduce congestion, and enhance mobility. Traditional traffic prediction models often rely on simplified assumptions, neglecting the intricate spatial and temporal dependencies inherent in urban road networks.

Recent advancements in deep learning have introduced graph-based and clustering-based approaches to capture traffic dynamics. However, existing methods face several limitations: (1) Graph Convolutional Networks (GCNs) often use oversimplified road network topologies, ignoring critical traffic organization details such as turn restrictions and one-way streets. (2) Clustering-based models fail to account for both regional and temporal similarities in traffic flow, leading to suboptimal grouping of intersections. (3) Large-scale training datasets increase computational overhead, hindering real-time prediction capabilities.

To address these challenges, this paper introduces the Deep Temporal Clustering Traffic Flow Prediction (DTCTFP) model, which integrates improved dynamic time warping, shortest-path analysis, and cluster-based recurrent neural networks. By leveraging actual traffic organization information and adaptive clustering, DTCTFP enhances prediction accuracy while maintaining computational efficiency.

Problem Definition

Traffic Flow Prediction Challenges

Urban intersections exhibit heterogeneous traffic behaviors influenced by factors such as road geometry, signal timing, and nearby points of interest (e.g., schools, hospitals). Conventional traffic prediction models treat intersections independently, disregarding shared patterns among spatially or functionally similar locations.

The DTCTFP framework reformulates traffic prediction as a cluster-based learning problem:

  1. Traffic Flow Clustering: Intersections are grouped into clusters based on spatiotemporal similarities, ensuring that each cluster shares consistent traffic patterns.
  2. Cluster-Specific Prediction: Separate prediction models are trained for each cluster, reducing redundancy and improving efficiency.

Key challenges include:
• Temporal Misalignment: Traffic peaks may occur at different times across intersections due to localized events (e.g., school drop-off times). Traditional Dynamic Time Warping (DTW) struggles with such delays, leading to incorrect alignments.

• Spatial Constraints: Physical proximity does not always imply similar traffic behavior. For example, intersections with “no left turn” rules may exhibit drastically different flow patterns despite being adjacent.

• Real-Time Requirements: Large datasets increase training and inference times, making real-time prediction difficult.

Methodology

  1. Deep Clustering for Traffic Flow

1.1 Temporal Feature Extraction

Traffic flow data is inherently sequential, requiring methods that capture both short-term fluctuations and long-term trends. DTCTFP employs a deep autoencoder to extract low-dimensional representations of traffic time series:
• Encoder: Uses 1D Convolutional Neural Networks (CNNs) and Bidirectional LSTM (BiLSTM) to compress raw traffic data into latent features.

• Decoder: Reconstructs the original sequence via upsampling and deconvolution.

• Loss Function: Mean Squared Error (MSE) ensures accurate reconstruction.

1.2 Gradient-Constrained Dynamic Time Warping (GCDTW)

Standard DTW aligns time series by minimizing cumulative distance but suffers from “pathological alignments” when traffic patterns are misaligned (e.g., peak hour shifts). GCDTW introduces gradient constraints to limit warping path slopes, preventing unrealistic alignments. This is particularly useful for intersections with delayed traffic surges.

1.3 Spatial Feature Extraction

Road networks are modeled as directed graphs, where nodes represent road segments and edges denote connectivity. Traffic rules (e.g., turn restrictions) are incorporated by adjusting edge weights. Dijkstra’s algorithm computes the shortest path between intersections, ensuring that spatial dependencies reflect actual travel routes rather than just Euclidean distance.

1.4 Feature Fusion and K-means++ Clustering

Temporal (GCDTW) and spatial (shortest-path) features are combined via weighted fusion, where weights are optimized to maximize silhouette scores. K-means++ clustering then groups intersections into homogeneous clusters, ensuring that each cluster shares similar traffic dynamics.

  1. Cluster-Based Traffic Prediction

2.1 Graph Convolutional Network (GCN) for Road Network Encoding

A GCN processes the road network topology to generate global spatial features, capturing interactions between intersections. Node features are aggregated at the intersection level, preserving locality.

2.2 Cluster-Specific Model Training

Instead of training individual models for each intersection, DTCTFP adopts a model-sharing strategy:
• Each cluster uses a Bidirectional Gated Recurrent Unit (BiGRU) to predict future traffic flows.

• The cluster centroid (representative traffic pattern) is fused with spatial features to enhance prediction robustness.

This approach reduces computational overhead while maintaining accuracy.

Experimental Validation

Dataset and Setup

Experiments were conducted using traffic data from 203 intersections in Dadukou District, Chongqing, collected over six months (July–December 2023). Key preprocessing steps included:
• Data Cleaning: Removal of duplicate vehicle records and missing values.

• Aggregation: Raw 1-minute traffic counts were aggregated into 5-minute intervals.

• Normalization: Min-max scaling was applied to ensure stable training.

Baselines and Metrics

DTCTFP was compared against eight state-of-the-art models:

  1. Statistical Models: ARIMA, SVR.
  2. Deep Learning Models: GRU, Transformer.
  3. Spatiotemporal Models: DCRNN, STGCN, ASTGCN, ASTGNN.

Evaluation metrics included:
• Mean Absolute Error (MAE)

• Root Mean Squared Error (RMSE)

• Mean Absolute Percentage Error (MAPE)

Results

  1. Prediction Accuracy:
    • DTCTFP outperformed all baselines across 30-minute, 1-hour, and 2-hour prediction horizons.

    • For 30-minute predictions, it reduced MAE by 12.09%, RMSE by 11.98%, and MAPE by 8.14% compared to ASTGNN.

  2. Ablation Study:
    • Removing the clustering module increased MAE by 14.5%, confirming its importance.

    • Omitting the sliding window mechanism degraded performance, highlighting its role in capturing temporal trends.

  3. Efficiency:
    • DTCTFP’s cluster-based approach reduced training time by 35% compared to ASTGNN, making it suitable for real-time deployment.

Case Study: Cluster Interpretation

Three distinct intersection clusters were identified:

  1. Cluster 1 (High Volatility): Intersections near schools and hospitals exhibited sharp morning peaks.
  2. Cluster 2 (Stable High Flow): Major arterials with consistent traffic volumes.
  3. Cluster 3 (Moderate Flow): Intersections with simpler traffic patterns, such as T-junctions.

Visualizations confirmed that DTCTFP accurately predicted traffic surges and lulls across all clusters.

Conclusion

The DTCTFP model advances short-term traffic prediction by integrating deep clustering, adaptive time-series alignment, and cluster-specific modeling. Its key contributions include:
• GCDTW: Improved temporal alignment for delayed traffic patterns.

• Traffic-Rule-Aware Graph Construction: Realistic spatial dependencies via directed graphs.

• Model Sharing: Efficient prediction through cluster-based BiGRUs.

Future work will explore multi-scale clustering (e.g., incorporating weather or event data) and dynamic graph updates to further enhance prediction robustness.

doi.org/10.19734/j.issn.1001-3695.2024.07.0284

Was this helpful?

0 / 0