Integrating Machine Learning Ensembles and Large Language Models for Heart Disease Prediction Using Voting Fusion
Organizations: Faculty of Computer Science & Engineering, Patuakhali Science & Technology University, Bangladesh · Dept. of Electrical & Electronic Engineering, Rajshahi University of Engineering & Technology, Bangladesh · Dept. of Industrial & Production Engineering, Ahsanullah University of Science & Technology, Bangladesh · Dept. of Computer Science & Engineering, National Institute of Technology, Silchar, India · University of Arkansas at Little Rock, Little Rock, Arkansas, USA · Institute for Digital Health & Innovation, University of Arkansas for Medical Sciences, Arkansas, USA
Abstract
Cardiovascular disease is the primary cause of death globally, necessitating early identification, precise risk classification, and dependable decision-support technologies. The advent of large language models (LLMs) provides new zero-shot and few-shot reasoning capabilities, even though machine learning (ML) algorithms, especially ensemble approaches like Random Forest, XGBoost, LightGBM, and CatBoost, are excellent at modeling complex, non-linear patient data and routinely beat logistic regression. This research predicts cardiovascular disease using a merged dataset of 1,190 patient records, comparing traditional machine learning models (95.78% accuracy, ROC-AUC 0.96) with open-source large language models via OpenRouter APIs. Finally, a hybrid fusion of the ML ensemble and LLM reasoning under Gemini 2.5 Flash achieved the best results (96.62% accuracy, 0.97 AUC), showing that LLMs (78.9 % accuracy) work best when combined with ML models rather than used alone. Results show that ML ensembles achieved the highest performance (95.78% accuracy, ROC-AUC 0.96), while LLMs performed moderately in zero-shot (78.9%) and slightly better in few-shot (72.6%) settings. The proposed hybrid method enhanced the strength in uncertain situations, illustrating that ensemble ML is considered the best structured tabular prediction case, but it can be integrated with hybrid ML-LLM systems to provide a minor increase and open the way to more reliable clinical decision-support tools.
Figures & tables
| Attribute | Values / Range |
|---|---|
| Age | Continuous |
| Sex | Male / Female |
| Chest Pain Type | TA, ATA, NAP, ASY |
| Resting BP | Continuous |
| Cholesterol | Continuous |
| Fasting BS | 1 = Yes, 0 = No |
| Model | Accuracy (%) |
|---|---|
| CatBoost) | 92.44 |
| Random Forest | 92.02 |
| XGBoost | 90.76 |
| LightGBM | 90.34 |
| Gradient Boosting | 89.92 |
| SVM | 85.02 |
| Ensemble Strategy | Accuracy (%) | AUC |
|---|---|---|
| Soft Voting (Weighted)) | 95.23 | 0.96 |
| Hard Voting | 93.78 | 0.98 |
| Model Name | Accuracy (%) | Accuracy (%) |
|---|---|---|
| Qwen 3 Coder | 81.34 | 72.94 |
| X AI Grok Code Fast 1 | 81.18 | 71.51 |
| Z AI GLM 4.5 Air | 80.08 | 72.94 |
| Meta Llama 4 Maverick | 79.24 | 76.20 |
| Moonshot AI Kimi K2 | 78.82 | 75.29 |
| OpenAI GPT 5 | 77.39 | 52.86 |
| Method | Accuracy | AUC |
|---|---|---|
| Zero soft voting | 0.789 | 0.804 |
| Zero hard voting | 0.776 | 0.782 |
| Few soft voting | 0.726 | 0.727 |
| Few hard voting | 0.722 | 0.729 |
| Ref. | Model / Approach | Accuracy (%) |
|---|---|---|
| [16] | Feature-Selected Stacking Ensemble | 82.56 |
| [18] | AdaBoost Decision Fusion (ABDF) | 83.0 |
| [14] | Data Mining Model (10-fold CV) | 86.3 |
| [15] | Firefly + Stacking Ensemble | 86.79 |
| [25] | Stacking Ensemble & Voting Ensemble | 91.0 |
| [17] | VAE + DNN Stacked Ensemble (HDPM) | 92.3 |