Using machine learning algorithms to differentiate between acute cholangitis and alcohol-associated hepatitis

April 13, 2024

Acute cholangitis (AC) is a potentially life-threatening bacterial infection that often is associated with strictures or gallstones. Symptoms include fever, jaundice, right upper abdominal pain and elevated liver enzymes.

While these may seem like distinctive, telltale symptoms, unfortunately, they are similar to those affecting patients with alcohol-associated hepatitis (AH). This challenges emergency department staff and other healthcare professionals who need to diagnose and treat patients with liver enzyme abnormalities and systemic inflammatory responses.

To help clinicians differentiate between AC and AH, Mayo Clinic researchers sought to develop and train machine learning algorithms (MLAs) using data from some of the routinely available laboratory tests frequently ordered for these patients.

In an article published in Mayo Clinic Proceedings in 2022, the researchers' findings demonstrate that through use of a few simple variables and routinely available structured clinical information, MLAs may be effective predictive tools.

"This study was motivated by seeing many medical providers in the emergency department or ICU struggle to distinguish acute cholangitis and alcohol-associated hepatitis, which are very different conditions that can present similarly," says Joseph C. Ahn, M.D., a transplant hepatology fellow at Mayo Clinic in Rochester, Minnesota. Dr. Ahn is first author of the study.

"There are many instances of gastroenterologists receiving consults for urgent endoscopic retrograde cholangiopancreatography in patients who initially deny a history of alcohol use but later turn out to have alcohol-associated hepatitis. In some situations, the inability to obtain a reliable history from patients with altered mental status or lack of access to imaging modalities in underserved areas may force providers to make the determination based on a limited amount of objective data," says Dr. Ahn.

Study methods

The researchers analyzed electronic health records of adult patients diagnosed with acute cholangitis (194) or alcohol-associated hepatitis (260) and seen at Mayo Clinic in Rochester between Jan. 1, 2010, and Dec. 31, 2019.

"This study was motivated by seeing many medical providers in the emergency department or ICU struggle to distinguish acute cholangitis and alcohol-associated hepatitis, which are very different conditions that can present similarly. Our results highlight the potential for machine learning algorithms to assist in clinical decision-making in cases of uncertainty."

— Joseph C. Ahn, M.D.

The 10 routinely available laboratory values that the researchers collected included white blood cell count, hemoglobin, mean corpuscular volume, platelet count, aspartate aminotransferase, alanine aminotransferase, alkaline phosphatase, total bilirubin, direct bilirubin, and albumin. The researchers used the laboratory data to train and test eight supervised MLAs for classification of AC and AH: decision tree, naive Bayes, logistic regression, k-nearest neighbor, support vector machine (SVM), artificial neural networks, random forest and gradient boosting.

  • External validation. The researchers externally validated the results using data from the Medical Information Mart for Intensive Care III (MIMIC-III) version 1.4 database. The MIMIC-III cohort included 92 patients with AH and 213 patients with AC admitted to the ICU at Beth Israel Deaconess Medical Center in Boston between 2001 and 2012.
  • Assessing physician predictive performance. The researchers tested physicians' ability to classify AH versus AC using the same 10 chosen laboratory variables. A group of 143 physician participants (including 40 residents, 41 fellows and 62 attendings) took an online quiz asking them to evaluate 15 randomly chosen patients and their 10 laboratory values without any other clinical context. After deciding whether each patient had AH or AC, the physicians were asked to identify which five-variable subset was most influential in guiding their decisions.

Results and conclusions

Overall, the machine learning algorithms demonstrated excellent performances for discriminating between AC and AH.

  • Performance of MLAs using all 10 variables. Overall, the researchers noted that all eight of the MLAs demonstrated excellent performances for classification of AC and AH using the 10 laboratory values. Random forest had the highest accuracies (up to 0.932 ± 0.023), and SVMs had the highest area under the curve (0.986 ± 0.008).
  • External validation. Using the MIMIC-III database, the prediction performances of the MLAs with appropriate threshold setting were comparable to those in the initial Mayo Clinic dataset.
  • Performance of five-variable subsets. When the researchers evaluated the ability of the MLAs to classify AC versus AH using five-variable subsets instead of the original 10 variables, they noted the best subset performed well, with an area under the curve of up to 0.994.
  • Comparing physician and MLA performance. Overall, the MLAs outperformed the physicians who participated in the online quiz in classifying AC and AH using the 10 laboratory values. The physicians had a mean accuracy of 0.790.

According to Dr. Ahn and co-investigators, if the machine learning algorithms can be made easily accessible with an online calculator or smartphone app, they may help healthcare staff members who are urgently presented with an acutely ill patient with abnormal liver enzymes.

"Our results highlight the potential for machine learning algorithms to assist in clinical decision-making in cases of uncertainty," says Dr. Ahn. "For patients, this would lead to improved diagnostic accuracy and reduce the number of additional tests or inappropriate ordering of invasive procedures, which may delay the correct diagnosis or subject patients to the risk of unnecessary complications."

For more information

Ahn JC, et al. Machine learning techniques differentiate alcohol-associated hepatitis from acute cholangitis in patients with systemic inflammation and elevated liver enzymes. Mayo Clinic Proceedings. 2022; 97:1326.

Refer a patient to Mayo Clinic.