
After studying this material, you should be able to:
Traditional machine learning requires collecting all user data in one central location to train models. This creates serious privacy risks.
Example:
Traditional ML:
Your phone data → Google's servers → Model trained on raw data
❌ Google sees everything you type
Instead of sending raw data to a server, the model travels to your device, trains locally, and only sends back model updates (not your data).
Federated Learning:
Model → Your phone → Trains locally → Sends only updates back
✅ Raw data never leaves your device
Real-world uses:
Think of these as the rulebook for building trustworthy FL systems:
| Principle | What It Means | Simple Analogy |
|---|---|---|
| Data Minimization | Collect only what's necessary | Only take what you need from a buffet |
| Data Anonymization | Remove identifying information | Blurring faces in a photo |
| Transparency & Control | Users know what happens to their data | A clear ingredient list on food |
| Verifiability & Auditability | Third parties can confirm the rules are followed | An independent financial audit |
🔑 Key Insight: Earlier FL systems satisfied the first three principles reasonably well, but verifiability remained a major gap.
Even with early FL, a critical question remained unanswered:
"How do we PROVE the server is doing what it claims?"
The trust gap looked like this:
Early FL System:
Device sends update → Server processes it → "Trust us, we added noise correctly"
❌ No external verification possible
Two partial solutions existed but had limitations:
| Solution | What It Did | Limitation |
|---|---|---|
| Basic FL | Kept data on device | Server logic unverifiable |
| Secure Aggregation | Cryptographically protected uploads | Incompatible with best-in-class privacy guarantees |
A TEE is a secure, isolated computing environment within a processor. Think of it as a locked room inside a computer where:
TEE Properties:
┌─────────────────────────────────────┐
│ 🔒 CONFIDENTIALITY │
│ Internal state cannot be seen │
│ │
│ 🛡️ INTEGRITY │
│ Logic cannot be tampered with │
│ │
│ 🔍 REMOTE ATTESTATION │
│ Third parties can verify what │
│ code is actually running │
└─────────────────────────────────────┘
Simple Analogy:
A TEE is like a notarized, glass-walled vault — outsiders can verify what's inside and what rules govern it, but cannot interfere with or secretly observe the contents.
FLOW OF DATA THROUGH THE SYSTEM:
1. DEVICE UPLOADS
📱 Device encrypts training data
📤 Uploads to server
⏱️ Data only accessible for limited time
2. ACCESS POLICIES
📋 Published to Rekor (public transparency log)
👁️ External auditors can inspect them
📌 Describes EXACTLY which programs can access data
3. TEE PROCESSING
🔐 Encrypted data decrypted ONLY inside TEE
🐍 Python training programs run inside TEE
🚫 Server operators cannot see raw data
4. OUTPUT
📊 Only differentially private model weights released
📈 Only aggregate metrics visible to operators
Differential privacy adds carefully calibrated mathematical noise to results, so individual contributions cannot be identified.
Without DP: Model update reveals "User typed X" ❌
With DP: Model update + noise = individual unidentifiable ✅
OLD SYSTEM:
"We promise we added the right noise"
→ No way to check ❌
NEW SYSTEM:
Access policy published publicly → TEE runs exactly that code
→ Anyone can verify ✅
Rekor is a public, append-only log (like a public bulletin board that cannot be erased).
🔑 Key Insight: This shifts the system from "trust us" to "verify us"
Some model architectures are trade secrets. The system handles this through sideloading:
Python Program (public, in access policy)
+
Serialized proprietary data (loaded at runtime)
=
Privacy logic remains verifiable ✅
Proprietary architecture remains protected ✅
By collecting all device uploads first, then running training:
Old approach:
Train → Wait for devices → Train → Wait → (diurnal variations cause problems)
New approach:
Collect all uploads → Calculate optimal participation schedule → Train once
✅ Better DP parameters possible
✅ Smaller noise multipliers = better accuracy
| Factor | Old System | New System |
|---|---|---|
| Training time | 1–2 months | Significantly faster |
| Bottleneck | Device availability + on-device compute | Server TEE resources |
| Parallelization | Limited | Across many machines |
Old system:
Gradient computation on device → Limited by phone hardware
❌ Can't train large models
New system:
Gradient computation on server TEE → Powerful server hardware
✅ Path to larger models
EVOLUTION OF FEDERATED LEARNING:
2017 — Basic FL
├── ✅ Data stays on device
├── ❌ Server logic unverifiable
└── ❌ Must trust server operator
~2020 — Secure Aggregation
├── ✅ Cryptographic upload protection
├── ❌ Incompatible with best DP guarantees
└── ❌ Still requires trust
2026 — TEE-Based FL (New)
├── ✅ Fully verifiable via remote attestation
├── ✅ Compatible with state-of-the-art DP
├── ✅ Public transparency log (Rekor)
├── ✅ Open source, reproducibly buildable
└── ✅ Faster training, larger models possible
The article hints at where this is heading:
| Future Goal | Current Status |
|---|---|
| Full proofs of correctness for DP algorithms | Anticipated |
| TEE + hardware accelerators for large models | Being explored |
| Mitigating side-channel attacks | Ongoing research |
| Synthetic data generation in TEEs | Experimental |
| LLM inference in TEEs | Experimental |
Test yourself with these questions:
💡 Core Takeaway: The new TEE-based FL system represents a fundamental shift from privacy by policy ("trust us") to privacy by architecture ("verify us") — making strong privacy guarantees mathematically provable and externally auditable for the first time.