{"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/arxiv-2608-23347","title":"Test-Time Adaptation for ECG Classification via SQI-Gated Self-Training and Beat-Rhythm Consistency","arxiv_id":"2608.23347","date":"2026-08-24","proceeding":null,"authors":["Wenhan Jiang","Zhipeng Deng","Jiale Zhou","Haolin Wang","Yafei Ou","Yefeng Zheng"],"abstract":"Deep learning models for electrocardiogram (ECG) classification often suffer from significant performance degradation when deployed in unseen domains due to shifts in acquisition devices and patient populations. Test-time adaptation (TTA) offers a practical solution by adapting models using only unlabeled data at inference time. However, existing TTA methods often underperform on ECG tasks, since naive online updates ignore the hierarchical beat-rhythm structure of cardiac cycles and are vulnerable to signal artifacts, which leads to unstable adaptation and model drift. We propose BeatRhythm-TTA, an ECG-tailored TTA framework that explicitly accounts for ECG's noisy observations and structured beat-rhythm semantics under domain shift. First, to handle pervasive ECG artifacts, we introduce a Signal Quality Index (SQI)-gated adaptation scheme that selectively filters out low-quality signals to prevent harmful updates. Second, to leverage ECG's beat-rhythm semantics, we enforce dual-level consistency so the model preserves beat morphology and rhythm dynamics while adapting to shifted acquisition conditions. Extensive experiments on multi-label ECG diagnosis across three adaptation protocols, using PTB-XL as the source domain and CPSC2018/Georgia as two target domains, demonstrate the effectiveness of our method, yielding an average +2.70% relative improvement in Macro-F1 over the best competing method.","url_abs":"https://arxiv.org/abs/2608.23347","url_pdf":"https://arxiv.org/pdf/2608.23347","source":{"archive":null,"snapshot":"2025-07-28","note":"not in the Papers with Code archive (frozen at the snapshot)","row_kind":"graph","title_abstract_authors_date":"arXiv metadata, CC0 1.0 (https://info.arxiv.org/help/license)"},"code_links":[],"tasks":[],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":"https://syntology.ai/paper/2608.23347","atlas_url":"https://app.syntology.ai/?focus=2608.23347","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2608.23347"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-25T09:33:49+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":[{"mentioned_in_github":null,"is_official":null,"provenance":"deterministic:regex_extraction","mentioned_in_paper":null,"url":"https://github.com/Vincent-Wenhan/BeatRhythm-TTA","reach":null}],"summary":{"ran":2,"ran_draft_wrong":5,"ran_fixture":6,"ran_honours":1,"ran_violates":1,"unverified":4},"by_repo_kind":{"found_in_text":{"samples":19,"ran":15,"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":"c0af846e96ca4517","entry":"Adapter","repo":"Vincent-Wenhan/BeatRhythm-TTA","repo_kind":"found_in_text","path":"src/method/beatrhythmtta.py","file_url":"https://github.com/Vincent-Wenhan/BeatRhythm-TTA/blob/HEAD/src/method/beatrhythmtta.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":"c0af846e96ca4517"}},{"code_sha256_prefix":"4f9c8246f0d92fdc","entry":"OutputHook","repo":"Vincent-Wenhan/BeatRhythm-TTA","repo_kind":"found_in_text","path":"src/method/beatrhythmtta.py","file_url":"https://github.com/Vincent-Wenhan/BeatRhythm-TTA/blob/HEAD/src/method/beatrhythmtta.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":"4f9c8246f0d92fdc"}},{"code_sha256_prefix":"e9d6a42d11559450","entry":"_aggregate_sample_sqi_from_beats","repo":"Vincent-Wenhan/BeatRhythm-TTA","repo_kind":"found_in_text","path":"src/method/beatrhythmtta.py","file_url":"https://github.com/Vincent-Wenhan/BeatRhythm-TTA/blob/HEAD/src/method/beatrhythmtta.py","link_basis":"first_harvest_node","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":"e9d6a42d11559450"}},{"code_sha256_prefix":"cc7d4ce406f2e230","entry":"_augment_time_aligned","repo":"Vincent-Wenhan/BeatRhythm-TTA","repo_kind":"found_in_text","path":"src/method/beatrhythmtta.py","file_url":"https://github.com/Vincent-Wenhan/BeatRhythm-TTA/blob/HEAD/src/method/beatrhythmtta.py","link_basis":"first_harvest_node","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":"cc7d4ce406f2e230"}},{"code_sha256_prefix":"23352225e22a2766","entry":"_beat_sqi_from_raw","repo":"Vincent-Wenhan/BeatRhythm-TTA","repo_kind":"found_in_text","path":"src/method/beatrhythmtta.py","file_url":"https://github.com/Vincent-Wenhan/BeatRhythm-TTA/blob/HEAD/src/method/beatrhythmtta.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"23352225e22a2766"}},{"code_sha256_prefix":"1469877e1da868a1","entry":"_cos_loss","repo":"Vincent-Wenhan/BeatRhythm-TTA","repo_kind":"found_in_text","path":"src/method/beatrhythmtta.py","file_url":"https://github.com/Vincent-Wenhan/BeatRhythm-TTA/blob/HEAD/src/method/beatrhythmtta.py","link_basis":"first_harvest_node","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":"1469877e1da868a1"}},{"code_sha256_prefix":"1e42a7bd01e89218","entry":"_cos_loss_vec","repo":"Vincent-Wenhan/BeatRhythm-TTA","repo_kind":"found_in_text","path":"src/method/beatrhythmtta.py","file_url":"https://github.com/Vincent-Wenhan/BeatRhythm-TTA/blob/HEAD/src/method/beatrhythmtta.py","link_basis":"first_harvest_node","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":"1e42a7bd01e89218"}},{"code_sha256_prefix":"81577d17c0818df4","entry":"_get_module_by_name","repo":"Vincent-Wenhan/BeatRhythm-TTA","repo_kind":"found_in_text","path":"src/method/beatrhythmtta.py","file_url":"https://github.com/Vincent-Wenhan/BeatRhythm-TTA/blob/HEAD/src/method/beatrhythmtta.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":"81577d17c0818df4"}},{"code_sha256_prefix":"499349346847f746","entry":"_map_rpeaks_sample_to_feat","repo":"Vincent-Wenhan/BeatRhythm-TTA","repo_kind":"found_in_text","path":"src/method/beatrhythmtta.py","file_url":"https://github.com/Vincent-Wenhan/BeatRhythm-TTA/blob/HEAD/src/method/beatrhythmtta.py","link_basis":"first_harvest_node","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":"499349346847f746"}},{"code_sha256_prefix":"029a9cac897dd0c7","entry":"_pool_beats","repo":"Vincent-Wenhan/BeatRhythm-TTA","repo_kind":"found_in_text","path":"src/method/beatrhythmtta.py","file_url":"https://github.com/Vincent-Wenhan/BeatRhythm-TTA/blob/HEAD/src/method/beatrhythmtta.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"029a9cac897dd0c7"}},{"code_sha256_prefix":"3bafcfe99aa8c684","entry":"as_2class_if_binary","repo":"Vincent-Wenhan/BeatRhythm-TTA","repo_kind":"found_in_text","path":"src/method/beatrhythmtta.py","file_url":"https://github.com/Vincent-Wenhan/BeatRhythm-TTA/blob/HEAD/src/method/beatrhythmtta.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"3bafcfe99aa8c684"}},{"code_sha256_prefix":"ca63893288e88e89","entry":"bn_affine_params_only","repo":"Vincent-Wenhan/BeatRhythm-TTA","repo_kind":"found_in_text","path":"src/method/beatrhythmtta.py","file_url":"https://github.com/Vincent-Wenhan/BeatRhythm-TTA/blob/HEAD/src/method/beatrhythmtta.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":"ca63893288e88e89"}},{"code_sha256_prefix":"62a7126295af3df9","entry":"bn_modules","repo":"Vincent-Wenhan/BeatRhythm-TTA","repo_kind":"found_in_text","path":"src/method/beatrhythmtta.py","file_url":"https://github.com/Vincent-Wenhan/BeatRhythm-TTA/blob/HEAD/src/method/beatrhythmtta.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":"62a7126295af3df9"}},{"code_sha256_prefix":"95c7d423e5761bc9","entry":"forward","repo":"Vincent-Wenhan/BeatRhythm-TTA","repo_kind":"found_in_text","path":"src/method/beatrhythmtta.py","file_url":"https://github.com/Vincent-Wenhan/BeatRhythm-TTA/blob/HEAD/src/method/beatrhythmtta.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":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"95c7d423e5761bc9"}},{"code_sha256_prefix":"90ab2183d1b2985c","entry":"is_multilabel","repo":"Vincent-Wenhan/BeatRhythm-TTA","repo_kind":"found_in_text","path":"src/method/beatrhythmtta.py","file_url":"https://github.com/Vincent-Wenhan/BeatRhythm-TTA/blob/HEAD/src/method/beatrhythmtta.py","link_basis":"first_harvest_node","language":"python","status":"ran_violates","verification_level":1,"contract_check":"VIOLATES","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"90ab2183d1b2985c"}},{"code_sha256_prefix":"c2e98b521fef27fa","entry":"BeatRhythmTTA","repo":"Vincent-Wenhan/BeatRhythm-TTA","repo_kind":"found_in_text","path":"src/method/beatrhythmtta.py","file_url":"https://github.com/Vincent-Wenhan/BeatRhythm-TTA/blob/HEAD/src/method/beatrhythmtta.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":"c2e98b521fef27fa"}},{"code_sha256_prefix":"7e9b5e32fb471ada","entry":"disable_dropout","repo":"Vincent-Wenhan/BeatRhythm-TTA","repo_kind":"found_in_text","path":"src/method/beatrhythmtta.py","file_url":"https://github.com/Vincent-Wenhan/BeatRhythm-TTA/blob/HEAD/src/method/beatrhythmtta.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":"7e9b5e32fb471ada"}},{"code_sha256_prefix":"93f5aab7ab70e133","entry":"set_bn_eval_only","repo":"Vincent-Wenhan/BeatRhythm-TTA","repo_kind":"found_in_text","path":"src/method/beatrhythmtta.py","file_url":"https://github.com/Vincent-Wenhan/BeatRhythm-TTA/blob/HEAD/src/method/beatrhythmtta.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":"93f5aab7ab70e133"}},{"code_sha256_prefix":"95f74d4e6881a050","entry":"set_bn_train_only","repo":"Vincent-Wenhan/BeatRhythm-TTA","repo_kind":"found_in_text","path":"src/method/beatrhythmtta.py","file_url":"https://github.com/Vincent-Wenhan/BeatRhythm-TTA/blob/HEAD/src/method/beatrhythmtta.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":"95f74d4e6881a050"}}]},"arxiv_metadata":{"licence":"arXiv metadata, CC0 1.0 (https://info.arxiv.org/help/license)","fields":["title","abstract","authors","date"],"primary_category":"cs.LG","source":"arxiv_2026.jsonl"},"syntology_extracted_results":{"kind":"leaderboard_placements","source":"Syntology's leaderboard-shaped extractor over the paper's own arXiv-HTML tables: a model pointed at a cell, the number was read from that cell and checked against the board's metric, dataset, split and scale, and an independent check accepted the entry; not reviewed by the paper's authors or the archive's editors","extractor_model":"global.anthropic.claude-sonnet-4-5-20250929-v1:0","verifier_model":null,"prompt_sha":"fa63d4bb9d755694","coverage":{"sentence":"Syntology has checked 6,885 of the 9,623 papers on this site that are newer than the archive; results from the others appear after they are checked.","papers_newer_than_archive":9623,"papers_checked":6885},"entries":[],"not_placed":{"boards":0,"rejected_by_independent_check":0,"refused_by_a_rule":0,"check_did_not_answer":0,"proposed_without_a_cell":0,"declined_by_site":0}}}