Coronary Risk Explorer
Inspiration
Cardiovascular disease remains the leading cause of death globally. In outpatient triage, physicians evaluate dozens of non-invasive variables—including ECG tracings, symptoms, echocardiograms, and blood work—to decide whether a patient needs invasive catheterization.
However, raw risk percentages fail to provide clinicians or patients with an intuitive, spatial understanding of where disease may be developing.
We built Coronary Risk Explorer to connect non-invasive predictive AI, clinical interpretability, and real-time 3D anatomical visualization into an interactive clinical decision-support tool.
What It Does
Coronary Risk Explorer predicts overall Coronary Artery Disease (CAD)—represented by the dataset's Cath label—and the presence of ≥50% stenosis in the three major coronary arteries:
- LAD — Left Anterior Descending
- LCX — Left Circumflex
- RCA — Right Coronary Artery
The model uses 54 routine clinical parameters.
Interactive 3D Anatomical Mapping
The application visualizes the heart, thorax, and coronary tree using anatomical meshes derived from BodyParts3D (CC BY 4.0).
Artery branches are dynamically recolored according to calibrated risk using custom WebGL shaders featuring:
- Pulsatile blood-flow visualization
- Risk-based glow effects
- Heartbeat synchronization
- Patient-specific pulse-rate animation
This transforms an abstract probability into an intuitive spatial representation of potential disease.
Fast In-Browser Inference
The system provides real-time scoring directly in the browser:
- Approximately 60 ms end-to-end scoring latency
- No dedicated GPU required
- Approximately 1.7 ms GPU frame time on integrated Intel Arc graphics
Exact Explainability
The application computes real-time SHAP feature attributions, decomposing the prediction into domain-level contributions:
- ECG
- Echocardiography
- Laboratory measurements
- Medical history
The interface also provides standard physiological adult ranges to help contextualize individual measurements.
Clinical Safety & Decision Thresholds
The application includes several safeguards designed for responsible clinical decision support:
- Threshold explorer
- Rule-out preset
- Balanced preset
- Cath-vs-vessel consistency warnings
- Prominent clinical disclaimers
How We Built It
ML Pipeline
The machine-learning pipeline was developed across 8 reproducible notebooks using the UCI Extension of the Z-Alizadeh Sani benchmark, containing 303 patients.
We evaluated:
- Logistic Regression
- Support Vector Machines
- Random Forest
- XGBoost
- LightGBM
Models were evaluated using repeated 5×5 stratified cross-validation, with hyperparameters optimized using nested Optuna TPE.
A 61-patient holdout set was strictly sealed until final evaluation.
Final performance:
| Prediction | ROC-AUC |
|---|---|
| Cath / overall CAD | 0.854 |
| LAD stenosis | 0.794 |
Confidence intervals were calculated using 2,000-resample bootstrap estimation.
Calibration
We applied out-of-fold Platt scaling so that predicted probabilities better reflect real-world event frequencies rather than merely providing ranking scores.
Backend
The backend is implemented as a FastAPI microservice with:
- Pydantic validation schemas
- Per-response CSP nonces
- Rate limiting
- Automated API testing
- Leakage-prevention tests
- SHAP additivity tests
The project contains 39 automated tests covering the above safety and correctness requirements.
Frontend & 3D
The frontend combines:
- Three.js
- WebGL
- Custom GLSL shaders
- GSAP ScrollTrigger
- Responsive UI
The application was designed with zero build-step overhead for the frontend experience.
Challenges We Ran Into
Small-Sample Clinical Constraints
Working with only 303 patients required unusually strict validation practices.
We used:
- Nested cross-validation
- Stratification
- Sealed holdout evaluation
- Leakage prevention
- Bootstrap confidence intervals
This was necessary to reduce the risk of reporting overly optimistic performance.
Anatomical Reconstruction
The BodyParts3D models represent ventricular cavities primarily as blood volumes rather than complete anatomical outer surfaces.
To create the visualization required by the product, we algorithmically reconstructed the outer ventricular surface using:
- Local wall thickness
- Anatomical geometry
- Coronary proximity
This allowed us to produce a more complete interactive representation of the heart.
Low-Latency Real-Time SHAP
Computing exact SHAP explanations for individual predictions introduced a latency challenge.
We optimized single-threaded TreeExplainer scoring to deliver exact feature attributions in approximately 60 ms, avoiding the additional overhead of a worker pool.
Accomplishments We're Proud Of
- Met all 5 requirements of Track A with a production-hardened web application.
- Built an honest, clinically grounded ML system with:
- Bootstrap confidence intervals
- Probability calibration
- Calibration slopes close to 1.0
- Created an interactive 3D WebGL anatomical experience capable of maintaining approximately 60 FPS on standard integrated graphics.
- Combined predictive modeling, interpretability, clinical context, and anatomical visualization into a single workflow.
What We Learned
Evaluating clinical machine learning requires prioritizing validation methodology, calibration, and explainability over simply choosing the most complex or highest-performing black-box model.
In a small clinical dataset, methodological rigor can be more important than squeezing out another few points of model performance.
What's Next
The next stage is exploring multimodal integration with angiographic video datasets, including datasets such as AngioCAD, to enable:
- Segment-level coronary analysis
- Multi-vessel validation
- Integration of non-invasive predictions with angiographic evidence
- More granular anatomical risk localization
- Potential longitudinal disease monitoring
Built With
- achieving-0.854-roc-auc-(cath)-and-0.794-roc-auc-(lad)-with-2
- and-39-automated-tests-covering-api-contracts
- and-lightgbm-across-repeated-5x5-stratified-cv
- and-shap-additivity.-frontend-&-3d:-three.js-webgl-rendering
- custom-glsl-shaders
- docker
- fastapi
- gsap
- gsap-scrolltrigger-animations
- html5
- javascript
- leakage-prevention
- optuna
- per-response-csp-nonces
- python
- random-forests
- rate-limiting
- scikit-learn
- shap
- svms
- three.js
- tuning-hyperparameters-via-nested-optuna-tpe.-a-61-patient-holdout-was-strictly-sealed-until-final-evaluation
- webgl
- xgboost
Log in or sign up for Devpost to join the conversation.