Frequency-Aware Masked Autoencoders for Multimodal Pretraining on Biosignals

Ran Liu, Ellen L. Zippi, Hadi Pouransari, Christopher Michael Sandino, Jingping Nie, Hanlin Goh, Erdrin Azemi, Ali Moin · Submission to ICLR 2024 · Rejected

TL;DR

bioFAME is a frequency-aware masked autoencoder designed for self-supervised pretraining across multimodal biosignals (like EEG, EMG, and EOG). By replacing conventional attention with a fixed-size Fourier operator and performing masking in the latent space rather than on raw inputs, the model handles varying sequence lengths and sampling rates without architectural changes. Across diverse downstream tasks, bioFAME improves classification accuracy by an average of 5.5% over prior state-of-the-art methods and stays resilient when modalities drop out or are swapped at test time.

What Problem Does This Paper Address?

Pretraining large models on biosignals (such as brainwaves, muscle activity, and eye movements) has historically lagged behind vision and NLP. Physiological data suffers from two major distribution shifts:

  1. Intra-modality shifts: Signals fluctuate across subjects, recording sessions, and sensor placements, even within the same modality.
  2. Cross-modality shifts: Real-world deployments frequently suffer from modality mismatch—sensors disconnect, sampling rates vary, or an EMG channel must be substituted with another sensor at test time.

Prior biosignal pretraining methods have often relied heavily on time-domain contrastive learning. However, combining multiple modalities during pretraining often degraded performance rather than improving it, because models struggled with cross-modal variance. Furthermore, standard Masked Autoencoder (MAE) strategies—which zero out chunks of the raw signal—introduce artificial step discontinuities that distort the underlying frequency spectra essential for decoding physiological activity.

Methods

The authors introduce bioFAME, which couples a frequency-aware encoder with a latent-space pretraining strategy:

[ Raw Signal (Any Length/Hz) ] 
       │
  (Patchify)
       │
       ▼
┌─────────────────────────────────────────┐
│     FA-Enc (Frequency-Aware Encoder)    │
│  • Sequence FFT                         │
│  • Multi-Head Filter Layer (Fixed-Size) │
│  • Sequence IFFT                        │
└─────────────────────────────────────────┘
       │
  (Latent Masking)
       │
       ▼
┌─────────────────────────────────────────┐
│   MAE (Latent Encoder-Decoder)          │
│  • Lightweight Transformer Encoder      │
│  • Pad Mask Tokens + Decoder            │
│  • MSE Reconstruction Loss on Patches   │
└─────────────────────────────────────────┘
  • Frequency-Aware Transformer (FA-Enc): Instead of standard multi-head self-attention, bioFAME uses a Multi-Head Frequency Filter Layer. The sequence of token embeddings is transformed via a 1D Discrete Fourier Transform (DFT). A fixed-size learnable complex kernel $K \in \mathbb{C}^{H \times D}$ is modulated by queries $Q = ZW$ via Hadamard product (or complex max-pooling) to globally mix tokens. The sequence is then converted back via Inverse DFT (IDFT). Because the filter dimension is fixed and modulated dynamically, it handles varying sequence lengths and sampling frequencies seamlessly.
  • Frequency-Maintain (FM) Latent Masking: To prevent the spectral corruption caused by raw time-domain masking, the entire unmasked signal is passed through FA-Enc. Patch masking is performed exclusively in the latent feature space.
  • Pure Reconstruction Objective: Unmasked latent tokens pass through a lightweight second transformer encoder, are padded with mask tokens, and a lightweight transformer decoder reconstructs the raw signal patches using standard Mean Squared Error (MSE). No contrastive losses or manual data augmentations are required.
  • Channel and Modality Independence: Channels are processed independently by the shared FA-Enc before being combined in the latent MAE module, allowing arbitrary channel counts and arrangements at inference time.

Datasets

  • Pretraining Dataset:
  • SleepEDF: Polysomnography records used for both unimodal pretraining (single-channel EEG: Fpz-Cz) and multimodal pretraining (Fpz-Cz EEG, Pz-Oz EEG, EOG, EMG, and respiration channels).
  • Downstream Transfer Benchmarks (Unimodal Time Series):
  • Epilepsy (EEG): 174 Hz, sequence length 178.
  • SleepEOG (EOG): 100 Hz, sequence length 3000.
  • ExpEMG (EMG): 4,000 Hz, sequence length 1500.
  • FD-B (Electromechanics / Motor Current): 64,000 Hz, sequence length 5120.
  • Mismatch Benchmarks: Evaluated on SleepEDF using modality dropout and modality substitution scenarios.

Key Insights and Ideas

  • Latent masking protects spectral consistency: Standard MAE introduces sharp rectangular edges into signals, creating high-frequency noise that disrupts physiological patterns. Encoding first and masking latents later keeps the frequency extractor operating on clean, physically meaningful oscillations.
  • Contrastive learning isn't strictly necessary for biosignals: Previous literature indicated that masked autoencoding alone underperformed on physiological time series. bioFAME demonstrates that pure masked autoencoding works well once the architecture respects frequency properties.
  • Multimodal pretraining finally helps: Where prior contrastive methods suffered performance drops when pretraining across multiple biosignal modalities, bioFAME's multimodal pretraining consistently outperforms unimodal pretraining, exposing the model to a richer spectrum of biological frequencies.
  • Strong inductive bias without pretraining: Even when trained completely from scratch without pretraining, the frequency-aware architecture achieves competitive performance (e.g., 93.17% on ExpEMG), underscoring that global Fourier token mixing provides a strong inductive bias for physiological waveforms.

Key Results

  • Unimodal Transfer: bioFAME sets a new state-of-the-art across all four downstream transfer datasets, averaging a ↑5.5% accuracy gain over prior baselines (including TF-C, TS-TCC, and PatchTST).
  • Epilepsy: Reaches 95.71% accuracy (multimodal pretraining) vs. 94.95% (TF-C).
  • SleepEOG: Reaches 71.55% vs. 69.58% (TF-C).
  • ExpEMG: Reaches 98.54% vs. 81.71% (TF-C) and 92.68% (PatchTST).
  • FD-B: Reaches 78.18% vs. 69.38% (TF-C).
  • Ablation Studies:
  • Removing both FA and FM modules lowers performance from 85.04% to 80.68% average accuracy.
  • Discarding the second encoder at inference time works fine for unimodal models (~85.04%), but keeping it is necessary in multimodal setups (85.99% vs. 83.92%) because it learns cross-modality integration.
  • Robustness to Sensor Faults: Under modality substitution or gradual modality dropout (down to a single surviving channel), bioFAME retains significantly higher classification accuracy and lower degradation slopes compared to PatchTST.

Limitations and Future Work

  • Interpretability of Frequency Filters: While the learnable Fourier operators clearly aid performance, the paper notes it is difficult to map which learned filters correspond to recognized physiological bands (e.g., alpha, beta, or delta rhythms in EEG).
  • Low-Density Biosignals: Experiments were restricted to low-density sensor systems (single- to few-channel setups) due to available public multimodal datasets.
  • Channel Independence Trade-off: Channel independence provides robustness to missing channels, but prior literature notes it can restrict model capacity when scaling to high-density sensor arrays (e.g., 64- or 128-channel clinical EEG/MEG caps). Exploring scalable cross-channel interaction without sacrificing robustness remains future work.

Summary updated

BibTeX
@misc{liu2023frequency,
  author = {Ran Liu and Ellen L. Zippi and Hadi Pouransari and Christopher Michael Sandino and Jingping Nie and Hanlin Goh and Erdrin Azemi and Ali Moin},
  title = {{Frequency-Aware Masked Autoencoders for Multimodal Pretraining on Biosignals}},
  year = {2023},
  eprint = {2309.05927},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2309.05927},
}
Figure