Inspiration In clinical practice, doctors still rely heavily on simple scoring tables like the ESC 2019 guidelines and CAD Consortium scores when a patient comes in with chest pain. These scores only look at age, sex, and chest pain symptoms, so they often miss patients who are actually in danger or send healthy people for expensive, invasive angiograms.

More than that, getting handed a number like "38% risk" means almost nothing to a patient, and it doesn't tell a doctor which artery is actually in trouble. We wanted to build something where you could take routine clinic tests, predict not just overall disease but the three main coronary arteries individually, and literally paint that risk right onto an interactive 3D heart so anyone can understand it in seconds.

What it does Tria takes routine patient data and predicts the risk of coronary artery disease as well as the narrowing risk for each of the three main coronary arteries: the LAD, LCX, and RCA.

Instead of forcing someone to fill out 50 separate clinic inputs, we ran feature ablation experiments and cut it down to 11 key questions (basic medical history, plus 4 routine tests like ECG signs, wall motion, and ejection fraction) which captures 93% of the full model's accuracy.

The prediction is mapped onto an interactive 3D heart built from the NIH Human Reference Atlas. Each artery changes color from green to red based on its specific risk threshold. You can click any artery to highlight the exact heart muscle it supplies using standard 17-segment cardiology maps. The heart also beats at the patient's actual heart rate, explains the top factors driving the prediction using SHAP values converted to percentage points, and lets you download a clean one-page PDF report.

How we built it On the backend, we built a FastAPI service that runs a Platt-calibrated Random Forest. One big mathematical issue with standard multi-output models is that an individual artery can accidentally get a higher risk score than overall coronary disease, which is impossible in real medicine. We resolved this by using a two-step conditional probability setup: the artery risk is calculated as the overall disease probability multiplied by the conditional risk given disease.

For the frontend, we used React, TypeScript, and Tailwind CSS. The 3D heart is built with Three.js using custom shaders to give the heart muscle and fat tissue a realistic look instead of looking like plastic, while keeping it fast enough to run in any browser without requiring a dedicated graphics card.

Challenges we faced The hardest part was getting the medical math and validation right. Medical models are notorious for data leakage and overfitting, so we had to set up repeated nested 5-fold cross-validation where every threshold, feature selection, and probability calibration was fitted strictly inside the training folds.

Another challenge was SHAP values. Standard TreeSHAP outputs numbers in raw log-odds, which makes no sense to a doctor looking at a probability on a screen. We wrote an attribution re-scaler so the explanation bars sum up cleanly to the actual percentage point difference from a typical patient.

Finally, getting the 3D heart to look realistic with myocardial territory highlights while running smoothly on regular laptops and phones took a lot of shader tuning and geometry cleanup.

What we learned Evaluating the model against standard clinical baselines on the same patient cohort was eye-opening. Tria reached an ROC-AUC of 0.932 compared to 0.82 for ESC 2019 and 0.88 for the CAD Consortium score, catching over 90% of sick patients while sparing more healthy patients from angiograms.

We also tested the model across 1,223 patients from 5 different hospitals in the US and Europe under a leave-one-hospital-out setup. That showed us that while the clinical patterns generalize well across centers (0.77 AUC), baseline referral rates differ across hospitals, proving how critical local probability calibration is in real-world healthcare. Above all, we learned that when complex statistical outputs are translated into spatial anatomy, clinical understanding becomes immediate.

Built With

Share this project:

Updates

Submission history