{"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-2601-06429","title":"A Unified Shape-Aware Foundation Model for Time Series Classification","arxiv_id":"2601.06429","date":"2026-01-10","proceeding":null,"authors":["Zhen Liu","Yucheng Wang","Boyuan Li","Junhao Zheng","Emadeldeen Eldele","Min Wu","Qianli Ma"],"abstract":"Foundation models pre-trained on large-scale source datasets are reshaping the traditional training paradigm for time series classification. However, existing time series foundation models primarily focus on forecasting tasks and often overlook classification-specific challenges, such as modeling interpretable shapelets that capture class-discriminative temporal features. To bridge this gap, we propose UniShape, a unified shape-aware foundation model designed for time series classification. UniShape incorporates a shape-aware adapter that adaptively aggregates multiscale discriminative subsequences (shapes) into class tokens, effectively selecting the most relevant subsequence scales to enhance model interpretability. Meanwhile, a prototype-based pretraining module is introduced to jointly learn instance- and shape-level representations, enabling the capture of transferable shape patterns. Pre-trained on a large-scale multi-domain time series dataset comprising 1.89 million samples, UniShape exhibits superior generalization across diverse target domains. Experiments on 128 UCR datasets and 30 additional time series datasets demonstrate that UniShape achieves state-of-the-art classification performance, with interpretability and ablation analyses further validating its effectiveness.","url_abs":"https://arxiv.org/abs/2601.06429","url_pdf":"https://arxiv.org/pdf/2601.06429","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":{"atlas_url":"https://app.syntology.ai/?focus=2601.06429","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2601.06429"}},"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":[{"mentioned_in_github":null,"is_official":null,"provenance":"deterministic:regex_extraction","mentioned_in_paper":null,"url":"https://github.com/qianlima-lab/UniShape","reach":{"status":"ok"}}],"summary":{"unverified":14},"by_repo_kind":{"found_in_text":{"samples":14,"ran":0,"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":14,"samples":[{"code_sha256_prefix":"be01f5d8430a83e7","entry":"Conv1d","repo":"qianlima-lab/UniShape","repo_kind":"found_in_text","path":"models/networks.py","file_url":"https://github.com/qianlima-lab/UniShape/blob/HEAD/models/networks.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":"be01f5d8430a83e7"}},{"code_sha256_prefix":"7514362f4f562e39","entry":"build_label_mask","repo":"qianlima-lab/UniShape","repo_kind":"found_in_text","path":"unishape_pretrain.py","file_url":"https://github.com/qianlima-lab/UniShape/blob/HEAD/unishape_pretrain.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":"7514362f4f562e39"}},{"code_sha256_prefix":"71772e679bc6d4f9","entry":"concat_all_gather","repo":"qianlima-lab/UniShape","repo_kind":"found_in_text","path":"models/pretrain_mocov3.py","file_url":"https://github.com/qianlima-lab/UniShape/blob/HEAD/models/pretrain_mocov3.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":"71772e679bc6d4f9"}},{"code_sha256_prefix":"ac8b5e7cee8de996","entry":"generate_pseudo_labels_by_similarity","repo":"qianlima-lab/UniShape","repo_kind":"found_in_text","path":"models/pretrain_mocov3.py","file_url":"https://github.com/qianlima-lab/UniShape/blob/HEAD/models/pretrain_mocov3.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":"ac8b5e7cee8de996"}},{"code_sha256_prefix":"05aabd3ba7656342","entry":"get_dataset","repo":"qianlima-lab/UniShape","repo_kind":"found_in_text","path":"datapre/dataloader.py","file_url":"https://github.com/qianlima-lab/UniShape/blob/HEAD/datapre/dataloader.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":"05aabd3ba7656342"}},{"code_sha256_prefix":"95689ca81a0c6492","entry":"get_dataset_cls","repo":"qianlima-lab/UniShape","repo_kind":"found_in_text","path":"datapre/dataloader.py","file_url":"https://github.com/qianlima-lab/UniShape/blob/HEAD/datapre/dataloader.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":"95689ca81a0c6492"}},{"code_sha256_prefix":"f5801fe8ae904972","entry":"get_transform","repo":"qianlima-lab/UniShape","repo_kind":"found_in_text","path":"datapre/dataloader.py","file_url":"https://github.com/qianlima-lab/UniShape/blob/HEAD/datapre/dataloader.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":"f5801fe8ae904972"}},{"code_sha256_prefix":"31304691eb3887d3","entry":"load_data_raw_spilt","repo":"qianlima-lab/UniShape","repo_kind":"found_in_text","path":"datapre/preprocessing.py","file_url":"https://github.com/qianlima-lab/UniShape/blob/HEAD/datapre/preprocessing.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":"31304691eb3887d3"}},{"code_sha256_prefix":"eb0ffbf33057b7ad","entry":"load_feather_dataset","repo":"qianlima-lab/UniShape","repo_kind":"found_in_text","path":"datapre/pretrain_dataset_pre.py","file_url":"https://github.com/qianlima-lab/UniShape/blob/HEAD/datapre/pretrain_dataset_pre.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":"eb0ffbf33057b7ad"}},{"code_sha256_prefix":"27a1e0c062ebbe80","entry":"load_pt_dataset","repo":"qianlima-lab/UniShape","repo_kind":"found_in_text","path":"datapre/pretrain_dataset_pre.py","file_url":"https://github.com/qianlima-lab/UniShape/blob/HEAD/datapre/pretrain_dataset_pre.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":"27a1e0c062ebbe80"}},{"code_sha256_prefix":"2eb58fc35287e225","entry":"train_batch","repo":"qianlima-lab/UniShape","repo_kind":"found_in_text","path":"unishape_pretrain.py","file_url":"https://github.com/qianlima-lab/UniShape/blob/HEAD/unishape_pretrain.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":"2eb58fc35287e225"}},{"code_sha256_prefix":"e1ef8ead68e3f350","entry":"train_epoch","repo":"qianlima-lab/UniShape","repo_kind":"found_in_text","path":"unishape_pretrain.py","file_url":"https://github.com/qianlima-lab/UniShape/blob/HEAD/unishape_pretrain.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":"e1ef8ead68e3f350"}},{"code_sha256_prefix":"4afbe3a4a816c50f","entry":"transfer_labels","repo":"qianlima-lab/UniShape","repo_kind":"found_in_text","path":"datapre/preprocessing.py","file_url":"https://github.com/qianlima-lab/UniShape/blob/HEAD/datapre/preprocessing.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":"4afbe3a4a816c50f"}},{"code_sha256_prefix":"330a085efe6d95e1","entry":"zero_feature_extraction","repo":"qianlima-lab/UniShape","repo_kind":"found_in_text","path":"unishape_zeroshot.py","file_url":"https://github.com/qianlima-lab/UniShape/blob/HEAD/unishape_zeroshot.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":"330a085efe6d95e1"}}]},"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":null}