Traffic forecasting is a notoriously fickle domain. Between the "predictable" chaos of rush hour and the unpredictable chaos of a multi-car pileup, traditional deep learning models often struggle to keep up. At ICLR 2022, researchers from UNIST introduced PM-MemNet, a model that stops trying to guess the future from scratch and starts "remembering" it instead.
TL;DR
PM-MemNet transforms traffic forecasting from a standard sequence-prediction task into a pattern-matching task using a novel key-value memory structure. By matching current road conditions to a curated bank of representative historical patterns, the model achieves state-of-the-art accuracy and responds much faster to abrupt changes like accidents or sudden congestion.
What Problem Does This Paper Address?
Most existing traffic models (like Graph WaveNet or GMAN) focus on learning spatio-temporal dependencies—how one road affects another over time. While effective, these models have a "lag" problem: they struggle to react when traffic conditions change abruptly.
The authors identify a core insight: traffic data is highly repetitive. A sudden slowdown on a highway today likely looks very similar to a slowdown that happened three months ago. However, standard models often fail to leverage these global historical "motifs" effectively, leading to inaccurate forecasts during critical transitions (e.g., the exact moment a rush hour begins or ends). By converting the problem into a pattern-matching task, the model can simply look up what happened the last time a similar pattern occurred.
Methods
The researchers proposed the Pattern-Matching Memory Network (PM-MemNet), which consists of three main components:
1. Key Extraction
Instead of letting the model see every bit of raw data, the authors pre-process historical data to extract "representative patterns." They use clustering-based undersampling to create a balanced set of "keys" (e.g., 100 distinct speed patterns) that represent various traffic states.
As shown above, raw extracted patterns often have a highly skewed similarity distribution (many identical or completely opposite patterns). Clustering helps create a normalized, diverse memory bank.
2. GCMem (Graph Convolutional Memory)
This is the heart of the paper. Standard memory networks use attention to find the right "slot" in memory. GCMem goes further by integrating Graph Convolutional Networks (GCNs). This allows the model to share information between neighboring roads while simultaneously looking up relevant patterns in its memory bank.
3. Encoder-Decoder Architecture
The encoder takes current traffic and noise as input to generate a query. The decoder then uses a Gated Recurrent Unit (GRU) combined with stacked GCMem layers to "read" the most relevant patterns from memory and project them into a future forecast.
Datasets
The model was evaluated on two major benchmarks:
- METR-LA: 4 months of speed data from 207 sensors on Los Angeles highways.
- NAVER-Seoul: 3 months of speed data from 774 links in Seoul, Korea. This is considered a "harder" dataset because urban arterial roads in Seoul have more complex and abrupt speed changes than LA highways.
Key Insights and Ideas
- Forecasting as Retrieval: The most powerful idea here is that we don't need to "calculate" the future if we can "find" it. By matching the current trend to a known historical pattern, the model bypasses the error accumulation common in recursive models.
- Small Memory, Big Impact: Surprisingly, the authors found that only about 100 representative patterns were needed to achieve peak performance. Adding thousands of patterns actually led to "memory ineffectiveness" and lower accuracy.
- Spatial-Aware Memory: By embedding GCNs directly into the memory architecture, the model ensures that if two roads are physically connected, their "memory lookups" are coordinated. This prevents the model from predicting a "fast" pattern for one road and a "congested" pattern for its immediate neighbor.
Key Results
- SOTA Performance: PM-MemNet outperformed state-of-the-art models like Graph WaveNet and GMAN across almost all metrics (MAE, MAPE, RMSE).
- Long-Term Superiority: The performance gap widened in long-term predictions (60–90 minutes out), where traditional models usually drift.
- Responsiveness: Qualitative analysis showed that PM-MemNet was significantly better at catching the "end of congestion" and "unexpected peaks." While other models predicted a slow recovery, PM-MemNet correctly identified the "fast recovery" pattern and adjusted its forecast 15–30 minutes earlier than competitors.
Limitations and Future Work
- Static Memory: Currently, the patterns are extracted once before training. The authors suggest that a "learnable" key space that evolves during training could be even more powerful.
- Training Imbalance: The model only trains the memory slots that are actually "referred to" by the data. Rare patterns (like extreme weather events) might not get enough training signal.
- Similarity Metrics: The model relies on cosine similarity for pattern matching, which might not be optimal for noisy sensor data. Future work could involve learning a custom distance function for traffic motifs.
Paper Citation: Hyunwook Lee, Seungmin Jin, Hyeshin Chu, Hongkyu Lim, and Sungahn Ko. "Learning to Remember Patterns: Pattern Matching Memory Networks for Traffic Forecasting." International Conference on Learning Representations (ICLR), 2022.
Summary updated