{"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/mg-tsd-multi-granularity-time-series","title":"MG-TSD: Multi-Granularity Time Series Diffusion Models with Guided Learning Process","arxiv_id":"2403.05751","date":"2024-03-09","proceeding":null,"authors":["Xinyao Fan","Yueying Wu","Chang Xu","Yuhao Huang","Weiqing Liu","Jiang Bian"],"abstract":"Recently, diffusion probabilistic models have attracted attention in generative time series forecasting due to their remarkable capacity to generate high-fidelity samples. However, the effective utilization of their strong modeling ability in the probabilistic time series forecasting task remains an open question, partially due to the challenge of instability arising from their stochastic nature. To address this challenge, we introduce a novel Multi-Granularity Time Series Diffusion (MG-TSD) model, which achieves state-of-the-art predictive performance by leveraging the inherent granularity levels within the data as given targets at intermediate diffusion steps to guide the learning process of diffusion models. The way to construct the targets is motivated by the observation that the forward process of the diffusion model, which sequentially corrupts the data distribution to a standard normal distribution, intuitively aligns with the process of smoothing fine-grained data into a coarse-grained representation, both of which result in a gradual loss of fine distribution features. In the study, we derive a novel multi-granularity guidance diffusion loss function and propose a concise implementation method to effectively utilize coarse-grained data across various granularity levels. More importantly, our approach does not rely on additional external data, making it versatile and applicable across various domains. Extensive experiments conducted on real-world datasets demonstrate that our MG-TSD model outperforms existing time series prediction methods.","url_abs":"https://arxiv.org/abs/2403.05751v2","url_pdf":"https://arxiv.org/pdf/2403.05751v2.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":"mg-tsd-multi-granularity-time-series","repo_url":"https://github.com/hundredl/mg-tsd","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"pytorch","reach":{"status":"ok","spdx":"Apache-2.0"}}],"tasks":[{"task_slug":"probabilistic-time-series-forecasting","task_name":"Probabilistic Time Series Forecasting"},{"task_slug":"time-series-1","task_name":"Time Series"},{"task_slug":"time-series-forecasting","task_name":"Time Series Forecasting"},{"task_slug":"time-series-prediction","task_name":"Time Series Prediction"}],"methods":[{"method_slug":"diffusion","method_name":"Diffusion"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2403.05751","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2403.05751"}},"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":"deterministic:regex_extraction","url":"https://github.com/Hundredl/MG-TSD","reach":{"status":"ok","spdx":"Apache-2.0"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/hundredl/mg-tsd","reach":{"status":"ok","spdx":"Apache-2.0"}}],"summary":{"ran_draft_wrong":1,"ran":2,"ran_fixture":1,"ran_violates":1,"unverified":5},"by_repo_kind":{"official":{"samples":10,"ran":5,"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":0,"samples":[{"code_sha256_prefix":"b5c54401114d79c1","entry":"default","repo":"Hundredl/MG-TSD","repo_kind":"official","path":"src/mgtsd_module.py","file_url":"https://github.com/Hundredl/MG-TSD/blob/HEAD/src/mgtsd_module.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":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"b5c54401114d79c1"}},{"code_sha256_prefix":"5dc406db3d593203","entry":"get_module_forward_input_names","repo":"Hundredl/MG-TSD","repo_kind":"official","path":"src/utils.py","file_url":"https://github.com/Hundredl/MG-TSD/blob/HEAD/src/utils.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"5dc406db3d593203"}},{"code_sha256_prefix":"c5fe8ab6ba5d7df5","entry":"noise_like","repo":"Hundredl/MG-TSD","repo_kind":"official","path":"src/mgtsd_module.py","file_url":"https://github.com/Hundredl/MG-TSD/blob/HEAD/src/mgtsd_module.py","link_basis":"plan_row","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"c5fe8ab6ba5d7df5"}},{"code_sha256_prefix":"25c7475539e39da4","entry":"str2bool","repo":"Hundredl/MG-TSD","repo_kind":"official","path":"src/run_mgtsd.py","file_url":"https://github.com/Hundredl/MG-TSD/blob/HEAD/src/run_mgtsd.py","link_basis":"plan_row","language":"python","status":"ran_violates","verification_level":1,"contract_check":"VIOLATES","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"25c7475539e39da4"}},{"code_sha256_prefix":"23cd21b046ab5b4d","entry":"weighted_average","repo":"Hundredl/MG-TSD","repo_kind":"official","path":"src/utils.py","file_url":"https://github.com/Hundredl/MG-TSD/blob/HEAD/src/utils.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"23cd21b046ab5b4d"}},{"code_sha256_prefix":"2c9062939ccf6c68","entry":"creat_coarse_data","repo":"Hundredl/MG-TSD","repo_kind":"official","path":"src/multi_gran_generator.py","file_url":"https://github.com/Hundredl/MG-TSD/blob/HEAD/src/multi_gran_generator.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"2c9062939ccf6c68"}},{"code_sha256_prefix":"5da4ff41f061dd67","entry":"creat_coarse_data_elec","repo":"Hundredl/MG-TSD","repo_kind":"official","path":"src/multi_gran_generator.py","file_url":"https://github.com/Hundredl/MG-TSD/blob/HEAD/src/multi_gran_generator.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"5da4ff41f061dd67"}},{"code_sha256_prefix":"09c8479d9a5b3e06","entry":"extract","repo":"Hundredl/MG-TSD","repo_kind":"official","path":"src/mgtsd_module.py","file_url":"https://github.com/Hundredl/MG-TSD/blob/HEAD/src/mgtsd_module.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"09c8479d9a5b3e06"}},{"code_sha256_prefix":"223b94f466aac14c","entry":"lags_for_fourier_time_features_from_frequency","repo":"Hundredl/MG-TSD","repo_kind":"official","path":"src/feature.py","file_url":"https://github.com/Hundredl/MG-TSD/blob/HEAD/src/feature.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"223b94f466aac14c"}},{"code_sha256_prefix":"1c63d0cd11d2c9b7","entry":"plot","repo":"Hundredl/MG-TSD","repo_kind":"official","path":"src/utils.py","file_url":"https://github.com/Hundredl/MG-TSD/blob/HEAD/src/utils.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"1c63d0cd11d2c9b7"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}