Skip to content

NKU-EmbeddedSystem/BioFormer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BioFormer: Rethinking Cross-Subject Generalization via Spectral Structural Alignment in Biomedical Time-Series

Paper


📌 Overview

BioFormer is a Transformer-based framework for cross-subject generalization in biomedical time-series (BTS).

We propose a new perspective spectral drift to explicitly characterize subject-specific variability in frequency space. Based on this, BioFormer performs spectral structural alignment via:

  • Frequency-Band Alignment Module (FBAM)

Our approach achieves strong performance across 6 benchmark datasets, outperforming 12 baselines.


🧠 Key Insight: Spectral Drift

Samples from different subjects exhibit similar global spectral patterns, while variability mainly appears as band-wise magnitude and phase shifts.


🏗️ Model Architecture

BioFormer integrates:

  • Multi-scale temporal encoding
  • Frequency-domain alignment (FBAM)
  • Adaptive normalization (SCLN)
  • PyramidConvolutional Embedding (PCE)

🔬 FBAM Mechanism

FBAM performs:

  • Magnitude scaling
  • Phase rotation

in Fourier subspaces, enabling interpretable alignment.


📊 Cross-Subject Performance

BioFormer consistently improves performance across multiple datasets under strict cross-subject settings.


🙏 Acknowledgement

This work is built upon:

👉 Medformer

We sincerely thank the authors for their open-source contribution.


⚙️ Requirements

matplotlib==3.7.0
natsort==8.4.0
numpy==1.23.5
pandas==1.5.3
scikit_learn==1.2.2
thop==0.1.1.post2209072238
torch==2.4.1
tqdm==4.64.1

Install:

pip install -r requirements.txt

📊 Datasets

We evaluate on six datasets:

  • APAVA
  • ADFTD
  • PTB
  • PTB-XL
  • BCI2a
  • BCI2b

🔹 BCI Datasets

Based on:

👉 https://github.com/ziyujia/ECML-PKDD_MMCNN

We adapt them into cross-subject setting.

Processed data:

👉 https://drive.google.com/drive/folders/1cpSyqhCAGl-NarfJWa-CmzPoG6TL6vVe?usp=sharing

🚀 Training & Evaluation

All commands are provided in:

experiments.ipynb

📖 Citation

@inproceedings{bioformer2026,
  title={BioFormer: Rethinking Cross-Subject Generalization via Spectral Structural Alignment in Biomedical Time-Series},
  author={Du, Guikang and Li, Haoran and Liu, Xinyu and Zhang, Zhibo and Gong, Xiaoli and Zhang, Jin},
  booktitle={ICML},
  year={2026}
}

📬 Contact

Guikang Du

Email: guikangdu@mail.nankai.edu.cn

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors