Table of Contents
Fetching ...

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.

FlowTS: Time Series Generation via Rectified Flow

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.

Paper Structure

This paper contains 16 sections, 5 equations, 8 figures, 4 tables, 2 algorithms.

Figures (8)

  • Figure 1: Process evolution comparison The evolution processes from initial state $Z_0\sim\pi_0$ (blue) to final state $Z_1\sim\pi_1$ (red) are visualized for both models. The intermediate states (purple) illustrate the continuous evolution between the two endpoints. Rectified Flow exhibits a linear transformation path, while DDPM demonstrates a curved trajectory from $Z_0$ to $Z_1$.
  • Figure 2: FlowTS pipeline.FlowTS is trained to learn an ODE to transport samples from $Z_0$ to $Z_1$ via a linear path. After training, through adaptive sampling, FlowTS can be applied to both unconditional and conditional generation. The details of sampling are included in Algorithm \ref{['alg:fm-ts-unconditional-generation']} and \ref{['alg:condition']}, respectively.
  • Figure 3: The FlowTS model builds on the standard Transformer architecture. The blue components represent the basic encoder-decoder structure, while the green components highlight novel additions, including attention registers, RoPE, Trend and Fourier Synthetic Layers. The model processes input $Z_t$ and timestep $t$ through $N$ encoder and $M$ decoder blocks to produce the drift force $v_t$ at time $t$.
  • Figure 4: FID curves of FlowTS and Diffusion-TS on Energy dataset across training epochs (2,500–25,000) and sampling steps. FlowTS demonstrates superior efficiency, achieving lower FID scores with fewer training and sampling epochs.
  • Figure 5: Context-FID scores with different sampling iterations (1, 2, 4, 8, 16, 32) on Energy, measured against cumulative sampling time. FlowTS outperforms Diffusion-TS in both accuracy and sampling speed.
  • ...and 3 more figures