FlowTS: Time Series Generation via Rectified Flow
Yang Hu, Xiao Wang, Zezhen Ding, Lirong Wu, Huatian Zhang, Stan Z. Li, Sheng Wang, Jiheng Zhang, Ziyun Li, Tianlong Chen
TL;DR
FlowTS tackles the computational bottleneck of diffusion-based time-series generation by replacing iterative solvers with straight-line transport along geodesics in probability space. It introduces an ODE-based framework that learns a transport map from an initial to a target distribution via rectified flow, enabling fast training and inference. Its contributions include an adaptive sampling strategy that balances noise adaptation and precision, explicit trend/seasonality decomposition, global context via attention registers, and RoPE-based positional encoding, plus the ability to adapt from unconditional to conditional generation at inference without retraining. Empirically, FlowTS achieves state-of-the-art context-FID on Stock and ETTh, improves solar forecasting MSE and MuJoCo imputation, and demonstrates substantial efficiency gains over diffusion-based baselines.
Abstract
Diffusion-based models have significant achievements in time series generation but suffer from inefficient computation: solving high-dimensional ODEs/SDEs via iterative numerical solvers demands hundreds to thousands of drift function evaluations per sample, incurring prohibitive costs. To resolve this, we propose FlowTS, an ODE-based model that leverages rectified flow with straight-line transport in probability space. By learning geodesic paths between distributions, FlowTS achieves computational efficiency through exact linear trajectory simulation, accelerating training and generation while improving performances. We further introduce an adaptive sampling strategy inspired by the exploration-exploitation trade-off, balancing noise adaptation and precision. Notably, FlowTS enables seamless adaptation from unconditional to conditional generation without retraining, ensuring efficient real-world deployment. Also, to enhance generation authenticity, FlowTS integrates trend and seasonality decomposition, attention registers (for global context aggregation), and Rotary Position Embedding (RoPE) (for position information). For unconditional setting, extensive experiments demonstrate that FlowTS achieves state-of-the-art performance, with context FID scores of 0.019 and 0.011 on Stock and ETTh datasets (prev. best: 0.067, 0.061). For conditional setting, we have achieved superior performance in solar forecasting (MSE 213, prev. best: 375) and MuJoCo imputation tasks (MSE 7e-5, prev. best 2.7e-4). The code is available at https://github.com/UNITES-Lab/FlowTS.
