The Problem
Blood glucose prediction models face a fundamental challenge: patient physiology changes over time. A model trained on three months of data begins to lose accuracy as metabolic patterns shift. Retraining from scratch is expensive. Fine-tuning on new data causes catastrophic forgetting of previously learned patterns.
This is the core problem AGNI addresses.
Continual Learning in Healthcare
Most continual learning research focuses on image classification benchmarks like CIFAR-100 or Split-MNIST. These are useful for method validation but do not capture the nuances of temporal health data:
- Non-stationary distributions that drift gradually
- Patient-specific patterns that must be preserved
- Safety-critical predictions where regression is unacceptable
- Limited labeled data per time window
AGNI bridges this gap by applying continual learning methods specifically designed for sequential regression on wearable sensor data.
Architecture
The framework has three components:
1. Shared encoder that extracts temporal features from continuous glucose monitor (CGM) readings
2. Task-specific adapter heads that specialize for different prediction horizons (30min, 60min, 120min)
3. Elastic weight consolidation (EWC) module that protects important parameters from being overwritten during new task learning
The key insight is that glucose dynamics at different prediction horizons share common underlying patterns but require specialized output mappings. The shared encoder captures the common structure while adapters handle horizon-specific behavior.
Results
On the benchmark evaluation:
- AGNI achieves 82-88% accuracy retention across sequential tasks
- Baseline fine-tuning drops to 8% on early tasks after learning later ones
- The EWC regularization adds minimal computational overhead (~3% training time increase)
- Adapter heads add only 2.1M parameters per task vs. full model duplication
What I Learned
Building AGNI reinforced several principles that extend beyond this specific project:
- Regularization is architecture. EWC is not just a training trick; it fundamentally shapes how the model allocates capacity across tasks.
- Healthcare ML requires different evaluation. Standard accuracy metrics miss the clinical significance of prediction errors. A 5mg/dL error at 180mg/dL is very different from the same error at 70mg/dL.
- Continual learning is about memory management. The analogy to human memory consolidation during sleep is more than metaphor. The selective protection of parameters mirrors how biological systems preserve important memories while allowing plasticity.
Next Steps
The current framework operates on single-patient data. The next phase will explore federated continual learning across patient cohorts, preserving privacy while enabling cross-patient knowledge transfer.