¶
Neural codecs for wearable and physiological signals on edge devices.
compressionKIT helps teams compress continuous sensor waveforms before they become a memory, radio, battery, or cloud-ingestion problem. It is designed for wearable and edge signals such as PPG, ECG, IMU, and future time-series modalities where preserving waveform utility matters.
The package provides reusable codec blocks, deploy packaging, runtime loading, and validation scorecards. The v1 release artifacts focus on PPG and ECG, but the architecture is intentionally broader than any single method or modality.
What compressionKIT is¶
compressionKIT is a toolkit for building, evaluating, packaging, and deploying compression codecs for wearable signals.
It includes:
- neural codec models and quantization components
- DSP and hybrid codec stages where they are useful
- preprocessing and augmentation blocks
- physiological and signal-fidelity scorecards
- deploy package generation with manifests, checksums, reference vectors, and C headers
- runtime loaders for local and HuggingFace artifacts
- golden release automation for supported PPG and ECG operating points
It is not a general physiological inference framework. It does not try to own arrhythmia classification, sleep staging, activity recognition, or downstream clinical decisions. It focuses on the codec layer: reducing data movement while preserving the signal content downstream systems need.
Current release scope
The current v1 release surface publishes neural codec bundles for PPG and ECG and includes reproducible DSP/hybrid comparison lanes. Those methods are examples of the codec framework, not the boundary of what compressionKIT can support.
Where compressionKIT fits¶
compression sits between the sensor and everything downstream: local storage, radio transport, gateway buffering, cloud ingestion, analytics, and model training. That position makes the codec a product boundary, not only a model choice. A release package needs to be small enough for edge deployment, explicit enough for validation, and stable enough that future codec versions can be compared against previously supported ones.
| Modality | Current status | What preservation means |
|---|---|---|
| PPG | v1 golden bundles and scorecards | Pulse timing, HR/HRV agreement, morphology, motion/noise behavior |
| ECG | v1 golden bundles and scorecards | R-peak timing, QRS-band fidelity, morphology, artifact robustness |
| IMU | Extension target | Activity-band energy, event timing, orientation/motion features |
| Other wearables | Block-level extension path | Define the observables first, then choose codec and scorecard |
What current goldens show¶
The first release-grade packages exercise the artifact contract on PPG and ECG, but the top-level question is not a single PRD curve. A customer needs to choose an operating point from compression level, physiology preservation, robustness, stitching behavior, and deploy footprint together.
| Customer question | Evidence surface | Where to inspect it |
|---|---|---|
| What compression levels are available? | Published CR ladder, frame duration, effective payload | Customer evidence, Model zoo |
| How much signal utility survives? | Truth PRD, PRDN-noise, HR/peak timing, band error, coherence | PPG models, ECG models |
| What happens under noise or artifacts? | Noise-tertile rows, SNR/artifact comparisons, and robustness scorecards | PPG CR vs fidelity, ECG CR vs fidelity |
| Is stitching a problem? | Seam ratio and long-recording stability checks | Customer evidence, modality scorecards |
| Will it fit on my edge target? | Encoder/decoder TFLite size, codebook size, deploy package contents | Customer evidence, Deployment |
The generated customer evidence summary is the compact entry point for this decision. Detailed plots now belong on the modality and CR-vs-fidelity pages, where they can be read with the matching sample counts, noise buckets, and reproduction links.
How to read the evidence¶
The headline numbers are a starting point, not the whole story. compressionKIT reports each supported codec through the same evidence surfaces so users can see what changed, what stayed comparable, and which signal conditions were tested.
-
CR vs. fidelity
Report codec CR, effective CR when entropy models are present, waveform fidelity, physiological agreement, and stitching behavior in one table.
-
Noise and artifacts
Split results by clean, median, noisy, empirical artifact, and SNR regimes; distinguish faithful PRD from clean-truth PRD and PRDN-noise so denoising behavior is visible.
-
Local imprinting
Check that a codec does not hallucinate subject- or segment-specific detail, hide signal quality problems, or make noisy inputs look falsely clean.
-
Standardized comparisons
Compare new candidates against every still-supported golden using the same datasets, sampling rules, scorecard schema, and artifact validation checks.
The guiding rule is simple: comparisons belong in generated scorecards, noise/artifact sweeps, and CR-vs-fidelity pages, not in one-off prose. When a new method or release arrives, the tables are regenerated from the supported artifacts so old and new versions remain comparable.
Guiding principles¶
These principles keep the toolkit practical without making every experiment use the same control flow.
| Principle | What it means in practice |
|---|---|
| Artifact-first | Runtime loading, validation, docs, and publication are driven by deploy packages rather than training scripts. |
| Observable-preserving | Each modality defines what must survive compression: timing, morphology, spectral content, or motion features. |
| Progressive disclosure | Users can try a bundle in minutes, validate a deploy directory, then reproduce or extend only when needed. |
| Method-flexible | RVQ, DSP, hybrid, entropy priors, and future codecs share the same release boundary. |
| Embedded-aware | Blocks should be portable toward fixed-memory C/LiteRT deployment paths. |
Why it matters¶
-
Wearable-first compression
Reduce flash, PSRAM, BLE, cellular, and cloud-storage pressure by compressing the waveform at the sensor edge.
-
Signal utility preserved
Scorecards report waveform fidelity and physiology-aware metrics such as PPG heart-rate preservation and ECG morphology behavior.
-
Deployable artifacts
Export LiteRT/TFLite models, C headers, codebooks, reference vectors, and package manifests for edge and host runtimes.
-
Extensible codec surface
Start from reusable blocks. Add new modalities, losses, quantizers, entropy models, or deployment targets without joining a mandatory experiment framework.
High-level getting started¶
Start with the lightest path that answers your question.
| Goal | Best starting point | Dataset required? |
|---|---|---|
| Try a published codec | HuggingFace guide or example notebooks | No |
| Evaluate on your own signal | Dataset setup ยท bring your own data | Your signal only |
| Inspect supported release artifacts | Model zoo and golden experiments | No |
| Validate a deploy package | Deployment guide | No |
| Reproduce golden results | Golden experiments | Yes |
| Extend or create a new codec | Experiment architecture | Usually |
Minimal runtime example:
import numpy as np
from compressionkit.runtime import load_codec
codec = load_codec("Ambiq/compressionkit-ppg-4x-v1.0")
frame = np.zeros(codec.frame_size, dtype=np.float32)
encoded = codec.compress(frame)
reconstructed = codec.decompress(encoded)
Install locally:
Current v1 artifacts¶
The first release-grade packages exercise the common artifact contract across PPG and ECG:
| Area | Current v1 status | Where to go |
|---|---|---|
| PPG neural codecs | Published HuggingFace bundles from 2x to 32x | PPG model zoo |
| ECG neural codecs | Published HuggingFace bundles from 2x to 64x | ECG model zoo |
| DSP and hybrid lanes | Published HuggingFace bundles (SPIHT + hybrid, all CRs) | Experiments |
| Release contract | Manifests, specs, checksums, reference vectors, scorecards | V1 release contract |
| Runtime/deployment | Local and HuggingFace loading plus deploy validation | Deployment guide |
For method details, see Methods. For the philosophy behind blocks, ready-made experiments, and goldens, see Experiment Architecture.
Where to go next¶
-
Getting Started
Install the package, run the notebooks, and learn the shortest path to a codec round-trip.
-
HuggingFace Bundles
Download a published codec, run it on a sample frame, and understand bundle contents.
-
Model Zoo
Browse current PPG and ECG release artifacts, metrics, and package links.
-
Golden Experiments
Reproduce, validate, stage, or extend release-grade experiments.
-
:material-blocks:{ .lg .middle } Experiment Architecture
Learn how reusable blocks, recipes, deploy artifacts, and golden releases fit together.
-
:material-badge-check:{ .lg .middle } Validation Scorecard
Understand noise handling, artifact behavior, physiological metrics, and release checks.

