Signal processing
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.
How it works
Schematic summary of this guide. Waveforms are illustrative, not measured data.
LSTM cells contain three learnable gates — input (i), forget (f), and output (o) — plus a cell state that acts as a long-term memory. The gating mechanism selects which information to retain or discard across variable-length time windows: , where and 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.
The key challenge for LSTM deployment on wearable MCUs is model size: recurrent models must fit the limited memory of wearable microcontrollers.
Frequently Asked Questions
How much training data is needed for a PPG LSTM model?
It depends on the task and model size; rhythm classification generally needs more labeled examples than heart-rate estimation, and transfer learning from public datasets can reduce the requirement.
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. Quantization and pruning shrink models to fit microcontroller memory; latency should be benchmarked on the target hardware.