WaveFormer: Wavelet Embedding Transformer for Biomedical Signals
Habib Irani, Bikram De, Vangelis Metsis
TL;DR
Biomedical time-series classification is challenged by long sequences, non-stationary dynamics, and multi-scale frequency content. WaveFormer introduces a dual-stage wavelet integration into a patch-based transformer: wavelet-enhanced embedding using Path A and Path B, plus Dynamic Wavelet Positional Encoding (DyWPE) and a Transformer encoder with relative positional bias. It achieves competitive or state-of-the-art results across eight diverse datasets, with seven wins and notable gains on long sequences, validated by ablations showing the dominant contribution of explicit frequency decomposition. The approach offers a principled framework to embed frequency-domain knowledge into transformer-based time-series classifiers, facilitating improved performance on long, multi-channel biomedical signals.
Abstract
Biomedical signal classification presents unique challenges due to long sequences, complex temporal dynamics, and multi-scale frequency patterns that are poorly captured by standard transformer architectures. We propose WaveFormer, a transformer architecture that integrates wavelet decomposition at two critical stages: embedding construction, where multi-channel Discrete Wavelet Transform (DWT) extracts frequency features to create tokens containing both time-domain and frequency-domain information, and positional encoding, where Dynamic Wavelet Positional Encoding (DyWPE) adapts position embeddings to signal-specific temporal structure through mono-channel DWT analysis. We evaluate WaveFormer on eight diverse datasets spanning human activity recognition and brain signal analysis, with sequence lengths ranging from 50 to 3000 timesteps and channel counts from 1 to 144. Experimental results demonstrate that WaveFormer achieves competitive performance through comprehensive frequency-aware processing. Our approach provides a principled framework for incorporating frequency-domain knowledge into transformer-based time series classification.
