PROJECT BETA

Silent Guardian

Privacy-First Healthcare AI at the Edge

A system that learns from sensitive patient data without ever centralizing it. Combining TinyML, Federated Learning, and Differential Privacy for secure ECG-based AFib detection.

TinyMLFederated LearningDifferential PrivacyECG Analysis

The Hard Problem

How do we train accurate AI models on sensitive healthcare data that we cannot legally or ethically collect in one place?

The Architectural Thesis

“Compute Moves to Data”

AI models travel to wearable devices, learn locally, and only share encrypted insights. Data never leaves the edge.

MedTech
Insurance
Elderly Care
Executive Summary

Key Takeaways

Silent Guardian represents a paradigm shift in medical AI: a system that learns from sensitive patient data without ever centralizing it. Designed for atrial fibrillation (AFib) detection from ECG signals, this prototype combines three cutting-edge technologies to solve healthcare AI's “Hard Problem.”

Core Innovation

Traditional AI centralizes patient data in cloud servers—a model incompatible with HIPAA, GDPR, and patient trust. Silent Guardian inverts this: AI models travel to wearable devices, learn locally, and only share encrypted insights. This “compute-to-data” approach unlocks collaboration across hospitals and insurance providers while preserving privacy.
96%

Detection Accuracy

AFib detection from ECG signals

64KB

RAM Constraint

Edge device deployment target

ε=1.0

Privacy Budget

Strong differential privacy guarantee

Fundamentals

Machine Learning Fundamentals

Teaching Computers to Learn — Starting from Zero

What is Machine Learning?

Machine learning is programming through examples, not explicit rules. Instead of coding “if heart rate > 100 bpm, flag as abnormal,” we show the computer thousands of ECG recordings labeled “normal” or “AFib,” and it learns the patterns itself.

Intuitive Analogy

Think of it like teaching a child to recognize dogs: you don't list every dog breed's features—you show pictures until they internalize "dogness."

Neural Networks

Neural networks mimic the brain's structure: layers of interconnected “neurons” (mathematical functions) that transform input (raw ECG voltage) into output (AFib probability). Each neuron applies weights (learned numbers) to its inputs.

The Training Process

  1. 1

    Forward Pass

    Input data flows through the network, producing a prediction

  2. 2

    Error Calculation

    Compare prediction to actual label, calculate the loss

  3. 3

    Backpropagation

    Calculate how each weight contributed to the error

  4. 4

    Weight Update

    Nudge weights to reduce errors—like tuning radio knobs to clear static

Interactive Neural Network

ECG Signal to AFib Detection

Epoch:0
Loss:0.5000
Prediction:0.0% AFib
Phase:Ready
InputHidden 1Hidden 2OutputP WaveQRS PeakT WaveR-R IntHeart RateAFib Prob
Activated Neuron
Positive Weight
Negative Weight
Gradient Flow
Hover nodes/connections for details
Edge Computing

TinyML: AI on a Microcontroller

64 KB

Target RAM

Maximum memory for MCU deployment

<1W

Power Budget

Milliwatt-level operation

<500ms

Inference Latency

Real-time cardiac monitoring

What is TinyML?

Most AI runs on power-hungry GPUs in data centers. TinyML shrinks models to fit microcontrollers (think Arduino) with kilobytes of memory and milliwatt power budgets.

Why Edge Computing?

Edge computing processes data where it's generated—on a smartwatch, not a distant server—enabling real-time responses, offline operation, and inherent privacy.

Model Compression Techniques

Quantization compresses models by reducing numerical precision. A weight stored as 32-bit float (e.g., 0.847362) becomes an 8-bit integer (e.g., 217), cutting size by 75% with minimal accuracy loss.

Pruning removes unimportant connections—like trimming dead branches from a tree—further shrinking the model.

TechniqueSize ReductionAccuracy Impact
Quantization75%Minimal (<1%)
Pruning50-90%Low (1-3%)
Knowledge Distillation10-100xModerate (2-5%)

Hardware Constraints

DeviceRAMPower
Raspberry Pi 41-8 GB5-15W
Jetson Nano2-4 GB5-10W
ESP32-S3512 KB<1W
Arduino Nano 33 BLE256 KB<100mW

Model Compression Simulator

Adjust the sliders below to see how quantization and pruning compress models for edge deployment

Model Size

0.68 MB

83% reduction

Accuracy

95.0%

Clinical grade ✓

Compression

5.9x

Original: 4.0 MB

8-bit
2-bit (Extreme)8-bit (Standard)32-bit (Full)
Precision: 8-bit (Reduced)
SignExponentMantissa

Lower bits = smaller model, but less precision

30%
No pruningModerateAggressive

Removes weights with absolute value below 30% of maximum

Higher threshold = more weights removed

Understanding the Trade-offs

Quantization

Reduces precision by representing weights with fewer bits. A 32-bit float becomes an 8-bit integer, achieving 4× compression with minimal accuracy loss.

Pruning

Removes weights with small values that contribute little to predictions. Like trimming dead branches, this shrinks the model while preserving core functionality.

Neural Network Weights

Hover over cells to see weight values. Blue = positive, Green = negative, Dashed = pruned

Neural Network Weight Matrix46 / 144 weights pruned (32%)
Positive weights
Negative weights
Pruned

Performance Metrics

4.0MB
Original
0.7MB
Compressed-83% reduction
Compression Ratio

5.9x

smaller than original
Model Accuracy95.0%
0%Clinical threshold (85%)100%
Distributed Training

Federated Learning: Collaboration Without Data Sharing

The Paradigm Shift

Imagine 100 hospitals each have 1,000 AFib patient records. Centralized training demands pooling all 100,000 records—illegal under HIPAA. Federated Learning (FL) solves this: a central server distributes a “global model” to each hospital.

Key Insight

FL decouples data location from model quality. A hospital with 100 patients contributes as much as one with 10,000—democratizing AI development. The model learns from collective diversity without any institution surrendering control.

The FedAvg Algorithm

The server aggregates client updates via FedAvg (weighted averaging based on dataset sizes) into an improved global model, which is then redistributed for the next round.

FL Training Workflow

  1. 1

    Global Distribution

    Server distributes global model to K participating clients

  2. 2

    Local Training

    Each client trains on local data (1 epoch per FL round)

  3. 3

    Gradient Upload

    Clients upload encrypted weight updates (not raw data)

  4. 4

    Secure Aggregation

    Server aggregates weights via FedAvg algorithm

  5. 5

    Repeat

    Updated global model redistributed; cycle continues

Straggler Handling: The server uses asynchronous updates with 80% participation thresholds to handle slow or disconnected clients.

Interactive Federated Learning Workflow

FL ServerGlobal ModelHospital 1Local DataHospital 2Local DataHospital 3Local DataHospital 4Local DataModel WeightsEncrypted GradientsLocal TrainingDP Protected

Federated Learning Cycle

Ready

Click on any stage to learn more, or press Play to watch the complete cycle.

Key Points

  • The global model resides on the central server
  • Client nodes (hospitals) are ready to participate
  • No raw patient data is ever centralized
Raw patient data never leaves the edge device
Privacy Guarantees

Differential Privacy: Quantifying Privacy Loss

17%

Re-identification Risk

Census records identified from summary statistics

ε=1.0

Strong Privacy

Minimal information leakage

ε=8.0

Balanced Mode

Better utility, moderate privacy

σ

Noise Magnitude

Calibrated Gaussian noise injection

What is Differential Privacy?

Differential privacy (DP) mathematically limits what attackers can infer about individuals from model outputs. The key parameter, epsilon (ε), bounds the probability ratio of any outcome occurring with vs. without your data.

The Privacy Budget

Lower ε = stronger privacy. At ε=1.0, an adversary gains almost no information about whether your specific ECG was in the training set. At ε=8.0, there's a small but measurable privacy risk balanced against better model accuracy.

Noise Injection Mechanisms

DP works by injecting noise (random values) into gradients before upload:

  • Laplacian noise — Symmetrically distributed, suits counting queries
  • Gaussian noise — Bell-curved, better fits gradient perturbation

Intuitive Analogy

The noise masks individual contributions while preserving aggregate patterns—like blurring faces in a crowd photo. You can still count how many people are present, but you can't identify any specific person.

Noise Calibration Formula

σ = (2 × sensitivity × √(2 × ln(1.25/δ))) / ε

Where σ is noise magnitude, sensitivity is the maximum gradient change from one record, δ is failure probability, and ε is the privacy budget.

Privacy-Utility Tradeoff

Silent Guardian uses Opacus to inject Gaussian noise calibrated to the epsilon budget. This guarantees differential privacy—an adversary cannot determine if any individual's data influenced the model.

Privacy-Utility Tradeoff Explorer

Adjust epsilon to see how privacy budget affects model accuracy

Privacy Budget (ε)1.0
Model Accuracy71.1%
Privacy LevelStrong Privacy
Strong Privacy
Weak Privacy

Strong Privacy (ε = 1)

~78% accuracy

Industry gold standard. An adversary gains almost no information about whether any specific ECG was in the training set.

Recommended for:HIPAA-compliant medical AI
Strong Privacy (ε ≤ 1.5)
Moderate Privacy (1.5 < ε ≤ 5)
Weak Privacy (ε > 5)
Clinical Application

Clinical Pipeline: From ECG Signal to AFib Detection

An electrocardiogram (ECG) measures the heart's electrical activity through sensors placed on the skin. Think of your heart as an electrical pump—each heartbeat creates a wave of electricity that spreads through cardiac tissue.

Atrial fibrillation (AFib) is the most common heart rhythm disorder. On an ECG, AFib appears as irregular R-R intervals (the time between heartbeats varies unpredictably) and absent P waves.

Raw ECG signals contain noise from muscle movement, electrical interference, and baseline drift. The preprocessing pipeline transforms noisy signals into clean features:

  1. 1
    Filtering: Remove noise using bandpass filters (0.5-40 Hz) and notch filters for 50/60 Hz power line interference
  2. 2
    Normalization: Scale signals to consistent amplitude ranges using z-score normalization or min-max scaling
  3. 3
    Segmentation: Divide continuous signals into 10-second windows for analysis
  4. 4
    Feature Extraction: Extract 48-650 features including R-R interval statistics, HRV, and DCT coefficients

Clinical Evaluation Metrics

MetricFormulaInterpretation
SensitivityTP / (TP + FN)% of actual AFib cases correctly detected
SpecificityTN / (TN + FP)% of normal rhythms correctly identified
F1-Score2 × (P × R) / (P + R)Balanced measure for imbalanced datasets

Silent Guardian Performance

Clinical-grade systems require ≥85% sensitivity and ≥90% specificity. Silent Guardian achieves 96% accuracy and F1-score of 0.83 for AFib detection.

Real-Time Requirements

Cardiac monitoring demands sub-second latency (<500ms) for life-threatening arrhythmia detection. Edge deployment eliminates cloud round-trip delays while preserving battery life through model quantization.

ECG Datasets Overview

DatasetRecordsPatientsDurationAFib Labels
MIT-BIH Arrhythmia484730 minManual annotations
PTB-XL21,83718,88510 sec71 SCP-ECG statements
PhysioNet 202043,05943,0596-60 secMulti-label (IID/Non-IID)

Live ECG Waveform Comparison

Normal Sinus Rhythm vs Atrial Fibrillation

Normal Sinus Rhythm

60-100 BPM
R-R Interval:Regular

A healthy heart rhythm with consistent timing between beats. Notice the clear P wave before each QRS complex, indicating normal atrial contraction.

Atrial Fibrillation (AFib)

Irregular
R-R Interval:Irregular

Chaotic atrial activity replaces normal P waves with fibrillatory (f) waves. The varying R-R intervals are the hallmark sign that Silent Guardian detects.

Key Diagnostic Difference

AFib detection relies on two primary features: absent P waves (replaced by chaotic f waves) and irregularly irregular R-R intervals. Silent Guardian's ML model learns to recognize these patterns with 96% accuracy.

Technical Design

System Architecture Design

Three-layer architecture: Edge devices, FL server, and privacy layer working together to enable secure, distributed learning.

Edge Device Layer

Raspberry Pi/Jetson with 12-lead ECG sensor, quantized TinyML model, and local gradient computation.

  • • 16-second ECG segments @ 257 KHz
  • • 1 epoch per FL round
  • • Battery-optimized training

FL Server Layer

Cloud orchestration using Flower framework with FedAvg aggregation and client management.

  • • Distribute global model to K clients
  • • Weighted averaging by dataset size
  • • 80% participation threshold

Privacy Layer

Opacus-powered DP integration with configurable epsilon budgets.

  • • Gaussian noise injection
  • • ε=1.0 (strong) to ε=8.0 (balanced)
  • • Gradient clipping before upload

The edge device integrates a 12-lead ECG sensor, runs a quantized TinyML model locally, and computes gradients without transmitting raw patient data.

  • Sensor Integration: ADC sampling at 257 KHz, real-time filtering and normalization
  • Local Training: 1 epoch per FL round to conserve battery; 16-second ECG segments
  • Gradient Computation: Full backpropagation on-device; only weight deltas uploaded

The cloud server orchestrates federated training using the FedAvg algorithm:

  1. 1. Distribute global model to K clients
  2. 2. Clients train locally on their data
  3. 3. Clients upload encrypted weight updates
  4. 4. Server aggregates weights via weighted averaging
  5. 5. Server broadcasts updated global model

Straggler handling uses asynchronous updates with 80% participation thresholds.

Sample Implementation

fl_client.pypython
import flwr as fl
from opacus import PrivacyEngine

class PrivateFlowerClient(fl.client.NumPyClient):
    def __init__(self, model, train_loader, privacy_engine):
        self.model = model
        self.train_loader = train_loader
        self.privacy_engine = privacy_engine
    
    def fit(self, parameters, config):
        # Set model parameters from server
        self.set_parameters(parameters)
        
        # Local training with DP
        self.train_with_privacy()
        
        # Return updated weights (not raw data!)
        return self.get_parameters(), len(self.train_loader), {}
    
    def train_with_privacy(self):
        # Opacus automatically clips gradients
        # and adds calibrated Gaussian noise
        for batch in self.train_loader:
            loss = self.compute_loss(batch)
            loss.backward()
            self.optimizer.step()

Privacy Layer Integration

Before uploading gradients, Opacus injects Gaussian noise calibrated to epsilon budget. This guarantees differential privacy—an adversary cannot determine if any individual's data influenced the model.

Silent Guardian Architecture

Click on each layer to explore how TinyML, Federated Learning, and Differential Privacy work together to protect patient data.

Encrypted Gradients
Noisy Updates (ε-DP)
Global Model Weights
Local Processing
Privacy Protection
Cloud Orchestration
Encrypted Data
Security & Regulation

Security Model & Regulatory Compliance

Unique Security Challenges

Federated learning systems face unique threats because the server cannot directly verify client behavior. Trust is distributed across multiple edge devices—any of which could be compromised.

Security Threats in FL

ThreatImpactDefense
Model PoisoningCriticalByzantine-robust aggregation (Multi-Krum)
Gradient LeakageHighDifferential Privacy noise injection
Byzantine AttacksHighCoordinate-wise median aggregation
Man-in-the-MiddleMediumTLS 1.3 encryption via gRPC

Malicious clients submit corrupted model updates to manipulate the global model's behavior. For example, an attacker could train their local model to misclassify AFib as normal rhythm, then scale up the malicious gradients to override legitimate updates. In healthcare FL, a single poisoned update could cause the system to miss life-threatening cardiac events.

Model updates can inadvertently leak patient information. Researchers have demonstrated that gradient vectors contain enough information to reconstruct training samples—meaning an ECG recording could be reverse-engineered from the numbers a client uploads.

  • Byzantine-Robust Aggregation: Instead of simple averaging (FedAvg), the server uses statistical techniques to identify and exclude outlier updates.
  • Differential Privacy Integration: Opacus adds calibrated Gaussian noise to gradients before upload, mathematically guaranteeing that individual patient ECG records cannot be reconstructed.
  • Secure Communication: All client-server exchanges use TLS 1.3 encryption, implemented via Flower's built-in gRPC channels.

Regulatory Compliance

HIPAA Compliance

Health Insurance Portability and Accountability Act mandates safeguards for Protected Health Information (PHI).

  • ✓ Encryption of PHI in transit and at rest
  • ✓ Audit logs for all data access
  • ✓ Business associate agreements
  • ✓ Raw ECG data never leaves edge devices

GDPR Compliance

Article 32 requires “appropriate technical and organisational measures” for data security.

  • ✓ Pseudonymization via FL architecture
  • ✓ Encryption for all transmissions
  • ✓ Data residency maintained
  • ✓ EU patient data stays on EU devices
!

FDA Pathway

FDA classifies AI-enabled diagnostic tools as Class II or III medical devices requiring 510(k) clearance or PMA approval.

  • • 950+ AI-enabled devices FDA-authorized
  • • 2025 guidance on AI lifecycle management
  • • Predetermined change control plans
  • • Pre-submission consultations planned
RegulationJurisdictionKey RequirementStatus
HIPAAUSAPHI encryption, audit logs, BAAsCompliant
GDPR Article 32EUPseudonymization, encryptionCompliant
FDA SaMDUSA510(k) clearance for Class II devicesPathway Defined

Federated Learning Security Threat Matrix

Hover over threats for analogies. Click defenses for detailed explanations.

ThreatImpactDescriptionDefense Mechanism
Model Poisoning
Critical

Malicious clients submit corrupted model updates to manipulate the global model, potentially causing it to misclassify AFib as normal rhythm.

Gradient Leakage
High

Model updates can inadvertently leak patient information. Gradient vectors may contain enough information to reconstruct original training samples.

Byzantine Attacks
High

Named after the Byzantine Generals Problem, these attacks involve clients sending arbitrary, contradictory updates that prevent model convergence.

Impact Levels:
Critical
High
Medium
Market Opportunity

Commercial Viability & Monetization Strategy

Silent Guardian addresses a trillion-dollar opportunity at the intersection of remote patient monitoring, data privacy, and collaborative medical research.

$22B

Market Size (2024)

Global RPM market valuation

$110B

Projected (2033)

CAGR of 19.8%

40.5%

North America Share

Largest regional market

$1,000+

Annual Reimbursement

Per Medicare RPM patient

The global RPM market was valued at $22.03 billion in 2024 and is projected to reach $110.71 billion by 2033 (CAGR 19.8%). North America holds 40.5% market share, driven by chronic disease prevalence, aging demographics, and COVID-19's acceleration of virtual care adoption.

The U.S. market alone shows 50 million current users with 71 million projected by 2025.

Medicare and 42 U.S. states cover RPM through specific CPT codes. A single Medicare patient can generate $1,000+ annual reimbursement with 20 minutes monthly monitoring.

Privacy-preserving features directly address insurer requirements: FraudNetX-style vertical federated learning enables collaborative fraud detection between hospitals and payers without raw PHI exposure, achieving 99.91% accuracy while maintaining HIPAA compliance.

Silent Guardian's federated architecture mirrors successful models like the National Clinical Cohort Collaborative (N3C), which aggregates EHR data from 90+ institutions while keeping data localized. MIT LCP Clinical Data Consortium demonstrates research value: institutions collaborate on outcomes analysis without sharing raw patient records.

Monetization Strategies

Provider SaaS Model

Tiered subscriptions (Starter/Professional/Enterprise) priced per-patient-per-month or per-bed, with Device-as-a-Service bundling to reduce CAPEX.

Payer Enterprise Model

Per-member-per-month licensing or value-based contracts sharing fraud prevention savings.

Research Network

Free platform access for data contributors (hospitals); paid query subscriptions for consumers (pharma, MedTech) creating high-margin revenue from network effects.

Three Pillars of Revenue

The commercial thesis rests on three pillars: provider-focused RPM services, payer-focused fraud detection and risk management, and research network infrastructure.

Remote Patient Monitoring Market Growth

Global market projection 2024-2033

5.0x
Growth
19.8%
CAGR
Explore Year Range2024 - 2033
20242033
Starting Point
$22.03B
Market size in 2024
Projected Peak
$110.71B
Market size by 2033
Total Growth
+$88.68B
Over 9-year period