All models

fNIRS-PreT

Transformer classifier for fNIRS signals with pooling and normalization in place of filtering and baseline correction.

Neuroscience signals · 371 operations Checked

100%

Showing the top corner; full diagram not loaded yetShowing a small copy; full diagram not loaded yetLarge diagram, not loaded yet

Open SVG

Loading diagram (17 KB)

Open in a new tab

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

Parameters
1.7M
Operations
371
Framework
PyTorch
Recurrent
No
Published
2022, IEEE Journal of Biomedical and Health Informatics
Cited by
130 (as of 30 October 2026)
Authors
Zenghui Wang, Jun Zhang, Xiaochu Zhang 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 diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.

Details
Stable ID
m21615
Graph hash
3cac1dcbd6dee6461a6b3a3c1485345b14668885746c79fe726baf313576193e
Skeleton hash
cc4e7d413e9cebef36397fbb1712cbbb6b31866ad48cf2aab44fd8ef468c18c0
Architecture hash
3b1115a4ea0481ad5b129b679ebb392907059d894cc2f9288ab60939f4274ffb
Diagram SHA-256
c44a37dea44a4cde0e0079e786c0f2132a8c50a23a036c4c933bc0db488fd6ba
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

fNIRS-PreT is an end-to-end Transformer network that classifies functional near-infrared spectroscopy (fNIRS) signals. The paper notes that the fNIRS classification problem has always been the focus of the brain-computer interface (BCI). It extends fNIRS-T, a classification network that the same paper proposes after the success of the self-attention-based Transformer in natural language processing and computer vision.

What fNIRS-PreT adds is a preprocessing module, made of one-dimensional average pooling and layer normalization, that replaces the filtering and baseline correction steps of data preprocessing. The networks use spatial-level and channel-level representations of fNIRS signals to improve data utilization and network representation capacity. In the released code, the input carries two chromophores, HbO and HbR.

The paper reports that the proposed models obtain the best accuracy on three open-access datasets, compared with traditional machine learning classifiers, a convolutional neural network (CNN) and long short-term memory (LSTM). In the most extensive ternary classification task, with 30 subjects and three types of overt movements, fNIRS-T, CNN, and LSTM obtain 75.49%, 72.89%, and 61.94% on test sets. The code instructions add that for fNIRS-PreT the filtering and baseline correction code in the data conversion scripts needs to be manually disabled.

Key idea. fNIRS-PreT makes the fNIRS-T Transformer classifier end to end by replacing filtering and baseline correction with a module of one-dimensional average pooling and layer normalization.

  • fNIRS-PreT
  • fNIRS classification
  • functional near-infrared spectroscopy
  • brain-computer interface
  • end-to-end network
  • preprocessing module
  • one-dimensional average pooling
  • layer normalization
  • HbO and HbR

AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.

Cite the paper

@article{Wang_2022, title={Transformer Model for Functional Near-Infrared Spectroscopy Classification}, volume={26}, ISSN={2168-2208}, url={http://dx.doi.org/10.1109/JBHI.2022.3140531}, DOI={10.1109/jbhi.2022.3140531}, number={6}, journal={IEEE Journal of Biomedical and Health Informatics}, publisher={Institute of Electrical and Electronics Engineers (IEEE)}, author={Wang, Zenghui and Zhang, Jun and Zhang, Xiaochu and Chen, Peng and Wang, Bing}, year={2022}, month=June, pages={2559–2569} }