{"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/self-supervised-contrastive-forecasting","title":"Self-Supervised Contrastive Learning for Long-term Forecasting","arxiv_id":"2402.02023","date":"2024-02-03","proceeding":null,"authors":["Junwoo Park","Daehoon Gwak","Jaegul Choo","Edward Choi"],"abstract":"Long-term forecasting presents unique challenges due to the time and memory complexity of handling long sequences. Existing methods, which rely on sliding windows to process long sequences, struggle to effectively capture long-term variations that are partially caught within the short window (i.e., outer-window variations). In this paper, we introduce a novel approach that overcomes this limitation by employing contrastive learning and enhanced decomposition architecture, specifically designed to focus on long-term variations. To this end, our contrastive loss incorporates global autocorrelation held in the whole time series, which facilitates the construction of positive and negative pairs in a self-supervised manner. When combined with our decomposition networks, our contrastive learning significantly improves long-term forecasting performance. Extensive experiments demonstrate that our approach outperforms 14 baseline models in multiple experiments over nine long-term benchmarks, especially in challenging scenarios that require a significantly long output for forecasting. Source code is available at https://github.com/junwoopark92/Self-Supervised-Contrastive-Forecsating.","url_abs":"https://arxiv.org/abs/2402.02023v2","url_pdf":"https://arxiv.org/pdf/2402.02023v2.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":"self-supervised-contrastive-forecasting","repo_url":"https://github.com/junwoopark92/self-supervised-contrastive-forecsating","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"pytorch","reach":null}],"tasks":[{"task_slug":"contrastive-learning","task_name":"Contrastive Learning"},{"task_slug":"time-series-1","task_name":"Time Series"},{"task_slug":"time-series-forecasting","task_name":"Time Series Forecasting"}],"methods":[{"method_slug":"contrastive-learning","method_name":"Contrastive Learning"},{"method_slug":"focus","method_name":"Focus"}],"datasets_introduced":[],"methods_introduced":[],"results":[{"leaderboard":"/sota/time-series-forecasting-on-etth1-720-2","task":"Time Series Forecasting","dataset":"ETTh1 (720) Univariate","model":"AutoCon","rank_in_archive_order":1,"of":12,"metrics":{"MAE":"0.223","MSE":"0.078"},"uses_additional_data":false},{"leaderboard":"/sota/time-series-forecasting-on-etth2-720-2","task":"Time Series Forecasting","dataset":"ETTh2 (720) Univariate","model":"AutoCon","rank_in_archive_order":1,"of":11,"metrics":{"MAE":"0.344","MSE":"0.177"},"uses_additional_data":false}],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2402.02023","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2402.02023"}},"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/junwoopark92/self-supervised-contrastive-forecsating","reach":null}],"summary":{"ran_draft_wrong":2,"unverified":1},"by_repo_kind":{"official":{"samples":3,"ran":2,"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":"06d3cbcf4dc84ada","entry":"autocorr_mask","repo":"junwoopark92/self-supervised-contrastive-forecsating","repo_kind":"official","path":"layers/losses.py","file_url":"https://github.com/junwoopark92/self-supervised-contrastive-forecsating/blob/HEAD/layers/losses.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"06d3cbcf4dc84ada"}},{"code_sha256_prefix":"d4b7801fb567ae7c","entry":"local_autocorr_mask","repo":"junwoopark92/self-supervised-contrastive-forecsating","repo_kind":"official","path":"layers/losses.py","file_url":"https://github.com/junwoopark92/self-supervised-contrastive-forecsating/blob/HEAD/layers/losses.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"d4b7801fb567ae7c"}},{"code_sha256_prefix":"21054d4a41578aa7","entry":"AutoCon","repo":"junwoopark92/self-supervised-contrastive-forecsating","repo_kind":"official","path":"layers/losses.py","file_url":"https://github.com/junwoopark92/self-supervised-contrastive-forecsating/blob/HEAD/layers/losses.py","link_basis":"first_harvest_node","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":"21054d4a41578aa7"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}