Skip to Content
Adaptive LearningFederated Learning

Federated Learning

src/lib/federated-learning.ts lets the learning system improve across users without sharing individual data.

The protocol

  1. Each client trains locally on its own quiz observations
  2. The client computes a BKT parameter delta (not raw data)
  3. The delta’s sensitivity is bounded by gradient clipping (clipNorm)
  4. Gaussian noise is added for (ε, δ)-differential privacy
  5. The noised delta is sent to the server
  6. The server aggregates deltas via weighted averaging into a GlobalModel

Key types

src/lib/federated-learning.ts
export interface FederatedUpdate { /* gradient delta with DP noise */ } export interface BKTParamDelta { /* per-parameter adjustments */ } export interface GlobalModel { /* aggregated state across clients */ } export interface PrivacyParams { epsilon: number // privacy budget ε // delta δ clipNorm: number // gradient clipping norm // noise scale — computed from ε, δ, clipNorm }

Guarantees

  • What leaves the device: a clipped, noised parameter delta — never observations, video content, or identity
  • Formal privacy: Gaussian-mechanism (ε, δ)-DP with sensitivity bounded by clipNorm
  • Utility: weighted averaging favors clients with more observations, so the global BKT parameters converge toward population-realistic values