AI in Biomedical Devices

Inspired by personalized medicine, and as part of the ADAPT in SC group, we are researching the use of AI to train individualized models for biomedical devices. Devices empowered by this research learn to tailor monitoring and treatment to the specific characteristics of an individual.

Training individual models

Classic methods for training AI models use group data. It is cheaper and easier. Collecting small amounts of data from each person reduces individual burden while still providing generalized performance across a population. However, the model is now optimized for the group, not the individual. Training an AI model on individual data requires more effort in data collection because the model must be retrained for every individual. However, the model can be optimized to each individual, usually outperforming the group model in predictive accuracy.
Group data Individual #1 data Individual #2 data

Case study: Detecting eating episodes by tracking wrist motion

In the eating detection project we use motion sensors in a smartwatch to track wrist motion throughout the day. There are 6 toal sensor axes, including 3 accelerometer (X, Y, Z) and 3 gyroscope (yaw, pitch, roll). Data is recorded at 15 Hz. The below demo shows motion data being analyzed during a meal, with moments of intake detected.
Motion sensors Demo of wrist motion during a meal (click to play)

We train neural networks to detect wrist motions associated with eating to identify timespans of those motions (e.g. meals/snacks). The neural network analyzes a sliding 6 minute window of sensor data and identifies the probability of eating P(e), where a higher value indiciates a higher likelihood that the person is eating. Periods of high P(e) can be detected as meals/snacks. The below example shows a day in which the person self-reported 3 meals (green bars), which were all detected by our methods. We also detected 3 false positives (orange bars A, B, C).
Neural network analyzes wrist motion Example detection of periods of eating (green = true positive, orange = false positive)

Data

We have 2 datasets that can be used to train eating detection models. The Clemson all-day dataset (CAD) contains data for 351 people wearing a wrist motion tracker for one day each. The Clemson multiday dataset (CMD) contains data for 9 people, each wearing a wrist motion tracker for 7-21 days. We can use CAD to train a single group model, and CMD to train individual models for each person.

Code

Code for training our models is available here. It uses TensorFlow and is programmed in Python. It includes functions for loading the data, preprocessing, model training, and inferencing for testing. It also includes functions for calculating metrics to evaluate model performance.

Results

The individual models perform better on average because they can learn motion patterns that each individual uses for eating, for example actions that may be associated with utensil and food preferences. More importantly, the indivudal models also learn what motions are NOT associated with eating, in other words what sorts of activities the individual engages in throughout the day. These types of motions are extremely varied across a large group of people, but can be significantly narrower for each individual. This decrease in variability can help reduce false positives.
Weighted accuracy (20:1 to account for class imbalance) vs detection threshold Ts