Diagnosing celiac disease isn’t always straightforward. Even trained pathologists, medical doctors who examine tissue under a microscope, don’t always agree when reviewing biopsies for signs of this chronic autoimmune condition.

The diagnosis of celiac disease is achieved through interpreting several data points that include patient symptoms, serological blood tests, small intestinal biopsies, and sometimes genetic tests. The duodenal biopsy in untreated celiac disease typically shows changes easily recognized by pathologists, medical doctors who examine tissue under a microscope. However, these biopsy changes are not specific for celiac disease, being present in other conditions. Therefore, correlation of biopsy findings with serological blood tests and other data points is essential to arrive at the correct diagnosis.

Artificial intelligence (AI) is beginning to be tested in the field of pathology. A new study published in NEJM AI showed success in training a computer to recognize the typical changes of celiac disease in biopsies, and was able to distinguish active celiac disease biopsies from normal tissue.

Small intestine biopsies in celiac disease show damage to the villi and increased inflammation. Pathologists generally agree well when changes are present that suggest celiac disease should be considered, but sometimes the changes can be patchy, making the diagnosis challenging. This and other technical challenges, such as biopsy orientation in the lab can lead to interobserver disagreement on grading the degree of injury present.

In this new study, researchers from the University of Cambridge and partners across the UK developed a machine learning model, essentially a computer program trained to recognize patterns in medical images that can diagnose celiac disease from biopsy slides. They trained the AI on over 3,000 real-world biopsy images from four different hospitals, using diverse equipment and staining techniques to make the model as robust as possible.

When tested on new, previously unseen samples from another hospital, the AI model performed with over 95% accuracy, on par with expert human pathologists. In fact, the agreement between the model and individual pathologists was just as strong as the agreement among the pathologists themselves. This means that the AI didn’t just get it right — it got it right in a way that was consistent with expert medical opinion.

Already being applied in other areas of medicine, AI is an exciting developing area in pathology. However, according to celiac disease pathology expert Dr. Marie Robert from Yale University School of Medicine, this excitement should be “tempered with the fact that bringing AI from research to clinical care is a painstaking and expensive process, and one that involves FDA approval. That said, AI shows great promise as a support tool in the future and will eventually help pathologists make faster and better diagnoses.”