research
Cost-Aware TSFM Forecasting
Research code for my Scientific Reports paper (accepted)
Foundation ModelsTime-Series ForecastingGreen AIEvaluationPython
View project
Problem#
Cities that most need hyper-local air-quality and weather forecasts often have the shortest data records and the smallest compute budgets. The usual options are a tiny searched architecture or transfer from data-rich cities. Foundation models are usually assumed to be too heavy, an assumption that is rarely tested.
What the repository contains#
- Three deployment strategies, one harness: a Green-NAS tiny specialist and a LightGBM direct model, transfer learning from data-rich cities, and a zero-shot foundation model (Chronos), plus a seasonal-naive floor.
- Two domains across 29 cities: hourly PM2.5 (UCI Beijing multi-site and an OpenAQ city panel) and 2 m temperature (Open-Meteo).
- Cost accounting: inference latency, measured energy and cost per 1,000 forecasts, combined into a cost-adjusted decision rule.
- A claim ledger: every number in the manuscript is traced to an artifact and a command in
paper/RESULTS_LEDGER.mdand checked by an audit script.
Key results#
- On PM2.5, the zero-shot model and the tuned specialist are statistically indistinguishable (MASE 0.662 vs 0.692 with covariates knowable at forecast time).
- The specialist’s apparent temperature edge (MASE 0.533 vs 0.792) shrinks to a small, non-significant gap (0.745) once its covariates are limited to values knowable at forecast time. The original edge was largely a perfect-foresight artifact.
- Under frequent retraining, the zero-shot model uses about ten times less measured energy.
Reproduce#
pip install numpy pandas lightgbm matplotlib shap
pip install torch chronos-forecasting
python src/run_forecast.py single --source pm25 \
--data-path data/beijing_pm25/PRSA_Data_20130301-20170228 \
--column Aotizhongxin --with-chronos --shap --out-prefix pm25_fm
The full regime and cross-city commands are in the repository README.