{"id":13444593,"url":"https://github.com/XiongxiaoXu/SST","last_synced_at":"2025-03-20T19:30:39.707Z","repository":{"id":234328705,"uuid":"788670336","full_name":"XiongxiaoXu/SST","owner":"XiongxiaoXu","description":"The official implementation of the paper: \"SST: Multi-Scale Hybrid Mamba-Transformer Experts for Long-Short Range Time Series Forecasting\"","archived":false,"fork":false,"pushed_at":"2025-02-21T15:14:32.000Z","size":18400,"stargazers_count":146,"open_issues_count":1,"forks_count":9,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-02-21T16:26:38.724Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://arxiv.org/abs/2404.14757","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/XiongxiaoXu.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-04-18T21:26:28.000Z","updated_at":"2025-02-21T15:14:35.000Z","dependencies_parsed_at":"2024-04-18T22:29:09.965Z","dependency_job_id":"96df87cf-97f7-419a-b08a-89ab54654186","html_url":"https://github.com/XiongxiaoXu/SST","commit_stats":null,"previous_names":["xiongxiaoxu/mambaformer-in-time-series","xiongxiaoxu/sst"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/XiongxiaoXu%2FSST","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/XiongxiaoXu%2FSST/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/XiongxiaoXu%2FSST/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/XiongxiaoXu%2FSST/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/XiongxiaoXu","download_url":"https://codeload.github.com/XiongxiaoXu/SST/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244676454,"owners_count":20491828,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-07-31T04:00:31.630Z","updated_at":"2025-03-20T19:30:39.689Z","avatar_url":"https://github.com/XiongxiaoXu.png","language":"Python","funding_links":[],"categories":["On the replacement of transformer/attention by SSMs"],"sub_categories":[],"readme":"# SST\nThe SST (State Space Transformer) code for the paper \"[SST: Multi-Scale Hybrid Mamba-Transformer Experts for Long-Short Range Time Series Forecasting](https://arxiv.org/abs/2404.14757)\".\n\n\u003cimg width=\"1075\" alt=\"image\" src=\"https://github.com/user-attachments/assets/93128514-7ada-4f3e-9c5e-3fad8bde8ae1\"\u003e\n\n## Contributions\n* We propose to **decompose time series into global patterns and local variations according to ranges**. We identify that global patterns as the focus of long range and local variations should be captured in short range.\n* To effectively capture long-term patterns and short-term variations, we leverage the patching to create coarser PTS in long range and finer PTS in short range. Moreover, we introduce **a new metric to precisely quantify the resolution of PTS**.\n* We propose a **novel hybrid Mamba-Transformer experts architecture SST**, with Mamba as a global patterns expert in long range, and LWT as a local variations expert in short range. A long-short router is designed to adaptively integrate the global patterns and local variations. **With Mamba and LWT, SST is highly scalable with linear complexity O(L) on time series length L**.\n\n## Getting Started\n### Environment\n* python            3.10.13\n* torch             1.12.1+cu116\n* mamba-ssm         1.2.0.post1\n* numpy             1.26.4\n* transformers      4.38.2\n\nThe installation of mamba-ssm package can refer to https://github.com/state-spaces/mamba. \n\n### Run\nTo run SST on various dataset, run corrrsponidng dataset `.sh` files in the scripts folder. \n\nFor exmaple, run SST on the Weather dataset: `./weather.sh`\n\n### Dataset\nYou can download all the datasets from the \"[Autoformer](https://drive.google.com/drive/folders/1ZOYpTUa82_jCcxIdTmyr0LXQfvaM9vIy)\" project. Creatae a `dataset` folder in the current directory and put the downloaded datasets into `dataset` folder.\n\n## Acknowledgement\nWe would like to greatly thank the following awesome projects:\n\nMamba (https://github.com/state-spaces/mamba)\n\nPatchTST (https://github.com/yuqinie98/PatchTST)\n\nLTSF-Linear (https://github.com/cure-lab/LTSF-Linear)\n\nAutoformer (https://github.com/thuml/Autoformer)\n\n## Cite\nIf you find this repository useful for your work, please consider citing the paper as follows (bib format from arxiv):\n\n```bibtex\n@article{xu2024sst,\n  title={SST: Multi-Scale Hybrid Mamba-Transformer Experts for Long-Short Range Time Series Forecasting},\n  author={Xu, Xiongxiao and Chen, Canyu and Liang, Yueqing and Huang, Baixiang and Bai, Guangji and Zhao, Liang and Shu, Kai},\n  journal={arXiv preprint arXiv:2404.14757},\n  year={2024}\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FXiongxiaoXu%2FSST","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FXiongxiaoXu%2FSST","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FXiongxiaoXu%2FSST/lists"}