Edge-aware multi-head transformer for noise-robust full-field magnetocardiography signal modeling
摘要
Magnetocardiography (MCG) provides unrivalled sensitivity to the weak magnetic fields generated by the heart, yet its clinical utility is hindered by two intertwined challenges: severe information loss during conventional channel-wise or spatial-averaging dimensionality reduction and contamination from heterogeneous environmental and physiological noise. We present Edge-Aware Multi-Head Transformer (EA-MHT), a novel spatiotemporal architecture that treats the MCG array as a whole, explicitly preserving both the central cardiac dynamics and the often-neglected edge-field signatures. First, a dedicated multi-head attention block learns rich representations of the peripheral channels, where gradient-rich but low-amplitude signals coexist with dominant noise sources. These edge-aware features are then fused with central-region embeddings through a second multi-head attention layer that jointly encodes global spatial coherence and local temporal structure. Finally, an attention-selection gating mechanism adaptively suppresses noise-related attention heads while amplifying signal-specific ones, yielding a purified, high-fidelity reconstruction of the cardiac magnetic field. Extensive experiments on the publicly released Kiel Cardio Database—containing 128-channel unshielded recordings from 312 subjects—demonstrate that EA-MHT outperforms state-of-the-art CNN, LSTM, and vanilla Transformer baselines in denoising (SNR