{"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/power-time-series-forecasting-by-pretrained","title":"One Fits All:Power General Time Series Analysis by Pretrained LM","arxiv_id":"2302.11939","date":"2023-02-23","proceeding":null,"authors":["Tian Zhou","Peisong Niu","Xue Wang","Liang Sun","Rong Jin"],"abstract":"Although we have witnessed great success of pre-trained models in natural language processing (NLP) and computer vision (CV), limited progress has been made for general time series analysis. Unlike NLP and CV where a unified model can be used to perform different tasks, specially designed approach still dominates in each time series analysis task such as classification, anomaly detection, forecasting, and few-shot learning. The main challenge that blocks the development of pre-trained model for time series analysis is the lack of a large amount of data for training. In this work, we address this challenge by leveraging language or CV models, pre-trained from billions of tokens, for time series analysis. Specifically, we refrain from altering the self-attention and feedforward layers of the residual blocks in the pre-trained language or image model. This model, known as the Frozen Pretrained Transformer (FPT), is evaluated through fine-tuning on all major types of tasks involving time series. Our results demonstrate that pre-trained models on natural language or images can lead to a comparable or state-of-the-art performance in all main time series analysis tasks, as illustrated in Figure 1. We also found both theoretically and empirically that the self-attention module behaviors similarly to principle component analysis (PCA), an observation that helps explains how transformer bridges the domain gap and a crucial step towards understanding the universality of a pre-trained transformer.The code is publicly available at https://github.com/DAMO-DI-ML/One_Fits_All.","url_abs":"https://arxiv.org/abs/2302.11939v6","url_pdf":"https://arxiv.org/pdf/2302.11939v6.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":"power-time-series-forecasting-by-pretrained","repo_url":"https://github.com/damo-di-ml/one_fits_all","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok"}},{"paper_slug":"power-time-series-forecasting-by-pretrained","repo_url":"https://github.com/damo-di-ml/neurips2023-one-fits-all","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok"}},{"paper_slug":"power-time-series-forecasting-by-pretrained","repo_url":"https://github.com/liaoyuhua/GPT-TS","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":"few-shot-learning","task_name":"Few-Shot Learning"},{"task_slug":"time-series-1","task_name":"Time Series"},{"task_slug":"time-series","task_name":"Time Series Analysis"},{"task_slug":"time-series-forecasting","task_name":"Time Series Forecasting"}],"methods":[{"method_slug":"absolute-position-encodings","method_name":"Absolute Position Encodings"},{"method_slug":"adam","method_name":"Adam"},{"method_slug":"attention","method_name":"Attention"},{"method_slug":"bpe","method_name":"BPE"},{"method_slug":"dense-connections","method_name":"Dense Connections"},{"method_slug":"dropout","method_name":"Dropout"},{"method_slug":"label-smoothing","method_name":"Label Smoothing"},{"method_slug":"layer-normalization","method_name":"Layer Normalization"},{"method_slug":"linear-layer","method_name":"Linear Layer"},{"method_slug":"multi-head-attention","method_name":"Multi-Head Attention"},{"method_slug":"position-wise-feed-forward-layer","method_name":"Position-Wise Feed-Forward Layer"},{"method_slug":"residual-connection","method_name":"Residual Connection"},{"method_slug":"softmax","method_name":"Softmax"},{"method_slug":"transformer","method_name":"Transformer"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2302.11939","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2302.11939"}},"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/DAMO-DI-ML/One_Fits_All","reach":{"status":"ok"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/damo-di-ml/one_fits_all","reach":{"status":"ok"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/damo-di-ml/neurips2023-one-fits-all","reach":{"status":"ok"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/liaoyuhua/GPT-TS","reach":null}],"summary":{"ran":6,"unverified":2},"by_repo_kind":{"official":{"samples":1,"ran":1,"repositories":1},"listed":{"samples":7,"ran":5,"repositories":2}},"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":"283abdbdd3b3be9d","entry":"Block","repo":"liaoyuhua/GPT-TS","repo_kind":"listed","path":"src/model.py","file_url":"https://github.com/liaoyuhua/GPT-TS/blob/HEAD/src/model.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":"283abdbdd3b3be9d"}},{"code_sha256_prefix":"ad66bcf4514af931","entry":"CausalSelfAttention","repo":"liaoyuhua/GPT-TS","repo_kind":"listed","path":"src/model.py","file_url":"https://github.com/liaoyuhua/GPT-TS/blob/HEAD/src/model.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":"ad66bcf4514af931"}},{"code_sha256_prefix":"22bc376d349bfa99","entry":"FlattenHead","repo":"liaoyuhua/GPT-TS","repo_kind":"listed","path":"src/model.py","file_url":"https://github.com/liaoyuhua/GPT-TS/blob/HEAD/src/model.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":"22bc376d349bfa99"}},{"code_sha256_prefix":"f7b3ba88e01c955b","entry":"GPT4TS","repo":"damo-di-ml/one_fits_all","repo_kind":"official","path":"Long-term_Forecasting/models/GPT4TS.py","file_url":"https://github.com/damo-di-ml/one_fits_all/blob/HEAD/Long-term_Forecasting/models/GPT4TS.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"f7b3ba88e01c955b"}},{"code_sha256_prefix":"8218db7b8802c1ec","entry":"PoolingHead","repo":"liaoyuhua/GPT-TS","repo_kind":"listed","path":"src/model.py","file_url":"https://github.com/liaoyuhua/GPT-TS/blob/HEAD/src/model.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":"8218db7b8802c1ec"}},{"code_sha256_prefix":"15bf8037c337e5d3","entry":"RevIN","repo":"liaoyuhua/GPT-TS","repo_kind":"listed","path":"src/model.py","file_url":"https://github.com/liaoyuhua/GPT-TS/blob/HEAD/src/model.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":"15bf8037c337e5d3"}},{"code_sha256_prefix":"f5ab1a373dfe173b","entry":"GPT2TS","repo":"liaoyuhua/GPT-TS","repo_kind":"listed","path":"src/model.py","file_url":"https://github.com/liaoyuhua/GPT-TS/blob/HEAD/src/model.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":"f5ab1a373dfe173b"}},{"code_sha256_prefix":"784ad185e9363327","entry":"gpt4ts","repo":"damo-di-ml/neurips2023-one-fits-all","repo_kind":"listed","path":"Classification/src/models/gpt4ts.py","file_url":"https://github.com/damo-di-ml/neurips2023-one-fits-all/blob/HEAD/Classification/src/models/gpt4ts.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":"784ad185e9363327"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}