Fredformer
Transformer forecaster that patches the frequency spectrum into bands and attends across channels within each band.
Time series · 117 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
- 8.6M
- Operations
- 117
- Framework
- PyTorch
- Recurrent
- No
- Published
- KDD 2024
- Cited by
- 125 (as of 24 October 2026)
- Authors
- Xihao Piao, Zheng Chen, Taichi Murayama and others
- Source
- GitHub: chenzRG/Fredformer
- 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
- m16753
- Graph hash
- a9e96695501e762177479a2e5c11d6a0de642f2a06d98a22ccb3b774a0d5ff56
- Skeleton hash
- 6d28864eef10cf377dbf59eb9d5a327d16897f23d3ae307e450cab4896bf87ac
- Architecture hash
- 9786dd1546bcd294d3e07cfa4b9b12a1ab75271ca74a9a6a648e8112cf887bc6
- Diagram SHA-256
- 48a9c1d01cc00c4010919d4dd8d03a5ca53f4bb85dcced5c531328513c6ac11a
- 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
Fredformer is a Transformer-based model for time series forecasting designed to mitigate frequency bias. The paper observes that Transformer forecasters tend to learn low-frequency features in the data and overlook high-frequency ones. Its empirical study traces this bias to the model focusing disproportionately on frequency features with higher energy.
The model works in the frequency domain: it applies the DFT to the input series, normalizes locally and segments the coefficients into patches, each covering a sub-frequency band. Patches from different channels within the same band are embedded as tokens, and attention runs across channels. Each band is therefore encoded independently, which avoids the influence of other frequency components. A frequency-wise summarizing layer and the inverse DFT then produce the forecast.
The experiments cover eight benchmark datasets: Weather, four ETT datasets, Electricity, Traffic and Solar-Energy. Against its baselines the paper reports 60 top-1 and 20 top-2 cases out of 80. The authors also propose a lightweight Fredformer, inspired by NyströmFormer, which applies a matrix approximation to the attention map.
Key idea. The paper analyzes frequency bias in Transformer forecasters and proposes Fredformer, which learns features equally across frequency bands through frequency patching, local normalization and channel-wise attention.
- fredformer
- frequency debiased transformer
- time series forecasting
- multivariate forecasting
- frequency bias
- frequency domain transformer
- channel-wise attention
- frequency patching
AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.
Cite the paper
@misc{piao2024fredformerfrequencydebiasedtransformer,
title={Fredformer: Frequency Debiased Transformer for Time Series Forecasting},
author={Xihao Piao and Zheng Chen and Taichi Murayama and Yasuko Matsubara and Yasushi Sakurai},
year={2024},
eprint={2406.09009},
archivePrefix={arXiv},
primaryClass={cs.LG},
doi={https://doi.org/10.1145/3637528.3671928},
url={https://arxiv.org/abs/2406.09009},
}