Beyond Binary Classification: Multiclass Machine Learning for Diabetes and Prediabetes Risk Prediction Using NHANES

Aman Mujahid, Anita PenkovaarXiv 2026 · arXiv

This paper explores a critical shift in medical machine learning: moving from binary "sick vs. healthy" models to multiclass frameworks that capture the nuances of disease progression. Specifically, the authors tackle the challenge of identifying prediabetes—a high-risk intermediate state—using the National Health and Nutrition Examination Survey (NHANES) dataset.

TL;DR

The researchers developed a multiclass machine learning framework to classify adults as normal, prediabetic, or diabetic, finding that while multiclass models offer better clinical stratification, the "prediabetes" state is inherently difficult to distinguish due to biological overlap. Surprisingly, advanced tabular transformers did not significantly outperform traditional gradient boosting models, suggesting that the bottleneck in diabetes screening lies in feature overlap rather than model architecture.

What Problem Does This Paper Address?

Most existing machine learning models for diabetes focus on binary classification (Diabetes vs. No Diabetes). This "all-or-nothing" approach ignores prediabetes, a phase where lifestyle interventions can effectively halt or reverse disease progression.

The challenge is that prediabetes isn't a discrete state with clear-cut boundaries in routinely collected data; it’s part of a biological continuum. Furthermore, many models suffer from "label leakage" by including diagnostic biomarkers like HbA1c as input features. This paper aims to build a realistic screening tool that excludes these "cheating" variables and evaluates whether modern deep learning (transformers) can better navigate the fuzzy boundaries of metabolic risk than traditional methods.

Methods

The authors compared two major families of algorithms:

  1. Gradient Boosted Decision Trees (GBDTs): XGBoost, LightGBM, and CatBoost.
  2. Tabular Transformers: TabTransformer, FT-Transformer, and SAINT (Self-Attention and Intersample Attention Transformer).

To ensure a realistic screening scenario, they excluded HbA1c from the input features, as it is the very metric used to define the ground truth labels. They also engineered specific features like the triglyceride-to-HDL ratio and interaction terms between age and BMI to capture complex metabolic patterns.

Datasets

The study utilized data from the NHANES (2007–2018), a large-scale observational dataset representing the US general population.

  • Cohort Size: 15,356 adults.
  • Class Distribution: 60.2% Normal, 27.9% Prediabetes, and 11.9% Diabetes.
Table 1: Continuous and categorical variables used in the dataset

Key Insights and Ideas

  • The "Biological Continuum" Bottleneck: The primary difficulty in detecting prediabetes isn't a lack of model complexity; it's the fact that prediabetic individuals look very similar to both healthy and diabetic individuals in the feature space. This is visualized through UMAP projections, which show significant mixing between the classes.
Figure 2: UMAP visualization of the normal, prediabetes, and diabetes groups in the test data. HbA1c and participant identifiers were excluded, numeric variables were standardized, and categorical variables were one-hot encoded. UMAP was fitted on the training set and the held-out test set was projected into two dimensions, using 30 neighbors, a minimum distance of 0.1, Euclidean dis- tance, and a random seed of 42.
  • Architecture Parity: Despite the hype around deep learning for tabular data, Transformers performed similarly to XGBoost. This suggests that for structured clinical data of this scale, the "signal" is already well-captured by tree-based models.
  • Problem Formulation > Model Choice: The authors found that changing how the problem was framed (e.g., merging prediabetes and diabetes into a single "abnormal" class) had a much larger impact on performance metrics than switching between different model architectures.
  • The Cost of Stratification: There is a clear trade-off. While multiclass models are more clinically informative, they are less "accurate" than binary models because they attempt to draw lines in a high-overlap region of the feature space.

Key Results

  • Multiclass Performance: Models achieved an overall accuracy of ~0.71 and a macro-averaged F1 score of ~0.70.
  • The Prediabetes Gap: While the models were strong at identifying the "Normal" (F1 ~0.79) and "Diabetes" (Sensitivity ~0.80) classes, "Prediabetes" remained the most challenging, with F1 scores hovering around 0.54–0.56.
  • Confusion Patterns: Most prediabetes misclassifications were "false negatives" labeled as normal, which is a significant concern for screening programs.
Confusion matrices for XGBoost across different formulations

Limitations and Future Work

  • Cross-Sectional Limitation: NHANES provides a snapshot in time. The authors note that longitudinal data (tracking the same individuals over years) would be better for capturing the transition into prediabetes.
  • Ordinality: The current multiclass approach treats all errors equally. In reality, misclassifying a diabetic person as "normal" is a much more serious error than misclassifying them as "prediabetic." Future work could explore ordinal classification or cost-sensitive learning to reflect these clinical priorities.
  • Fairness: While the authors explored fairness-aware reweighting, it primarily shifted recall between groups rather than equalizing it, suggesting that more fundamental data-level or algorithmic changes are needed to ensure equitable screening.

Summary updated

Abstract

Detecting diabetes risk early is important for preventing disease progression. Most existing machine learning approaches focus on binary classification, which limits their ability to capture intermediate risk states such as prediabetes. We develop a supervised learning framework to classify adults as normal, prediabetic, or diabetic using National Health and Nutrition Examination Survey data. The framework uses routinely collected demographic, clinical, and lifestyle variables from 15,356 adults, with glycated hemoglobin (HbA1c) used only to define labels and excluded from input features to prevent leakage. We compare conventional machine learning and transformer-based models and examine two binary formulations: normal versus prediabetes, and normal versus combined prediabetes and diabetes. Models are evaluated on a held-out test set using precision, sensitivity, specificity, and F1 score. In the multiclass setting, performance is broadly consistent across models, with accuracy up to 0.72 and macro-averaged F1 of 0.70. Prediabetes remains the most challenging class, with F1 scores of 0.54 to 0.56 for conventional models and 0.53 to 0.55 for transformers, reflecting its overlap with both neighboring states. When the task is reduced to normal versus prediabetes, F1 scores rise modestly to 0.62 to 0.64. A more substantial improvement is observed under a broader screening formulation combining prediabetes and diabetes, with F1 scores of 0.73 to 0.74 across all models. These findings suggest that feature overlap along the biological continuum between normal and diabetic states contributes more to the difficulty of prediabetes detection than model architecture. Multiclass prediction provides a more clinically informative representation of metabolic risk progression but highlights a trade-off between clinically meaningful stratification and predictive accuracy.
BibTeX
@misc{mujahid2026beyond,
  author = {Aman Mujahid and Anita Penkova},
  title = {{Beyond Binary Classification: Multiclass Machine Learning for Diabetes and Prediabetes Risk Prediction Using NHANES}},
  year = {2026},
  eprint = {2611.16756},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2611.16756},
}
Figure