arXiv:2610.13411cs.LGOct 2026

Manuscript Offprint

arXiv:2610.13411

In-Context Learning for System Identification: Probabilistic Formulation, Long-Sequence Handling, and Benchmark Validation

Matteo Rufolo, Dario Piga, Filippo Pura, Marco Forgione

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Matteo Rufolo 1,2^{1,2}

Dario Piga 1^{1}

Filippo Pura 1^{1}

Marco Forgione 1^{1}

1^{1}SUPSI, IDSIA - Dalle Molle Institute for Artificial Intelligence, Lugano, Switzerland

2^{2}USI, Faculty of Informatics, Lugano, Switzerland

{matteo.rufolo, dario.piga, filippo.pura, marco.forgione}@supsi.ch

Please cite this version of the paper:

M. Rufolo, D. Piga, F. Pura and M. Forgione “In-Context Learning for System Identification: Probabilistic Formulation, Long-Sequence Handling, and Benchmark Validation,” in Automatica, 2026. In press.

You may use the following bibtex entry:

@article{rufolo2026incontext,

title={In-Context Learning for System Identification: Probabilistic Formulation, Long-Sequence Handling, and Benchmark Validation},

author={Rufolo, Matteo and Piga, Dario and Pura, Filippo and Forgione, Marco},

journal={Automatica},

year={2026},

note={in press}

}

Abstract

Traditional system identification typically involves two steps: initially, training data is processed to estimate a model of the system of interest; then, the model is used to predict outputs for new input queries. In contrast, recent in-context learning approaches learn a meta model that maps directly from training data and query inputs to outputs in a zero-shot fashion, bypassing explicit model estimation. This approach leverages a meta model trained offline, on large sets of synthetically generated data, to emulate the behavior of a system identification algorithm. In this work, we advance this meta-learning framework for system identification in three directions. First, we develop a unified probabilistic meta-identification architecture that combines a Transformer-based encoder–decoder with tailored mechanisms for handling long training sequences, enabling calibrated predictions over long horizons. Second, we show how a pre-trained meta model can act as an uncertainty-aware synthetic data generator for classical system identification, providing task-specific data that regularize parametric models when real data are scarce. Third, we systematically evaluate

∗^{*}This work was partly supported by the Hasler Foundation project “FALCON - Foundation models for zero-shot adaptive control and prediction for dynamical systems” and as a part of NCCR Automation, a National Centre of Competence in Research, funded by the Swiss National Science Foundation (grant number 51NF40_225155).

the framework on standard nonlinear system identification benchmarks and on a challenging out-of-distribution scenario, demonstrating competitive accuracy with state-of-the-art methods and strong generalization, including cases where input-only adaptation is sufficient to handle significant distribution shifts.

Keywords: Meta learning; Artificial neural networks; System identification; Synthetic data.

1 Introduction

References (40)