MedMamba: Multi-View State Space Models with Adaptive Graph Learning for Medical Time Series Classification
Abstract
Medical time series are central to healthcare, enabling continuous monitoring and supporting timely clinical decisions. Despite recent progress, existing methods struggle to jointly model local-global dynamics and handle nonstationarities like baseline drift, while often failing to capture latent channel interactions. To address these challenges, we propose MedMamba, an end-to-end architecture that integrates state space models with domain-specific inductive biases. Specifically, MedMamba first employs multi-scale convolutional embeddings to capture discriminative local morphology. Second, to mitigate nonstationarity, we introduce a tri-branch differential state space encoder that processes raw, temporal-difference, and frequency-domain views, fusing them to emphasize informative patterns while suppressing drift. Furthermore, to uncover latent channel correlations, we design a spatial graph Mamba module that learns a directed dependency structure regularized toward sparsity and acyclicity, which obviates the need for predefined graphs. Extensive experiments on five real-world datasets demonstrate that MedMamba achieves state-of-the-art performance while maintaining linear computational complexity, and ablation studies validate each component's contribution.Code is available at https://github.com/zhangda1018/MedMamba.
Lay Summary
Medical recordings such as EEG and ECG can help detect health conditions, but they are hard for AI systems to interpret. Useful clues may appear as short spikes, long rhythms, or relationships between different sensors, while noise and slow signal drift can hide important patterns. We developed MedMamba, an AI model designed to analyze these recordings more reliably. It looks at each signal from three views: the original waveform, how the signal changes over time, and its rhythm information. It also learns which sensors are related for each recording, instead of relying on fixed assumptions. This allows the model to capture both detailed and long-range patterns efficiently. In tests on five real-world brain and heart signal datasets, including settings with previously unseen people, MedMamba achieved stronger overall performance than existing methods. This work may help build more reliable AI tools for clinical monitoring and decision support.