TS-ICL: a Time-Indexed Foundation Model for Time Series Forecasting & Imputation via In-Context Learning
Paper: TS-ICL: A Flexible Time-Indexed Foundation Model for Time Series via In-Context Learning
TS-ICL is a continuous probabilistic Time Series Foundation Model (TSFM) that unifies forecasting and imputation in a single zero-shot architecture, requiring no task-specific training or fine-tuning.
Installation
pip install tsicl
Model checkpoint can be found on TS-ICL's Huggingface repo.
Requirements: Python ≥ 3.12, PyTorch ≥ 2.5.1
Quick Start
from tsicl import TSICL
model = TSICL(model_path="checkpoints/tsicl-v1.ckpt")
# Forecasting — predict the next 96 timesteps
point, quantiles = model.forecast(
inputs = my_series, # e.g. 1-D numpy array or tensor
prediction_length = 96,
quantile_levels = [0.1, 0.5, 0.9],
denormalize = True
)
# Imputation — reconstruct NaN values
point, quantiles = model.impute(
inputs = my_series_with_nans,
quantile_levels = [0.1, 0.5, 0.9],
denormalize = True
)
Both methods return a (point_prediction, quantile_predictions) tuple. NaN values are handled natively — no preprocessing required.
Notebooks
Step-by-step tutorials on synthetic Gaussian Processes:
| Notebook | Description |
|---|---|
| get_started_imputation.ipynb | Pointwise & block missingness, covariate-aware imputation, output format, batch processing |
| get_started_forecasting.ipynb | Univariate forecasting, partially observed look-back, covariate-aware forecasting, batch processing |
Model
TS-ICL processes each time series through four successive modules:
- Time Series Encoder — a Perceiver-like architecture that compresses observed (timestamp, value) pairs into M = 32 learnable latent tokens via cross-attention. Accepts inputs of arbitrary length without preprocessing.
- Channel Mixer — aggregates information across channels via cross-attention. Selectively integrates covariate representations into the target's representation when covariates are provided.
- Temporal Context Query Module — maps any query timestamp to a context-aware embedding using Fourier (NeRF-style) positional encoding. Enables prediction at arbitrary timestamps, including on irregular grids.
- In-Context Regressor — a causal Transformer that reads observed (representation, value) pairs as in-context training examples and outputs 99 quantiles at the queried timestamps.
A single checkpoint (tsicl-v1.ckpt) contains two specialised components — one trained with masking for imputation, one with causal masking for forecasting — sharing the same architecture backbone.
Performance
Forecasting — fev-bench
TS-ICL is highly competitive with the best forecasting foundation models, while being fast at inference. TS-ICL efficently leverages covariate (when relevant) and is also robust to sparse look-back windows.
Example — pointwise forecast with a known covariate (GFC17 dataset):
Forecasting — TIME benchmark
Imputation — fm-impute-bench
TS-ICL achieves state-of-the-art imputation across 132 univariate and 24 covariate-aware tasks, outperforming the best tabular foundation model baseline while being ~50× faster at inference.
Example — block imputation with uncertainty quantification (COVID-19 energy dataset):
Citation
If you use TS-ICL for research purposes, please consider citing the associated paper:
@article{lenaour2026tsicl,
title={TS-ICL: A Flexible Time-Indexed Foundation Model for Time Series via In-Context Learning},
author={Le Naour, Etienne and Nabil, Tahar and Petralia, Adrien},
journal={arXiv preprint arXiv:2606.05878},
year={2026}
}
Contributors
License
TS-ICL weights and code are released under a non-commercial license, see LICENSE.
Contact
To learn more or request a commercial license, please contact us at:
tsicl-contact_at_edf.fr (replace _at_ with @).
Metadata
Release files for tsicl 0.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| tsicl-0.2.1.tar.gz | 55.8 kB | With provenance | Details for tsicl-0.2.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| tsicl-0.2.1-py3-none-any.whl | Python 3 | none | any | Details for tsicl-0.2.1-py3-none-any.whl |
Total release size: 132.1 kB
Release files / tsicl-0.2.1.tar.gz
| Download URL | tsicl-0.2.1.tar.gz |
|---|---|
| Size | 55.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
80d21585be4472885f85e6d2f085c75b316965851d0ff8820f913f44d67e098b
|
|
BLAKE2b-256 checksum How to use checksums |
bc390579bff4625fb890d282f5161a2f788b6942252a41f0e21a09e724b26a39
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 25, 2026.
Transparency logRelease files / tsicl-0.2.1-py3-none-any.whl
| Download URL | tsicl-0.2.1-py3-none-any.whl |
|---|---|
| Size | 76.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f3a8b9cfeb291a9d173098915dda03b4bfdef3c1702d08e5d04e3adf4ab57d54
|
|
BLAKE2b-256 checksum How to use checksums |
5f59fd805c44c0a3944a1fcb9d954e3fb34d6464bf5c4588a490fc858c9bf60a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 25, 2026.
Transparency logSecurity for tsicl 0.2.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for tsicl-0.2.1.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 25, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.