TS-ICL: A Flexible Time-Indexed Foundation Model for Time Series via In-Context Learning

Etienne Le Naour, Tahar Nabil, Adrien PetraliaNeurIPS 2026

TL;DR

Real-world time series are messy—riddled with missing values, irregular timestamps, and shifting external variables—yet today’s foundation models mostly assume clean, uniform grids designed strictly for forecasting. TS-ICL changes the game by reframing time series modeling as continuous, timestamp-aligned in-context regression. In a single unified architecture, it sets a new state-of-the-art in filling missing data (imputation) while competing head-to-head with top forecasting models, especially when historical data is patchy.

What Problem Does This Paper Address?

Time Series Foundation Models (TSFMs)—pretrained models that make zero-shot predictions on unseen data—have revolutionized forecasting. However, most rely on "patching" (chopping time series into fixed-length blocks, similar to image patches in vision models). Patching assumes clean, regularly spaced grids. When sensors drop out or measurements arrive asynchronously, patch-based models struggle and cannot natively impute (fill in) missing values.

Meanwhile, Tabular Foundation Models (like TabPFN) adapted for time series can handle missing data and external variables (covariates, like using air temperature to predict electricity load). Yet, they lack a native understanding of time, rely on handcrafted features, and are painfully slow at inference. Until now, no single model offered fast zero-shot performance, irregular sampling support, covariate integration, and unified forecasting and imputation.

Methods

Instead of predicting the "next patch," the 27M-parameter TS-ICL asks: Given a set of observed (timestamp, value) pairs, what is the value at this specific query timestamp? Whether that query timestamp lies in the future (forecasting) or in a gap in the past (imputation) makes no difference to the architecture.

Figure 1: The TS-ICL pipeline. From temporal encoding to in-context regression. The diagram il- lustrates the four-module transformation for forecasting with one covariate observed on the horizon.

TS-ICL processes data through four stages:

  1. Time Series Encoder: Compresses arbitrary-length series and covariates independently into a fixed number of latent tokens using a Perceiver-style cross-attention mechanism.
  2. Channel Mixer: Uses cross-attention to selectively pull useful signals from covariates into the main target series' representation.
  3. Temporal Context Query Module: Bridges discrete tokens and continuous time. Any arbitrary timestamp is embedded via frequency-based positional encoding and cross-attends to the mixed representation.
  4. In-Context Learning Regressor: Treats observed timestamps as an on-the-fly "training set" inside a causal Transformer, outputting probabilistic quantile estimates for unseen target timestamps in a single forward pass.

What’s new in training? Because real-world multivariate datasets with clear causal links are scarce, the authors invented a DAG-based causal data prior. They sample Directed Acyclic Graphs where root nodes are univariate signals, and child nodes are generated via random linear or non-linear functions (MLPs, RNNs). Picking one node as the target and others as covariates forces TS-ICL to learn true causal relationships—and ignore noisy, independent distractions.

Figure 2: Synthetic target–covariate generation. Multivariate structures are constructed from a sampled DAG, where base signals are transformed via linear and non-linear SCMs. One node is se- lected as the target, while others serve as informa- tive or redundant covariates.

Datasets

  • Pretraining: A massive mixture of 40 datasets (~2 million time series ranging from 100 to 600k steps), combining 31 real-world datasets across multiple domains with synthetic stochastic processes from the TempoPFN generator, wired together via the DAG covariate generator.
  • Evaluation: No new benchmarks were introduced; instead, the authors used rigorous, established zero-shot suites: fm-impute-bench (33 univariate and 6 covariate datasets across 4 masking scenarios) for imputation, fev-bench (100 tasks, 30 with covariates) for forecasting, and the TIME benchmark (98 leakage-free tasks).

Key Insights and Ideas

  • Forecasting and imputation are the exact same problem: By indexing directly by continuous time rather than fixed grid patches, predicting $t+10$ is mathematically identical to predicting a dropped sensor reading at $t-5$.
  • Patching is brittle when history degrades: Standard TSFMs rely heavily on intact local patches. When historical look-back windows lose 30% to 90% of their data, patch-based models degrade sharply, whereas TS-ICL’s continuous-time formulation gracefully absorbs the missingness.
  • Synthetic causal graphs teach real-world covariate use: Training on synthetic DAGs transfers remarkably well to real-world exogenous variables, allowing the model to exploit helpful signals without overfitting to spurious correlations.

Key Results

  • State-of-the-Art Imputation: On univariate fm-impute-bench, TS-ICL lowers Normalized MAE by 17% and probabilistic error (CRPS) by 15% over the best tabular foundation model (TabICLv2-TS), while running ~50× faster (6.5 ms vs. 307 ms per window). With covariates, it beats TabPFNv2.5-TS by 36% in NMAE and 35% in CRPS.
Figure 3: NMAE-CRPS (lower is better) on the fm-impute benchmark. Each point corresponds to a method, averaged across tasks.
  • Competitive Forecasting: On fev-bench, TS-ICL trails specialized patch-based leader Chronos-2 by only ~6% (and TiRex by ~3%) in clean univariate settings, while running ~40× faster than tabular foundation models. Adding covariates pushes TS-ICL past TiRex in probabilistic accuracy.
  • Resilience to Missing History: When 50% of the look-back window is missing on fev-bench, Chronos-2's forecasting error (MASE) degrades by 50% (from 1.62 to 2.44), whereas TS-ICL degrades by just 11% (from 1.70 to 1.89), decisively outperforming Chronos-2 across all missingness levels (30%–90%).

Limitations and Future Work

Pointwise timestamp regression isn't free: TS-ICL is roughly 4× slower at forecasting inference than highly optimized patch-based models like Chronos-2 (15.4 ms vs. 3.5 ms per window), despite having 4× fewer parameters. The authors note that engineering optimizations—such as mixed-precision training—could help close this gap. Looking ahead, they plan to expand the diversity of their synthetic training prior and extend TS-ICL's flexible encoder–regressor backbone to zero-shot anomaly detection and time series classification.

Summary updated

Abstract

Foundation models mark a profound paradigm shift in time series modeling, with task-specific models being superseded by general-purpose zero-shot models. Yet, current approaches primarily focus on forecasting, while real-world time series are often irregularly and partially observed, requiring models that can jointly forecast, impute missing values, and handle degraded sampling conditions. To address these challenges, we introduce TS-ICL, a novel probabilistic In-Context Learning encoder-regressor Transformer that unifies forecasting and imputation. TS-ICL formulates time series tasks as timestamp-aligned regression and naturally incorporates covariates by training on synthetic dependency structures generated from a novel causal data prior. Empirically, TS-ICL achieves a new state-of-the-art in imputation, while remaining competitive with leading forecasting foundation models across both univariate and covariate-aware benchmarks. It shows particularly strong performance in forecasting with partially observed look-back windows. *Code page*: https://github.com/EDF-Lab/ts-icl.
BibTeX
@inproceedings{naour2026ts,
  author = {Etienne Le Naour and Tahar Nabil and Adrien Petralia},
  title = {{TS-ICL: A Flexible Time-Indexed Foundation Model for Time Series via In-Context Learning}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=urL7kBfWB5},
}
Figure