{"about":{"site":"https://codewithpapers.app","non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page"},"url":"/paper/fm-ts-flow-matching-for-time-series","title":"FM-TS: Flow Matching for Time Series Generation","arxiv_id":"2411.07506","date":"2024-11-12","proceeding":null,"authors":["Yang Hu","Xiao Wang","Lirong Wu","Huatian Zhang","Stan Z. Li","Sheng Wang","Tianlong Chen"],"abstract":"Time series generation has emerged as an essential tool for analyzing temporal data across numerous fields. While diffusion models have recently gained significant attention in generating high-quality time series, they tend to be computationally demanding and reliant on complex stochastic processes. To address these limitations, we introduce FM-TS, a rectified Flow Matching-based framework for Time Series generation, which simplifies the time series generation process by directly optimizing continuous trajectories. This approach avoids the need for iterative sampling or complex noise schedules typically required in diffusion-based models. FM-TS is more efficient in terms of training and inference. Moreover, FM-TS is highly adaptive, supporting both conditional and unconditional time series generation. Notably, through our novel inference design, the model trained in an unconditional setting can seamlessly generalize to conditional tasks without the need for retraining. Extensive benchmarking across both settings demonstrates that FM-TS consistently delivers superior performance compared to existing approaches while being more efficient in terms of training and inference. For instance, in terms of discriminative score, FM-TS achieves 0.005, 0.019, 0.011, 0.005, 0.053, and 0.106 on the Sines, Stocks, ETTh, MuJoCo, Energy, and fMRI unconditional time series datasets, respectively, significantly outperforming the second-best method which achieves 0.006, 0.067, 0.061, 0.008, 0.122, and 0.167 on the same datasets. We have achieved superior performance in solar forecasting and MuJoCo imputation tasks, significantly enhanced by our innovative $t$ power sampling method. The code is available at https://github.com/UNITES-Lab/FMTS.","url_abs":"https://arxiv.org/abs/2411.07506v1","url_pdf":"https://arxiv.org/pdf/2411.07506v1.pdf","source":{"archive":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","row_kind":"abstracts"},"code_links":[{"paper_slug":"fm-ts-flow-matching-for-time-series","repo_url":"https://github.com/unites-lab/fmts","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"pytorch","reach":{"status":"ok"}}],"tasks":[{"task_slug":"benchmarking","task_name":"Benchmarking"},{"task_slug":"imputation","task_name":"Imputation"},{"task_slug":"mujoco","task_name":"MuJoCo"},{"task_slug":"time-series-1","task_name":"Time Series"},{"task_slug":"time-series-generation","task_name":"Time Series Generation"}],"methods":[{"method_slug":"attention","method_name":"Attention"},{"method_slug":"diffusion","method_name":"Diffusion"},{"method_slug":"softmax","method_name":"Softmax"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2411.07506","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2411.07506"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-24T18:15:14+00:00","read_at_is":"when the build read Syntology's graph, not when any sample ran","claim":"Per-sample execution status on synthesized fixtures; not a correctness claim about the paper. Samples come from repositories linked to the paper, official or community; repo_kind says which.","repos":[{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/unites-lab/fmts","reach":{"status":"ok"}}],"summary":{"ran_honours":2,"ran_violates":3,"ran_draft_wrong":2,"ran_fixture":2,"unverified":11},"by_repo_kind":{"official":{"samples":20,"ran":9,"repositories":1}},"repo_kind_vocabulary":{"official":"The archive marks this repository official for the paper","named_in_paper":"The archive records that the paper mentions this repository; it is not marked official","listed":"In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper","found_in_text":"Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted","community":"Not in the archive's code links for this paper; a community repository Syntology harvested"},"n_pointer_only_for_licence":20,"samples":[{"code_sha256_prefix":"7f1040f5e3991d5e","entry":"identity","repo":"unites-lab/fmts","repo_kind":"official","path":"FMTS/Models/interpretable_diffusion/model_utils.py","file_url":"https://github.com/unites-lab/fmts/blob/HEAD/FMTS/Models/interpretable_diffusion/model_utils.py","link_basis":"harvester_set","language":"python","status":"ran_honours","verification_level":2,"contract_check":"HONOURS","metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"7f1040f5e3991d5e"}},{"code_sha256_prefix":"20a4af10369ee6be","entry":"calculate_fid","repo":"unites-lab/fmts","repo_kind":"official","path":"FMTS/Utils/context_fid.py","file_url":"https://github.com/unites-lab/fmts/blob/HEAD/FMTS/Utils/context_fid.py","link_basis":"harvester_set","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"20a4af10369ee6be"}},{"code_sha256_prefix":"d1ef6b8cb9a28a53","entry":"default","repo":"unites-lab/fmts","repo_kind":"official","path":"FMTS/Models/interpretable_diffusion/model_utils.py","file_url":"https://github.com/unites-lab/fmts/blob/HEAD/FMTS/Models/interpretable_diffusion/model_utils.py","link_basis":"harvester_set","language":"python","status":"ran_violates","verification_level":1,"contract_check":"VIOLATES","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"d1ef6b8cb9a28a53"}},{"code_sha256_prefix":"608e364a9d2376a3","entry":"exists","repo":"unites-lab/fmts","repo_kind":"official","path":"FMTS/Models/interpretable_diffusion/model_utils.py","file_url":"https://github.com/unites-lab/fmts/blob/HEAD/FMTS/Models/interpretable_diffusion/model_utils.py","link_basis":"harvester_set","language":"python","status":"ran_violates","verification_level":1,"contract_check":"VIOLATES","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"608e364a9d2376a3"}},{"code_sha256_prefix":"5254eb44ce12370e","entry":"pad_nan_to_target","repo":"unites-lab/fmts","repo_kind":"official","path":"FMTS/Models/ts2vec/utils.py","file_url":"https://github.com/unites-lab/fmts/blob/HEAD/FMTS/Models/ts2vec/utils.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"5254eb44ce12370e"}},{"code_sha256_prefix":"645d1fdb1dc0e80c","entry":"pkl_load","repo":"unites-lab/fmts","repo_kind":"official","path":"FMTS/Models/ts2vec/utils.py","file_url":"https://github.com/unites-lab/fmts/blob/HEAD/FMTS/Models/ts2vec/utils.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"645d1fdb1dc0e80c"}},{"code_sha256_prefix":"e93cc5b705c2eb3b","entry":"precompute_freqs_cis","repo":"unites-lab/fmts","repo_kind":"official","path":"FMTS/Models/interpretable_diffusion/transformer.py","file_url":"https://github.com/unites-lab/fmts/blob/HEAD/FMTS/Models/interpretable_diffusion/transformer.py","link_basis":"plan_row","language":"python","status":"ran_violates","verification_level":1,"contract_check":"VIOLATES","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"e93cc5b705c2eb3b"}},{"code_sha256_prefix":"70bf6ebaafd266c4","entry":"reshape_for_broadcast","repo":"unites-lab/fmts","repo_kind":"official","path":"FMTS/Models/interpretable_diffusion/transformer.py","file_url":"https://github.com/unites-lab/fmts/blob/HEAD/FMTS/Models/interpretable_diffusion/transformer.py","link_basis":"harvester_set","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"70bf6ebaafd266c4"}},{"code_sha256_prefix":"79783deb10f33397","entry":"torch_pad_nan","repo":"unites-lab/fmts","repo_kind":"official","path":"FMTS/Models/ts2vec/utils.py","file_url":"https://github.com/unites-lab/fmts/blob/HEAD/FMTS/Models/ts2vec/utils.py","link_basis":"harvester_set","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"79783deb10f33397"}},{"code_sha256_prefix":"6f50094115053323","entry":"apply_rotary_emb","repo":"unites-lab/fmts","repo_kind":"official","path":"FMTS/Models/interpretable_diffusion/transformer.py","file_url":"https://github.com/unites-lab/fmts/blob/HEAD/FMTS/Models/interpretable_diffusion/transformer.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"6f50094115053323"}},{"code_sha256_prefix":"16dc8797fafc754b","entry":"batch_generator","repo":"unites-lab/fmts","repo_kind":"official","path":"FMTS/Utils/discriminative_metric.py","file_url":"https://github.com/unites-lab/fmts/blob/HEAD/FMTS/Utils/discriminative_metric.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"16dc8797fafc754b"}},{"code_sha256_prefix":"bef4cca3a23662a6","entry":"cacf_torch","repo":"unites-lab/fmts","repo_kind":"official","path":"FMTS/Utils/cross_correlation.py","file_url":"https://github.com/unites-lab/fmts/blob/HEAD/FMTS/Utils/cross_correlation.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"bef4cca3a23662a6"}},{"code_sha256_prefix":"0c1e47b7a9f0bc5c","entry":"compensate_masking","repo":"unites-lab/fmts","repo_kind":"official","path":"FMTS/Utils/masking_utils.py","file_url":"https://github.com/unites-lab/fmts/blob/HEAD/FMTS/Utils/masking_utils.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"0c1e47b7a9f0bc5c"}},{"code_sha256_prefix":"6e9a7cc7f3228021","entry":"costume_collate","repo":"unites-lab/fmts","repo_kind":"official","path":"FMTS/Utils/masking_utils.py","file_url":"https://github.com/unites-lab/fmts/blob/HEAD/FMTS/Utils/masking_utils.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"6e9a7cc7f3228021"}},{"code_sha256_prefix":"b16217f58fce53e0","entry":"get_quantile","repo":"unites-lab/fmts","repo_kind":"official","path":"FMTS/Utils/imputation_utils.py","file_url":"https://github.com/unites-lab/fmts/blob/HEAD/FMTS/Utils/imputation_utils.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"b16217f58fce53e0"}},{"code_sha256_prefix":"8b8ed7b7f7de3f69","entry":"load_dict_from_json","repo":"unites-lab/fmts","repo_kind":"official","path":"FMTS/Utils/io_utils.py","file_url":"https://github.com/unites-lab/fmts/blob/HEAD/FMTS/Utils/io_utils.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"8b8ed7b7f7de3f69"}},{"code_sha256_prefix":"ef8e0e1d280c05be","entry":"load_yaml_config","repo":"unites-lab/fmts","repo_kind":"official","path":"FMTS/Utils/io_utils.py","file_url":"https://github.com/unites-lab/fmts/blob/HEAD/FMTS/Utils/io_utils.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"ef8e0e1d280c05be"}},{"code_sha256_prefix":"66531358d7cefe44","entry":"merge_opts_to_config","repo":"unites-lab/fmts","repo_kind":"official","path":"FMTS/Utils/io_utils.py","file_url":"https://github.com/unites-lab/fmts/blob/HEAD/FMTS/Utils/io_utils.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"66531358d7cefe44"}},{"code_sha256_prefix":"fbf2cb45dcc978f2","entry":"padding_mask","repo":"unites-lab/fmts","repo_kind":"official","path":"FMTS/Utils/masking_utils.py","file_url":"https://github.com/unites-lab/fmts/blob/HEAD/FMTS/Utils/masking_utils.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"fbf2cb45dcc978f2"}},{"code_sha256_prefix":"495e06d1db831486","entry":"random_mask","repo":"unites-lab/fmts","repo_kind":"official","path":"FMTS/Utils/imputation_utils.py","file_url":"https://github.com/unites-lab/fmts/blob/HEAD/FMTS/Utils/imputation_utils.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"495e06d1db831486"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}