# Using Large Language Models to Predict Advanced Liver Fibrosis in Metabolic Dysfunction-Associated Steatotic Liver Disease (MASLD): A Proof-of-Concept Analysis

**Authors:** Basile Njei, Nelvis Njei, Sarpong Boateng, Omar Al Ta'ani, Yazan Al-Ajlouni

PMC · DOI: 10.7759/cureus.102777 · Cureus · 2026-02-01

## TL;DR

This study shows that large language models like GPT-4 can accurately predict advanced liver fibrosis in patients with MASLD using clinical data, outperforming traditional methods.

## Contribution

The novel use of GPT-4 and GPT-3.5 for predicting advanced liver fibrosis in MASLD using structured clinical variables is demonstrated for the first time.

## Key findings

- GPT-4 achieved an AUROC of 0.91 for predicting advanced fibrosis in MASLD patients.
- GPT-4 and GPT-3.5 outperformed traditional risk scores like FIB-4 in fibrosis prediction.
- Both models showed strong calibration and high specificity for detecting advanced fibrosis.

## Abstract

Background: Metabolic dysfunction-associated steatotic liver disease (MASLD) is a prevalent condition linked to type 2 diabetes and other metabolic risk factors. Timely detection of advanced fibrosis (≥F3) in MASLD patients is critical for effective clinical management. Traditional risk scores, such as the Fibrosis-4 Index (FIB-4) and NAFLD Fibrosis Score (NFS), have limitations, prompting the exploration of machine learning models for improved risk prediction.

Objectives: This proof-of-concept study evaluates the feasibility of using large language models (LLMs), specifically GPT-4 and GPT-3.5 (OpenAI, Inc., San Francisco, United States), to predict advanced liver fibrosis in individuals with MASLD using only structured clinical variables from the National Health and Nutrition Examination Survey (NHANES).

Methods: We used NHANES 2017-2020 data, including 162 participants with MASLD. GPT-4 and GPT-3.5 were accessed via application programming interface (API) to predict fibrosis risk using variables such as age, BMI, aspartate aminotransferase (AST), alanine aminotransferase (ALT), platelet count, and HbA1c. Performance was evaluated using sensitivity, specificity, area under the receiver operating characteristic curve (AUROC), and Brier score, with model thresholds set at 40.5% for GPT-4 and 45% for GPT-3.5 based on Youden’s index.

Results: GPT-4 achieved an AUROC of 0.91 (95% CI: 0.86-0.96), while GPT-3.5 demonstrated an AUROC of 0.90 (95% CI: 0.85-0.95). Both models showed strong calibration, with GPT-4 maintaining superior specificity (0.86 vs. 0.82). The models' performance outpaced traditional risk scores, such as FIB-4.

Conclusions: GPT-based LLMs show strong potential for predicting advanced fibrosis in MASLD, offering a scalable, interpretable tool for clinical use. Further validation across diverse populations and clinical settings is needed to confirm generalizability and refine the approach before clinical adoption.

## Linked entities

- **Diseases:** MASLD (MONDO:0013209), type 2 diabetes (MONDO:0005148)

## Full-text entities

- **Genes:** GPT (glutamic--pyruvic transaminase) [NCBI Gene 2875] {aka AAT1, ALT, ALT1, GPT1, SGPT}, SLC17A5 (solute carrier family 17 member 5) [NCBI Gene 26503] {aka AST, ISSD, NSD, SD, SIALIN, SIASD}
- **Diseases:** Liver Diseases (MESH:D008107), Fibrosis (MESH:D005355), CMRF (MESH:D024821), Liver Fibrosis (MESH:D008103), Chronic Kidney Disease (MESH:D051436), hepatitis B (MESH:D006509), hepatitis C (MESH:D019698), NAFLD (MESH:D065626), MASH (MESH:D005234), LLMs (MESH:D007806), metabolic dysfunction (MESH:D008659), hypertensive (MESH:D006973), viral hepatitis (MESH:D014777), CKD (MESH:D012080), congestive hepatopathy (MESH:D002311), liver damage (MESH:D056486), type 2 diabetes (MESH:D003924), impaired glucose control (MESH:D007174), hepatocellular carcinoma (MESH:D006528)
- **Chemicals:** triglycerides (MESH:D014280), GPT-4 (-), lipid (MESH:D008055), glucose (MESH:D005947), alcohol (MESH:D000438)
- **Species:** Homo sapiens (human, species) [taxon 9606]

## Full text

_Full body text omitted from this summary view._ Fetch the complete paper as Markdown: https://tomesphere.com/paper/PMC12955738/full.md

## Figures

5 figures with captions in the complete paper: https://tomesphere.com/paper/PMC12955738/full.md

## References

30 references — full list in the complete paper: https://tomesphere.com/paper/PMC12955738/full.md

---
Source: https://tomesphere.com/paper/PMC12955738