{"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/film-frequency-improved-legendre-memory-model","title":"FiLM: Frequency improved Legendre Memory Model for Long-term Time Series Forecasting","arxiv_id":"2205.08897","date":"2022-05-18","proceeding":null,"authors":["Tian Zhou","Ziqing Ma","Xue Wang","Qingsong Wen","Liang Sun","Tao Yao","Wotao Yin","Rong Jin"],"abstract":"Recent studies have shown that deep learning models such as RNNs and Transformers have brought significant performance gains for long-term forecasting of time series because they effectively utilize historical information. We found, however, that there is still great room for improvement in how to preserve historical information in neural networks while avoiding overfitting to noise presented in the history. Addressing this allows better utilization of the capabilities of deep learning models. To this end, we design a \\textbf{F}requency \\textbf{i}mproved \\textbf{L}egendre \\textbf{M}emory model, or {\\bf FiLM}: it applies Legendre Polynomials projections to approximate historical information, uses Fourier projection to remove noise, and adds a low-rank approximation to speed up computation. Our empirical studies show that the proposed FiLM significantly improves the accuracy of state-of-the-art models in multivariate and univariate long-term forecasting by (\\textbf{20.3\\%}, \\textbf{22.6\\%}), respectively. We also demonstrate that the representation module developed in this work can be used as a general plug-in to improve the long-term prediction performance of other deep learning modules. Code is available at https://github.com/tianzhou2011/FiLM/","url_abs":"https://arxiv.org/abs/2205.08897v4","url_pdf":"https://arxiv.org/pdf/2205.08897v4.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":"film-frequency-improved-legendre-memory-model","repo_url":"https://github.com/WenjieDu/PyPOTS","is_official":1,"mentioned_in_paper":0,"mentioned_in_github":0,"framework":"pytorch","reach":null},{"paper_slug":"film-frequency-improved-legendre-memory-model","repo_url":"https://github.com/tianzhou2011/FiLM","is_official":0,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"film-frequency-improved-legendre-memory-model","repo_url":"https://github.com/damo-di-ml/neurips2022-film","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null}],"tasks":[{"task_slug":"deep-learning","task_name":"Deep Learning"},{"task_slug":"dimensionality-reduction","task_name":"Dimensionality Reduction"},{"task_slug":"time-series-1","task_name":"Time Series"},{"task_slug":"time-series","task_name":"Time Series Analysis"},{"task_slug":"time-series-forecasting","task_name":"Time Series Forecasting"}],"methods":[{"method_slug":"speed","method_name":"SPEED"}],"datasets_introduced":[],"methods_introduced":[],"results":[{"leaderboard":"/sota/time-series-forecasting-on-etth1-192-1","task":"Time Series Forecasting","dataset":"ETTh1 (192) Multivariate","model":"FiLM","rank_in_archive_order":15,"of":17,"metrics":{"MAE":"0.423","MSE":"0.414"},"uses_additional_data":false},{"leaderboard":"/sota/time-series-forecasting-on-etth1-192-2","task":"Time Series Forecasting","dataset":"ETTh1 (192) Univariate","model":"FiLM","rank_in_archive_order":4,"of":5,"metrics":{"MAE":"0.207","MSE":"0.072"},"uses_additional_data":false},{"leaderboard":"/sota/time-series-forecasting-on-etth1-336-1","task":"Time Series Forecasting","dataset":"ETTh1 (336) Multivariate","model":"FiLM","rank_in_archive_order":37,"of":72,"metrics":{"MAE":"0.445","MSE":"0.442"},"uses_additional_data":false},{"leaderboard":"/sota/time-series-forecasting-on-etth1-336-2","task":"Time Series Forecasting","dataset":"ETTh1 (336) Univariate","model":"FiLM","rank_in_archive_order":5,"of":10,"metrics":{"MAE":"0.229","MSE":"0.083"},"uses_additional_data":false},{"leaderboard":"/sota/time-series-forecasting-on-etth1-720-1","task":"Time Series Forecasting","dataset":"ETTh1 (720) Multivariate","model":"FiLM","rank_in_archive_order":13,"of":22,"metrics":{"MAE":"0.472","MSE":"0.465"},"uses_additional_data":false},{"leaderboard":"/sota/time-series-forecasting-on-etth1-720-2","task":"Time Series Forecasting","dataset":"ETTh1 (720) Univariate","model":"FiLM","rank_in_archive_order":5,"of":12,"metrics":{"MAE":"0.24","MSE":"0.09"},"uses_additional_data":false},{"leaderboard":"/sota/time-series-forecasting-on-etth1-96-1","task":"Time Series Forecasting","dataset":"ETTh1 (96) Multivariate","model":"FiLM","rank_in_archive_order":11,"of":15,"metrics":{"MAE":"0.394","MSE":"0.371"},"uses_additional_data":false},{"leaderboard":"/sota/time-series-forecasting-on-etth1-96-2","task":"Time Series Forecasting","dataset":"ETTh1 (96) Univariate","model":"FiLM","rank_in_archive_order":4,"of":6,"metrics":{"MAE":"0.178","MSE":"0.055"},"uses_additional_data":false},{"leaderboard":"/sota/time-series-forecasting-on-etth2-192-1","task":"Time Series Forecasting","dataset":"ETTh2 (192) Multivariate","model":"FiLM","rank_in_archive_order":13,"of":16,"metrics":{"MAE":"0.4","MSE":"0.357"},"uses_additional_data":false},{"leaderboard":"/sota/time-series-forecasting-on-etth2-192-2","task":"Time Series Forecasting","dataset":"ETTh2 (192) Univariate","model":"FiLM","rank_in_archive_order":6,"of":6,"metrics":{"MAE":"0.335","MSE":"0.182"},"uses_additional_data":false},{"leaderboard":"/sota/time-series-forecasting-on-etth2-336-1","task":"Time Series Forecasting","dataset":"ETTh2 (336) Multivariate","model":"FiLM","rank_in_archive_order":14,"of":20,"metrics":{"MAE":"0.417","MSE":"0.377"},"uses_additional_data":false},{"leaderboard":"/sota/time-series-forecasting-on-etth2-336-2","task":"Time Series Forecasting","dataset":"ETTh2 (336) Univariate","model":"FiLM","rank_in_archive_order":7,"of":10,"metrics":{"MAE":"0.367","MSE":"0.204"},"uses_additional_data":false},{"leaderboard":"/sota/time-series-forecasting-on-etth2-720-1","task":"Time Series Forecasting","dataset":"ETTh2 (720) Multivariate","model":"FiLM","rank_in_archive_order":14,"of":20,"metrics":{"MAE":"0.456","MSE":"0.439"},"uses_additional_data":false},{"leaderboard":"/sota/time-series-forecasting-on-etth2-720-2","task":"Time Series Forecasting","dataset":"ETTh2 (720) Univariate","model":"FiLM","rank_in_archive_order":7,"of":11,"metrics":{"MAE":"0.396","MSE":"0.241"},"uses_additional_data":false},{"leaderboard":"/sota/time-series-forecasting-on-etth2-96-1","task":"Time Series Forecasting","dataset":"ETTh2 (96) Multivariate","model":"FiLM","rank_in_archive_order":13,"of":16,"metrics":{"MAE":"0.348","MSE":"0.284"},"uses_additional_data":false},{"leaderboard":"/sota/time-series-forecasting-on-etth2-96-2","task":"Time Series Forecasting","dataset":"ETTh2 (96) Univariate","model":"FiLM","rank_in_archive_order":3,"of":6,"metrics":{"MAE":"0.272","MSE":"0.127"},"uses_additional_data":false}],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2205.08897","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2205.08897"}},"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/tianzhou2011/FiLM","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/damo-di-ml/neurips2022-film","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/WenjieDu/PyPOTS","reach":null}],"summary":{"ran_draft_wrong":8,"ran":6,"ran_violates":1,"ran_fixture":2,"unverified":1},"by_repo_kind":{"named_in_paper":{"samples":14,"ran":14,"repositories":1},"listed":{"samples":4,"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":"89b10a8b26bbb7ed","entry":"Activation","repo":"tianzhou2011/FiLM","repo_kind":"named_in_paper","path":"layers/S4.py","file_url":"https://github.com/tianzhou2011/FiLM/blob/HEAD/layers/S4.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"89b10a8b26bbb7ed"}},{"code_sha256_prefix":"d22c957702db6906","entry":"HiPPO_LegT","repo":"damo-di-ml/neurips2022-film","repo_kind":"listed","path":"models/FiLM.py","file_url":"https://github.com/damo-di-ml/neurips2022-film/blob/HEAD/models/FiLM.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":"d22c957702db6906"}},{"code_sha256_prefix":"84a100173d52d8f1","entry":"SpectralConv1d","repo":"damo-di-ml/neurips2022-film","repo_kind":"listed","path":"models/FiLM.py","file_url":"https://github.com/damo-di-ml/neurips2022-film/blob/HEAD/models/FiLM.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":"84a100173d52d8f1"}},{"code_sha256_prefix":"8429e6520e353d4d","entry":"batched_index_select","repo":"tianzhou2011/FiLM","repo_kind":"named_in_paper","path":"layers/LSHAttention_reformer.py","file_url":"https://github.com/tianzhou2011/FiLM/blob/HEAD/layers/LSHAttention_reformer.py","link_basis":"harvester_set","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":"8429e6520e353d4d"}},{"code_sha256_prefix":"0a550f84606d37a9","entry":"compl_mul1d","repo":"tianzhou2011/FiLM","repo_kind":"named_in_paper","path":"layers/mwt.py","file_url":"https://github.com/tianzhou2011/FiLM/blob/HEAD/layers/mwt.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"0a550f84606d37a9"}},{"code_sha256_prefix":"c4d0804ed8acef6e","entry":"decor_time","repo":"tianzhou2011/FiLM","repo_kind":"named_in_paper","path":"layers/AutoCorrelation.py","file_url":"https://github.com/tianzhou2011/FiLM/blob/HEAD/layers/AutoCorrelation.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":"c4d0804ed8acef6e"}},{"code_sha256_prefix":"aa5486a3650902d8","entry":"exists","repo":"tianzhou2011/FiLM","repo_kind":"named_in_paper","path":"layers/LSHAttention_reformer.py","file_url":"https://github.com/tianzhou2011/FiLM/blob/HEAD/layers/LSHAttention_reformer.py","link_basis":"harvester_set","language":"python","status":"ran_violates","verification_level":1,"contract_check":"VIOLATES","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"aa5486a3650902d8"}},{"code_sha256_prefix":"304bff6fb6e3e2cd","entry":"get_dynamic_modes","repo":"tianzhou2011/FiLM","repo_kind":"named_in_paper","path":"layers/FourierCorrelation.py","file_url":"https://github.com/tianzhou2011/FiLM/blob/HEAD/layers/FourierCorrelation.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":"304bff6fb6e3e2cd"}},{"code_sha256_prefix":"f3449af8fae1d130","entry":"get_initializer","repo":"tianzhou2011/FiLM","repo_kind":"named_in_paper","path":"layers/S4.py","file_url":"https://github.com/tianzhou2011/FiLM/blob/HEAD/layers/S4.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":"f3449af8fae1d130"}},{"code_sha256_prefix":"c12f08051ec5fa06","entry":"get_initializer","repo":"tianzhou2011/FiLM","repo_kind":"named_in_paper","path":"layers/mwt.py","file_url":"https://github.com/tianzhou2011/FiLM/blob/HEAD/layers/mwt.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":"c12f08051ec5fa06"}},{"code_sha256_prefix":"61139ec62260b411","entry":"get_logger","repo":"tianzhou2011/FiLM","repo_kind":"named_in_paper","path":"layers/S4.py","file_url":"https://github.com/tianzhou2011/FiLM/blob/HEAD/layers/S4.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"61139ec62260b411"}},{"code_sha256_prefix":"f32036738135c8a8","entry":"get_phi_psi","repo":"tianzhou2011/FiLM","repo_kind":"named_in_paper","path":"layers/utils.py","file_url":"https://github.com/tianzhou2011/FiLM/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":"tianzhou2011/FiLM","repo_kind":"named_in_paper","path":"layers/utils.py","file_url":"https://github.com/tianzhou2011/FiLM/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":"a54c8c5c47c6a8b8","entry":"phi_","repo":"tianzhou2011/FiLM","repo_kind":"named_in_paper","path":"layers/utils.py","file_url":"https://github.com/tianzhou2011/FiLM/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":"117b5aefd4b1b065","entry":"softmax_complex","repo":"tianzhou2011/FiLM","repo_kind":"named_in_paper","path":"layers/mwt.py","file_url":"https://github.com/tianzhou2011/FiLM/blob/HEAD/layers/mwt.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":"117b5aefd4b1b065"}},{"code_sha256_prefix":"8b42f84b228597d9","entry":"sort_key_val","repo":"tianzhou2011/FiLM","repo_kind":"named_in_paper","path":"layers/LSHAttention_reformer.py","file_url":"https://github.com/tianzhou2011/FiLM/blob/HEAD/layers/LSHAttention_reformer.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"8b42f84b228597d9"}},{"code_sha256_prefix":"82ea253c64044e55","entry":"transition","repo":"damo-di-ml/neurips2022-film","repo_kind":"listed","path":"models/FiLM.py","file_url":"https://github.com/damo-di-ml/neurips2022-film/blob/HEAD/models/FiLM.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":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"82ea253c64044e55"}},{"code_sha256_prefix":"ec0ad07ef03f10ee","entry":"Model","repo":"damo-di-ml/neurips2022-film","repo_kind":"listed","path":"models/FiLM.py","file_url":"https://github.com/damo-di-ml/neurips2022-film/blob/HEAD/models/FiLM.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":"ec0ad07ef03f10ee"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}