Generating time series that hop domains via text and few-shot prompts
TimeCraft exists to generate synthetic time series that actually cross domains, take text orders, and make downstream models better instead of just faking the training set.

What it does
TimeCraft is a diffusion-based framework for generating synthetic time series. It targets real-world domains—healthcare, finance, energy, transportation—where collecting data is expensive or privacy-sensitive. Users can guide generation through three optional inputs: a few target-domain examples, natural language descriptions, or gradients from a downstream model they want to improve.
The interesting bit
Rather than retraining for every new domain, TimeCraft learns a universal latent space of reusable “semantic prototypes”—think of them as a dictionary of temporal patterns—and adapts to unseen domains via a lightweight Prototype Assignment Module that infers domain-specific weights from a handful of samples. It also employs a multi-agent system to write textual descriptions of time series, enabling hybrid conditioning where both prototypes and free-form text steer the output.
Key highlights
- Cross-domain generalization tested on energy, transportation, meteorology, and finance; the authors claim best fidelity on 11 of 12 in-domain datasets and strongest generalization to unseen domains.
- Text controllability via a multi-agent text-generation pipeline and hybrid prototype-text conditioning; reported MSE improvement of 12.52% and MAE improvement of 6.34% versus generation without text.
- Target-aware adaptation using influence functions to guide diffusion toward improving downstream task performance on forecasting, classification, or anomaly detection; evaluated on six medical datasets including ICU stay prediction and rare disease diagnosis.
- The repository bundles several related research extensions—
CaTSGfor causal generation,OATSfor online augmentation of time-series foundation models, andDiff-MNfor continuous generation with irregular observations.
Caveats
- The repo is effectively a research umbrella containing multiple distinct sub-projects (
TimeDP,BRIDGE,TarDiff,CaTSG,OATS,Diff-MN), each with its own paper and code directory, so expect to navigate subfolders rather than use a single unified API.
Verdict
Worth exploring if you need controllable synthetic temporal data that transfers across industries or want to augment scarce medical time series. Pass if you need a single, battle-tested library with a unified API rather than a collection of research artifacts.
Frequently asked
- What is microsoft/TimeCraft?
- TimeCraft exists to generate synthetic time series that actually cross domains, take text orders, and make downstream models better instead of just faking the training set.
- Is TimeCraft open source?
- Yes — microsoft/TimeCraft is open source, released under the MIT license.
- What language is TimeCraft written in?
- microsoft/TimeCraft is primarily written in Python.
- How popular is TimeCraft?
- microsoft/TimeCraft has 1.1k stars on GitHub.
- Where can I find TimeCraft?
- microsoft/TimeCraft is on GitHub at https://github.com/microsoft/TimeCraft.