RhythmFormer
A video transformer that extracts the pulse signal from facial video using periodic sparse attention.
Neuroscience signals · 601 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
- Neuroscience signals
- Parameters
- 3.3M
- Operations
- 601
- Framework
- PyTorch
- Recurrent
- No
- Published
- Pattern Recognition (arXiv 2024)
- Cited by
- 54 (as of 28 October 2026)
- Authors
- Bochao Zou, Zizheng Guo, Jiansheng Chen and others
- 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
- m19854
- Graph hash
- f220e3db0d61837bdd48934003b02f614178f822daf37b345635d8a32f2b9bc9
- Skeleton hash
- 64ee95c03dbe8027b9a24cea363a173e0d97279ff1e360f8b511712035162d2c
- Architecture hash
- 927b86439735ec87c9381c6fb462f05104bee0bb2fe7219ab641bff56bdf8753
- Diagram SHA-256
- 94c2fc9c58de51b93cd0f8c11e84790b579c974ce93deae319027973f7cbe998
- 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
RhythmFormer is a transformer for remote photoplethysmography (rPPG), a non-contact method for detecting physiological signals from facial videos. The paper notes that earlier methods had not conclusively shown transformers to perform better than convolutional neural networks on this task, and attributes this to the quadratic scaling of transformers with sequence length, which results in coarse-grained feature extraction.
The paper's answer is periodic sparse attention, in which a pre-attention stage placed before the conventional attention learns periodic patterns and filters out a large number of irrelevant attention computations. The pre-attention stage selects the top-k tokens to keep as keys and values, and the paper sets k to 40. The network consists of a fusion stem, patch embedding, a hierarchical temporal periodic transformer and an rPPG prediction head, and the hierarchical part has three temporal periodic transformer (TPT) blocks with two temporal downsampling modules between them.
The fusion stem integrates the difference frame with the raw frame so that frame-level features capture rPPG information, and the paper says the stem can be integrated into existing methods. There is no explicit position embedding. The predictor head projects the rPPG features into blood volume pulse (BVP) waves. On the COHFACE dataset the paper reports an MAE of 1.17, which it says was better than previous approaches.
Key idea. RhythmFormer adds a pre-attention stage that learns the periodic patterns of rPPG signals and filters out irrelevant attention computations, enabling fine-grained feature extraction from facial video.
- RhythmFormer
- rPPG
- remote photoplethysmography
- periodic sparse attention
- heart rate estimation
- remote physiological measurement
- facial video
- blood volume pulse
AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.
Cite the paper
@misc{zou2025rhythmformerextractingpatternedrppg,
title={RhythmFormer: Extracting Patterned rPPG Signals based on Periodic Sparse Attention},
author={Bochao Zou and Zizheng Guo and Jiansheng Chen and Junbao Zhuo and Weiran Huang and Huimin Ma},
year={2025},
eprint={2402.12788},
archivePrefix={arXiv},
primaryClass={cs.CV},
url={https://arxiv.org/abs/2402.12788},
}