TSLib MultiPatchFormer
A Transformer forecaster that embeds a multivariate series at several patch sizes and attends across channels.
Time series · 118 operations Checked
Click or tap a spot to read it up close. Scroll or drag inside the diagram to move through it. Zoom with + and − or Ctrl and scroll. Press 0 for the whole graph. Swipe inside the diagram to move through it. Use + and − to zoom.
At a glance
- Task
- Time series
- Parameters
- 2M
- Operations
- 118
- Framework
- PyTorch
- Recurrent
- No
- Published
- 2025, Scientific Reports
- Cited by
- 43 (as of 23 October 2026)
- Authors
- Vahid Naghashi, Mounir Boukadoum, Abdoulaye Banire Diallo
- License
- MIT
- Checked
- Passed: the trace was replayed operation by operation and matched the model's own output for this input.
Files
The file opened in a new tab. Use your browser's Save command there to keep it.
The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.
Details
- Stable ID
- m3038
- Graph hash
- a1fac8c752e2d35a80adfc3bf4497cce6c95d9d1e5752898633957268b6d07f9
- Skeleton hash
- 5eabd54add6f19032fe308fe5ccee08d96ba65f5741b62f259310b17764e43ac
- Architecture hash
- 6ba31e7b5108dac42566dcf7d5bb281c501aee0191f27ecdb1db7d40f73c61f1
- Diagram SHA-256
- 53764282ff6780cca12474a3bc6f1feba1b0f1f7b62bfe34cd23abc88cc5f2eb
- TorchLens version
- 2.36.0
- Renderer
- graphviz 2.43.0+pyvips 3.2.0+libvips 8.18.7+render-opts@06c1f0d3
- Check
- Forward pass replayed in PyTorch
What it is
MultiPatchFormer is a Transformer based model for multivariate time series forecasting that integrates multi-scale patch-wise temporal modeling and channel-wise representation. The paper starts from the observation that most existing forecasting models rely on a single scale or time resolution.
The framework consists of instance normalization, multiscale embedding, a temporal encoder, an inter-series encoder module and a predictor. The multiscale embedding divides the input series into patches of various sizes and embeds all of them into the same model space, so the same model parameters serve every scale. The temporal encoder then uses multi-head self-attention to extract temporal dependencies over the patches. Its output is passed to a channel-wise encoder, whose cross-channel attention captures the correlations among the variates. Inside that attention, a 1-dimensional convolution reduces the channel dimension of the key and value to decrease noise and computation.
The decoder does not map to the whole forecast window with a single linear layer. It divides the prediction length into parts and generates the prediction part by part with a sequence of linear layers. On 7 datasets (ETTh1, ETTh2, ETTm1, ETTm2, Weather, Electricity and Traffic), the paper reports the best or second best result in 82% of cases for MSE and 86% for MAE.
Key idea. MultiPatchFormer projects patches of several sizes into one shared model dimension at the embedding stage, so the same parameters capture multi-scale and cross-scale information.
- multipatchformer
- multi patch former
- multiscale time series forecasting
- multivariate time series forecasting
- multi-scale patch embedding
- channel-wise attention
- time series transformer
- multi-step decoder
- long-term forecasting
AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.
Cite the paper
@article{Naghashi_2025, title={A multiscale model for multivariate time series forecasting}, volume={15}, ISSN={2045-2322}, url={http://dx.doi.org/10.1038/s41598-024-82417-4}, DOI={10.1038/s41598-024-82417-4}, number={1}, journal={Scientific Reports}, publisher={Springer Science and Business Media LLC}, author={Naghashi, Vahid and Boukadoum, Mounir and Diallo, Abdoulaye Banire}, year={2025}, month=Jan }