{"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/guiding-masked-representation-learning-to","title":"Guiding Masked Representation Learning to Capture Spatio-Temporal Relationship of Electrocardiogram","arxiv_id":"2402.09450","date":"2024-02-02","proceeding":null,"authors":["Yeongyeon Na","Minje Park","Yunwon Tae","Sunghoon Joo"],"abstract":"Electrocardiograms (ECG) are widely employed as a diagnostic tool for monitoring electrical signals originating from a heart. Recent machine learning research efforts have focused on the application of screening various diseases using ECG signals. However, adapting to the application of screening disease is challenging in that labeled ECG data are limited. Achieving general representation through self-supervised learning (SSL) is a well-known approach to overcome the scarcity of labeled data; however, a naive application of SSL to ECG data, without considering the spatial-temporal relationships inherent in ECG signals, may yield suboptimal results. In this paper, we introduce ST-MEM (Spatio-Temporal Masked Electrocardiogram Modeling), designed to learn spatio-temporal features by reconstructing masked 12-lead ECG data. ST-MEM outperforms other SSL baseline methods in various experimental settings for arrhythmia classification tasks. Moreover, we demonstrate that ST-MEM is adaptable to various lead combinations. Through quantitative and qualitative analysis, we show a spatio-temporal relationship within ECG data. Our code is available at https://github.com/bakqui/ST-MEM.","url_abs":"https://arxiv.org/abs/2402.09450v3","url_pdf":"https://arxiv.org/pdf/2402.09450v3.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":"guiding-masked-representation-learning-to","repo_url":"https://github.com/bakqui/st-mem","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"pytorch","reach":{"status":"ok","spdx":"NOASSERTION"}}],"tasks":[{"task_slug":"diagnostic","task_name":"Diagnostic"},{"task_slug":"ecg-classification","task_name":"ECG Classification"},{"task_slug":"electrocardiography-ecg","task_name":"Electrocardiography (ECG)"},{"task_slug":"representation-learning","task_name":"Representation Learning"},{"task_slug":"self-supervised-learning","task_name":"Self-Supervised Learning"}],"methods":[{"method_slug":"mae","method_name":"MAE"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2402.09450","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2402.09450"}},"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/bakqui/ST-MEM","reach":{"status":"ok","spdx":"NOASSERTION"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/bakqui/st-mem","reach":{"status":"ok","spdx":"NOASSERTION"}}],"summary":{"ran":8,"ran_honours":1,"unverified":3},"by_repo_kind":{"official":{"samples":12,"ran":9,"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":"99e49f8a77853d36","entry":"Attention","repo":"bakqui/st-mem","repo_kind":"official","path":"models/st_mem.py","file_url":"https://github.com/bakqui/st-mem/blob/HEAD/models/st_mem.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"99e49f8a77853d36"}},{"code_sha256_prefix":"2b3233292ba7ed4f","entry":"DropPath","repo":"bakqui/st-mem","repo_kind":"official","path":"models/st_mem.py","file_url":"https://github.com/bakqui/st-mem/blob/HEAD/models/st_mem.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"2b3233292ba7ed4f"}},{"code_sha256_prefix":"64ed1b3cde2d010f","entry":"FeedForward","repo":"bakqui/st-mem","repo_kind":"official","path":"models/st_mem.py","file_url":"https://github.com/bakqui/st-mem/blob/HEAD/models/st_mem.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"64ed1b3cde2d010f"}},{"code_sha256_prefix":"a24bf8bb8d9da4b8","entry":"PreNorm","repo":"bakqui/st-mem","repo_kind":"official","path":"models/st_mem.py","file_url":"https://github.com/bakqui/st-mem/blob/HEAD/models/st_mem.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"a24bf8bb8d9da4b8"}},{"code_sha256_prefix":"97bd47441e36c7ba","entry":"ST_MEM_ViT","repo":"bakqui/st-mem","repo_kind":"official","path":"models/st_mem.py","file_url":"https://github.com/bakqui/st-mem/blob/HEAD/models/st_mem.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"97bd47441e36c7ba"}},{"code_sha256_prefix":"8bb3bf9e7e9a8e01","entry":"TransformerBlock","repo":"bakqui/st-mem","repo_kind":"official","path":"models/st_mem.py","file_url":"https://github.com/bakqui/st-mem/blob/HEAD/models/st_mem.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"8bb3bf9e7e9a8e01"}},{"code_sha256_prefix":"0aac3a5d3e7366d0","entry":"build_loss_fn","repo":"bakqui/ST-MEM","repo_kind":"official","path":"util/losses.py","file_url":"https://github.com/bakqui/ST-MEM/blob/HEAD/util/losses.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"0aac3a5d3e7366d0"}},{"code_sha256_prefix":"be5ed6c1426a7112","entry":"get_1d_sincos_pos_embed","repo":"bakqui/st-mem","repo_kind":"official","path":"models/st_mem.py","file_url":"https://github.com/bakqui/st-mem/blob/HEAD/models/st_mem.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"well_formed","behaviour_fingerprint":true,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"be5ed6c1426a7112"}},{"code_sha256_prefix":"7824ae360cc8164e","entry":"get_1d_sincos_pos_embed","repo":"bakqui/ST-MEM","repo_kind":"official","path":"models/mtae.py","file_url":"https://github.com/bakqui/ST-MEM/blob/HEAD/models/mtae.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"7824ae360cc8164e"}},{"code_sha256_prefix":"972e6be1273bd1fe","entry":"ST_MEM","repo":"bakqui/st-mem","repo_kind":"official","path":"models/st_mem.py","file_url":"https://github.com/bakqui/st-mem/blob/HEAD/models/st_mem.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"972e6be1273bd1fe"}},{"code_sha256_prefix":"c1e83d90ebccadea","entry":"vit_base","repo":"bakqui/ST-MEM","repo_kind":"official","path":"models/encoder/vit.py","file_url":"https://github.com/bakqui/ST-MEM/blob/HEAD/models/encoder/vit.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"c1e83d90ebccadea"}},{"code_sha256_prefix":"b07cc3e316c32ce2","entry":"vit_small","repo":"bakqui/ST-MEM","repo_kind":"official","path":"models/encoder/vit.py","file_url":"https://github.com/bakqui/ST-MEM/blob/HEAD/models/encoder/vit.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"b07cc3e316c32ce2"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}