Towards diet management with automatic reasoning and persuasive - - PowerPoint PPT Presentation
Towards diet management with automatic reasoning and persuasive - - PowerPoint PPT Presentation
Towards diet management with automatic reasoning and persuasive natural language generation Luca Anselma and Alessandro Mazzei Dipartimento di Informatica, Universit di Torino, Italy Nutrition The diet is an important factor influencing
Nutrition
- The diet is an important factor influencing diseases
- Necessity to encourage the world’s population toward a
healthy diet (FAO)
- Many states specialized general guidelines by adopting
strategies related to their food history
- in the literature systems of Dietary Reference Values
(DRVs) recommended to be followed for significant amounts of time
- In a diet it is necessary to consider parameters such as
the total energy requirements and the specific required amount of nutrients and macronutrients such as proteins, carbohydrates and lipids
An example
- John, a 40-year-old male who is 1.80 m tall and weighs 71.3 kg
has an estimated basal metabolic rate of 1690 kcal/day (Schofield equation)
- Taking into account his physical activity (e.g., a sedentary
lifestyle) he has a total energy requirement of 2450 kcal/day
- Moreover, it is recommended that such energy intake is
provided by:
- 260 kcal/day of proteins,
- 735 kcal/day of lipids and
- 1455 kcal/day of carbohydrates
- In this section we focus on the total energy requirement; the
macronutrients can be dealt with separately in the same way
- The main factors to be accounted for are
- 1. the diet that the user intends to follow,
- 2. the food that s/he has eaten in the last days, and
- 3. the nutritional values of the dishes and their specific
recipes
- Often a user is not able to carefully follow a diet for a
number of reasons
- Important to support the user in devising the
consequences and to dynamically adapt the rest of the so that the global Dietary Reference Values could nevertheless be reached
The problem
User model (sex, age, weight, lifestyle) Diet described as:
- total energy intake
(kcal)
- carbohydrates (kcal)
- proteins (kcal)
- lipids (kcal)
for a significant amount
- f time
In the everyday activity there may be deviations from the ideal diet What are the consequences of such deviations on the diet for the rest of the week?
The MADiMAN project
Artificial Intelligence for diet management
- NLP for recipe analysis
- Automate Reasoning about diet and recipes
- Persuasive multimedia NLGeneration
Collaboration with hospital dietitians (“Molinette” hospital of Torino, third largest hospital in Italy)
System architecture
2. D i etM anager Servi ce 3. N LU /I E Servi ce 4. R easoner Servi ce 5. N LG Servi ce
- 1. APP
R eci pe
D B users D B reci pes
The MADiMAN project
- The system we propose is useful for
a) evaluating the compatibility of a dish with a diet
allowing small and occasional episodes of diet disobedience,
b) determining what are the consequences of eating a
specific dish on the rest of the diet,
c) showing such consequences to the user thus
empowering her/him and, moreover,
d) motivating the user in following the diet by persuading
her/him to minimize the acts of disobedience.
The MADiMAN project
- The system could be commercially attractive at least in:
- medical context, where users (e.g. patients affected by
essential obesity) are strongly motivated to strictly follow a diet and need tools that help them
- (healthy) restaurant-chains context, where the effort of
deploying the system can be rewarded by an increase in customer retention.
The MADiMAN project
Artificial Intelligence for diet management
- NLP for recipe analysis
- Automate Reasoning about diet and
recipes
- Persuasive multimedia NLGeneration
Cloud Architecture
Architecture of the system
2. D i etM anager Servi ce 3. N LU /I E Servi ce 4. R easoner Servi ce 5. N LG Servi ce
- 1. APP
R eci pe
D B users D B reci pes
STP
- Simple Temporal Problem [Dechter et al. 91]
- Conjunction of bounds on differences (STP constraints)
Represents the conjunction of bounds on differences: minA ≤ End(A) – Start(A) ≤ maxA
…
minZ ≤ End(S) – Start(A) ≤ maxZ
STP
- The constraint propagation is performed by Floyd-Warshall's
all-pairs shortest paths, O(n3)
- It checks the consistency and also gives the minimal network,
i.e., the equivalent network with the strictest implied constraints
Represents min'A ≤ End(A) – Start(A) ≤ max'A
…
min'Z ≤ End(S) – Start(A) ≤ max'Z
Reasoning about diet
- We adopt STP and represent Dietary Reference Values
as STP constraints and energy (kcal) instead of time
- Example: John’s total energy intake must be 2450
kcal/day for a week
Reasoning about diet
Sunday Monday [2205,2695] [2205,2695] Tuesday Wednesday Thursday Friday Saturday [2205,2695] [2205,2695] [2205,2695] [2205,2695] [2450·7,2450·7] [0,0] [0,0] [0,0] [0,0] [0,0] [0,0] [2205,2695]
- To allow users to make small deviations attaining at the
same time to the diet:
- Over the longest periods of time (e.g., weeks) we
impose the “ideal” values
- Over the shortest periods (e.g., meals or days) we
allow some deviations
- For example, as long as the final weekly goal is
reachable, John is allowed to deviate from the value of ±10% a day
(for the sake of conciseness only days and not meals are represented here)
Reasoning about diet
- Let us assume that John ate 2690 kcal on Sunday,
Monday and Tuesday
- We add to the STP such new information and propagate
the constraints
Sunday Monday [2205,2695] [2205,2695] Tuesday Wednesday Thursday Friday Saturday [2205,2695] [2205,2695] [2205,2695] [2205,2695] [2450·7,2450·7] [0,0] [0,0] [0,0] [0,0] [0,0] [0,0] [2205,2695] Sunday Monday [2690,2690] [2690,2690] Tuesday Wednesday Thursday Friday Saturday [2690,2690] [2205,2465] [2205,2465] [2205,2465] [0,0] [0,0] [0,0] [0,0] [0,0] [0,0] [2205,2465] [2270·4,2270·4]
Sunday Monday [2690,2690] [2690,2690] Tuesday Wednesday Thursday Friday Saturday [2690,2690] [2205,2695] [2205,2695] [2205,2695] [2450·7,2450·7] [0,0] [0,0] [0,0] [0,0] [0,0] [0,0] [2205,2695]
John ate 2690 kcal on Sunday, Monday and Tuesday Constraint propagation
Reasoning about diet
- Thus, John has to eat 2270 kcal/day for the rest of the
week
- For reaching such a goal he can assume between 2205
and 2465 kcal/day
Sunday Monday [2690,2690] [2690,2690] Tuesday Wednesday Thursday Friday Saturday [2690,2690] [2205,2465] [2205,2465] [2205,2465] [0,0] [0,0] [0,0] [0,0] [0,0] [0,0] [2205,2465] [2270·4,2270·4]
Generating messages for the user
- STP results must be interpreted to present to
the user a meaningful feedback
- When the user proposes a meal, we classify
its macronutrients on the basis of the minimal network of the STP in two inconsistent cases:
- I.1: permanently inconsistent (i.e.,
inconsistent with the diet)
- I.2: occasionally inconsistent (i.e., ideally
consistent with the diet but inconsistent with the food already eaten) …
constraint from the minimal network
Generating messages for the user
min t2 t1 mean t1 t2 max
perfectly) balanced perfectly) balanced well) balanced well) balanced not)balanced not)balanced
IPER IPO
C.1 C.2 C.3 C.1 C.2 C.3
…and three consistent cases using thresholds:
- C.1: consistent and not balanced
(IPO/IPER),
- C.2: consistent and well-
balanced (IPO/IPER) and
- C.3: consistent and perfectly
balanced IPO/IPER indicate a lack/excess of a macronutrient
Generating messages for the user
C D Message Template Translation I.1 IPO Questo piatto non va affatto bene, contiene davvero pochissime proteine! This dish is not good at all, it’s too poor in proteins! I.2 IPO Ora non puoi mangiare questo piatto perch´ e ` e poco proteico. Ma se domenica mangi un bel piatto di fagioli allora luned` ı potrai mangiarlo. You cannot have this dish now because it doesn’t provide enough proteins, but if you eat a nice dish of beans on Sunday, you can have it on Monday. C.1 IPO Va bene mangiare le patatine ma nei prossimi giorni dovrai mangiare pi` u proteine. It’s OK to eat chips but in the next days you’ll have to eat more proteins. C.2 IPO Questo piatto va bene, ` e solo un po’ scarso di proteine. Nei prossimi giorni anche fagioli per`
- ! :)
This dish is OK, but it’s a bit poor in proteins. In the next days you’ll need beans too! :) C.3
- Ottima scelta! Questo piatto `
e perfetto per la tua dieta :) Great choice! This dish is perfect for your diet :)
On the basis of the five cases, we generate a natural language message using a template-based NLG Notice that we use adverbs as little bit (poco), really (davvero) and emoticons to increase the communicative strength
Related works
- Both academic studies (e.g., [Balintfy 1964, Iizuka et al.
2012]) and commercial apps related to nutrition (e.g. DailyBurn, Lose It!, MyNetDiary, A low GI Diet, Weight- Watchers)
- Our dietary system presents two elements of novelty:
1) the use of automatic reasoning as a tool
a.
for verifying the compatibility of a specific recipe with a specific diet and for
b.
for determining the consequences of the choice of a specific dish and
2) the use of NLG techniques to produce the answer
Related works
- Operational Research techniques based on the simplex
method for solving linear programming problems to tackle the problem of planning a diet [Lancaster 1992] [Bas 2014]). However they are meant to plan an entire diet and they do not support the user in choosing a dish and in investigating the consequences of her/his choice
- [Buisson 2008] employed fuzzy arithmetic to represent
imprecision/uncertainty in quantity and composition of food and heuristic search for suggesting to the user some actions to balance the meal (e.g. removing/adding food). However, they did not consider the problem of globally balancing the meals.
Future works
- Improve the NLG module for tailoring (e.g., build a corpus
- f sentences that a professional dietician would use to
persuade users towards correct dish choices, classify the users to personalize the messages on the basis, for instance, of the age)
Future works
- Experiment with the system in two settings:
- 1. Design a simulation that includes a) a database of
real recipes, b) a user model that allows to test the persuasion efficacy and c) a baseline built rigidly sticking to DRVs
Diet Recipe HistoryDB Dishes Diet History Diet
User Model
Proteins Lipids Carbohydrates
AND
Suggestion
BehaviourSimulation Manager
NLG
Statistics
Future works
- Early simulations involved meals
- f Molinette hospital
- Molinette has several two-week
menus (one ordinary, the other for special needs (e.g., without gluten, low in sodium etc))
- At each meal the patient can
choose among several alternatives for the first course, the second course, side dishes
- Molinette also provided a recipe
database
- The menu resulted high in proteins; this observation has
been confirmed by the hospital dieticians
Future works
- Experiment with the system in two settings:
…
- 2. Test the system with a focus group in a clinical
setting, in particular with patients affected by essential
- besity. In this setting we imagine that the system