Forging Time Series with Language: A Large Language Model Approach to Synthetic Data Generation

Cécile Rousseau, Tobia Boschi, Giandomenico Cornacchia, Dhaval Salwala, Alessandra Pascale, Juan Bernabe Moreno

TL;DR

SDForger is a novel framework that adapts Large Language Models (LLMs) to generate high-quality synthetic multivariate time series data. By converting complex time-series signals into compact tabular embeddings and encoding them as text, it allows even lightweight LLMs (like GPT-2) to learn temporal dynamics efficiently. This approach beats traditional generative models in data realism and significantly boosts downstream forecasting performance, all while running up to two orders of magnitude faster.

What Problem Does This Paper Address?

High-quality time series data is critical for forecasting, anomaly detection, and risk analysis across domains like finance, climate science, and energy management. However, real-world data is often scarce, expensive to collect, or restricted due to privacy concerns.

While synthetic data generation seems like an obvious fix, traditional generative approaches—such as Variational Autoencoders (VAEs), Generative Adversarial Networks (GANs), and diffusion models—struggle to capture long-term dependencies and complex multivariate relationships. They also typically require training from scratch for every new dataset.

On the other hand, trying to use LLMs directly for time series data introduces a massive computational bottleneck: long temporal sequences quickly overwhelm the context windows of language models, leading to skyrocketing training and inference costs. SDForger bridges this gap by enabling LLMs to process time series data through a highly compressed, text-based representation.

Methods

The SDForger framework breaks down the generation process into three main macro-steps:

  1. Preprocessing and Embedding: If only a single long time series is available, the framework uses a periodicity-aware segmentation strategy to cut the signal into natural, overlapping cycles. Next, it applies basis decomposition techniques—specifically Functional Principal Components (FPC) or Fast Independent Component Analysis (FastICA)—to transform these continuous time-series windows into low-dimensional tabular embeddings. This step is crucial because it completely decouples the sequence length from the computational complexity.
  2. Textual Encoding and LLM Fine-Tuning: The tabular embeddings are converted into structured text prompts using a "Fill-In-The-Middle" template. To prevent the LLM from developing positional biases based on the order of the features, the framework applies a Random Feature Order Permutation. An autoregressive LLM is then fine-tuned on these text prompts.
  3. Decoding: During inference, the LLM generates new textual embeddings, which are parsed back into tabular form. An online filtering system discards any invalid, duplicated, or wildly diverging samples in real time. Finally, the valid embeddings are mathematically inverted back into the original time-series space.
Overview of the SDForger pipeline, showing the transformation from raw time series to text and back.

Datasets

The authors evaluated SDForger across 12 publicly available datasets spanning diverse domains, including:

  • Energy: Australian Electricity, Appliances, ETTH1, and ECL (electricity consumption).
  • Mobility & Transport: Bikesharing, Traffic, Traffic Monash, and Tourism.
  • Nature: Carbon Capture Plant emissions and various Weather datasets (Rain, Solar, Temperature).
  • Finance: Exchange Rate and NN5 (ATM cash withdrawals).

These datasets include both stationary and non-stationary data, with sampling frequencies ranging from minutes to months.

Key Insights and Ideas

  • FastICA Beats FPC for LLM Generation: Surprisingly, using FastICA for embeddings yielded better results than FPC, particularly on distance-based metrics. FPC organizes components hierarchically by explained variance, concentrating most information in the first few features. FastICA, however, extracts statistically independent components of equal "power." This independent, unranked structure makes it much easier for the LLM to learn the joint distribution without getting confused by a hierarchy of feature importance.
  • Lightweight LLMs Are Plenty: The authors found that a lightweight, older model like GPT-2 (124M parameters) performed on par with, and sometimes better than, much larger and newer models like Granite-3.0 (2B) and Phi-3.5 (3.8B). This means high-quality time-series generation doesn't require massive compute infrastructure.
  • Multimodal Readiness: Because the time series is ultimately represented as text, SDForger can naturally support textual conditioning. For example, by prefixing prompts with text like "Condition: data is temp", the model can generate highly accurate, channel-specific physical signals.

Key Results

SDForger was tested against several state-of-the-art baselines, including TimeVAE, TimeVQVAE, RtsGAN, SdeGAN, and LS4.

  • Data Realism: In both multisample and univariate settings, SDForger achieved highly balanced performance across feature-based (statistical) and distance-based (structural) similarity metrics, frequently outperforming the baselines or ranking second best.
  • Downstream Utility: When the synthetic data was used to fine-tune a downstream forecasting foundation model (Tiny Time Mixers), the data generated by SDForger alone often yielded competitive results. More importantly, combining real data with SDForger's synthetic data (Original + Gen) consistently delivered the best overall forecasting performance across multiple datasets.
  • Generation Speed: SDForger proved to be exceptionally efficient, generating sequences 1 to 2 orders of magnitude faster than heavy deep generative competitors like TimeVQVAE and GANs.

Limitations and Future Work

While SDForger represents a major step forward, the authors noted a few areas for improvement:

  • Linear Embeddings: The framework currently relies on linear decomposition methods (FastICA and FPC). Integrating non-linear embedding techniques, like deep Autoencoders, could help capture even more intricate, non-linear data dynamics.
  • Full Fine-Tuning: The current pipeline fully fine-tunes the LLM. Implementing Parameter-Efficient Fine-Tuning (PEFT) methods like LoRA could make the training process even faster and more scalable.
  • Broader Downstream Tasks: The utility of the generated data was primarily validated on forecasting; future work will need to evaluate how well this synthetic data serves other tasks like classification and anomaly detection.

Summary updated

BibTeX
@inproceedings{rousseau2025forging,
  author = {Cécile Rousseau and Tobia Boschi and Giandomenico Cornacchia and Dhaval Salwala and Alessandra Pascale and Juan Bernabe Moreno},
  title = {{Forging Time Series with Language: A Large Language Model Approach to Synthetic Data Generation}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2025},
  url = {https://openreview.net/forum?id=A2pmvkqOgp},
}
Figure