Inspiration

40% of Type 2 Diabetes patients develop Diabetic Kidney Disease — and most don't find out until it's too late to reverse. The standard screening
method requires blood draws and lab tests that patients routinely skip.
Meanwhile, clinical trials targeting DKD struggle to find eligible patients fast enough. We realized there was a massive untapped signal sitting in
data patients already generate every day: their continuous glucose monitor (CGM) readings.

What it does

Invera is a clinical trial recruitment dashboard for medical researchers. A researcher drags and drops a patient's CGM CSV file into the dashboard.
Within seconds, the system computes six glycemic variability features from the glucose data and runs them through a trained XGBoost classifier to
produce a DKD risk score and a RED / YELLOW / GREEN flag. High-risk
patients are surfaced at the top of the table for trial enrollment review. Multiple files can be uploaded in parallel. All patient data stays local — only six statistical aggregates are ever sent to the inference server.

How we built it

Frontend: React 19 + Vite with a Windows 2000 / Y2K aesthetic (Tahoma font, inset borders, gradient title bars). Recharts for the CGM glucose trace
visualization.

Backend: FastAPI deployed on HuggingFace Spaces. Processes CSV files
entirely in memory — no disk writes.

ML Model: XGBoost classifier trained on the Shanghai T2DM clinical dataset (Zhao et al., 2023) — 85 patients, ground truth derived from $\text{eGFR} < 60 \Rightarrow \text{DKD_Risk} = 1$. We corrected a 20:1 class imbalance
using scale_pos_weight=20 and validated with stratified 4-fold cross-validation, achieving AUC-ROC = 0.94.

Six features extracted from CGM data: $$\mu_g,\ \sigma_g,\ \text{CV}_g = \frac{\sigma_g}{\mu_g},\ \text{TAR},\
\text{TBR},\ \text{TIR}$$

AI integration: Gemini 2.5 Flash identifies the glucose column from any CSV header — no hardcoded column names required.

Challenges we ran into

  • Class imbalance: Only 4 DKD-positive patients out of 85. Stratified
    folding was essential to ensure at least one positive case appeared in each test fold.
    • CORS and deployment: Getting the React dev proxy, HuggingFace Spaces, and Vercel to all agree on routing took significant debugging.
    • CSV format diversity: CGM exports differ drastically across devices.
      Solving this generically with Gemini was the key unlock. ## Accomplishments that we're proud of
  • AUC of 0.94 on a clinically meaningful task with a very small, imbalanced dataset
    • A genuinely HIPAA-conscious architecture: raw glucose readings never
      leave the researcher's machine
    • A fully working end-to-end pipeline — upload a real CGM file and get a
      real risk score — built in under 24 hours ## What we learned That wearable data contains far more clinical signal than it's currently
      being used for. The six glycemic variability features we extract are
      non-invasive, already being collected, and strongly predictive of kidney
      stress — yet this signal is almost entirely ignored in standard clinical
      workflows. ## What's next for Invera
  • Expand training data using GlucoBench and other CGM cohorts
    • FHIR API integration for automated patient import from EHR systems
    • Temporal modelling (LSTM) to capture glucose trend dynamics over time
    • Export approved patient cohorts directly to clinical trial registries
      (NCT)
    • Prospective validation on T1DM + T2DM cohorts across multiple sites

Built With

Share this project:

Updates