TS2Code: Enhancing Time Series Understanding via Learning to Code
Its authors withdrew this paper, so there is no full text to read or summarize.
Abstract
Despite improvements in multimodal reasoning and code generation, language models still fail to perform well on time series forecasting and reasoning. To address this, we propose TS2Code, a novel multi-modal training objective for learning multi-modal representation spaces for time series data. TS2Code works by training vision-language models to convert time series to code, which reconstructs the input time series when run. This reconstruction serves as a verifiable reward, which lets us use reinforcement learning (RL) to train models to write better code. In extensive experiments, we find that training models to convert time series into code improves their zero-shot performance on time series forecasting, anomaly detection, and reasoning, with the gains increasing with model size. In addition, by controlling code structure through RL, we further find that rewarding code styles, such as minimal digit usage, also helps improve performance. Our implementation will be posted publicly, and is available to reviewers anonymously at https://anonymous.4open.science/r/TS2Code-830E.
BibTeX
@misc{tan2026ts,
author = {Mingtian Tan and C. Bayan Bruss and Nam H Nguyen and David Evans and Thomas Hartvigsen},
title = {{TS2Code: Enhancing Time Series Understanding via Learning to Code}},
year = {2026},
url = {https://openreview.net/forum?id=4Ygp2A6am2},
howpublished = {OpenReview},
note = {Submitted to ICLR 2026},
}Ask Althea to put this paper to the test.
Loading related content...