[Paper Review] Completing partial recipes using item-based collaborative filtering to recommend ingredients
This paper proposes an item-based collaborative filtering approach to recommend missing ingredients for partial recipes using a sparse, high-dimensional recipe dataset with implicit feedback. By applying PMI similarity and PCA-based dimensionality reduction, the method achieves a recall@10 of 40.25%, demonstrating effective and intuitive ingredient recommendations despite data sparsity and lack of explicit ratings.
Increased public interest in healthy lifestyles has motivated the study of algorithms that encourage people to follow a healthy diet. Applying collaborative filtering to build recommendation systems in domains where only implicit feedback is available is also a rapidly growing research area. In this report we combine these two trends by developing a recommendation system to suggest ingredients that can be added to a partial recipe. We implement the item-based collaborative filtering algorithm using a high-dimensional, sparse dataset of recipes, which inherently contains only implicit feedback. We explore the effect of different similarity measures and dimensionality reduction on the quality of the recommendations, and find that our best method achieves a recall@10 of circa 40%.
Motivation & Objective
- To develop a recommendation system that suggests ingredients to complete partial recipes using only implicit feedback from recipe-ingredient co-occurrence.
- To evaluate the impact of different similarity measures and dimensionality reduction on recommendation quality in a sparse, high-dimensional dataset.
- To address the challenge of implicit feedback, where absence of an ingredient does not imply dislike, by selecting appropriate similarity metrics.
- To improve scalability and robustness of the model through PCA-based dimensionality reduction while maintaining high-quality recommendations.
- To compare the performance of the proposed method with existing matrix factorization approaches on a similar task.
Proposed method
- The method treats each recipe as a 'user' and each ingredient as an 'item', converting the dataset into a binary rating matrix where 1 indicates ingredient presence and 0 indicates absence.
- Item-based collaborative filtering is applied using four similarity measures: cosine, asymmetric cosine, Jaccard, and Pointwise Mutual Information (PMI), to identify ingredients frequently co-occurring with those in a partial recipe.
- The model uses k-nearest neighbors (k=50) to generate recommendations based on the most similar ingredients, with k tuned for robustness.
- Dimensionality reduction via Principal Component Analysis (PCA) is applied to the ingredient space to reduce sparsity and improve computational efficiency and stability.
- The performance is evaluated using recall@10, mean rank, and median rank to assess both precision and ranking quality of recommendations.
- The model is trained and tested on the 'What's Cooking?' Kaggle dataset containing 39,774 recipes and 6,782 distinct ingredients, with preprocessing to resolve duplicate ingredient variants.
Experimental results
Research questions
- RQ1How do different similarity measures—cosine, asymmetric cosine, Jaccard, and PMI—affect the quality of ingredient recommendations in a sparse, implicit feedback setting?
- RQ2To what extent does dimensionality reduction via PCA improve the robustness and performance of item-based collaborative filtering in high-dimensional, sparse recipe data?
- RQ3Can item-based collaborative filtering produce intuitive and contextually relevant ingredient recommendations even without explicit user ratings or cuisine metadata?
- RQ4How does the choice of k (number of neighbors) influence the stability and quality of recommendations across different similarity measures?
- RQ5How does the proposed method compare in performance to existing matrix factorization-based approaches like NNMF and RLS on the same task and dataset?
Key findings
- The best-performing method, using PMI similarity with k=50 and PCA-reduced data, achieved a recall@10 of 40.25%, which is the highest among all evaluated similarity measures.
- Asymmetric cosine and PMI similarity outperformed standard cosine and Jaccard in both recall@10 and median rank, indicating better handling of sparse, binary data.
- PCA-based dimensionality reduction improved recommendation quality, reduced runtime by a factor of 10, and made results more robust to changes in k and similarity measure.
- The model produced intuitive and cuisine-aware recommendations, such as suggesting salsa and corn for Mexican-style ingredients, even without explicit cuisine information.
- Despite the lack of explicit feedback and data quality issues like duplicate ingredients (e.g., 'tortilla' and 'corn tortilla'), the model generated plausible and contextually relevant suggestions.
- The performance gap between the proposed method and De Clercq et al.'s NNMF approach (43.6% recall@10) is attributed to dataset cleanliness, suggesting that data preprocessing could close or reverse this gap.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.