{"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/robusttsf-towards-theory-and-design-of-robust","title":"RobustTSF: Towards Theory and Design of Robust Time Series Forecasting with Anomalies","arxiv_id":"2402.02032","date":"2024-02-03","proceeding":null,"authors":["Hao Cheng","Qingsong Wen","Yang Liu","Liang Sun"],"abstract":"Time series forecasting is an important and forefront task in many real-world applications. However, most of time series forecasting techniques assume that the training data is clean without anomalies. This assumption is unrealistic since the collected time series data can be contaminated in practice. The forecasting model will be inferior if it is directly trained by time series with anomalies. Thus it is essential to develop methods to automatically learn a robust forecasting model from the contaminated data. In this paper, we first statistically define three types of anomalies, then theoretically and experimentally analyze the loss robustness and sample robustness when these anomalies exist. Based on our analyses, we propose a simple and efficient algorithm to learn a robust forecasting model. Extensive experiments show that our method is highly robust and outperforms all existing approaches. The code is available at https://github.com/haochenglouis/RobustTSF.","url_abs":"https://arxiv.org/abs/2402.02032v1","url_pdf":"https://arxiv.org/pdf/2402.02032v1.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":"robusttsf-towards-theory-and-design-of-robust","repo_url":"https://github.com/haochenglouis/robusttsf","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":null}],"tasks":[{"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":{"syntology_url":null,"atlas_url":"https://app.syntology.ai/?focus=2402.02032","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2402.02032"}},"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/haochenglouis/RobustTSF","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/haochenglouis/robusttsf","reach":null}],"summary":{"ran":4,"ran_fixture":1,"ran_draft_wrong":5,"unverified":2},"by_repo_kind":{"official":{"samples":12,"ran":10,"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":12,"samples":[{"code_sha256_prefix":"7cf73bba97ce763f","entry":"complete_linear_deviation","repo":"haochenglouis/robusttsf","repo_kind":"official","path":"RobustTSF_SOTA_Methods/Robust_Exp_Transformer/data_provider/trendfilter_modify/trendfilter.py","file_url":"https://github.com/haochenglouis/robusttsf/blob/HEAD/RobustTSF_SOTA_Methods/Robust_Exp_Transformer/data_provider/trendfilter_modify/trendfilter.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"7cf73bba97ce763f"}},{"code_sha256_prefix":"b0b8b5530ee8ee3d","entry":"complete_linear_deviations","repo":"haochenglouis/robusttsf","repo_kind":"official","path":"RobustTSF_SOTA_Methods/Robust_Exp_Transformer/data_provider/trendfilter_modify/trendfilter.py","file_url":"https://github.com/haochenglouis/robusttsf/blob/HEAD/RobustTSF_SOTA_Methods/Robust_Exp_Transformer/data_provider/trendfilter_modify/trendfilter.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"b0b8b5530ee8ee3d"}},{"code_sha256_prefix":"3900bd8aa76b04dd","entry":"first_derivative_matrix","repo":"haochenglouis/robusttsf","repo_kind":"official","path":"RobustTSF_SOTA_Methods/Robust_Exp_Transformer/data_provider/trendfilter_modify/trendfilter.py","file_url":"https://github.com/haochenglouis/robusttsf/blob/HEAD/RobustTSF_SOTA_Methods/Robust_Exp_Transformer/data_provider/trendfilter_modify/trendfilter.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"3900bd8aa76b04dd"}},{"code_sha256_prefix":"1e6625ac4c098f26","entry":"first_derv_nes_cvxpy","repo":"haochenglouis/robusttsf","repo_kind":"official","path":"RobustTSF_SOTA_Methods/Robust_Exp_Transformer/data_provider/trendfilter_modify/trendfilter.py","file_url":"https://github.com/haochenglouis/robusttsf/blob/HEAD/RobustTSF_SOTA_Methods/Robust_Exp_Transformer/data_provider/trendfilter_modify/trendfilter.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"1e6625ac4c098f26"}},{"code_sha256_prefix":"adf520c57cf10d0e","entry":"get_interp_extrapolate_functions","repo":"haochenglouis/robusttsf","repo_kind":"official","path":"RobustTSF_SOTA_Methods/Robust_Exp_Transformer/data_provider/trendfilter_modify/trendfilter.py","file_url":"https://github.com/haochenglouis/robusttsf/blob/HEAD/RobustTSF_SOTA_Methods/Robust_Exp_Transformer/data_provider/trendfilter_modify/trendfilter.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"adf520c57cf10d0e"}},{"code_sha256_prefix":"f56222d1f555e2b5","entry":"get_model_deviation_matrix","repo":"haochenglouis/robusttsf","repo_kind":"official","path":"RobustTSF_SOTA_Methods/Robust_Exp_Transformer/data_provider/trendfilter_modify/trendfilter.py","file_url":"https://github.com/haochenglouis/robusttsf/blob/HEAD/RobustTSF_SOTA_Methods/Robust_Exp_Transformer/data_provider/trendfilter_modify/trendfilter.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":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"f56222d1f555e2b5"}},{"code_sha256_prefix":"70f16e450f281be0","entry":"get_obj_func_model","repo":"haochenglouis/robusttsf","repo_kind":"official","path":"RobustTSF_SOTA_Methods/Robust_Exp_Transformer/data_provider/trendfilter_modify/trendfilter.py","file_url":"https://github.com/haochenglouis/robusttsf/blob/HEAD/RobustTSF_SOTA_Methods/Robust_Exp_Transformer/data_provider/trendfilter_modify/trendfilter.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"70f16e450f281be0"}},{"code_sha256_prefix":"9dce9ac21ed99398","entry":"get_reg","repo":"haochenglouis/robusttsf","repo_kind":"official","path":"RobustTSF_SOTA_Methods/Robust_Exp_Transformer/data_provider/trendfilter_modify/trendfilter.py","file_url":"https://github.com/haochenglouis/robusttsf/blob/HEAD/RobustTSF_SOTA_Methods/Robust_Exp_Transformer/data_provider/trendfilter_modify/trendfilter.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"9dce9ac21ed99398"}},{"code_sha256_prefix":"50d31d9fb26957b0","entry":"second_derivative_matrix_nes","repo":"haochenglouis/robusttsf","repo_kind":"official","path":"RobustTSF_SOTA_Methods/Robust_Exp_Transformer/data_provider/trendfilter_modify/trendfilter.py","file_url":"https://github.com/haochenglouis/robusttsf/blob/HEAD/RobustTSF_SOTA_Methods/Robust_Exp_Transformer/data_provider/trendfilter_modify/trendfilter.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":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"50d31d9fb26957b0"}},{"code_sha256_prefix":"ac866917dc1cd68b","entry":"vectorize","repo":"haochenglouis/robusttsf","repo_kind":"official","path":"RobustTSF_SOTA_Methods/Robust_Exp_Transformer/data_provider/trendfilter_modify/trendfilter.py","file_url":"https://github.com/haochenglouis/robusttsf/blob/HEAD/RobustTSF_SOTA_Methods/Robust_Exp_Transformer/data_provider/trendfilter_modify/trendfilter.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"ac866917dc1cd68b"}},{"code_sha256_prefix":"f4e5810a809e441a","entry":"trend_filter","repo":"haochenglouis/robusttsf","repo_kind":"official","path":"RobustTSF_SOTA_Methods/Robust_Exp_Transformer/data_provider/trendfilter_modify/trendfilter.py","file_url":"https://github.com/haochenglouis/robusttsf/blob/HEAD/RobustTSF_SOTA_Methods/Robust_Exp_Transformer/data_provider/trendfilter_modify/trendfilter.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"f4e5810a809e441a"}},{"code_sha256_prefix":"ff7b5d86575472f9","entry":"validate","repo":"haochenglouis/RobustTSF","repo_kind":"official","path":"train_noisy.py","file_url":"https://github.com/haochenglouis/RobustTSF/blob/HEAD/train_noisy.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"ff7b5d86575472f9"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}