Abstract
Food recommendation has become an important means to help guide users to adopt healthy dietary habits. Previous works on food recommendation either i) fail to consider users' explicit requirements, ii) ignore crucial health factors (e.g., allergies and nutrition needs), or iii) do not utilize the rich food knowledge for recommending healthy recipes. To address these limitations, we propose a novel problem formulation for food recommendation, modeling this task as constrained question answering over a large-scale food knowledge base/graph (KBQA). Besides the requirements from the user query, personalized requirements from the user's dietary preferences and health guidelines are handled in a unified way as additional constraints to the QA system. To validate this idea, we create a QA style dataset for personalized food recommendation based on a large-scale food knowledge graph and health guidelines. Furthermore, we propose a KBQA-based personalized food recommendation framework which is equipped with novel techniques for handling negations and numerical comparisons in the queries. Experimental results on the benchmark show that our approach significantly outperforms non-personalized counterparts (average 59.7% absolute improvement across various evaluation metrics), and is able to recommend more relevant and healthier recipes.
Introduction: Beyond Simple Similarity
Most contemporary food recommendation systems operate as "black boxes," utilizing matrix completion to suggest recipes based on past behavior (e.g., "if you liked pizza, you might like lasagna"). However, food choices are high-stakes and multifaceted. A truly effective recommendation must balance three often-conflicting pillars: explicit user intent (e.g., "I want a breakfast dish with bread"), personal preferences (e.g., "I hate onions"), and strict health constraints (e.g., "I have type 2 diabetes and need low-carb options").
Traditional systems struggle to integrate these factors, often ignoring explicit queries or failing to account for critical health factors like allergies. This research addresses these gaps by reframing recommendation as a constrained Question Answering (QA) task over a massive Knowledge Graph (KG). By moving from "matching" to "reasoning," the system can provide hard guarantees that a recipe satisfies all user constraints.
Methodology: The pFoodReQ Framework
The authors introduce pFoodReQ (pronounced "FoodRec"), a framework that treats personalization as a set of additional constraints appended to a natural language query. The architecture consists of three core innovations:
- Query Expansion (QE): This component automatically appends the user's "persona" (e.g., "does not have peanuts, contains 5g-30g carbs") to the raw query.
- KG Augmentation (KA): Recognizing that neural networks often struggle with numerical logic, the system performs symbolic comparisons on the KG before the neural model processes it, tagging nodes that meet specific health guidelines.
- Constraint Modeling (CM): To prevent the model from confusing "contains X" with "does not contain X," the authors use a specialized embedding-based markup to explicitly signal positive constraints, negative constraints (negations), and padding.
Datasets and Experimental Results
The study utilized FoodKG, a large-scale knowledge graph containing over 1 million recipes, ingredients, and nutritional data points. To evaluate the system, the authors created a Personalized KBQA Benchmark by analyzing ~200 Reddit submissions from health-focused communities (e.g., r/diabetes), resulting in 4,621 training and 2,269 test instances that incorporate American Diabetes Association (ADA) lifestyle guidelines.
Key results include:
- Performance Gains: pFoodReQ achieved a 62.7% MAP (Mean Average Precision), representing a 59.7% absolute improvement over non-personalized KBQA baselines.
- Human Validation: In a blind study, human evaluators rated pFoodReQ's recommendations significantly higher (7.76/10) than the state-of-the-art BAMnet baseline (3.82/10).
- Hybrid Reasoning: The success of the system stems from combining symbolic reasoning (for numbers and logic) with neural embeddings (for semantic similarity).
Conclusion and Future Work
By treating recommendation as a matter of satisfiability rather than just similarity, pFoodReQ offers a robust path toward health-conscious AI assistants. While the current system relies on template-based questions, future work will focus on automatically mining user preferences from natural language food logs and improving multi-hop reasoning across the Knowledge Graph to handle even more complex dietary inquiries.
Summary updated