
June 30, 2026
What happens when an AI model performs well overall but struggles with the cases that matter most? This project was developed during an internship at Stanford University under the mentorship of Dr. Pat Kasinpila, where our team investigated the use of machine learning for coronary artery disease (CAD) classification. We compared different modeling approaches and examined not only how accurately AI could classify disease, but also how class imbalance and dataset composition could affect its reliability.
The project focused on three forms of coronary artery disease: obstructive CAD, nonobstructive CAD, and spontaneous coronary artery dissection (SCAD). A convolutional neural network (CNN) was developed to learn visual patterns associated with these different categories, while logistic regression provided a simpler baseline for comparison.
The CNN achieved a mean validation accuracy of 92.13% without class rebalancing, compared with 84.42% for logistic regression. At first, the CNN appeared to be the stronger approach. However, the dataset was not evenly distributed across the disease categories, raising an important question: was high overall accuracy actually reflecting reliable performance across all three conditions?
To investigate this, the CNN was also evaluated after oversampling to address the imbalance between categories. Accuracy fell to 61.67%. Rather than simply treating this as poorer performance, the result highlighted one of the central challenges of medical machine learning: a strong overall accuracy can conceal weaknesses involving less-represented patient groups or disease categories.
The main contribution of the project was therefore not simply determining which model produced the highest accuracy. It demonstrated how class imbalance, rare conditions, dataset composition, and model choice can substantially change how reliable an AI system appears to be.
Ultimately, the project shows why evaluating medical AI requires looking beyond a single performance number. Understanding where a model struggles and why can be just as important as measuring how often it gets the answer right.

Thanks for reading my blog !

