Md Assaduzzaman, Md. Hasan Imam Bijoy, Mohammad Jahangir Alam, Md. Zahid HASAN, Nafiz Fahad, Tze Hui Liew, Ohidujjaman
Thyroid disorders affect millions globally, underscoring the urgent need for accurate and reliable diagnostic tools. Conventional diagnostic methods are often time-consuming, invasive, and prone to inconclusive results, whereas existing machine learning (ML) approaches continue to face persistent challenges with outliers, data imbalance, interpretability, and generalization. To address these challenges, this study proposes a robust meta-learning framework that integrates hybrid outlier handling, feature selection, Bayesian hyperparameter optimization, and explainable artificial intelligence (XAI) for binary classification of thyroid disease. This study introduces a hybrid outlier-handling framework combining univariate Interquartile Range (IQR) analysis, multivariate Isolation Forest detection, and regression-based contextual imputation. Class imbalance was mitigated using Random Oversampling (ROS), and key predictive features were identified using a Recursive Feature Elimination (RFE). The selected features were used to train Random Forest and XGBoost, which were subsequently combined in a stacking ensemble with a logistic regression meta-learner. The proposed framework demonstrated state-of-the-art performance, achieving an accuracy of 99.74%, an Area Under the Receiver Operating Characteristic Curve (AUC-ROC) of 0.9994, and a Cohen's Kappa score of 0.9769. Stratified 10-fold cross-validation confirmed its stability with an average accuracy of 99.70%, highlighting strong generalization. Robustness tests under adversarial perturbations (ε = 0.01, 0.05, 0.1) and Gaussian noise demonstrated minimal performance degradation, with accuracies consistently above 96%. Model transparency is achieved using SHapley Additive exPlanations (SHAP) and Local Interpretable Model-agnostic Explanations (LIME), which provide global and local explanations of feature contributions. Overall, the proposed framework demonstrates high accuracy, robustness, and transparency, supporting its suitability for real-world AI-assisted thyroid disease diagnosis.