{"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/are-self-attentions-effective-for-time-series","title":"Are Self-Attentions Effective for Time Series Forecasting?","arxiv_id":"2405.16877","date":"2024-05-27","proceeding":null,"authors":["Dongbin Kim","Jinseong Park","Jaewook Lee","Hoki Kim"],"abstract":"Time series forecasting is crucial for applications across multiple domains and various scenarios. Although Transformer models have dramatically advanced the landscape of forecasting, their effectiveness remains debated. Recent findings have indicated that simpler linear models might outperform complex Transformer-based approaches, highlighting the potential for more streamlined architectures. In this paper, we shift the focus from evaluating the overall Transformer architecture to specifically examining the effectiveness of self-attention for time series forecasting. To this end, we introduce a new architecture, Cross-Attention-only Time Series transformer (CATS), that rethinks the traditional Transformer framework by eliminating self-attention and leveraging cross-attention mechanisms instead. By establishing future horizon-dependent parameters as queries and enhanced parameter sharing, our model not only improves long-term forecasting accuracy but also reduces the number of parameters and memory usage. Extensive experiment across various datasets demonstrates that our model achieves superior performance with the lowest mean squared error and uses fewer parameters compared to existing models. The implementation of our model is available at: https://github.com/dongbeank/CATS.","url_abs":"https://arxiv.org/abs/2405.16877v3","url_pdf":"https://arxiv.org/pdf/2405.16877v3.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":"are-self-attentions-effective-for-time-series","repo_url":"https://github.com/dongbeank/cats","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":"time-series-1","task_name":"Time Series"},{"task_slug":"time-series-forecasting","task_name":"Time Series Forecasting"}],"methods":[{"method_slug":"absolute-position-encodings","method_name":"Absolute Position Encodings"},{"method_slug":"adam","method_name":"Adam"},{"method_slug":"attention","method_name":"Attention"},{"method_slug":"bpe","method_name":"BPE"},{"method_slug":"dense-connections","method_name":"Dense Connections"},{"method_slug":"dropout","method_name":"Dropout"},{"method_slug":"focus","method_name":"Focus"},{"method_slug":"label-smoothing","method_name":"Label Smoothing"},{"method_slug":"layer-normalization","method_name":"Layer Normalization"},{"method_slug":"linear-layer","method_name":"Linear Layer"},{"method_slug":"multi-head-attention","method_name":"Multi-Head Attention"},{"method_slug":"position-wise-feed-forward-layer","method_name":"Position-Wise Feed-Forward Layer"},{"method_slug":"residual-connection","method_name":"Residual Connection"},{"method_slug":"softmax","method_name":"Softmax"},{"method_slug":"transformer","method_name":"Transformer"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":null,"atlas_url":"https://app.syntology.ai/?focus=2405.16877","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2405.16877"}},"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/dongbeank/CATS","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/dongbeank/cats","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran":5,"unverified":8},"by_repo_kind":{"official":{"samples":13,"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":"5b900d79dd00feb4","entry":"DecoderLayer","repo":"dongbeank/cats","repo_kind":"official","path":"models/CATS.py","file_url":"https://github.com/dongbeank/cats/blob/HEAD/models/CATS.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"5b900d79dd00feb4"}},{"code_sha256_prefix":"c9e915f73a989d19","entry":"Projection","repo":"dongbeank/cats","repo_kind":"official","path":"models/CATS.py","file_url":"https://github.com/dongbeank/cats/blob/HEAD/models/CATS.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"c9e915f73a989d19"}},{"code_sha256_prefix":"51cadb0ea6fdf45c","entry":"QueryAdaptiveMasking","repo":"dongbeank/cats","repo_kind":"official","path":"models/CATS.py","file_url":"https://github.com/dongbeank/cats/blob/HEAD/models/CATS.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"51cadb0ea6fdf45c"}},{"code_sha256_prefix":"928f4380b09f0830","entry":"_MultiheadAttention","repo":"dongbeank/cats","repo_kind":"official","path":"models/CATS.py","file_url":"https://github.com/dongbeank/cats/blob/HEAD/models/CATS.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"928f4380b09f0830"}},{"code_sha256_prefix":"cb391e8599bbce03","entry":"parse_ratios","repo":"dongbeank/CATS","repo_kind":"official","path":"utils/tools.py","file_url":"https://github.com/dongbeank/CATS/blob/HEAD/utils/tools.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"cb391e8599bbce03"}},{"code_sha256_prefix":"8c76ef42a9443f81","entry":"CORR","repo":"dongbeank/CATS","repo_kind":"official","path":"utils/metrics.py","file_url":"https://github.com/dongbeank/CATS/blob/HEAD/utils/metrics.py","link_basis":"plan_row","language":"python","status":"unverified","verification_level":0,"contract_check":"HONOURS","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"8c76ef42a9443f81"}},{"code_sha256_prefix":"1a7ac87e34d772f5","entry":"Decoder","repo":"dongbeank/cats","repo_kind":"official","path":"models/CATS.py","file_url":"https://github.com/dongbeank/cats/blob/HEAD/models/CATS.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":"1a7ac87e34d772f5"}},{"code_sha256_prefix":"9362e3c7bb8cc5f2","entry":"Dummy_Embedding","repo":"dongbeank/cats","repo_kind":"official","path":"models/CATS.py","file_url":"https://github.com/dongbeank/cats/blob/HEAD/models/CATS.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":"9362e3c7bb8cc5f2"}},{"code_sha256_prefix":"75f44993b096bf76","entry":"MAE","repo":"dongbeank/CATS","repo_kind":"official","path":"utils/metrics.py","file_url":"https://github.com/dongbeank/CATS/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":"d682a61115f944df","entry":"Model_backbone","repo":"dongbeank/cats","repo_kind":"official","path":"models/CATS.py","file_url":"https://github.com/dongbeank/cats/blob/HEAD/models/CATS.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":"d682a61115f944df"}},{"code_sha256_prefix":"b40a11875ebd0cd2","entry":"RSE","repo":"dongbeank/CATS","repo_kind":"official","path":"utils/metrics.py","file_url":"https://github.com/dongbeank/CATS/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":"9a5fcd4ebfc55d03","entry":"time_features","repo":"dongbeank/CATS","repo_kind":"official","path":"utils/timefeatures.py","file_url":"https://github.com/dongbeank/CATS/blob/HEAD/utils/timefeatures.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":"9a5fcd4ebfc55d03"}},{"code_sha256_prefix":"f8544563682146e5","entry":"time_features_from_frequency_str","repo":"dongbeank/CATS","repo_kind":"official","path":"utils/timefeatures.py","file_url":"https://github.com/dongbeank/CATS/blob/HEAD/utils/timefeatures.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":"MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"f8544563682146e5"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}