LSTM Networks for PPG Analysis
Long Short-Term Memory (LSTM) networks are recurrent neural networks with gating mechanisms that capture long-range temporal dependencies in sequential data. For PPG analysis, LSTMs learn end-to-end to extract heart rate, detect arrhythmias, and remove motion artifacts directly from raw or minimally preprocessed waveforms, outperforming traditional signal processing in high-noise scenarios.
LSTM cells contain three learnable gates — input (i), forget (f), and output (o) — plus a cell state C_t that acts as a long-term memory. The gating mechanism selects which information to retain or discard across variable-length time windows: f_t = σ(W_f·[h_{t-1}, x_t] + b_f), where W_f and b_f are learnable parameters. This architecture enables LSTMs to model cardiac rhythms across multiple beat periods and learn physiologically plausible heart rate dynamics from training data.
For PPG analysis, recurrent architectures can model temporal context, while bidirectional models use samples on both sides of a point and are therefore generally suited to offline window processing rather than causal streaming. DeepBeat (Torres-Soto and Ashley, 2020) is not a heart-rate LSTM benchmark: it used convolutional denoising autoencoders and convolutional classifiers for simultaneous PPG signal-quality assessment and atrial-fibrillation detection. The paper reported AF classification metrics, not a 1.28 bpm heart-rate MAE on WESAD or BAMI.
For AF detection, multi-scale LSTM architectures operating at both beat-level (morphological features) and rhythm-level (IBI sequence) achieve AUC 0.97–0.99 on PhysioNet challenge datasets. The key challenge for LSTM deployment on wearable MCUs is model size: typical PPG LSTM models require 50K–500K parameters, demanding 200KB–2MB storage. Model compression through pruning, quantization (INT8), and knowledge distillation can reduce inference time by 10–20× with <1% accuracy loss.
Frequently Asked Questions
How much training data is needed for a PPG LSTM model?
Typically 10,000–100,000 annotated beat sequences for heart rate estimation, and 50,000–500,000 rhythm segments for AF detection. Transfer learning from large public datasets (MIMIC-III, PhysioNet) can reduce labeled data requirements by 10×.
How does LSTM compare to CNN for PPG analysis?
CNNs excel at learning local waveform morphology features (beat shape, artifact patterns) while LSTMs capture sequential dependencies (rhythm, IBI trends). Hybrid CNN-LSTM architectures typically outperform either alone for complex tasks like AF detection or cuffless BP estimation.
Can LSTM be deployed on a wearable microcontroller?
Yes, with model compression. Quantized INT8 LSTM models of 50K parameters run in <10ms on ARM Cortex-M4 at 100 MHz, enabling real-time PPG analysis on smartwatch-class hardware.