Ahmed Doghri Logo Image
Ahmed Doghri

chronopatch

Foundation forecasting is impressive. I wanted the small mechanism you can read: retrieve similar patches, forecast the next segment, then calibrate the interval. 15.44% MASE gain.

chronopatch, a patch-based time-series forecasting benchmark

The Small Part Of Foundation Forecasting

Chronos, MOMENT, and Moirai made forecasting feel like language modeling. chronopatch keeps one useful idea and strips the rest down: similar recent patches can predict the next patch.

The synthetic demand series has trend, seasonality, promotions, and drift. That is enough to expose a lazy seasonal baseline and enough to keep the benchmark reproducible.

Point Forecasts Are Only Half The Job

The forecaster retrieves historical contexts that look like the current context, averages what came next, and blends that with a recent trend correction.

Then it calibrates residuals on held-out data and wraps the forecast in conformal intervals. The interval is not decoration. If a forecast ships without uncertainty, the caller has to invent it.

The Number

Seasonal naive scores 1.167 MASE. chronopatch scores 0.987, a 15.44% relative gain. The calibrated interval covers 0.93 of test points with mean width 15.11.

4 tests pass locally and on GitHub Actions across Python 3.9, 3.11, and 3.13.

Tools Used

Python
Time Series
Patch Retrieval
Conformal Prediction
MASE
pytest
GitHub Actions CI