In-Context Learning for System Identification: Probabilistic Formulation, Long-Sequence Handling, and Benchmark Validation
Organizations: SUPSI, IDSIA - Dalle Molle Institute for Artificial Intelligence, Lugano, Switzerland · USI, Faculty of Informatics, Lugano, Switzerland
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 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.
Figures & tables
| Method | RMSE mean (std) | Inference time [s] |
| Patching | 0.048 (0.044) | 0.019 |
| Ensembling | 0.038 (0.050) | 0.039 |
| Benchmark | Method | RMSE | Training/Meta- inference time |
| WH | In-context | 0.0014 | 5.91 s |
| dynoNet Forgione and Piga (2021b) | 0.0017 | 1-60 min | |
| LSTM Champneys et al. (2024) | 0.0015 | 1-24 hr | |
| ARX Champneys et al. (2024) | 0.0434 | 1-60 min | |
| Cascaded Tanks | In-context | 0.429 | 0.22 s |
| dynoNet Forgione and Piga (2021b) | 0.421 | 1-60 min |
| Setting | Zero-shot | Scenario 1 | Scenario 2 |
| RMSE | 1.249 | 0.242 | 0.115 |
System Identification
System identification infers mathematical models and parameters of dynamical systems from input-output, trajectory, sensor, or video data.
See all 154 papers