{"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/patchmixer-a-patch-mixing-architecture-for","title":"PatchMixer: A Patch-Mixing Architecture for Long-Term Time Series Forecasting","arxiv_id":"2310.00655","date":"2023-10-01","proceeding":null,"authors":["Zeying Gong","Yujin Tang","Junwei Liang"],"abstract":"Although the Transformer has been the dominant architecture for time series forecasting tasks in recent years, a fundamental challenge remains: the permutation-invariant self-attention mechanism within Transformers leads to a loss of temporal information. To tackle these challenges, we propose PatchMixer, a novel CNN-based model. It introduces a permutation-variant convolutional structure to preserve temporal information. Diverging from conventional CNNs in this field, which often employ multiple scales or numerous branches, our method relies exclusively on depthwise separable convolutions. This allows us to extract both local features and global correlations using a single-scale architecture. Furthermore, we employ dual forecasting heads encompassing linear and nonlinear components to better model future curve trends and details. Our experimental results on seven time-series forecasting benchmarks indicate that compared with the state-of-the-art method and the best-performing CNN, PatchMixer yields $3.9\\%$ and $21.2\\%$ relative improvements, respectively, while being 2-3x faster than the most advanced method.","url_abs":"https://arxiv.org/abs/2310.00655v2","url_pdf":"https://arxiv.org/pdf/2310.00655v2.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":"patchmixer-a-patch-mixing-architecture-for","repo_url":"https://github.com/Zeying-Gong/PatchMixer","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"patchmixer-a-patch-mixing-architecture-for","repo_url":"https://github.com/hughxx/tsf-new-paper-taste","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok"}}],"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":"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-192-1","task":"Time Series Forecasting","dataset":"ETTh1 (192) Multivariate","model":"PatchMixer","rank_in_archive_order":1,"of":17,"metrics":{"MAE":"0.394","MSE":"0.373"},"uses_additional_data":false},{"leaderboard":"/sota/time-series-forecasting-on-etth1-192-2","task":"Time Series Forecasting","dataset":"ETTh1 (192) Univariate","model":"PatchMixer","rank_in_archive_order":1,"of":5,"metrics":{"MAE":"0.198","MSE":"0.066"},"uses_additional_data":false},{"leaderboard":"/sota/time-series-forecasting-on-etth1-336-1","task":"Time Series Forecasting","dataset":"ETTh1 (336) Multivariate","model":"PatchMixer","rank_in_archive_order":3,"of":72,"metrics":{"MAE":"0.414","MSE":"0.392"},"uses_additional_data":false},{"leaderboard":"/sota/time-series-forecasting-on-etth1-336-2","task":"Time Series Forecasting","dataset":"ETTh1 (336) Univariate","model":"PatchMixer","rank_in_archive_order":3,"of":10,"metrics":{"MAE":"0.220","MSE":"0.078"},"uses_additional_data":false},{"leaderboard":"/sota/time-series-forecasting-on-etth1-720-1","task":"Time Series Forecasting","dataset":"ETTh1 (720) Multivariate","model":"PatchMixer","rank_in_archive_order":9,"of":22,"metrics":{"MAE":"0.463","MSE":"0.445"},"uses_additional_data":false},{"leaderboard":"/sota/time-series-forecasting-on-etth1-720-2","task":"Time Series Forecasting","dataset":"ETTh1 (720) Univariate","model":"PatchMixer","rank_in_archive_order":6,"of":12,"metrics":{"MAE":"0.243","MSE":"0.093"},"uses_additional_data":false},{"leaderboard":"/sota/time-series-forecasting-on-etth1-96-1","task":"Time Series Forecasting","dataset":"ETTh1 (96) Multivariate","model":"PatchMixer","rank_in_archive_order":2,"of":15,"metrics":{"MAE":"0.381","MSE":"0.353"},"uses_additional_data":false},{"leaderboard":"/sota/time-series-forecasting-on-etth1-96-2","task":"Time Series Forecasting","dataset":"ETTh1 (96) Univariate","model":"PatchMixer","rank_in_archive_order":3,"of":6,"metrics":{"MAE":"0.179","MSE":"0.054"},"uses_additional_data":false},{"leaderboard":"/sota/time-series-forecasting-on-etth2-192-1","task":"Time Series Forecasting","dataset":"ETTh2 (192) Multivariate","model":"PatchMixer","rank_in_archive_order":1,"of":16,"metrics":{"MAE":"0.334","MSE":"0.274"},"uses_additional_data":false},{"leaderboard":"/sota/time-series-forecasting-on-etth2-192-2","task":"Time Series Forecasting","dataset":"ETTh2 (192) Univariate","model":"PatchMixer","rank_in_archive_order":1,"of":6,"metrics":{"MAE":"0.305","MSE":"0.147"},"uses_additional_data":false},{"leaderboard":"/sota/time-series-forecasting-on-etth2-336-1","task":"Time Series Forecasting","dataset":"ETTh2 (336) Multivariate","model":"PatchMixer","rank_in_archive_order":2,"of":20,"metrics":{"MAE":"0.368","MSE":"0.317"},"uses_additional_data":false},{"leaderboard":"/sota/time-series-forecasting-on-etth2-336-2","task":"Time Series Forecasting","dataset":"ETTh2 (336) Univariate","model":"PatchMixer","rank_in_archive_order":1,"of":10,"metrics":{"MAE":"0.332","MSE":"0.166"},"uses_additional_data":false},{"leaderboard":"/sota/time-series-forecasting-on-etth2-720-1","task":"Time Series Forecasting","dataset":"ETTh2 (720) Multivariate","model":"PatchMixer","rank_in_archive_order":5,"of":20,"metrics":{"MAE":"0.426","MSE":"0.393"},"uses_additional_data":false},{"leaderboard":"/sota/time-series-forecasting-on-etth2-720-2","task":"Time Series Forecasting","dataset":"ETTh2 (720) Univariate","model":"PatchMixer","rank_in_archive_order":4,"of":11,"metrics":{"MAE":"0.374","MSE":"0.217"},"uses_additional_data":false},{"leaderboard":"/sota/time-series-forecasting-on-etth2-96-1","task":"Time Series Forecasting","dataset":"ETTh2 (96) Multivariate","model":"PatchMixer","rank_in_archive_order":1,"of":16,"metrics":{"MAE":"0.3","MSE":"0.225"},"uses_additional_data":false},{"leaderboard":"/sota/time-series-forecasting-on-etth2-96-2","task":"Time Series Forecasting","dataset":"ETTh2 (96) Univariate","model":"PatchMixer","rank_in_archive_order":1,"of":6,"metrics":{"MAE":"0.268","MSE":"0.119"},"uses_additional_data":false}],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2310.00655","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2310.00655"}},"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/hughxx/tsf-new-paper-taste","reach":{"status":"ok"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/Zeying-Gong/PatchMixer","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran_honours":1,"ran":1,"unverified":1},"by_repo_kind":{"official":{"samples":3,"ran":2,"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":"16b9b78d429636b7","entry":"PositionalEncoding","repo":"Zeying-Gong/PatchMixer","repo_kind":"official","path":"layers/PatchTST_layers.py","file_url":"https://github.com/Zeying-Gong/PatchMixer/blob/HEAD/layers/PatchTST_layers.py","link_basis":"harvester_set","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"well_formed","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"16b9b78d429636b7"}},{"code_sha256_prefix":"72b9272542f279c6","entry":"get_activation_fn","repo":"Zeying-Gong/PatchMixer","repo_kind":"official","path":"layers/PatchTST_layers.py","file_url":"https://github.com/Zeying-Gong/PatchMixer/blob/HEAD/layers/PatchTST_layers.py","link_basis":"harvester_set","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":"72b9272542f279c6"}},{"code_sha256_prefix":"c3fc6992d1e467f3","entry":"Coord2dPosEncoding","repo":"Zeying-Gong/PatchMixer","repo_kind":"official","path":"layers/PatchTST_layers.py","file_url":"https://github.com/Zeying-Gong/PatchMixer/blob/HEAD/layers/PatchTST_layers.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":"c3fc6992d1e467f3"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}