Skip to content
compressionKIT
Models & experiments
HELIA

PPG Models (v1.1 exports)

PPG release artifacts and comparison lanes at 64 Hz. The published HuggingFace bundles are RVQ neural codecs; the experiment registry also includes SPIHT DSP and hybrid AI+DSP configurations with package links.

The v1.1 bundles correct the exports of existing checkpoints without retraining. The tables below are historical physiological evaluations, not new measurements of the corrected deployment bundles. See release details for measured export parity and packet sizes.

These validation results and the noise-aware customer scorecards use different evaluation views. Keep the metric definitions and recording windows with the numbers when comparing results.

ModelConfigCRPRD (%)MSECosine
ppg-rvq-02xppg_rvq_64hz_02x_golden.yaml2.00x0.800.0000630.99997
ppg-rvq-04xppg_rvq_64hz_04x_golden.yaml4.00x1.290.0001650.99992
ppg-rvq-08xppg_rvq_64hz_08x_golden.yaml8.00x2.760.0007560.99963
ppg-rvq-16xppg_rvq_64hz_16x_golden.yaml16.00x5.900.0034570.99831
ppg-rvq-32xppg_rvq_64hz_32x_golden.yaml32.00x12.620.0158430.99220
ModelHR MAE (bpm)SDNN MAE (ms)
ppg-rvq-02x0.069.6
ppg-rvq-04x0.0512.9
ppg-rvq-08x0.1032.4
ppg-rvq-16x0.1958.2
ppg-rvq-32x0.36110.2

All metrics are on the validation set. HR/HRV metrics are from long-recording overlap-add evaluation (60 s windows, 50% hop).

PPG PRD vs compression ratio PPG PRD vs compression ratio

Mean squared error plots

PPG MSE vs compression ratio PPG MSE vs compression ratio

Cosine similarity plots

PPG Cosine Similarity vs compression ratio PPG Cosine Similarity vs compression ratio

PPG has three release-facing comparison lanes:

LaneRoleCurrent publication status
SPIHTDSP faithfulness baseline; preserves clean/noisy inputs with minimal learned behaviorHugging Face package links on the experiment pages
RVQPublished neural codec bundles; compact learned representation with physiological scorecardsPublished for 2x, 4x, 8x, 16x, and 32x
HybridLearned denoising front end with a SPIHT backend; designed for wearable-noise regimesHugging Face package links on the experiment pages

The robustness sweep scores each lane against a filtered clean-truth proxy after injecting empirical noise or additive artifacts. Lower PRD is better. This is a different question from faithful reconstruction of a clean validation frame: it asks which codec best preserves the recoverable pulse waveform when the input is already corrupted.

Condition familyCurrent PPG crossover pattern
Clean inputSPIHT wins at 2x-8x, while RVQ wins at 16x-32x in the current robustness fixture.
Native / empirical SNR ladderHybrid wins most injected-noise cells from native through -12 dB. At 32x, RVQ remains strongest for native, 12 dB, and 8 dB before hybrid takes over at heavier noise.
Motion artifactsRVQ is the current winner across the measured CR ladder.
Baseline wanderHybrid is the current winner across the measured CR ladder.

PPG robustness winners across SNR

PPG robustness winners across artifacts

The practical read is that SPIHT is a strong low-noise baseline, RVQ is the published neural operating surface, and hybrid approaches become important when the input looks more like a wrist-worn signal with empirical noise or drift. See PPG CR vs fidelity and Validation Scorecard for the detailed scorecard definitions and noise-aware metrics.

All PPG models share the same architecture:

  • Encoder: Strided Conv2D blocks (stride 2 per stage) with depthwise-separable convolutions, followed by a 1x1 projection to embedding_dim=16
  • RVQ bottleneck: EMA-updated codebooks with 256 entries, 8 bits/index
  • Decoder: UpSampling2D + Conv2D mirror of the encoder
  • Training: EMA decay 0.99, base filters 48, filter multiplier 1.25, 200 epochs
ModelEncoder StagesDownsampleLatent PositionsRVQ LevelsBits/Frame
02x12x16022560
04x24x8021280
08x38x402640
16x416x202320
32x416x201160
ModelCR
02x2.00x
04x4.00x
08x8.00x
16x16.00x
32x32.00x

Frame size = 320 samples (5 s at 64 Hz). Raw frame = 5120 bits (16-bit). Codebook size K = 256 (8 bits/index).

Latent sample rate plots

PPG effective latent sample rate PPG effective latent sample rate

  • Primary: MSE
  • Auxiliary: Derivative loss (weight 0.1) — preserves waveform first-derivative (morphology)

Long-recording evaluation uses overlap-add reconstruction on 60 s continuous segments, then computes physiological metrics with physioKit:

Heart-rate error plots

PPG heart rate error PPG heart rate error

SDNN error plots

PPG SDNN error PPG SDNN error

RMSSD error plots

PPG RMSSD error PPG RMSSD error

ModelHR MAE (bpm)HR Median AEHR BiasSDNN MAE (ms)RMSSD MAE (ms)
02x0.060.000+0.0469.613.8
04x0.050.000+0.02112.918.7
08x0.100.018+0.04132.448.5
16x0.190.032+0.01658.290.8
32x0.360.076+0.180110.2171.3

The published v1 PPG goldens use ppg-unified-strict-sanitize-v1: a unified mixture of BIDMC, BUT PPG, PPG-DaLiA, and WESAD. The release-facing PPG goldens are MESA-free so users can reproduce the published artifacts without restricted NSRR data.

MESA remains a supported restricted source for internal or custom experiments, but it is not used in the published v1 PPG goldens. See Dataset Setup for source-specific licensing and cache-building commands.

Terminal window
# Build the open sources used by the v1 PPG goldens.
uv run python scripts/build_ppg_cache.py \
--sources bidmc butppg ppg_dalia wesad
Terminal window
# Reproduce a specific published operating point.
uv run compressionkit golden run ppg-rvq-8x
# Reproduce all PPG RVQ goldens.
uv run compressionkit golden run-all --modality ppg --method rvq
results/ppg_rvq_64hz_08x_golden/
├── best_model.weights.h5 # Best checkpoint
├── config.json # Frozen config
├── summary.json # Training metrics
├── long_recording_eval.json # HR/HRV preservation metrics
├── training_history_*.csv # Epoch-by-epoch metrics
├── tensorboard/ # TensorBoard logs
├── plots/ # Reconstruction plots
└── deploy/ # Deployment artifacts
├── encoder.tflite # INT8 quantized encoder
├── encoder.h # C header for encoder
├── encoder.keras # Keras encoder model
├── decoder.keras # Keras decoder model
├── decoder_float32.tflite # Float32 LiteRT decoder for host-side decode
├── decoder.tflite # Optional INT8 decoder for on-device decode
├── decoder.h # Optional C header for INT8 decoder
├── codebook.npz # RVQ codebook weights
├── codebook.h # C header for codebook
├── sample_data.npz # 50 validation samples
├── model_card.json # Metadata used for publishing
└── deploy_manifest.json # Artifact manifest

For the full runtime guide, see Deployment Guide.

  • Frame shape: (1, 1, 320, 1) float32
  • Sample rate: 64 Hz
  • Default HuggingFace repo pattern: Ambiq/compressionkit-ppg-{cr}x-v1.1
import numpy as np
from compressionkit.runtime import RVQCodec
t = np.arange(320, dtype=np.float32) / 64.0
signal = (0.6 * np.sin(2.0 * np.pi * 1.2 * t) + 0.1 * np.sin(2.0 * np.pi * 2.4 * t)).reshape(1, 1, 320, 1)
codec = RVQCodec.from_pretrained("Ambiq/compressionkit-ppg-4x-v1.1")
indices = codec.encode(signal.astype(np.float32))
reconstruction = codec.decode(indices)
  • Use encoder.tflite plus codebook.h for the lowest-footprint embedded path.
  • Use decoder_float32.tflite when reconstruction runs on a host or cloud service.
  • Add the two-stage prior only when bitrate is more constrained than compute or memory.

To create a new PPG model variant:

  1. Copy an existing golden config: cp configs/ppg_rvq_64hz_08x_golden.yaml configs/ppg_rvq_64hz_08x_v2.yaml
  2. Modify parameters (e.g. base_filters, num_levels, learning_rate)
  3. Train: uv run train-ppg-rvq --config configs/ppg_rvq_64hz_08x_v2.yaml
  4. Compare results against the golden baseline