Source-linked AI summary
MoWaveQFormer: A Motion-Conditioned Quality-Gated Transformer for Smartphone-Based PPG Heart Rate Estimation
Swandip Singha, Rifat Bin Reza, Saifur Rahman Sabuj
TL;DR
Free-living PPG heart-rate estimation faces motion-dependent corruption, and binary quality labels can force models to discard borderline recordings. MoWaveQFormer conditions filtering on motion and Transformer encoding on signal quality; it achieved the best overall performance among six representative methods on BUT PPG v2.0, with some scope limitations.
Problem
Free-living motion creates distinct PPG corruption patterns, while common methods do not explicitly condition processing on motion categories and binary quality labels can force hard accept/discard decisions.
Source: §I · p. 1Method
MoWaveQFormer combines a rule-based motion conditioner, motion-conditioned learnable filtering, a quality-gated Transformer, ECG-based HR supervision, and a PTT consistency constraint.
Source: §I · p. 2Results
MoWaveQFormer achieved the best overall performance among six representative methods, significantly improving over DeepPPG, CNN-BiLSTM, and a classical harmonic spectral tracker but not significantly differing from Q-PPG-inspired ResNet1D.
Source: §V · p. 7, §VI · p. 8Takeaways & Limitations
The soft quality gate provides a modest benefit concentrated on low-quality windows, retaining all windows while down-weighting unreliable segments.
Source: §V · p. 7Results come from one subject-level split of one dataset, and generalization to other populations, devices, and acquisition protocols remains unevaluated.
Source: §V · p. 7
Abstract
from arXiv · showhide
Photoplethysmography (PPG)-based heart-rate (HR) estimation on smartphones remains unreliable in free-living conditions because motion artifacts vary in spectral structure across activities, and benchmarks such as BUT PPG v2.0 label signal quality only as binary good or bad, discarding partially usable data. This study develops an HR estimation architecture that explicitly conditions motion type and signal quality rather than treating both uniformly. We propose MoWaveQFormer, a three-stage architecture trained under ECG supervision. Stage 1 assigns each window a discrete motion group based on accelerometer-derived spectral energy, without trainable parameters. Stage 2 uses this index to select one of the three learnable FIR filter banks for motion-specific spectral shaping of the PPG signal. Stage 3 embeds the resulting sub-bands into patch tokens, re-weights them via a differentiable soft gate derived from the quality label, and encodes them with a Transformer whose pooled output is regressed to HR, trained jointly with an ECG-supervised loss and a pulse-transit-time consistency term. In a subject-independent split of BUT PPG v2.0 (3,888 recordings, 50 subjects), MoWaveQFormer achieved a mean absolute error of 7.85 bpm, the lowest among five methods, with significant improvements over three baselines (Wilcoxon test, p<0.05). Ablation and Bland-Altman analyses characterize each component's contribution. With 816,445 parameters and sub-3-ms latency, MoWaveQFormer suits real-time deployment, pending validation on smartphone hardware. Replacing motion-agnostic filtering and binary quality discarding with differentiable conditioned processing offers a compact pathway to more reliable free-living PPG-based cardiovascular monitoring.
I. INTRODUCTION
Free-living PPG heart-rate estimation is challenged by motion-dependent signal corruption, while common models and quality labels do not fully use motion information or partially usable recordings. MoWaveQFormer addresses these gaps with motion-conditioned filtering, quality gating, and physiological supervision.
Motivation
- Free-living motion produces distinct spectral corruption patterns, but many methods ignore accelerometer signals or use them without distinguishing motion-induced artifacts.Existing deep models commonly apply one transformation across windows, despite activity-specific spectral signatures.Source: §I · p. 1
- BUT PPG v2.0 labels recordings only as good or bad, which can force HR models to discard borderline-quality segments and their partial physiological information.The paper motivates differentiable internal quality weighting as an alternative to hard accept/discard decisions.Source: §I · p. 1
- The study adds PTT consistency to ECG-derived HR supervision because PTT encodes information about arterial compliance and should remain consistent across short windows.The introduction identifies this as an underused physiological constraint in contemporary PPG HR estimation.Source: §I · p. 1
Contributions
- MoWaveQFormer uses motion-stratified filtering, quality-gated encoding, and a PTT consistency constraint alongside ECG-based HR supervision.Its three stages are a rule-based motion conditioner, a motion-conditioned wavelet filter bank, and a quality-gated Transformer encoder.Source: §I · p. 2
- The proposed framework showed significant improvements over three of four representative motion-agnostic baselines, with no significant difference from a Q-PPG-inspired ResNet1D baseline.The reported comparison uses a Wilcoxon signed-rank test with p < 0.05 for the significant improvements.Source: §I · p. 2
II. METHODOLOGY
MoWaveQFormer maps synchronized smartphone PPG and accelerometer windows to an HR estimate through motion-conditioned filtering and quality-gated Transformer encoding. It trains with ECG-derived HR labels and R-peak annotations used to compute a PTT target.
Overview
- In the reported experiments, motion groups come from recorded activity annotations; the accelerometer-derived classifier is evaluated separately as a candidate for annotation-free deployment.R-peak annotations are used only during training to compute the PTT target.Source: A. Overview of MoWaveQFormer Framework · p. 2
- The three-stage pipeline selects a motion-specific filter bank, converts PPG into eight sub-bands, then quality-gates Transformer patch tokens before pooled HR regression.The training objective combines ECG-supervised HR regression with a PTT-consistency term.Source: A. Overview of MoWaveQFormer Framework · p. 2, Figure 1 · p. 2
- Motion information explicitly selects PPG filters before feature encoding, rather than being concatenated with motion features into a shared embedding.This places motion conditioning at the start of representation processing.Source: A. Overview of MoWaveQFormer Framework · p. 2
- Each PPG channel is min-max normalized within its window to [−1, 1], avoiding dataset-level statistics that could leak information across the subject-level split.The normalization also stabilizes the learnable filters and embedding projection.Source: A. Overview of MoWaveQFormer Framework · p. 2
B. Motion Conditioning Module
The motion-conditioning module assigns a discrete group used to select a learnable FIR filter bank. The filters produce motion-specific sub-bands for the subsequent encoder.
B. Motion Conditioning Module
- The rule-based classifier avoids end-to-end training because coughing and laughing account for only 7.4% of training windows, which the authors judged insufficient for reliable learning.They cite the risk of fitting subject-specific idiosyncrasies rather than motion physics.Source: B. Motion Conditioning Module · p. 3
- The accelerometer classifier uses spectral-energy ratios and fixed thresholds to assign walking, burst, or default subtle/rest motion groups.Walking uses the 1–2.5 Hz stride band; burst uses 4–15 Hz energy relative to the 0.5–4 Hz baseline, with absolute-energy floors for both branches.Source: B. Motion Conditioning Module · p. 3
- Held-out accelerometer classifications agree with annotated activity groups in 56% of cases, reflecting difficulty separating subtle motions using accelerometer statistics alone.The subtle/rest group includes rest, elevated sensor pressure, finger movement, lighting change, and talking.Source: B. Motion Conditioning Module · p. 3
C. Motion-Conditioned Learnable Wavelet Filtering
- The filter bank replaces one globally optimized decomposition with learnable filters indexed by motion group and jointly optimized with the HR regression objective.The design is motivated by activity-dependent artifact spectra and prior observations that one global parameterization can underperform across heterogeneous motion regimes.Source: C. Motion-Conditioned Learnable… · p. 3
- For each of three motion groups, eight learnable 31-sample FIR filters and motion-specific sigmoid gains transform normalized PPG into sub-bands.The selected filter set is applied by zero-padded convolution; its output replaces raw PPG as the Stage 3 encoder input.Source: C. Motion-Conditioned Learnable… · p. 3
D. Quality-Guided Transformer Representation Learning
MoWaveQFormer converts quality labels into a soft gate on patch embeddings before Transformer encoding. The encoded tokens are pooled and regressed to heart rate.
D. Quality-Guided Transformer Representation Learning
- The eight sub-bands are split into 30 patches, flattened, projected to 128 dimensions, and combined with learnable positional encodings.Each patch contains 80 values from 8 sub-bands across 10 samples.Source: D. Quality-Guided Transformer… · p. 3
- A learned sigmoid gate reweights each patch embedding from the binary quality label without zeroing low-quality tokens.The gate is applied before the encoder, so low-quality tokens remain available as keys and values in self-attention.Source: D. Quality-Guided Transformer… · p. 3
- A four-layer Transformer processes the gated tokens, whose outputs are globally averaged and passed through a two-layer regression head to predict HR.The encoder uses four attention heads, model dimension 128, feedforward dimension 512, and dropout 0.1.Source: D. Quality-Guided Transformer… · p. 3
E. Physiological Constraint and Training Objective
Training combines ECG-derived heart-rate supervision with a pulse-transit-time consistency term. The latter applies only when a physiologically plausible measured PTT target is available.
E. Physiological Constraint and Training Objective
- Measured PTT is the mean delay from each ECG R-peak to the first subsequent PPG peak, restricted to 50–600 ms.Windows without a valid match are excluded from the PTT term but retain HR supervision.Source: E. Physiological Constraint and… · p. 3
- The training objective combines L1 error against ECG-derived HR with a PTT consistency loss weighted by λ_PTT = 0.1.The PTT loss penalizes the absolute discrepancy between predicted and measured delay for valid targets.Source: E. Physiological Constraint and… · p. 4
- The PTT term adds no trainable parameters and regularizes predictions against the arterial-delay characteristics of the paired ECG–PPG recording.The training procedure applies the combined loss and updates model parameters while keeping the motion index non-differentiable.Source: E. Physiological Constraint and… · p. 4
III. EXPERIMENTAL SETUP
The evaluation uses BUT PPG v2.0, a smartphone PPG dataset with ECG references across eight activity conditions. Training augmentation is applied independently to each sample.
A. Dataset and Preprocessing
- BUT PPG v2.0 contains 3,888 ten-second recordings from 50 subjects across eight activity conditions, with smartphone PPG and reference ECG for each record.Synchronized tri-axial chest accelerometer data are available for 3,840 records.Source: A. Dataset and Preprocessing · p. 4
- Across the dataset, 78.7% of windows are labeled low quality and 21.3% high quality.The dataset passage identifies this imbalance as motivating the soft quality gate.Source: A. Dataset and Preprocessing · p. 4
- During training, each sample independently has a 0.5 probability of Gaussian noise augmentation and a 0.5 probability of a circular shift of up to ±10 samples.No augmentation is applied during validation or testing.Source: A. Dataset and Preprocessing · p. 4
B. Data Partitioning
On the subject-independent test set, MoWaveQFormer had the best overall performance among six methods, although its improvement over ResNet1D was not statistically significant. The evaluation also reports subject-level partitioning, stratified metrics, and training configuration.
B. Data Partitioning
- The subject-level split assigns 35 subjects to training, 7 to validation, and 8 to testing; motion groups are strongly imbalanced.The training groups comprise 2,436 subtle/rest windows (88.9%), 102 walking (3.7%), and 204 burst (7.4%); the test groups contain 532, 22, and 44 windows, respectively.Source: B. Data Partitioning · p. 4
C. Evaluation Metrics
- Test performance is measured against ECG-derived HR using MAE, RMSE, and Pearson r, with additional stratification by quality and activity.The evaluation also uses paired Wilcoxon tests and Bland–Altman bias with 95% limits of agreement.Source: C. Evaluation Metrics · p. 4
D. Training Configuration
- The model has 816,445 trainable parameters and is trained for 80 epochs with AdamW; training and evaluation use a cloud-hosted NVIDIA GPU.Inference latency is measured over 200 runs after a 50-iteration warmup on GPU and CPU.Source: D. Training Configuration · p. 4
A. Heart-Rate Estimation Accuracy
- MoWaveQFormer was best among six methods on test-set error and correlation; deep baselines had MAE of 8.2–8.5 bpm, while spectral trackers exceeded 20 bpm.The overall test set contains 598 records.Source: Table II · p. 5, A. Heart-Rate Estimation Accuracy · p. 5
- Improvements over DeepPPG, CNN-BiLSTM, and Harmonic-SP were significant, but the lower mean error versus ResNet1D was not significant (p = 0.319).The Wilcoxon test used paired per-record absolute errors; effect sizes were small versus the two learned CNN baselines.Source: Table III · p. 5, A. Heart-Rate Estimation Accuracy · p. 5
B. Motion-Specific Corruption Patterns and PTT Consistency
Rest, walking, and coughing show distinct PPG corruption signatures, while mean pulse transit time (PTT) remains consistent across activity classes. Figure 2 pairs representative waveforms and spectra with PTT measurements.
- Representative rest, walking, and coughing windows show visually distinct time- and frequency-domain corruption signatures; at rest, the waveform is clean and periodic, with a dominant spectral peak matching ECG-derived reference rate.Source: B. Motion-Specific Corruption Patterns… · p. 5
- Mean PTT, measured from ECG R-peaks to corresponding PPG peaks, ranges from 0.303 to 0.318 s across eight activity classes, with overlapping standard deviations.Source: B. Motion-Specific Corruption Patterns… · p. 5
- Figure 2 shows representative rest, walking, and coughing windows and spectra, annotates the rest example’s PTT, and plots mean PTT with standard deviations across all eight classes.Source: Figure 2 · p. 5
C. Effect of the Quality Gate
The quality-gate benefit is concentrated in low-quality windows, while motion-class results vary across activities. Ablations show measurable contributions from the quality gate and PTT term, but no discernible aggregate benefit from motion-specific filtering alone.
C. Effect of the Quality Gate
- MoWaveQFormer achieves the lowest MAE on low-quality windows, while ResNet1D is marginally better on high-quality windows; error is substantially higher at SQI=0.Source: Table IV · p. 5, C. Effect of the Quality Gate · p. 5
D. Per-Motion-Class Performance
- MoWaveQFormer has the lowest MAE for walking, coughing, and laughing, but DeepPPG leads on higher-pressure and moving-finger, CNN-BiLSTM on light-change, and ResNet1D on talking.For rest, MoWaveQFormer is comparable to ResNet1D (7.493 versus 7.555).Source: Table V · p. 6, D. Per-Motion-Class Performance · p. 6
E. Ablation Study
- Removing the quality gate or PTT term raises validation MAE by 0.121 or 0.143 bpm, respectively; shared filtering changes it by −0.083 bpm, within run-to-run variation.Source: Table VI · p. 6, E. Ablation Study · p. 6
F. Learned Filter-Bank Analysis
The learned filters show modest walking-specific stride-band attenuation but no comparable burst-band specialization. The test-set agreement analysis reports a negative bias and wide limits, and inference takes under 3 ms on the tested hardware.
F. Learned Filter-Bank Analysis
- Walking filters attenuate the stride band slightly more than subtle/rest filters (−13.25 dB versus −12.96 dB), while burst filters attenuate the burst band less (−14.09 dB versus −14.99 dB).Source: Figure 3 · p. 6, F. Learned Filter-Bank Analysis · p. 6
G. Clinical Agreement Analysis
- All eleven errors below −50 bpm occurred on low-quality windows with annotated HR of 120–161 bpm; recomputed QRS-based values were closer to predictions, with CSV-to-recomputed ratios near 2:1.Source: G. Clinical Agreement Analysis · pp. 6–7
- Test-set bias is −5.54 bpm, with 95% limits of agreement of [−29.42, 18.35] bpm; 95.7% of errors fall within those limits.Source: G. Clinical Agreement Analysis · p. 6, Figure 4 · p. 7
H. Computational Efficiency
- MoWaveQFormer has 816,445 trainable parameters and processes a 10-second window in 2.04 ± 0.11 ms on cloud CUDA GPU or 2.63 ± 0.21 ms on CPU.Source: H. Computational Efficiency · p. 7
V. DISCUSSION
MoWaveQFormer performs best overall among six representative methods, with significant gains over three baselines but no significant difference from ResNet1D. Its clearest benefits are activity- and quality-dependent, while motion classification, taxonomy granularity, dataset scope, and on-device validation constrain deployment claims.
V. DISCUSSION
- Walking, coughing, and laughing showed the clearest gains, but 88.9% subtle/rest windows dilute motion conditioning’s pooled ablation effect (∆=−0.083 bpm) and remain heterogeneous.Walking artifacts are approximately periodic within 10-second windows, whereas coughing and laughing create brief non-stationary transients that fixed-response filters cannot selectively suppress.Source: §V · p. 7, §VI · p. 8
- With 78.7% low-quality windows, soft gating retains rather than discards data and benefits low-quality windows most; PTT consistency had the largest single-component ablation effect.ResNet1D achieved marginally lower MAE on high-quality windows.Source: §V · p. 7
- The reported results use annotated motion groups; the accelerometer rule classifier agreed with them on only 56% of held-out test data, potentially reducing deployment gains.Misclassification routes windows to a mismatched filter set.Source: §V · p. 7
- Evaluation used one subject-level split of one dataset, and inference latency was measured on cloud infrastructure rather than smartphone hardware.Generalization to other populations, devices, and acquisition protocols remains unevaluated.Source: §V · p. 7
VI. CONCLUSION
- Future work targets finer-grained motion grouping, learned real-time motion classification, cross-dataset validation, and on-device implementation.The proposed taxonomy does not resolve subtle/rest heterogeneity.Source: §V · pp. 7–8
- MoWaveQFormer achieved the best overall performance among six methods, significantly improving over DeepPPG, CNN-BiLSTM, and Harmonic-SP but not ResNet1D.The ResNet1D significance comparison varied across repeated runs, warranting cautious interpretation.Source: §V · p. 7, §VI · p. 8