Machine Learning Models for Predicting Significant Liver Fibrosis in Patients with Severe Obesity and Nonalcoholic Fatty Liver Disease

Obes Surg. 2024 Oct 25. doi: 10.1007/s11695-024-07548-z. Online ahead of print.

Abstract

Purpose: Although noninvasive tests can be used to predict liver fibrosis, their accuracy is limited for patients with severe obesity and nonalcoholic fatty liver disease (NAFLD). We developed machine learning (ML) models to predict significant liver fibrosis in patients with severe obesity through noninvasive tests.

Materials and methods: This prospective study included 194 patients with severe obesity who underwent wedge liver biopsy and metabolic bariatric surgery at Taipei Medical University Hospital between September 2016 and December 2020. Significant liver fibrosis was defined as a fibrosis score ≥ 2. Patients were randomly divided into a training group (70%) and a validation group (30%). ML models, including support vector machine, random forest, k-nearest neighbor, XGBoost, and logistic regression, were trained to predict significant liver fibrosis, using DM status, AST, ALT, ultrasonographic fibrosis scores, and liver stiffness measurements (LSM). An ensemble model including these ML models was also used for prediction.

Results: Among the ML models, the XGBoost model exhibited the highest AUROC of 0.77, with a sensitivity, specificity, and accuracy of 61.5%, 75.8%, and 69.5%, in validation set, while LSM, AST, ALT showed strongest effects on the model. The ensemble model outperformed all ML models in terms of sensitivity, specificity, and accuracy of 73.1%, 90.9%, and 83.1%.

Conclusion: For patients with severe obesity and NAFLD, the XGBoost model and the ensemble model exhibit high predictive performance for significant liver fibrosis. These models may be used to screen for significant liver fibrosis in this patient group and monitor treatment response after metabolic bariatric surgery.

Keywords: Liver fibrosis; Machine learning; Nonalcoholic fatty liver disease; Severe obesity.