{"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/timebridge-non-stationarity-matters-for-long","title":"TimeBridge: Non-Stationarity Matters for Long-term Time Series Forecasting","arxiv_id":"2410.04442","date":"2024-10-06","proceeding":null,"authors":["Peiyuan Liu","Beiliang Wu","Yifan Hu","Naiqi Li","Tao Dai","Jigang Bao","Shu-Tao Xia"],"abstract":"Non-stationarity poses significant challenges for multivariate time series forecasting due to the inherent short-term fluctuations and long-term trends that can lead to spurious regressions or obscure essential long-term relationships. Most existing methods either eliminate or retain non-stationarity without adequately addressing its distinct impacts on short-term and long-term modeling. Eliminating non-stationarity is essential for avoiding spurious regressions and capturing local dependencies in short-term modeling, while preserving it is crucial for revealing long-term cointegration across variates. In this paper, we propose TimeBridge, a novel framework designed to bridge the gap between non-stationarity and dependency modeling in long-term time series forecasting. By segmenting input series into smaller patches, TimeBridge applies Integrated Attention to mitigate short-term non-stationarity and capture stable dependencies within each variate, while Cointegrated Attention preserves non-stationarity to model long-term cointegration across variates. Extensive experiments show that TimeBridge consistently achieves state-of-the-art performance in both short-term and long-term forecasting. Additionally, TimeBridge demonstrates exceptional performance in financial forecasting on the CSI 500 and S&P 500 indices, further validating its robustness and effectiveness. Code is available at https://github.com/Hank0626/TimeBridge.","url_abs":"https://arxiv.org/abs/2410.04442v4","url_pdf":"https://arxiv.org/pdf/2410.04442v4.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":"timebridge-non-stationarity-matters-for-long","repo_url":"https://github.com/hank0626/timebridge","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":"multivariate-time-series-forecasting","task_name":"Multivariate Time Series Forecasting"},{"task_slug":"time-series-1","task_name":"Time Series"},{"task_slug":"time-series-forecasting","task_name":"Time Series Forecasting"}],"methods":[{"method_slug":"attention","method_name":"Attention"},{"method_slug":"softmax","method_name":"Softmax"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2410.04442","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2410.04442"}},"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/hank0626/timebridge","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran":4,"ran_draft_wrong":1,"ran_fixture":2,"unverified":3},"by_repo_kind":{"official":{"samples":10,"ran":7,"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":"03d63d172032b256","entry":"CORR","repo":"hank0626/timebridge","repo_kind":"official","path":"utils/metrics.py","file_url":"https://github.com/hank0626/timebridge/blob/HEAD/utils/metrics.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"03d63d172032b256"}},{"code_sha256_prefix":"825425c76db1d77d","entry":"PeriodNorm","repo":"hank0626/timebridge","repo_kind":"official","path":"layers/Transformer_EncDec.py","file_url":"https://github.com/hank0626/timebridge/blob/HEAD/layers/Transformer_EncDec.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"825425c76db1d77d"}},{"code_sha256_prefix":"ebab5ccedc5c9abe","entry":"denormalization","repo":"hank0626/timebridge","repo_kind":"official","path":"layers/Embed.py","file_url":"https://github.com/hank0626/timebridge/blob/HEAD/layers/Embed.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"ebab5ccedc5c9abe"}},{"code_sha256_prefix":"f32036738135c8a8","entry":"get_phi_psi","repo":"hank0626/timebridge","repo_kind":"official","path":"layers/utils.py","file_url":"https://github.com/hank0626/timebridge/blob/HEAD/layers/utils.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"f32036738135c8a8"}},{"code_sha256_prefix":"4ef26472da51e3aa","entry":"legendreDer","repo":"hank0626/timebridge","repo_kind":"official","path":"layers/utils.py","file_url":"https://github.com/hank0626/timebridge/blob/HEAD/layers/utils.py","link_basis":"harvester_set","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"4ef26472da51e3aa"}},{"code_sha256_prefix":"7ae3eba84feb6b9e","entry":"normalization","repo":"hank0626/timebridge","repo_kind":"official","path":"layers/Embed.py","file_url":"https://github.com/hank0626/timebridge/blob/HEAD/layers/Embed.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"7ae3eba84feb6b9e"}},{"code_sha256_prefix":"a54c8c5c47c6a8b8","entry":"phi_","repo":"hank0626/timebridge","repo_kind":"official","path":"layers/utils.py","file_url":"https://github.com/hank0626/timebridge/blob/HEAD/layers/utils.py","link_basis":"harvester_set","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"a54c8c5c47c6a8b8"}},{"code_sha256_prefix":"75f44993b096bf76","entry":"MAE","repo":"hank0626/timebridge","repo_kind":"official","path":"utils/metrics.py","file_url":"https://github.com/hank0626/timebridge/blob/HEAD/utils/metrics.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":"VIOLATES","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"75f44993b096bf76"}},{"code_sha256_prefix":"b40a11875ebd0cd2","entry":"RSE","repo":"hank0626/timebridge","repo_kind":"official","path":"utils/metrics.py","file_url":"https://github.com/hank0626/timebridge/blob/HEAD/utils/metrics.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":"VIOLATES","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"b40a11875ebd0cd2"}},{"code_sha256_prefix":"bdc787c888ab83a2","entry":"divide_no_nan","repo":"hank0626/timebridge","repo_kind":"official","path":"utils/losses.py","file_url":"https://github.com/hank0626/timebridge/blob/HEAD/utils/losses.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"bdc787c888ab83a2"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}