BioFormer: Rethinking Cross-Subject Generalization via Spectral Structural Alignment in Biomedical Time-Series
Abstract
Cross-subject generalization in biomedical time-series aims to learn representations that generalize to unseen subjects while suppressing subject-specific variability. Most existing methods implicitly suppress the variability through model building or subject adversarial learning, but rarely model it explicitly. We introduce \textbf{spectral drift} as a new perspective to characterize subject specific variability. Specifically, BTS signals under the same label often share consistent oscillatory structure, yet exhibit subject-dependent magnitude or phase shifts in specific frequency components, which we interpret as subject-specific variability. Building on this insight, we propose \textit{BioFormer}. At its core is a Frequency-Band Alignment Module (FBAM) that generates band-wise modulation factors from the spectral distribution and adaptively adjusts amplitude and phase to align spectral structure, thereby mitigating variability. We further pair FBAM with Sample Conditional Layer Normalization, which infers normalization parameters from intrinsic signal statistics rather than subject identity, stabilizing cross-subject representations. Extensive experiments on six datasets demonstrate that BioFormer outperforms 12 baselines, yielding absolute F1-score improvements of 6\%.
Lay Summary
Biomedical signals such as EEG and ECG vary substantially across individuals, making it difficult for AI models trained on some people to generalize to unseen subjects. Most existing methods try to reduce these differences indirectly, without explicitly understanding how individual variability appears in the signals. In this work, we show that subject differences often emerge as changes in rhythmic patterns across frequencies, which we describe as \emph{spectral drift}. Based on this observation, we develop BioFormer, a neural network that adaptively aligns important frequency patterns while preserving disease- or task-related information. Experiments on six biomedical datasets show that BioFormer generalizes more reliably to new subjects than existing approaches. Our findings suggest that explicitly modeling physiological frequency structure can