{"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/retrieval-augmented-time-series-forecasting-1","title":"Retrieval Augmented Time Series Forecasting","arxiv_id":"2505.04163","date":"2025-05-07","proceeding":null,"authors":["Sungwon Han","Seungeon Lee","Meeyoung Cha","Sercan O Arik","Jinsung Yoon"],"abstract":"Time series forecasting uses historical data to predict future trends, leveraging the relationships between past observations and available features. In this paper, we propose RAFT, a retrieval-augmented time series forecasting method to provide sufficient inductive biases and complement the model's learning capacity. When forecasting the subsequent time frames, we directly retrieve historical data candidates from the training dataset with patterns most similar to the input, and utilize the future values of these candidates alongside the inputs to obtain predictions. This simple approach augments the model's capacity by externally providing information about past patterns via retrieval modules. Our empirical evaluations on ten benchmark datasets show that RAFT consistently outperforms contemporary baselines with an average win ratio of 86%.","url_abs":"https://arxiv.org/abs/2505.04163v1","url_pdf":"https://arxiv.org/pdf/2505.04163v1.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":"retrieval-augmented-time-series-forecasting-1","repo_url":"https://github.com/archon159/RAFT","is_official":1,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":"retrieval","task_name":"Retrieval"},{"task_slug":"time-series-1","task_name":"Time Series"},{"task_slug":"time-series-forecasting","task_name":"Time Series Forecasting"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2505.04163","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2505.04163"}},"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/archon159/RAFT","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran":3,"unverified":10},"by_repo_kind":{"official":{"samples":13,"ran":3,"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":"c7809c2a271dca7d","entry":"group_values","repo":"archon159/RAFT","repo_kind":"official","path":"utils/m4_summary.py","file_url":"https://github.com/archon159/RAFT/blob/HEAD/utils/m4_summary.py","link_basis":"harvester_set","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":"c7809c2a271dca7d"}},{"code_sha256_prefix":"a835854e98db22c5","entry":"mase","repo":"archon159/RAFT","repo_kind":"official","path":"utils/m4_summary.py","file_url":"https://github.com/archon159/RAFT/blob/HEAD/utils/m4_summary.py","link_basis":"harvester_set","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":"a835854e98db22c5"}},{"code_sha256_prefix":"27a243751eb26480","entry":"smape_2","repo":"archon159/RAFT","repo_kind":"official","path":"utils/m4_summary.py","file_url":"https://github.com/archon159/RAFT/blob/HEAD/utils/m4_summary.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":"27a243751eb26480"}},{"code_sha256_prefix":"19d697bd6bbd21c0","entry":"accelerated_dtw","repo":"archon159/RAFT","repo_kind":"official","path":"utils/dtw_metric.py","file_url":"https://github.com/archon159/RAFT/blob/HEAD/utils/dtw_metric.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":"19d697bd6bbd21c0"}},{"code_sha256_prefix":"6aa5559ae4d6a717","entry":"calculate_ADF","repo":"archon159/RAFT","repo_kind":"official","path":"utils/ADFtest.py","file_url":"https://github.com/archon159/RAFT/blob/HEAD/utils/ADFtest.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":"6aa5559ae4d6a717"}},{"code_sha256_prefix":"447f4eb6d094eb7f","entry":"calculate_target_ADF","repo":"archon159/RAFT","repo_kind":"official","path":"utils/ADFtest.py","file_url":"https://github.com/archon159/RAFT/blob/HEAD/utils/ADFtest.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":"447f4eb6d094eb7f"}},{"code_sha256_prefix":"bdc787c888ab83a2","entry":"divide_no_nan","repo":"archon159/RAFT","repo_kind":"official","path":"utils/losses.py","file_url":"https://github.com/archon159/RAFT/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"}},{"code_sha256_prefix":"66037d9834a6eeb5","entry":"dtw","repo":"archon159/RAFT","repo_kind":"official","path":"utils/dtw.py","file_url":"https://github.com/archon159/RAFT/blob/HEAD/utils/dtw.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":"66037d9834a6eeb5"}},{"code_sha256_prefix":"79cd2766b7a4c49f","entry":"dtw","repo":"archon159/RAFT","repo_kind":"official","path":"utils/dtw_metric.py","file_url":"https://github.com/archon159/RAFT/blob/HEAD/utils/dtw_metric.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":"79cd2766b7a4c49f"}},{"code_sha256_prefix":"7e91f7d6b90183d5","entry":"jitter","repo":"archon159/RAFT","repo_kind":"official","path":"utils/augmentation.py","file_url":"https://github.com/archon159/RAFT/blob/HEAD/utils/augmentation.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":"7e91f7d6b90183d5"}},{"code_sha256_prefix":"3e06f3c627157901","entry":"rotation","repo":"archon159/RAFT","repo_kind":"official","path":"utils/augmentation.py","file_url":"https://github.com/archon159/RAFT/blob/HEAD/utils/augmentation.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":"3e06f3c627157901"}},{"code_sha256_prefix":"570f35b7d04be7f7","entry":"scaling","repo":"archon159/RAFT","repo_kind":"official","path":"utils/augmentation.py","file_url":"https://github.com/archon159/RAFT/blob/HEAD/utils/augmentation.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":"570f35b7d04be7f7"}},{"code_sha256_prefix":"4967a8f159950811","entry":"shape_dtw","repo":"archon159/RAFT","repo_kind":"official","path":"utils/dtw.py","file_url":"https://github.com/archon159/RAFT/blob/HEAD/utils/dtw.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":"4967a8f159950811"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}