{"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/textbf-s-2-ip-llm-semantic-space-informed","title":"$\\textbf{S}^2$IP-LLM: Semantic Space Informed Prompt Learning with LLM for Time Series Forecasting","arxiv_id":"2403.05798","date":"2024-03-09","proceeding":null,"authors":["Zijie Pan","Yushan Jiang","Sahil Garg","Anderson Schneider","Yuriy Nevmyvaka","Dongjin Song"],"abstract":"Recently, there has been a growing interest in leveraging pre-trained large language models (LLMs) for various time series applications. However, the semantic space of LLMs, established through the pre-training, is still underexplored and may help yield more distinctive and informative representations to facilitate time series forecasting. To this end, we propose Semantic Space Informed Prompt learning with LLM ($S^2$IP-LLM) to align the pre-trained semantic space with time series embeddings space and perform time series forecasting based on learned prompts from the joint space. We first design a tokenization module tailored for cross-modality alignment, which explicitly concatenates patches of decomposed time series components to create embeddings that effectively encode the temporal dynamics. Next, we leverage the pre-trained word token embeddings to derive semantic anchors and align selected anchors with time series embeddings by maximizing the cosine similarity in the joint space. This way, $S^2$IP-LLM can retrieve relevant semantic anchors as prompts to provide strong indicators (context) for time series that exhibit different temporal dynamics. With thorough empirical studies on multiple benchmark datasets, we demonstrate that the proposed $S^2$IP-LLM can achieve superior forecasting performance over state-of-the-art baselines. Furthermore, our ablation studies and visualizations verify the necessity of prompt learning informed by semantic space.","url_abs":"https://arxiv.org/abs/2403.05798v2","url_pdf":"https://arxiv.org/pdf/2403.05798v2.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":"textbf-s-2-ip-llm-semantic-space-informed","repo_url":"https://github.com/panzijie825/s2ip-llm","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":"prompt-learning","task_name":"Prompt Learning"},{"task_slug":"time-series-1","task_name":"Time Series"},{"task_slug":"time-series-forecasting","task_name":"Time Series Forecasting"}],"methods":[{"method_slug":"align","method_name":"ALIGN"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":null,"atlas_url":"https://app.syntology.ai/?focus=2403.05798","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2403.05798"}},"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/panzijie825/s2ip-llm","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran":3,"unverified":1},"by_repo_kind":{"official":{"samples":4,"ran":3,"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":"c7809c2a271dca7d","entry":"group_values","repo":"panzijie825/s2ip-llm","repo_kind":"official","path":"Long-term_Forecasting/utils/m4_summary.py","file_url":"https://github.com/panzijie825/s2ip-llm/blob/HEAD/Long-term_Forecasting/utils/m4_summary.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":"c7809c2a271dca7d"}},{"code_sha256_prefix":"a835854e98db22c5","entry":"mase","repo":"panzijie825/s2ip-llm","repo_kind":"official","path":"Long-term_Forecasting/utils/m4_summary.py","file_url":"https://github.com/panzijie825/s2ip-llm/blob/HEAD/Long-term_Forecasting/utils/m4_summary.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":"a835854e98db22c5"}},{"code_sha256_prefix":"27a243751eb26480","entry":"smape_2","repo":"panzijie825/s2ip-llm","repo_kind":"official","path":"Long-term_Forecasting/utils/m4_summary.py","file_url":"https://github.com/panzijie825/s2ip-llm/blob/HEAD/Long-term_Forecasting/utils/m4_summary.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":"27a243751eb26480"}},{"code_sha256_prefix":"bdc787c888ab83a2","entry":"divide_no_nan","repo":"panzijie825/s2ip-llm","repo_kind":"official","path":"Long-term_Forecasting/utils/losses.py","file_url":"https://github.com/panzijie825/s2ip-llm/blob/HEAD/Long-term_Forecasting/utils/losses.py","link_basis":"harvester_set","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":"bdc787c888ab83a2"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}