LLM-Powered Prediction of Hyperglycemia and Discovery of Behavioral Treatment Pathways from Wearables and Diet

This paper introduces GlucoLens, an explainable machine learning system that integrates wearable sensor data, diet, and activity logs to accurately predict postprandial hyperglycemia and recommend personalized behavioral interventions for managing blood glucose levels.

Abdullah Mamun, Asiful Arefeen, Susan B. Racette, Dorothy D. Sears, Corrie M. Whisner, Matthew P. Buman, Hassan Ghasemzadeh

Published 2026-03-10
📖 4 min read☕ Coffee break read

Imagine your body is a high-performance car, and the fuel you put in it is the food you eat. Usually, this car runs smoothly. But sometimes, if you pour in the wrong kind of fuel or don't drive enough, the engine starts to sputter, and the fuel gauge (your blood sugar) spikes dangerously high. This spike is called hyperglycemia, and if it happens often, it's a warning sign that you might be heading toward Type 2 diabetes.

This paper introduces a new "co-pilot" for your car called GlucoLens. It's a smart system designed to predict exactly how your blood sugar will react to your lunch before you even eat it, and then tell you how to fix it if things look bad.

Here is how GlucoLens works, broken down into simple concepts:

1. The Detective Team (The Data)

To make a good prediction, GlucoLens doesn't just guess; it acts like a detective gathering clues from four different sources:

  • The Fuel Gauge (CGM): A wearable sensor that constantly checks your blood sugar.
  • The Odometer (Activity Tracker): A device that counts your steps, tells if you are sitting or standing, and measures how much you move.
  • The Receipt (Food Log): What you actually ate for lunch.
  • The Schedule (Work Log): When you started work, if you worked from home, and how your day is structured.

2. The Brain (The AI Models)

The researchers built a system that combines two types of "brains" to solve the puzzle:

  • The Math Whiz (Machine Learning): This is the core engine. It looks at thousands of data points (like how many calories you ate, how long you sat, and your current blood sugar) and uses math to calculate the likely outcome. In this study, a "Random Forest" model (think of it as a committee of decision trees) was the best at doing the math.
  • The Wise Elder (Large Language Models): They also tried asking advanced AI chatbots (like Claude and GPT) to guess the outcome just by reading the data. While the chatbots were okay, they weren't as accurate as the Math Whiz. However, when the Math Whiz and the Wise Elder worked together, they got even better at spotting patterns.

3. The Crystal Ball (The Prediction)

The main goal is to predict the AUC (Area Under the Curve).

  • The Analogy: Imagine your blood sugar after a meal is a wave. The "AUC" is the total size of that wave. A small wave is healthy; a giant, towering wave is dangerous.
  • GlucoLens looks at your lunch and your morning activity and says, "Based on what you ate and how you moved, here is exactly how big that wave will be in the next three hours."
  • It achieved a very high accuracy, with its predictions being off by only about 12% on average. That's like a weather forecast that gets the temperature right within a few degrees.

4. The "What If" Game (Counterfactual Explanations)

This is the most magical part. GlucoLens doesn't just say, "You will have high blood sugar." It plays a game of "What If?" to show you how to avoid it.

  • The Scenario: The system predicts you will have a sugar spike because you ate a heavy lunch and sat at your desk for 3 hours.
  • The Magic Fix: It then generates a "parallel universe" scenario: "If you had walked for 40 minutes instead of sitting, your blood sugar would have stayed normal." Or, "If you had added a little more fiber to your salad, the spike would have been smaller."

It gives you a menu of small, achievable changes (like standing up more or eating slightly less sugar) that act as a "reset button" for your body's reaction.

Why This Matters

Currently, people often find out they have high blood sugar after they feel sick or after a doctor's visit. GlucoLens flips the script. It acts like a proactive navigator rather than a rearview mirror.

By using data from your watch, your phone, and your food logs, it tells you: "Hey, if you do X, Y, and Z, you can avoid the crash." It turns complex medical data into simple, actionable advice, helping people stay healthy before they ever get sick.

In short: GlucoLens is a smart, wearable-based coach that predicts your blood sugar wave before it happens and gives you a map of small lifestyle tweaks to keep your ride smooth and safe.