compressionkit-ecg-4x-v1.1

A ECG signal compression codec using Residual Vector Quantization (RVQ), optimized for edge and wearable devices.

Model Details

  • Modality: ECG
  • Sample Rate: 256 Hz
  • Compression Ratio: 4x
  • Quantization: INT8
  • RVQ Levels: 2
  • Codebook Size: 256 entries ร— 16D
  • Encoder Input: [None, 1, 512, 1]
  • Encoder Output: [None, 1, 128, 16]

Release Provenance

Release kind: corrected_export_without_retraining. Export source commit: 7a5443834ec50e41f41d4ff2b1c2f27e73b1acf7. Physiological scorecard: historical; not reevaluated for this release. Packet compatibility: corrected RVQ level counts; bind packets to exact repository and revision. Pretraining ancestry: not independently audited during export repair. See release_provenance.json for checkpoint hashes, replaced revision, and sample provenance.

Quality Metrics

Fidelity & Robustness

Both fidelity yardsticks are reported so the codec is judged fairly: faithfulness is PRD vs the recorded (still-noisy) input, while truth fidelity is PRD vs clean ground truth. Lower is better.

Metric Value
Truth PRD vs clean (%) 2.33
Truth PRD at native noise (%) 38.03
Faithful PRD vs input (%) 3.63
PRD degradation slope (PRD%/dB) 3.97
PRD at 0 dB SNR (%) 51.15
PRD at -6 dB SNR (%) 79.05
Pure-noise imprint autocorr 0.2496

Time Domain

PRD here is faithfulness (vs the recorded input); see Fidelity & Robustness above for the clean-truth and noise-regime view.

Metric Mean Median P90
PRD vs input โ€” faithfulness (%) 3.6256 3.2914 5.2169
RMSE 0.0349 0.0316 0.0495
Cosine Similarity 0.9992 0.9995 0.9997

Spectral

  • Band Total Relative Error (median): 0.0427

Bitrate

  • Codec CR (uniform): 4.0x
  • Codec CR (learned prior): 9.73x

Encoder Precision Parity

Difference from FP32 reconstruction on a disjoint real-data holdout; lower is better.

Encoder P90 PRD Worst PRD Status
int8 5.27% 12.81% recommended
fp16 0.24% 2.63% recommended
int16x8 1.82% 4.90% recommended

Usage

Python (compressionkit runtime)

from compressionkit.runtime import RVQCodec

codec = RVQCodec.from_pretrained("Ambiq/compressionkit-ecg-4x-v1.1")

# Encode: float32 signal โ†’ RVQ indices
indices = codec.encode(signal)

# Decode: RVQ indices โ†’ reconstructed signal
recon = codec.decode(indices)

Local deployment directory

codec = RVQCodec("path/to/deploy/")

Files

File Description
encoder_int8.tflite INT8 quantized encoder (on-device)
encoder_float32.tflite Float32 encoder for browser/server runtimes
encoder_fp16.tflite FP16 encoder variant for supported edge runtimes
encoder_int16x8.tflite INT16x8 encoder variant for supported edge runtimes
encoder.h C header for encoder
encoder.keras Float32 Python reference encoder (training/inspection use)
decoder_float32.tflite Float32 decoder (server-side evaluation)
decoder_int8.tflite INT8 decoder (optional, on-device)
decoder.keras Float32 Python reference decoder (training/inspection use)
codebook.npz RVQ codebook tables
codebook.h C header for codebook
config.json Deployment manifest
sample_stimulus.npz Synthetic test data
quality_scorecard.json Full evaluation metrics

Dataset & License

Training data: PTB-XL (all open, no restricted-access dependency). Sample data uses synthetic physiokit waveforms only โ€” no patient data is redistributed.

Model weights are released under the Ambiq Model Weights License โ€” deployment is restricted to Ambiq silicon devices. See LICENSE-MODEL-WEIGHTS.md for full terms.

Citation

@software{compressionkit,
  author = {Ambiq AI},
  title = {compressionKIT: Signal Compression for Edge AI},
  url = {https://github.com/AmbiqAI/compressionkit}
}
Downloads last month
90
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support