TimeCoder: LLM-Driven Synthesis and Refinement for Intervention-Aware Time Series Modeling
Abstract
Time series modeling in real-world systems often involves sparse and heterogeneous external interventions that abruptly alter underlying dynamics, posing significant challenges for both classical mechanistic models and purely data-driven approaches. While mechanistic models provide strong domain knowledge and interpretability, they lack flexibility under uncertainty, whereas deep learning models struggle to generalize intervention effects under limited supervision. We propose TimeCoder, an automated framework that integrates large language models (LLMs) reasoning, domain-informed mechanistic knowledge, and data-driven optimization to iteratively construct intervention-aware time series models. TimeCoder operates through a closed-loop generate–calibrate–refine process, where an LLM proposes explicit intervention-aware model structures grounded in domain knowledge and statistical evidence, model parameters are calibrated on observed data, and structured diagnostics of predictive errors guide subsequent structural refinement. We evaluate TimeCoder on four challenging benchmarks spanning healthcare, hydrology, and epidemics, demonstrating consistent improvements in forecasting and classification accuracy, generalization under sparse interventions, and sample efficiency compared to state-of-the-art baselines. Code is available at https://anonymous.4open.science/r/TimeCoder/.
est. 32% chance this paper gets accepted at ICLR 2027.
What do you think this paper will get?
All positions stay anonymous.