{"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/tempo-prompt-based-generative-pre-trained","title":"TEMPO: Prompt-based Generative Pre-trained Transformer for Time Series Forecasting","arxiv_id":"2310.04948","date":"2023-10-08","proceeding":null,"authors":["Defu Cao","Furong Jia","Sercan O Arik","Tomas Pfister","Yixiang Zheng","Wen Ye","Yan Liu"],"abstract":"The past decade has witnessed significant advances in time series modeling with deep learning. While achieving state-of-the-art results, the best-performing architectures vary highly across applications and domains. Meanwhile, for natural language processing, the Generative Pre-trained Transformer (GPT) has demonstrated impressive performance via training one general-purpose model across various textual datasets. It is intriguing to explore whether GPT-type architectures can be effective for time series, capturing the intrinsic dynamic attributes and leading to significant accuracy improvements. In this paper, we propose a novel framework, TEMPO, that can effectively learn time series representations. We focus on utilizing two essential inductive biases of the time series task for pre-trained models: (i) decomposition of the complex interaction between trend, seasonal and residual components; and (ii) introducing the design of prompts to facilitate distribution adaptation in different types of time series. TEMPO expands the capability for dynamically modeling real-world temporal phenomena from data within diverse domains. Our experiments demonstrate the superior performance of TEMPO over state-of-the-art methods on zero shot setting for a number of time series benchmark datasets. This performance gain is observed not only in scenarios involving previously unseen datasets but also in scenarios with multi-modal inputs. This compelling finding highlights TEMPO's potential to constitute a foundational model-building framework.","url_abs":"https://arxiv.org/abs/2310.04948v3","url_pdf":"https://arxiv.org/pdf/2310.04948v3.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":"tempo-prompt-based-generative-pre-trained","repo_url":"https://github.com/dc-research/tempo","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"tempo-prompt-based-generative-pre-trained","repo_url":"https://github.com/liaoyuhua/tempo-pytorch","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":0,"framework":"pytorch","reach":null}],"tasks":[{"task_slug":"time-series-1","task_name":"Time Series"},{"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":"focus","method_name":"Focus"},{"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":[{"leaderboard":"/sota/time-series-forecasting-on-etth1-336-1","task":"Time Series Forecasting","dataset":"ETTh1 (336) Multivariate","model":"TEMPO","rank_in_archive_order":12,"of":72,"metrics":{"MAE":"0.425","MSE":"0.408"},"uses_additional_data":false}],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2310.04948","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2310.04948"}},"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/liaoyuhua/tempo-pytorch","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/dc-research/tempo","reach":null}],"summary":{"ran":5,"ran_fixture":1,"unverified":8},"by_repo_kind":{"official":{"samples":4,"ran":2,"repositories":1},"listed":{"samples":10,"ran":4,"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":"24e4db9409133442","entry":"MergedLinear","repo":"liaoyuhua/tempo-pytorch","repo_kind":"listed","path":"src/model.py","file_url":"https://github.com/liaoyuhua/tempo-pytorch/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":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"24e4db9409133442"}},{"code_sha256_prefix":"493fa780d9805e42","entry":"MultiFourier","repo":"dc-research/tempo","repo_kind":"official","path":"tempo/models/TEMPO.py","file_url":"https://github.com/dc-research/tempo/blob/HEAD/tempo/models/TEMPO.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"493fa780d9805e42"}},{"code_sha256_prefix":"824bb7a2b3d84a75","entry":"RevIN","repo":"liaoyuhua/tempo-pytorch","repo_kind":"listed","path":"src/model.py","file_url":"https://github.com/liaoyuhua/tempo-pytorch/blob/HEAD/src/model.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"824bb7a2b3d84a75"}},{"code_sha256_prefix":"151e67c803ffaf6b","entry":"RevIn","repo":"dc-research/tempo","repo_kind":"official","path":"tempo/models/TEMPO.py","file_url":"https://github.com/dc-research/tempo/blob/HEAD/tempo/models/TEMPO.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"151e67c803ffaf6b"}},{"code_sha256_prefix":"e6da3917b55558e3","entry":"get_prompt_param_cls","repo":"liaoyuhua/tempo-pytorch","repo_kind":"listed","path":"src/model.py","file_url":"https://github.com/liaoyuhua/tempo-pytorch/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":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"e6da3917b55558e3"}},{"code_sha256_prefix":"7c974bf3bf70147c","entry":"get_prompt_value","repo":"liaoyuhua/tempo-pytorch","repo_kind":"listed","path":"src/model.py","file_url":"https://github.com/liaoyuhua/tempo-pytorch/blob/HEAD/src/model.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":"7c974bf3bf70147c"}},{"code_sha256_prefix":"becc71810b11d8de","entry":"Block","repo":"liaoyuhua/tempo-pytorch","repo_kind":"listed","path":"src/model.py","file_url":"https://github.com/liaoyuhua/tempo-pytorch/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":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"becc71810b11d8de"}},{"code_sha256_prefix":"78c68ccc3b7915e0","entry":"CausalSelfAttention","repo":"liaoyuhua/tempo-pytorch","repo_kind":"listed","path":"src/model.py","file_url":"https://github.com/liaoyuhua/tempo-pytorch/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":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"78c68ccc3b7915e0"}},{"code_sha256_prefix":"e51e1d4c223af3ce","entry":"LoRALayer","repo":"liaoyuhua/tempo-pytorch","repo_kind":"listed","path":"src/model.py","file_url":"https://github.com/liaoyuhua/tempo-pytorch/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":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"e51e1d4c223af3ce"}},{"code_sha256_prefix":"c48e3d0e9e8f2f56","entry":"Prompt","repo":"liaoyuhua/tempo-pytorch","repo_kind":"listed","path":"src/model.py","file_url":"https://github.com/liaoyuhua/tempo-pytorch/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":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"c48e3d0e9e8f2f56"}},{"code_sha256_prefix":"6bd1e2f7a0f4b1b7","entry":"TEMPO","repo":"dc-research/tempo","repo_kind":"official","path":"tempo/models/TEMPO.py","file_url":"https://github.com/dc-research/tempo/blob/HEAD/tempo/models/TEMPO.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":"6bd1e2f7a0f4b1b7"}},{"code_sha256_prefix":"29d73946e8df2a48","entry":"TEMPO","repo":"liaoyuhua/tempo-pytorch","repo_kind":"listed","path":"src/model.py","file_url":"https://github.com/liaoyuhua/tempo-pytorch/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":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"29d73946e8df2a48"}},{"code_sha256_prefix":"bbf888eb7c291ff7","entry":"TEMPOConfig","repo":"liaoyuhua/tempo-pytorch","repo_kind":"listed","path":"src/model.py","file_url":"https://github.com/liaoyuhua/tempo-pytorch/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":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"bbf888eb7c291ff7"}},{"code_sha256_prefix":"dde2d9d566d3b650","entry":"print_trainable_parameters","repo":"dc-research/tempo","repo_kind":"official","path":"tempo/models/TEMPO.py","file_url":"https://github.com/dc-research/tempo/blob/HEAD/tempo/models/TEMPO.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":"dde2d9d566d3b650"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}