{"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/saits-self-attention-based-imputation-for","title":"SAITS: Self-Attention-based Imputation for Time Series","arxiv_id":"2202.08516","date":"2022-02-17","proceeding":null,"authors":["Wenjie Du","David Cote","Yan Liu"],"abstract":"Missing data in time series is a pervasive problem that puts obstacles in the way of advanced analysis. A popular solution is imputation, where the fundamental challenge is to determine what values should be filled in. This paper proposes SAITS, a novel method based on the self-attention mechanism for missing value imputation in multivariate time series. Trained by a joint-optimization approach, SAITS learns missing values from a weighted combination of two diagonally-masked self-attention (DMSA) blocks. DMSA explicitly captures both the temporal dependencies and feature correlations between time steps, which improves imputation accuracy and training speed. Meanwhile, the weighted-combination design enables SAITS to dynamically assign weights to the learned representations from two DMSA blocks according to the attention map and the missingness information. Extensive experiments quantitatively and qualitatively demonstrate that SAITS outperforms the state-of-the-art methods on the time-series imputation task efficiently and reveal SAITS' potential to improve the learning performance of pattern recognition models on incomplete time-series data from the real world. The code is open source on GitHub at https://github.com/WenjieDu/SAITS.","url_abs":"https://arxiv.org/abs/2202.08516v5","url_pdf":"https://arxiv.org/pdf/2202.08516v5.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":"saits-self-attention-based-imputation-for","repo_url":"https://github.com/WenjieDu/SAITS","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"saits-self-attention-based-imputation-for","repo_url":"https://github.com/WenjieDu/PyPOTS","is_official":1,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"saits-self-attention-based-imputation-for","repo_url":"https://github.com/gorgen2020/LSSDM_imputation","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":"imputation","task_name":"Imputation"},{"task_slug":"missing-values","task_name":"Missing Values"},{"task_slug":"multivariate-time-series-imputation","task_name":"Multivariate Time Series Imputation"},{"task_slug":"time-series-1","task_name":"Time Series"},{"task_slug":"time-series","task_name":"Time Series Analysis"},{"task_slug":"time-series-classification","task_name":"Time Series Classification"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[{"leaderboard":"/sota/multivariate-time-series-imputation-on-3","task":"Multivariate Time Series Imputation","dataset":"Electricity","model":"SAITS","rank_in_archive_order":1,"of":1,"metrics":{"MAE (100 steps, 10% data missing)":"0.735"},"uses_additional_data":false},{"leaderboard":"/sota/multivariate-time-series-imputation-on-1","task":"Multivariate Time Series Imputation","dataset":"PhysioNet Challenge 2012","model":"SAITS","rank_in_archive_order":1,"of":9,"metrics":{"MAE (10% of data as GT)":"0.186"},"uses_additional_data":false}],"syntology":{"syntology_url":null,"atlas_url":"https://app.syntology.ai/?focus=2202.08516","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2202.08516"}},"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/gorgen2020/LSSDM_imputation","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/WenjieDu/SAITS","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/WenjieDu/PyPOTS","reach":null}],"summary":{"ran_draft_wrong":3,"unverified":7},"by_repo_kind":{"official":{"samples":2,"ran":1,"repositories":1},"listed":{"samples":8,"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":"7340b482ffe44836","entry":"Conv1d_with_init","repo":"gorgen2020/LSSDM_imputation","repo_kind":"listed","path":"diff_models.py","file_url":"https://github.com/gorgen2020/LSSDM_imputation/blob/HEAD/diff_models.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":"7340b482ffe44836"}},{"code_sha256_prefix":"e706793d7d22ae44","entry":"get_torch_trans","repo":"gorgen2020/LSSDM_imputation","repo_kind":"listed","path":"diff_models.py","file_url":"https://github.com/gorgen2020/LSSDM_imputation/blob/HEAD/diff_models.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":"e706793d7d22ae44"}},{"code_sha256_prefix":"eda3c011569ce7aa","entry":"read_arguments","repo":"WenjieDu/SAITS","repo_kind":"official","path":"run_models.py","file_url":"https://github.com/WenjieDu/SAITS/blob/HEAD/run_models.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":"eda3c011569ce7aa"}},{"code_sha256_prefix":"a8551932723a26a9","entry":"extract_hour","repo":"gorgen2020/LSSDM_imputation","repo_kind":"listed","path":"dataset_physio.py","file_url":"https://github.com/gorgen2020/LSSDM_imputation/blob/HEAD/dataset_physio.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":"a8551932723a26a9"}},{"code_sha256_prefix":"ccd6544c73cf2a29","entry":"get_dataloader","repo":"gorgen2020/LSSDM_imputation","repo_kind":"listed","path":"dataset_pm25.py","file_url":"https://github.com/gorgen2020/LSSDM_imputation/blob/HEAD/dataset_pm25.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":"ccd6544c73cf2a29"}},{"code_sha256_prefix":"52837d0ce876252f","entry":"get_dataloader_original","repo":"gorgen2020/LSSDM_imputation","repo_kind":"listed","path":"dataset_pm25.py","file_url":"https://github.com/gorgen2020/LSSDM_imputation/blob/HEAD/dataset_pm25.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":"52837d0ce876252f"}},{"code_sha256_prefix":"d166bfcd5d4c397e","entry":"parse_data","repo":"gorgen2020/LSSDM_imputation","repo_kind":"listed","path":"dataset_physio.py","file_url":"https://github.com/gorgen2020/LSSDM_imputation/blob/HEAD/dataset_physio.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":"d166bfcd5d4c397e"}},{"code_sha256_prefix":"5c04f3d80eeca460","entry":"parse_id","repo":"gorgen2020/LSSDM_imputation","repo_kind":"listed","path":"dataset_physio.py","file_url":"https://github.com/gorgen2020/LSSDM_imputation/blob/HEAD/dataset_physio.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":"5c04f3d80eeca460"}},{"code_sha256_prefix":"969cbb4487c84c89","entry":"result_processing","repo":"WenjieDu/SAITS","repo_kind":"official","path":"run_models.py","file_url":"https://github.com/WenjieDu/SAITS/blob/HEAD/run_models.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":"969cbb4487c84c89"}},{"code_sha256_prefix":"353b5cb711bb921e","entry":"sample_mask","repo":"gorgen2020/LSSDM_imputation","repo_kind":"listed","path":"dataset_pemsbay.py","file_url":"https://github.com/gorgen2020/LSSDM_imputation/blob/HEAD/dataset_pemsbay.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":"353b5cb711bb921e"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}