Most patients with type 2 diabetes are sedentary despite the clear benefit of regular physical activity, including better glucose control and improvement in quality of life (1). Smartphones could potentially improve patient care by continual communication with patients and sensors that quantify patient behavior (2). Nevertheless, the use of personalized messages that take into account the actual behavior of patients and learn to reinforce it has not yet been reported.

We provided a total of 27 patients with type 2 diabetes who did not perform regular physical activity prior to recruitment with a pedometer installed on their personal smartphones and a personal plan for physical activity. Patients were randomized into a control group (n = 7) and a treatment group (n = 20), and received text messages (via the Short Message Service [SMS] on the smartphone) one to seven times a week to encourage physical activity. In the treatment group, the messages consisted of positive feedback (with and without a social component) and negative feedback. Messages to patients in the treatment group were initially selected through nonchanging expert-generated rules (“initial policy”) and later were personalized through an automatic Reinforcement Learning (3) algorithm (“personalized policy”), which learns to optimize messages to improve each participant's compliance with the activity regimen. Patients in the control group received constant weekly reminders to exercise (“control”). Follow-up HbA1c tests were performed every 3 months. Physicians were blinded to the randomization.

Participants who received messages tailored by the personalized policy increased the amount of activity (e.g., walking) and pace of walking over time (as seen in the positive slopes of the graphs of these variables), while the control group patients did not (Table 1). Allocation to the personalized policy, higher initial HbA1c level, and lower activity targets led to a superior reduction in HbA1c levels (R2 = 0.405, P < 0.0001). In a questionnaire, patients in the treatment group reported that the messages helped them to increase (P = 0.01) and to maintain (P = 0.07) physical activity, while control patients reported that messages were ineffective.

Table 1

Rates of improvement in physical activity performed and in the rate of walking


Control(n = 7)
Treatment(n = 20)P value (control vs. personalized)a
InitialPersonalized
Demographics      
 Female sex 0.36 
 Age, yearsb 55.1 ± 3.6 58.7 ± 2.1 0.56 
 Initial HbA1c, % (mmol/mol) 8.7 (72) 7.7 (61) 1.00 
Outcomesc     
 Slope of the change in activity, min of walking/day over time −0.004 (0.002) −0.001 (0.008) +0.012 (0.002) 2 × 10−5 
 Slope of the rate of walking, Hz/day over time −0.010 (0.007) −0.009 (0.005) +0.002 (0.005) 0.04 

Control(n = 7)
Treatment(n = 20)P value (control vs. personalized)a
InitialPersonalized
Demographics      
 Female sex 0.36 
 Age, yearsb 55.1 ± 3.6 58.7 ± 2.1 0.56 
 Initial HbA1c, % (mmol/mol) 8.7 (72) 7.7 (61) 1.00 
Outcomesc     
 Slope of the change in activity, min of walking/day over time −0.004 (0.002) −0.001 (0.008) +0.012 (0.002) 2 × 10−5 
 Slope of the rate of walking, Hz/day over time −0.010 (0.007) −0.009 (0.005) +0.002 (0.005) 0.04 

Initial policy refers to a rule-based policy for sending messages. Personalized policy refers to messages that were optimized using the learning algorithm to maximize individual activity. The slope of change in activity is measured by a linear fit to the plotted amount of daily exercise over time. The slope of the rate of walking is the change in the number of steps per minute during walking over time.

aThe P value was calculated by t test.

bValues are reported as mean ± SEM.

cValues in parentheses are the SEM.

The learning algorithm improved gradually in predicting which messages would lead participants to exercise. On average, the best daily message was a positive-feedback message with a social component (average improvement of 8.8% in activity in the day following such a message), and the best consecutive messages were a positive social message after a negative-feedback message (42.7% improvement). The least effective message was a positive-feedback message without social reference (9.9% reduction), and the least effective consecutive messages were a negative-feedback message after a positive social message (−61.4%). We also clustered participants by their response to the different types of messages and found that patients can be divided into the following three groups: one that reacted negatively to any message, one that only reacted positively to the positive–with social component message, and a third where patients reacted positively to all messages, especially a positive social message or positive self-message. This demonstrates the importance of individually tailored feedback as delivered by our algorithm.

These results suggest that a mobile phone application with a learning algorithm can improve adherence to exercise in patients with diabetes. Because a personalized learning algorithm is automated, it can be used in large populations to improve health and glycemic control.

Clinical trial reg. no. NCT02612402, clinicaltrials.gov.

Acknowledgments. The authors thank all the participants for generously helping them in this study.

Duality of Interest. All authors have completed the Unified Competing Interest form. All authors performed this study as part of their salaried employment within their respective institutions. The authors have no financial relationships with any organizations that might have an interest in the submitted work in the previous 3 years and no other relationships or activities that could appear to have influenced the submitted work. No potential conflicts of interest relevant to this article were reported.

Author Contributions. I.H. conceived the idea, designed the study, obtained institutional review board approval, recruited the patients, collected data, and wrote the manuscript. G.F. collected and analyzed the medical data. M.K. designed and built the app. S.M. helped to design the study and the algorithm, and designed and built the app. M.T. helped to design the study and the algorithm. E.Y.-T. developed the idea, designed and implemented the study, analyzed the results, and wrote the manuscript. I.H. is the guarantor of this work and, as such, had full access to all the data in the study and takes responsibility for the integrity of the data and the accuracy of the data analysis.

1.
Pronk
NP
,
Remington
PL
;
Community Preventive Services Task Force
.
Combined diet and physical activity promotion programs for prevention of diabetes: Community Preventive Services Task Force recommendation statement
.
Ann Intern Med
2015
;
163
:
465
468
[PubMed]
2.
de Jongh
T
,
Gurol-Urganci
I
,
Vodopivec-Jamsek
V
,
Car
J
,
Atun
R
.
Mobile phone messaging for facilitating self-management of long-term illnesses
.
Cochrane Database Syst Rev
2012
;
12
:
CD007459
[PubMed]
3.
Gatti
C
.
Reinforcement learning
. In
Design of Experiments for Reinforcement Learning
.
New York
,
Springer
,
2014
, p.
7
52