{"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/tslanet-rethinking-transformers-for-time","title":"TSLANet: Rethinking Transformers for Time Series Representation Learning","arxiv_id":"2404.08472","date":"2024-04-12","proceeding":null,"authors":["Emadeldeen Eldele","Mohamed Ragab","Zhenghua Chen","Min Wu","XiaoLi Li"],"abstract":"Time series data, characterized by its intrinsic long and short-range dependencies, poses a unique challenge across analytical applications. While Transformer-based models excel at capturing long-range dependencies, they face limitations in noise sensitivity, computational efficiency, and overfitting with smaller datasets. In response, we introduce a novel Time Series Lightweight Adaptive Network (TSLANet), as a universal convolutional model for diverse time series tasks. Specifically, we propose an Adaptive Spectral Block, harnessing Fourier analysis to enhance feature representation and to capture both long-term and short-term interactions while mitigating noise via adaptive thresholding. Additionally, we introduce an Interactive Convolution Block and leverage self-supervised learning to refine the capacity of TSLANet for decoding complex temporal patterns and improve its robustness on different datasets. Our comprehensive experiments demonstrate that TSLANet outperforms state-of-the-art models in various tasks spanning classification, forecasting, and anomaly detection, showcasing its resilience and adaptability across a spectrum of noise levels and data sizes. The code is available at https://github.com/emadeldeen24/TSLANet.","url_abs":"https://arxiv.org/abs/2404.08472v2","url_pdf":"https://arxiv.org/pdf/2404.08472v2.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":"tslanet-rethinking-transformers-for-time","repo_url":"https://github.com/emadeldeen24/tslanet","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"tslanet-rethinking-transformers-for-time","repo_url":"https://github.com/WenjieDu/PyPOTS","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":0,"framework":"pytorch","reach":null}],"tasks":[{"task_slug":"anomaly-detection","task_name":"Anomaly Detection"},{"task_slug":"computational-efficiency","task_name":"Computational Efficiency"},{"task_slug":"representation-learning","task_name":"Representation Learning"},{"task_slug":"self-supervised-learning","task_name":"Self-Supervised Learning"},{"task_slug":"time-series-1","task_name":"Time Series"},{"task_slug":"time-series-classification","task_name":"Time Series Classification"}],"methods":[{"method_slug":"convolution","method_name":"Convolution"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2404.08472","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2404.08472"}},"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/emadeldeen24/tslanet","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/WenjieDu/PyPOTS","reach":null}],"summary":{"ran":8,"ran_fixture":5,"unverified":3},"by_repo_kind":{"official":{"samples":6,"ran":5,"repositories":1},"listed":{"samples":10,"ran":8,"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":"2e44cb3aed48ca48","entry":"Adaptive_Spectral_Block","repo":"WenjieDu/PyPOTS","repo_kind":"listed","path":"pypots/nn/modules/tslanet/backbone.py","file_url":"https://github.com/WenjieDu/PyPOTS/blob/HEAD/pypots/nn/modules/tslanet/backbone.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"2e44cb3aed48ca48"}},{"code_sha256_prefix":"0bd45a9410192ee6","entry":"Adaptive_Spectral_Block","repo":"emadeldeen24/tslanet","repo_kind":"official","path":"Classification/TSLANet_classification.py","file_url":"https://github.com/emadeldeen24/tslanet/blob/HEAD/Classification/TSLANet_classification.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":"0bd45a9410192ee6"}},{"code_sha256_prefix":"43c44182d498a36d","entry":"DropPath","repo":"WenjieDu/PyPOTS","repo_kind":"listed","path":"pypots/nn/modules/tslanet/backbone.py","file_url":"https://github.com/WenjieDu/PyPOTS/blob/HEAD/pypots/nn/modules/tslanet/backbone.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"43c44182d498a36d"}},{"code_sha256_prefix":"50cca414093bc5f4","entry":"ICB","repo":"WenjieDu/PyPOTS","repo_kind":"listed","path":"pypots/nn/modules/tslanet/backbone.py","file_url":"https://github.com/WenjieDu/PyPOTS/blob/HEAD/pypots/nn/modules/tslanet/backbone.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"50cca414093bc5f4"}},{"code_sha256_prefix":"b6aa4c925d9d63a1","entry":"ICB","repo":"emadeldeen24/tslanet","repo_kind":"official","path":"Classification/TSLANet_classification.py","file_url":"https://github.com/emadeldeen24/tslanet/blob/HEAD/Classification/TSLANet_classification.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":"b6aa4c925d9d63a1"}},{"code_sha256_prefix":"39dcb76a380a0b70","entry":"PatchEmbed","repo":"WenjieDu/PyPOTS","repo_kind":"listed","path":"pypots/nn/modules/tslanet/backbone.py","file_url":"https://github.com/WenjieDu/PyPOTS/blob/HEAD/pypots/nn/modules/tslanet/backbone.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"39dcb76a380a0b70"}},{"code_sha256_prefix":"490e12e5991e02bc","entry":"PatchEmbed","repo":"emadeldeen24/tslanet","repo_kind":"official","path":"Classification/TSLANet_classification.py","file_url":"https://github.com/emadeldeen24/tslanet/blob/HEAD/Classification/TSLANet_classification.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":"490e12e5991e02bc"}},{"code_sha256_prefix":"971f0f502ec7859e","entry":"TSLANet_layer","repo":"emadeldeen24/tslanet","repo_kind":"official","path":"Classification/TSLANet_classification.py","file_url":"https://github.com/emadeldeen24/tslanet/blob/HEAD/Classification/TSLANet_classification.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":"971f0f502ec7859e"}},{"code_sha256_prefix":"b39eb711a782b579","entry":"_trunc_normal_","repo":"WenjieDu/PyPOTS","repo_kind":"listed","path":"pypots/nn/modules/tslanet/backbone.py","file_url":"https://github.com/WenjieDu/PyPOTS/blob/HEAD/pypots/nn/modules/tslanet/backbone.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"b39eb711a782b579"}},{"code_sha256_prefix":"87577b3ff9d32712","entry":"drop_path","repo":"WenjieDu/PyPOTS","repo_kind":"listed","path":"pypots/nn/modules/tslanet/backbone.py","file_url":"https://github.com/WenjieDu/PyPOTS/blob/HEAD/pypots/nn/modules/tslanet/backbone.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"87577b3ff9d32712"}},{"code_sha256_prefix":"48b96f362caa9ad1","entry":"random_masking_3D","repo":"WenjieDu/PyPOTS","repo_kind":"listed","path":"pypots/nn/modules/tslanet/backbone.py","file_url":"https://github.com/WenjieDu/PyPOTS/blob/HEAD/pypots/nn/modules/tslanet/backbone.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"48b96f362caa9ad1"}},{"code_sha256_prefix":"aa497c84b9b2b2f6","entry":"random_masking_3D","repo":"emadeldeen24/tslanet","repo_kind":"official","path":"Classification/TSLANet_classification.py","file_url":"https://github.com/emadeldeen24/tslanet/blob/HEAD/Classification/TSLANet_classification.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":"aa497c84b9b2b2f6"}},{"code_sha256_prefix":"d347dc5f198621fd","entry":"trunc_normal_","repo":"WenjieDu/PyPOTS","repo_kind":"listed","path":"pypots/nn/modules/tslanet/backbone.py","file_url":"https://github.com/WenjieDu/PyPOTS/blob/HEAD/pypots/nn/modules/tslanet/backbone.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"d347dc5f198621fd"}},{"code_sha256_prefix":"b5ba0c5dffc1d40a","entry":"BackboneTSLANet","repo":"WenjieDu/PyPOTS","repo_kind":"listed","path":"pypots/nn/modules/tslanet/backbone.py","file_url":"https://github.com/WenjieDu/PyPOTS/blob/HEAD/pypots/nn/modules/tslanet/backbone.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"b5ba0c5dffc1d40a"}},{"code_sha256_prefix":"3ab5e61f13a9e280","entry":"TSLANet","repo":"emadeldeen24/tslanet","repo_kind":"official","path":"Classification/TSLANet_classification.py","file_url":"https://github.com/emadeldeen24/tslanet/blob/HEAD/Classification/TSLANet_classification.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":"3ab5e61f13a9e280"}},{"code_sha256_prefix":"699fbbad8beb6f92","entry":"TSLANet_layer","repo":"WenjieDu/PyPOTS","repo_kind":"listed","path":"pypots/nn/modules/tslanet/backbone.py","file_url":"https://github.com/WenjieDu/PyPOTS/blob/HEAD/pypots/nn/modules/tslanet/backbone.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"699fbbad8beb6f92"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}