AI analysis of CGM device data may detect early CF diabetes

AI spots condition in CF patients who test negative with standard measures

Written by Steve Bryson, PhD |

A doctor and a robot have a conversation.

Data from continuous glucose monitoring (CGM) devices, which track blood sugar levels in real time, can reveal early signs of diabetes in people with cystic fibrosis (CF), even among those who test negative for diabetes using standard tools.

That’s according to a study using machine learning, a type of artificial intelligence (AI) that uses algorithms to detect patterns in large CGM datasets.

“This study demonstrates the utility of combining CGM with machine learning methods to characterize the glycemic [profile] across the spectrum of CF,” the team wrote.

The study, “Machine learning analysis of continuous glucose monitoring identifies a novel dysglycemic phenotype found in most people with cystic fibrosis,” was published in the Journal of Cystic Fibrosis.

One of the most common CF complications is CF-related diabetes (CFRD), which occurs when blood glucose levels are too high. CFRD is associated with declines in lung function, more frequent flare-ups of lung symptoms, weight loss, and lower survival rates.

Recommended Reading
banner for Lara Govendo's column

The benefits of therapy in life with chronic illness

Using machine learning to interpret CGM numbers

The recommended test for detecting CFRD is the oral glucose tolerance test (OGTT), which measures blood glucose after drinking a glucose solution. Guidelines suggest that people with CF undergo the test every year starting at age 10.

CGM, which provides detailed, real-time glucose readings, has been used in CF care to detect early glucose abnormalities before CFRD fully develops. In fact, studies suggest that CGM can reveal glucose dysregulation (dysglycemia) even in CF patients with normal OGTT results.

The researchers sought to determine whether machine learning could detect early glucose dysregulation in CGM data.

The study involved 82 people with CF, ages 6-78, with CGM data. Ten of them had CFRD. Based on their OGTT results, the remaining participants were divided into two groups: 44 with normal glucose tolerance and 28 with impaired glucose tolerance, meaning blood sugar is higher than normal but not yet at diabetes levels. For comparison, the study also drew on existing datasets of healthy individuals and those with type 1 diabetes.

When the researchers examined CGM data throughout each day, consistent patterns emerged. In patients with normal or impaired glucose tolerance, more than 92% of blood glucose spikes exceeded 200 mg/dL. In those with CFRD, 100% of peaks exceeded this threshold, compared with 14.5% in healthy individuals. Similar daily patterns were observed for the amount of time spent above 140 mg/dL.

The team first confirmed that the machine learning model could reliably distinguish CFRD from healthy controls, achieving an area under the curve — a measure reflecting a test’s ability to discriminate between people with or without a disease — of 0.993 (a perfect score is 1).

They then applied UMAP, a mathematical method that arranges data points based on similarity, to data from the CFRD and healthy control groups. Data points from healthy controls and CFRD patients formed two distinct clusters.

To measure how closely each participant’s blood glucose pattern aligned with either cluster, the researchers calculated a silhouette score. Positive silhouette scores indicate alignment with the healthy cluster, while negative scores indicate alignment with the CFRD cluster. As expected, healthy controls had the highest mean score (0.35) and people with CFRD had the lowest (-0.76).

The analysis was first restricted to participants with simultaneous OGTT and CGM results. The mean silhouette scores were -0.61 for CF patients with normal OGTT results and -0.54 for those with impaired glucose tolerance, showing no significant difference between the two groups.

“These groups display a greater range and variability compared to [healthy controls], suggesting a spectrum of glycemic abnormality severity,” the team noted.

When all CGM recordings within one year of the OGTT were included, the silhouette scores for CF patients, with or without glucose intolerance, remained consistently negative regardless of the time elapsed between the tests. And when scores were tracked across consecutive 24-hour CGM segments within individual recording periods, they remained relatively stable for each person.

“Applying machine learning analysis to CGM data revealed that nearly all [CF patients], including those classified as [normal glucose tolerance] by the standard two-point OGTT, exhibit significant dysglycemia,” the researchers wrote. “CGM based digital [characterization] therefore offers a more sensitive and continuous measure of metabolic dysfunction in CF.”