Abstract
Next-basket recommendation (NBR) is a recommendation task that predicts a basket or a set of items a user is likely to adopt next based on his/her history of basket adoption sequences. It enables a wide range of novel applications and services from predicting next basket of items for grocery shopping to recommending food items a user is likely to consume together in the next meal. Even though much progress has been made in the algorithmic NBR research over the years, little research has been done to broaden knowledge about the evaluation of NBR methods, which largely based on the offline evaluation experiments and binary relevance paradigm. Specifically, we argue that recommended baskets which are more similar to ground-truth baskets are better recommendations than those that share little resemblance to the ground truth, and therefore they should be granted some partial credits. Based on this notion of non-binary relevance assessment, we propose new evaluation metrics for NBR by adapting and extending similarity metrics from natural language processing (NLP) and text classification research. To validate the proposed metrics, we conducted two user studies on the next-meal food recommendation using numerous state-of-the-art NBR methods in both online and offline evaluation settings. Our findings show that the the offline performance assessment based on the proposed non-binary evaluation metrics is more representative of the online evaluation performance than that of the standard evaluation metrics.
Introduction: Moving Beyond Binary Relevance
In the domain of Next-basket Recommendation (NBR), systems aim to predict the subsequent set of items a user will select, such as a grocery list or the components of a meal. Historically, these systems have been evaluated using a binary relevance paradigm: an item is either an exact match to the ground truth (success) or it is not (failure). This "all-or-nothing" approach, however, fails to capture the nuance of real-world user preferences.
The core argument of this research is that not all rejected items are equally poor. For instance, if a user consumes a chicken sandwich, a recommendation for a turkey sandwich is qualitatively "better" than a recommendation for a slice of pizza, even if neither is an exact match. Standard metrics like Precision and Recall do not distinguish between these scenarios, potentially misguiding the optimization of recommendation algorithms.
Proposed Non-binary Evaluation Metrics
To address the limitations of binary evaluation, we propose a suite of non-binary metrics that grant "partial credit" based on item similarity. These metrics are categorized into three primary groups:
- Content-based Metrics: Leveraging Natural Language Processing (NLP), we adapted metrics such as BLEU, ROUGE, and BERTScore to quantify the similarity between item names and textual descriptions.
- Hierarchical Metrics (hMatch): These utilize structured taxonomies (e.g., Staple → Wheat → Bread). Similarity is calculated based on the depth of the shared path within the categorical hierarchy.
- Hybrid Metrics: These combine the strengths of both approaches, for example, using BERTScore to evaluate the similarity between categorical tags themselves.
To aggregate these scores for an entire basket, we employ the Best Matching Principle. For each item in a recommended basket, the system identifies the most similar item in the ground-truth basket and uses that similarity score to compute the final metric for the recommendation.
Experimental Setup and Datasets
The proposed metrics were validated using the MyFitnessPal (MFP) public food diary dataset. This dataset comprises approximately 587,000 food diaries from 9,900 users. Its richness—including both detailed textual descriptions and a deep hierarchy of 1,263 third-level categorical tags—makes it an ideal testbed for both content-based and hierarchical similarity measures.
Validation and Key Results
The efficacy of these metrics was tested through two user studies involving real-world food logging and Amazon Mechanical Turk (AMT) workers.
Correlation with Human Preference
A critical finding was that users are remarkably forgiving of "incorrect" recommendations. In our online study, 65% of items that did not exactly match the ground truth were still rated as "likely" or "very likely" to be adopted. This confirms that binary metrics are overly punitive.
Furthermore, non-binary metrics showed a significantly higher correlation with actual human preferences. Specifically, BERTScore ($P_{BERT}$) achieved a Pearson correlation of $\rho = 0.5129$, markedly outperforming standard Precision ($\rho = 0.4438$). While hierarchical metrics (hMatch) aligned well with objective similarity judgments, embedding-based metrics like BERTScore were better predictors of subjective preference.
Consistency and Discriminative Power
When ranking various recommendation algorithms (such as Personal Popularity vs. SASRec), the rankings produced by non-binary metrics were more consistent with online user performance than those produced by binary metrics. Additionally, non-binary metrics were far more effective at identifying low-quality baskets. Standard Precision exhibited a high False Positive Rate (0.354) for the least-preferred baskets, whereas $P_{BERT}$ was much more discriminative (0.163).
Conclusion and Future Directions
This research demonstrates that non-binary evaluation metrics provide a more accurate and human-centric assessment of next-basket recommendations. By accounting for partial matches, researchers can better align offline optimization with online user satisfaction.
While these metrics require rich metadata, future work could involve developing domain-specific models (e.g., a "Food-BERT") to further refine similarity scoring. Additionally, exploring item complementarity—how well items within a basket pair together—remains a promising avenue for enhancing the evaluation of complex recommendation tasks.
Summary updated