Abstract
Tiny-HR is a modular, three-part machine learning pipeline designed to estimate heart rate on ultra-low-power microcontrollers like the ESP32. By partitioning the process into upsampling, signal classification, and regression, the system achieves an 82% reduction in energy consumption and inference time compared to traditional signal processing methods, while maintaining a memory footprint under 40 kB. This modularity not only improves efficiency but also enhances the interpretability of the "black box" typically associated with deep learning models.
Introduction
Wearable health monitors face a constant trade-off between battery life, cost, and accuracy. Traditional heart rate (HR) estimation relies on signal processing (SP) techniques like peak detection, which require high sampling rates (typically 12–20 Hz) to be reliable. These high rates prevent the Analog-to-Digital Converter (ADC) and the processor from entering deep-sleep modes, leading to significant "baseload" power consumption.
While Deep Learning (DL) can outperform traditional SP, most models are "black boxes," making it difficult to diagnose incorrect heart rate estimations. Furthermore, they are often too memory-intensive for the "TinyML" constraints of edge devices—microcontrollers with limited RAM and flash memory.
Proposed Pipeline
The authors propose a modular "Tiny-HR" pipeline consisting of three distinct, lightweight models:
- Upsampler Neural Network (U-NN): A Fully Connected Network (FCN) that takes a low-resolution 6 Hz signal and reconstructs it into a filtered 12 Hz output. This allows the device to sample at half the usual rate, saving 50% of the ADC's energy.
- Signal Quality Classifier: A 1D-Convolutional Neural Network (CNN) that acts as a "go/no-go" gate. It identifies and discards abnormal or low-quality signals (e.g., those corrupted by motion artifacts) before they reach the final stage.
- HR Regressor (HR-NN): A 1D-CNN that predicts the heart rate directly from the windowed, upsampled signal.
The pipeline was developed in PyTorch, converted to ONNX, and deployed to an ESP32 edge device using TensorFlow Lite Micro.
Experimental Setup
- Data Collection: Raw pulse data was collected using a custom thin-film pressure sensor applied to the radial artery.
- Participants: 5 healthy volunteers provided data at rest and after moderate exercise.
- Dataset: 5,687 labeled 6-second signal frames.
- Ground Truth: Expert-validated heart rates derived from high-resolution (126 Hz) raw data.
- Splits: 70% Training, 15% Validation, and 15% Test.
Key Insights and Interpretability
A major advantage of this modular approach is the creation of "probing points." If the system fails, developers can determine if the failure occurred during upsampling (poor reconstruction) or classification (noisy input), making the AI more transparent.
Additionally, the U-NN "learns" the morphology of a pulse wave, allowing it to reconstruct usable signals from sampling rates below the Nyquist threshold for traditional peak detection. Surprisingly, this ML pipeline proved more energy-efficient than traditional signal processing because complex mathematical filters (like Wavelet transforms) are more computationally taxing on simple microcontrollers than optimized matrix multiplications.
Results
The Tiny-HR pipeline was benchmarked against a traditional Signal Processing (SP) pipeline and a Hybrid version:
- Efficiency: The ML pipeline reduced energy usage and inference time by 82% compared to the SP pipeline.
- Footprint: The entire pipeline fits within 40 kB, ideal for low-cost microcontrollers.
- Accuracy (Mean Absolute Error):
- Signal Processing: 1.17 BPM
- Hybrid Pipeline: 2.39 BPM
- Full ML Pipeline: 3.28 BPM
- Classification: The signal quality classifier achieved 94% accuracy in filtering out problematic signals.
Conclusion
Tiny-HR demonstrates that modular ML can significantly improve the efficiency of wearable health monitors. While a small accuracy gap remains compared to traditional methods, the massive gains in battery life and the added interpretability make it a compelling solution for edge devices. Future work will focus on expanding dataset diversity and using Neural Architecture Search (NAS) to further optimize model performance.
Summary updated