HiMAE: Hierarchical Masked Autoencoder for wrist PPG
HiMAE is a compact (1.2M-parameter) self-supervised foundation model for wrist photoplethysmography (PPG), designed to run directly on commercial smartwatches. It was pretrained with masked reconstruction on about 80,000 hours of unlabeled wrist PPG from 47,644 participants. Its encoder produces representations that transfer to downstream screening tasks, such as detecting premature ventricular contractions (PVC) and stage I hypertension, through a linear probe or fine-tuning.
No weights are distributed in this repository. The pretrained HiMAE weights, the clinical checkpoints and the training data are proprietary. This card documents the model described in the papers below. The architecture, training code, evaluation code and a synthetic example are open source on GitHub.
Model Details
Model Description
HiMAE is a hierarchical one-dimensional convolutional encoder–decoder with a U-Net-style design. The encoder compresses temporal resolution through stride-2 convolutions while increasing channel depth. Shallow stages capture local pulse morphology, while deeper stages aggregate longer-range rhythm dynamics. Residual blocks use GELU activations and batch normalization. Encoder–decoder skip connections are used only for reconstruction during pretraining; downstream prediction uses the pretrained encoder alone.
- Developed by: Simon A. Lee, Hao Zhou, Minji Han, Md Sazzad Hissain Khan, Rachel Choi, Cyrus Tanade, Juhyeon Lee, Minghui Sun, Young Sang Choi, Jiaqi Ding, Li Zhu, Md Mahbubur Rahman, Viswam Nathan, Mehrab Bin Morshed, Migyeong Gwak, Keum San Chun, Jeffrey N. Chiang, Sharanya Arcot Desai
- Affiliations: Digital Health Team, Samsung Research America; University of California, Los Angeles
- Model type: Self-supervised masked autoencoder (1-D CNN) for physiological time series
- Input modality: Single-channel wrist PPG, 10-second windows at 100 Hz (1,000 samples)
- License: MIT (code)
- Weights: Not released
Model Sources
- Repository: https://github.com/Simonlee711/On-Device-FM
- Paper (method): HiMAE: Hierarchical Masked Autoencoders Discover Resolution-Specific Structure in Wearable Time Series, ICLR 2026
- Paper (on-device clinical evaluation): A compact on-device foundation model enables real-time physiological screening on wearable devices (manuscript in submission)
Uses
Direct Use
HiMAE is intended for research on representation learning from wearable PPG. The pretrained encoder maps a normalized 10-second PPG window to latent representations, which can serve as features for downstream tasks.
Downstream Use
Task-specific heads are trained on top of the encoder to produce continuous risk scores, either with a frozen encoder (linear probe) or by fine-tuning the whole encoder. The papers evaluate:
- premature ventricular contraction detection (PPG with an ECG reference);
- stage I hypertension classification;
- exploratory laboratory-abnormality screening (HbA1c, hemoglobin, platelet count, serum sodium) with frozen linear probes.
The model is small enough to run on smartwatch hardware without quantization or pruning, which supports screening-oriented inference in resource-constrained, on-device settings.
Out-of-Scope Use
- Use as a stand-alone diagnostic device or for autonomous clinical decision-making.
- Clinical deployment without prospective validation, calibration, and alert-burden assessment in the target population.
- Inputs that differ from the pretraining format (other body sites, sensors, sampling rates or window lengths) without revalidation.
- Claims of equivalent performance across demographic subgroups; this has not been established.
Bias, Risks, and Limitations
- No established clinical utility. The studies show cross-cohort predictive validity and technical feasibility on commercial hardware. They are not prospective clinical validation and do not show clinical utility, safety, or patient benefit.
- Pretraining population imbalance. The pretraining cohort is 77.6% male, 57.1% aged 30–49, and 65.1% White (see Training Data). Performance in under-represented groups, including adults aged 65 and older (2.8%), may differ.
- Subgroup performance not assessed. Demographic variables were not uniformly available across downstream cohorts, and those cohorts were not sized for powered subgroup analyses.
- Device and data provenance. All data come from Samsung Galaxy smartwatches. Generalization to other devices, optical sensors or firmware is untested.
- Small downstream cohorts. The PVC (139 participants) and hypertension (135 participants) cohorts are modest. Laboratory tasks (19–39 participants each) are exploratory.
- Energy use not measured. On-device latency and throughput were measured, but model-attributable energy consumption and battery discharge under sustained operation were not.
- Operational risk. On-device execution reduces raw-signal transmission but does not remove privacy, calibration, security, or alert-management requirements. False-positive alerts carry real costs.
Recommendations
Before any deployment, users should evaluate the model prospectively in the target population and setting, including discrimination, calibration, subgroup performance, alert burden, and drift. Ongoing monitoring should track discrimination, calibration, subgroup performance, drift, and software and hardware versions. Operating thresholds should be selected on independent validation data, never on the evaluation set.
How to Get Started with the Model
Because the weights are not released, this repository cannot be loaded with from_pretrained. The architecture and a checkpoint trained on synthetic data are available on GitHub:
git clone https://github.com/Simonlee711/On-Device-FM
cd On-Device-FM
pip install -r requirements.txt
from pvc.utils.model_arch.himae import HiMAE, PAPER_CONFIG
model = HiMAE({"source": "ppg", "sampling_freq": PAPER_CONFIG["sampling_freq"],
"seg_len": PAPER_CONFIG["seg_len"], "model_params": {}})
# Per-stage feature maps for a batch of normalized windows x with shape (B, 1, 1000):
stage_features = model.encode(x)
The repository's HiMAE_PVC_Detection.ipynb notebook runs an end-to-end linear probe on the synthetic PVC example.
Training Details
Training Data
Pretraining used free-living wrist PPG from 47,644 participants across seven independent studies and multiple generations of Samsung Galaxy smartwatches. Participants opted into the Samsung Galaxy Watch research platform. The recordings total about 80,000 hours, or 28.8 million non-overlapping 10-second windows. No clinical labels were used, and the data are not publicly available.
| Category | Subgroup | N | % |
|---|---|---|---|
| Sex | Male | 36,990 | 77.6 |
| Female | 10,532 | 22.1 | |
| Another gender identity | 122 | 0.3 | |
| Age (years) | 18–29 | 12,019 | 25.2 |
| 30–49 | 27,207 | 57.1 | |
| 50–64 | 7,067 | 14.8 | |
| ≥65 | 1,351 | 2.8 | |
| Race | White | 31,029 | 65.1 |
| Asian or Pacific Islander | 7,630 | 16.0 | |
| Black or African American | 3,414 | 7.2 | |
| American Indian or Alaska Native | 592 | 1.2 | |
| Another race | 4,979 | 10.5 | |
| Body mass index (kg m⁻²) | Underweight (<18.5) | 823 | 1.7 |
| Normal (18.5–24.9) | 13,626 | 28.6 | |
| Overweight (25–29.9) | 16,634 | 34.9 | |
| Obese I (30–34.9) | 8,745 | 18.4 | |
| Obese II–III (≥35) | 7,816 | 16.4 |
Sex, age, race and BMI are complete for all participants.
Training Procedure
Preprocessing
Recordings sampled at 100 Hz were segmented into non-overlapping 10-second windows (1,000 samples), and each window was normalized independently. Each window is split into contiguous patches of 5 samples, and 80% of the patches are masked. Masks are either uniformly random (to encourage recovery of fine morphology) or contiguous blocks (to simulate motion artifacts and sensor dropout).
Architecture
| Setting | Value |
|---|---|
| Input | 1 × 1,000 (10 s at 100 Hz) |
| Encoder channel hierarchy | 16, 32, 64, 128, 256 |
| Convolution kernel / stride | 5 / 2 |
| Patch size | 5 samples |
| Masking ratio | 0.8 |
| Activation / normalization | GELU / batch normalization |
| Parameters (full autoencoder) | 1,245,953 |
| Parameters (encoder + linear head used downstream) | 700,929 |
The configuration was chosen through controlled ablations of channel depth, patch size, kernel size, stride, and masking ratio, compared by validation reconstruction error. No neural architecture search was used.
Training Hyperparameters
- Objective: mean squared reconstruction error, computed on masked samples only
- Optimizer: AdamW with linear warmup (10% of steps) followed by cosine learning-rate decay
- Early stopping: on validation reconstruction loss
- Released-code defaults (
pretrain/himae.py): batch size 1,024; learning rate 1e-3; weight decay 1e-3; up to 300 epochs; early-stopping patience 3; block-masking probability 0.5 with 4 masked blocks; 80/10/10 train/validation/test split of pretraining windows
Speeds, Sizes, Times
- Pretraining: converged in about 12 hours on four NVIDIA Tesla T4 GPUs with PyTorch Lightning.
- Model-weight memory: 4.8 MiB (fp32).
- On-device inference: see Results.
Evaluation
Testing Data, Factors & Metrics
Testing Data
All downstream cohorts are disjoint from pretraining in participants, device generations, firmware versions, and collection protocols. Training, validation, and test partitions are disjoint at the participant level and were fixed before evaluation. Counts are 10-second windows.
| Task | Participants | Test windows (positive %) | Reference standard |
|---|---|---|---|
| PVC detection | 139 | 77,899 (10.3%) | Concurrent ambulatory ECG; automated beat annotations reviewed by trained personnel |
| Stage I hypertension | 135 | 823 (23.3%) | Continuous non-invasive finger-cuff blood pressure with dual auscultation (My Heart Lab Study, NCT04314947) |
| HbA1c / platelet / hemoglobin / sodium abnormality (exploratory) | 19 / 33 / 39 / 36 | 202 / 401 / 256 / 271 | Contemporaneous clinical laboratory panels (Tulane University) |
Factors
Results are reported separately by task and by adaptation regime: a frozen encoder with a linear probe, and full fine-tuning. Few-shot fine-tuning was also evaluated with 256, 512, 1,024, 2,048, or all training examples.
Metrics
- AUROC is the primary measure of discrimination. 95% confidence intervals come from 1,000 participant-level bootstrap resamples of the test set, with all windows of a sampled participant kept together.
- Paired AUROC differences between models are tested with the two-sided paired DeLong test.
- Threshold-dependent metrics (true-positive counts, sensitivity, specificity, PPV, NPV, balanced accuracy, Youden index) are computed at thresholds selected on the validation split only to target 95%, 90%, or 80% specificity, then applied unchanged to the test set.
Results
Discrimination (test AUROC, 95% CI). Both regimes use the same held-out test participants.
| Task | Regime | HiMAE (1.2M) | ResNet (11.2M, supervised) | PaPaGei (5.7M) | EfficientNet (7.8M) | MAE1D (6.7M) | MAE1D (110M) |
|---|---|---|---|---|---|---|---|
| PVC | Frozen | 0.8023 [0.7822, 0.8217] | 0.7320 [0.7122, 0.7534] | 0.7892 [0.7697, 0.8095] | 0.7478 [0.7277, 0.7674] | 0.7834 [0.7634, 0.8045] | 0.7129 [0.6946, 0.7326] |
| PVC | Fine-tuned | 0.9165 [0.9063, 0.9277] | 0.7320 [0.7122, 0.7534] | 0.8692 [0.8533, 0.8864] | 0.8536 [0.8385, 0.8690] | 0.8341 [0.8159, 0.8511] | 0.9155 [0.9040, 0.9261] |
| Hypertension | Frozen | 0.6624 [0.6274, 0.6958] | 0.4930 [0.4574, 0.5278] | 0.6611 [0.6193, 0.7021] | 0.6415 [0.5993, 0.6857] | 0.5471 [0.5025, 0.5924] | 0.6614 [0.6220, 0.7018] |
| Hypertension | Fine-tuned | 0.8969 [0.8656, 0.9252] | 0.4930 [0.4574, 0.5278] | 0.8376 [0.7988, 0.8734] | 0.8428 [0.8067, 0.8784] | 0.6275 [0.5829, 0.6704] | 0.8959 [0.8695, 0.9202] |
ResNet was trained once with full supervision, so its result is the same in both regimes. After fine-tuning, HiMAE and the 110M-parameter MAE1D showed no statistically significant difference (PVC ΔAUROC 0.001, P = 0.69; hypertension ΔAUROC 0.001, P = 0.77), despite an approximately 92-fold difference in parameter count.
Operating point (fine-tuned, validation-selected 95% specificity target).
| Task | True-positive windows | Sensitivity [95% CI] | Achieved specificity [95% CI] | ΔTP vs. ResNet [95% CI] |
|---|---|---|---|---|
| PVC | 4,921 | 0.614 [0.575, 0.654] | 0.948 [0.943, 0.952] | +3,186 [+2,524, +3,878] |
| Hypertension | 104 | 0.542 [0.452, 0.635] | 0.948 [0.924, 0.969] | +95 [+66, +121] |
On-device performance (Samsung Galaxy Watch 8, Exynos W1000, 2 GB RAM; full precision; batch size 1; mean [95% CI] across repeated timed passes).
| Model | Parameters | Model-weight memory | CPU latency (s/window) | Throughput (windows/s) |
|---|---|---|---|---|
| HiMAE | 1.2M | 4.8 MiB | 0.900 [0.887, 0.913] | 1.200 [1.184, 1.216] |
| PaPaGei | 5.7M | 22.3 MiB | 0.976 [0.960, 0.992] | 1.069 [1.054, 1.084] |
| EfficientNet | 7.8M | 31.1 MiB | 1.420 [1.398, 1.442] | 0.704 [0.693, 0.715] |
| MAE1D | 6.7M | 26.8 MiB | 1.576 [1.552, 1.600] | 0.620 [0.610, 0.630] |
| MAE1D | 110M | 441.3 MiB | 3.360 [3.318, 3.402] | 0.298 [0.292, 0.304] |
All models were converted to TorchScript and run with PyTorch Mobile inside a native Wear OS application, under identical conditions and without quantization, pruning, operator fusion, or accelerator offloading.
Summary
HiMAE gave the highest frozen-encoder AUROC on both primary tasks. After fine-tuning, it matched a model about 92 times larger, and it had the lowest memory footprint and latency on a commercial smartwatch. In few-shot experiments, it achieved the strongest discrimination across low-label regimes for both tasks.
Environmental Impact
- Hardware type: 4 × NVIDIA Tesla T4
- Hours used: about 12 (pretraining)
- Cloud provider / compute region / carbon emitted: not reported
Technical Specifications
Model Architecture and Objective
HiMAE is a U-Net-style hierarchical 1-D CNN masked autoencoder. The encoder has five residual stages with stride-2 downsampling; stage k has a temporal step of 2^k samples, and receptive fields range from about 130 ms to 3.73 s. A mirrored decoder with skip connections reconstructs the masked input. The objective is mean squared error on masked samples.
Compute Infrastructure
- Training hardware: four NVIDIA Tesla T4 GPUs
- Deployment hardware: Samsung Galaxy Watch 8 (5-core Exynos W1000, 2 GB LPDDR5)
- Software: PyTorch, PyTorch Lightning; TorchScript and PyTorch Mobile for on-device inference
Citation
BibTeX:
@inproceedings{lee2026himae,
title = {HiMAE: Hierarchical Masked Autoencoders Discover Resolution-Specific Structure in Wearable Time Series},
author = {Lee, Simon A. and Tanade, Cyrus and Zhou, Hao and others and Arcot Desai, Sharanya},
booktitle = {The Fourteenth International Conference on Learning Representations},
year = {2026},
url = {https://arxiv.org/abs/2510.25785}
}
The on-device clinical evaluation, A compact on-device foundation model enables real-time physiological screening on wearable devices, is in submission. Citation details will be added on publication.
Model Card Authors
Simon A. Lee, Jeffrey N. Chiang, Sharanya Arcot Desai
Model Card Contact
Simon A. Lee (simonlee711@g.ucla.edu), Jeffrey N. Chiang (njchiang@g.ucla.edu), Sharanya Arcot Desai (s.desai1@samsung.com), or open an issue on GitHub.
Paper for Simonlee711/HiMAE
Evaluation results
- AUROC on PVC detection cohort (private; 139 participants)test set self-reported0.802
- AUROC on PVC detection cohort (private; 139 participants)test set self-reported0.916
- AUROC on My Heart Lab Study hypertension cohort (private; 135 participants)test set self-reported0.662
- AUROC on My Heart Lab Study hypertension cohort (private; 135 participants)test set self-reported0.897