CST and coordinate-aware MTGNN for PEMS-BAY
These checkpoints predict the next hour of traffic speed at 325 Bay Area
sensors from the preceding hour. The comparison uses the same sensor
coordinates for both models. The CST variant uses a CSTLinear to generate
MTGNN graph scores. The baseline_coords variant uses MTGNN's learned graph
with sensor coordinates.
Predict from the Hub
Use Python 3.11 or newer. The bundled synthetic CSV contains the 325 required sensor IDs and 12 five-minute readings. It provides a quick test of the input format and prediction path.
git clone https://github.com/takumiecd/cst-mtgnn-metr-la.git
cd cst-mtgnn-metr-la
python -m pip install -r requirements.txt
curl -fL https://huggingface.co/takumiecd/cst-mtgnn-pems-bay/resolve/main/example_input.csv -o example_input.csv
python infer.py example_input.csv --dataset pems-bay --seed 17 --variant cst
python infer.py example_input.csv --dataset pems-bay --seed 17 --variant baseline_coords
Use --seed 17, --seed 29, or --seed 43. The CLI fetches the
Safetensors and the shared config.json on demand, then returns 12
five-minute forecasts in mph. Set --sensor to select a sensor ID, or
--device cuda to use a CUDA-enabled PyTorch installation. To use your own
CSV, supply the timestamp column in Pacific local time and all 325 sensor-ID
columns. Use five-minute intervals. The CLI forecasts from the last 12 rows.
The coordinate-aware MTGNN can select different neighbors on CPU and CUDA when graph scores tie at the top-20 cutoff. We report the benchmark MAE from the RTX 4090 evaluation.
Forecast from downloaded files
hf download takumiecd/cst-mtgnn-pems-bay config.json example_input.csv \
seed-43/cst.safetensors --local-dir ./pems-bay-weights
python infer.py pems-bay-weights/example_input.csv --variant cst \
--config pems-bay-weights/config.json \
--weights pems-bay-weights/seed-43/cst.safetensors
Checkpoints and evaluation
Each of the six runs trained for 100 epochs on an RTX 4090. Files contain the weights from the epoch with the lowest validation MAE. The table reports test MAE in mph across all 12 forecast horizons on the chronological holdout.
| Seed | MTGNN + coordinates | Selected epoch | CST | Selected epoch |
|---|---|---|---|---|
| 17 | 1.764 | 20 | 1.586 | 74 |
| 29 | 1.744 | 11 | 1.587 | 89 |
| 43 | 1.726 | 10 | 1.584 | 81 |
| Mean | 1.745 | — | 1.586 | — |
The test evaluation uses 10,412 windows. The published feed replay uses these same six checkpoints and covers regional outages and delivery delays. Training protocol and learning curves · Outage and latency results · Checkpoint manifest and SHA-256 digests