{"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/an-improved-masking-strategy-for-self","title":"An Improved Masking Strategy for Self-supervised Masked Reconstruction in Human Activity Recognition","arxiv_id":"2312.04147","date":"2023-12-07","proceeding":null,"authors":["Jinqiang Wang","Tao Zhu","Huansheng Ning"],"abstract":"Masked reconstruction serves as a fundamental pretext task for self-supervised learning, enabling the model to enhance its feature extraction capabilities by reconstructing the masked segments from extensive unlabeled data. In human activity recognition, this pretext task employed a masking strategy centered on the time dimension. However, this masking strategy fails to fully exploit the inherent characteristics of wearable sensor data and overlooks the inter-channel information coupling, thereby limiting its potential as a powerful pretext task. To address these limitations, we propose a novel masking strategy called Channel Masking. It involves masking the sensor data along the channel dimension, thereby compelling the encoder to extract channel-related features while performing the masked reconstruction task. Moreover, Channel Masking can be seamlessly integrated with masking strategies along the time dimension, thereby motivating the self-supervised model to undertake the masked reconstruction task in both the time and channel dimensions. Integrated masking strategies are named Time-Channel Masking and Span-Channel Masking. Finally, we optimize the reconstruction loss function to incorporate the reconstruction loss in both the time and channel dimensions. We evaluate proposed masking strategies on three public datasets, and experimental results show that the proposed strategies outperform prior strategies in both self-supervised and semi-supervised scenarios.","url_abs":"https://arxiv.org/abs/2312.04147v1","url_pdf":"https://arxiv.org/pdf/2312.04147v1.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":"links_only","authors_date_abstract":"arXiv metadata, CC0 1.0 (https://info.arxiv.org/help/license), from the Kaggle arXiv metadata snapshot of 2026-09-12"},"code_links":[{"paper_slug":"an-improved-masking-strategy-for-self","repo_url":"https://github.com/diheal/channle_masking","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"tf","reach":{"status":"ok"}}],"tasks":[],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":null,"atlas_url":"https://app.syntology.ai/?focus=2312.04147","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2312.04147"}},"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/diheal/channle_masking","reach":{"status":"ok"}}],"summary":{"ran_honours":2,"ran":3,"ran_draft_wrong":1,"unverified":2},"by_repo_kind":{"official":{"samples":8,"ran":6,"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":8,"samples":[{"code_sha256_prefix":"7816c6d65ab55d8f","entry":"get_angles","repo":"diheal/channle_masking","repo_kind":"official","path":"utils.py","file_url":"https://github.com/diheal/channle_masking/blob/HEAD/utils.py","link_basis":"harvester_set","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"7816c6d65ab55d8f"}},{"code_sha256_prefix":"e774add9378d78c7","entry":"get_data","repo":"diheal/channle_masking","repo_kind":"official","path":"dataset.py","file_url":"https://github.com/diheal/channle_masking/blob/HEAD/dataset.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":"e774add9378d78c7"}},{"code_sha256_prefix":"a3e63cd2c4334956","entry":"point_wise_feed_forward_network","repo":"diheal/channle_masking","repo_kind":"official","path":"encoderLayer.py","file_url":"https://github.com/diheal/channle_masking/blob/HEAD/encoderLayer.py","link_basis":"plan_row","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"none","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"a3e63cd2c4334956"}},{"code_sha256_prefix":"70fe09020aeba7f4","entry":"positional_encoding","repo":"diheal/channle_masking","repo_kind":"official","path":"utils.py","file_url":"https://github.com/diheal/channle_masking/blob/HEAD/utils.py","link_basis":"plan_row","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"70fe09020aeba7f4"}},{"code_sha256_prefix":"00c2ece4e478acf2","entry":"scaled_dot_product_attention","repo":"diheal/channle_masking","repo_kind":"official","path":"multiHeadAttention.py","file_url":"https://github.com/diheal/channle_masking/blob/HEAD/multiHeadAttention.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":"00c2ece4e478acf2"}},{"code_sha256_prefix":"fef0db7c23439528","entry":"span_mask","repo":"diheal/channle_masking","repo_kind":"official","path":"utils.py","file_url":"https://github.com/diheal/channle_masking/blob/HEAD/utils.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":"fef0db7c23439528"}},{"code_sha256_prefix":"584d76a8e1df1ca1","entry":"get_base","repo":"diheal/channle_masking","repo_kind":"official","path":"module.py","file_url":"https://github.com/diheal/channle_masking/blob/HEAD/module.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":"584d76a8e1df1ca1"}},{"code_sha256_prefix":"39ea78413719e721","entry":"get_evaluate","repo":"diheal/channle_masking","repo_kind":"official","path":"module.py","file_url":"https://github.com/diheal/channle_masking/blob/HEAD/module.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":"39ea78413719e721"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}