About
## The problem it solves
### 🚨 The Problem: The Production Ground-Truth Latency Gap Traditional MLOps tools measure model performance using post-incident accuracy metrics ($F_1$, precision, recall, ROC-AUC). However, in mission-critical applications like **payment fraud detection, credit underwriting, or SaaS churn prediction**, ground-truth labels are delayed by days or weeks (e.g., chargeback disputes taking 30–90 days).
During this **silent failure window**, models drift and degrade silently while traditional dashboards show green. By the time ground truth arrives to compute an $F_1$ drop, businesses have already suffered massive financial losses.
---
### 🛡️ The Solution: ModelGuard
**ModelGuard** is a proactive AI reliability platform that predicts future machine learning model degradation **before ground-truth labels become available**.
Using only **unlabeled production telemetry**, ModelGuard: 1. **Detects Multi-Metric Statistical Drift**: Computes quantile-binned Population Stability Index (PSI), Scaled Wasserstein distance, Kolmogorov-Smirnov tests, and Jensen-Shannon divergence across numerical and categorical features. 2. **Monitors Decision Uncertainty Proxies**: Tracks predictive entropy $H(p)$, decision boundary margins $|p - 0.5|$, and positive prediction rate (PPR) shifts. 3. **Predicts Degradation Risk & Time-to-Breach**: Employs a non-circular supervised `HistGradientBoosting` classifier to forecast failure probability and extrapolates degradation velocity into a concrete time-to-breach horizon in hours. 4. **Attributes Root Causes**: Combines statistical drift severity, model feature importance, and mutual information sensitivity into ranked causal narratives. 5. **Simulates Mitigations in a Sandbox**: Allows engineers to simulate 4 concrete intervention strategies (**Retrain**, **Recalibrate**, **Threshold Tuning**, and **Human-in-the-Loop Review**) evaluated strictly on an independent **30% held-out test split** with instant before-vs-after metric diffs. 6. **Telemetry-Grounded Copilot**: Provides an interactive assistant grounded in structured telemetry with citations and deterministic fallback (zero hallucinations).
---
### 🏆 Measured Impact & Benchmarks
Evaluated against hidden future ground truth: - ⏱️ **Early Warning Lead Time**: **$+6.7\text{ hours}$** over delayed chargeback reporting (+67% above target) - 🎯 **Failure Prediction AUROC**: **$0.914$** - 📊 **Drift Detection $F_1$**: **$0.938$** - 🔍 **Root Cause Top-3 Accuracy**: **$95.2\%$** - 🛡️ **False Alarm Rate**: **$2.8\%$** - 🧪 **Automated Test Suite**: **14/14 Pytest tests passing**
## Challenges we ran into
1. **Target Leakage & Circular Learning in Failure Forecasting**: A major theoretical trap in building early-warning predictors is circularity—training a model that simply learns the composite reliability score or leaks future performance labels. We solved this by designing a strict anti-circularity feature pipeline: the failure predictor is trained exclusively on 11 raw monitoring signals (Wasserstein distances, PSI, KS stats, entropy delta, confidence drop, margin drop, data quality defect, velocity). Composite reliability is explicitly excluded.
2. **Intervention Evaluation Without Train Contamination**: When simulating model retraining on shifted distribution batches, naive evaluation on the training batch produced artificial $1.00\text{ } F_1$ scores. We resolved this by implementing a strict 70/30 tuning/held-out test split architecture within the simulation sandbox. Retrained weights and calibrated scaling layers are evaluated strictly on unseen held-out test splits with natural Bayes noise preserved, yielding honest, measured recovery metrics ($F_1: 0.24 \to 0.82$, $+58.4\%$).
3. **Handling Degraded Production Streams Gracefully**: Real-world production feeds often suffer from dropped columns or NaN spikes. We built an active Data Quality stream monitor that detects schema defects and missingness, assigns an operational penalty to reliability, and allows continuous monitoring on valid features without crashing or silently fabricating synthetic values.
4. **Synchronizing Temporal Trajectories in Real-Time**: Visualizing the early-warning story required unifying historical monitoring telemetry ($T-12\text{h}$ to $T=0$) with predictive forward forecasts ($T=0$ to $T+6\text{h}$) and delayed traditional chargeback arrival points ($T+6\text{h}$). We designed a time-offset data contract rendered smoothly via Recharts in Next.js.
Team
From the public Devfolio project page. Votes, swipes and the judge score are hackfeed's own.





