Source-linked AI summary
Modeling Personalized Item Frequency Information for Next-basket Recommendation
Haoji Hu, Xiangnan He, Jinyang Gao, Zhi-Li Zhang
TL;DR
Existing RNNs do not directly capture personalized item frequency, which the paper identifies as carrying two useful signals for next-basket recommendation. It proposes a kNN method to use those patterns and reports that it generally outperforms state-of-the-art deep learning methods.
Problem
Existing RNNs cannot directly capture item-frequency information, limiting the use of personalized item frequency patterns in next-basket recommendation.
Source: §1 · pp. 1–2Method
The paper proposes a kNN method that directly captures two PIF patterns and considers temporal dynamics.
Source: §1 · p. 2Results
The proposed method generally outperforms state-of-the-art deep learning methods.
Source: §6 · p. 9Takeaways & Limitations
The paper argues that RNNs' strong representation power does not guarantee solutions that capture expected vector addition under non-convex optimization.
Source: §6 · p. 9More theoretical analysis of RNNs' difficulty is needed, along with an optimizer with a theoretical guarantee of finding a global optimum.
Source: §6 · p. 9
Abstract
from arXiv · showhide
Next-basket recommendation (NBR) is prevalent in e-commerce and retail industry. In this scenario, a user purchases a set of items (a basket) at a time. NBR performs sequential modeling and recommendation based on a sequence of baskets. NBR is in general more complex than the widely studied sequential (session-based) recommendation which recommends the next item based on a sequence of items. Recurrent neural network (RNN) has proved to be very effective for sequential modeling and thus been adapted for NBR. However, we argue that existing RNNs cannot directly capture item frequency information in the recommendation scenario. Through careful analysis of real-world datasets, we find that {\em personalized item frequency} (PIF) information (which records the number of times that each item is purchased by a user) provides two critical signals for NBR. But, this has been largely ignored by existing methods. Even though existing methods such as RNN based methods have strong representation ability, our empirical results show that they fail to learn and capture PIF. As a result, existing methods cannot fully exploit the critical signals contained in PIF. Given this inherent limitation of RNNs, we propose a simple item frequency based k-nearest neighbors (kNN) method to directly utilize these critical signals. We evaluate our method on four public real-world datasets. Despite its relative simplicity, our method frequently outperforms the state-of-the-art NBR methods -- including deep learning based methods using RNNs -- when patterns associated with PIF play an important role in the data.
1 INTRODUCTION
Next-basket recommendation models sequences of purchased baskets, a setting that differs from item-sequence recommendation and cannot be handled by flattening baskets without inventing within-basket order. The paper argues that personalized item frequency contains useful purchase patterns that existing RNNs do not directly capture, and proposes a kNN method to use them.
1 INTRODUCTION
- NBR recommends items from a user's sequence of purchased baskets [45][44][46], unlike top-n recommendation and item-sequence recommendation.Flattening baskets into item sequences introduces an order among items within a basket that does not exist [p04].Source: §1 · p. 1
- Existing RNNs are a mainstream choice for sequential modeling, but cannot directly capture item-frequency information in recommendation.Modeling the relation between historical records and the recommended items is a central NBR challenge.Source: §1 · p. 1
- PIF contains more than repeated-purchase patterns: similar users may also purchase an item that the target user repeatedly buys.The paper reports that existing methods do not fully use this collaborative purchase information.Source: §1 · pp. 1–2
- The paper proposes a kNN method that directly captures both PIF patterns, considers temporal dynamics, analyzes RNNs' difficulty learning vector addition, and evaluates on four real-world datasets.These are among the paper's stated contributions.Source: §1 · p. 2
2 PRELIMINARIES
This section defines next-basket recommendation and examines how personalized item frequency (PIF) relates to target baskets. It reviews existing methods and analyzes why RNNs may represent item-frequency signals yet fail to learn them in practice.
2.1 Problem Definition
- Next-basket recommendation predicts a fixed-size set of items from a user's sequence of historical baskets.Each basket is represented as a 0/1 item vector.Source: §2.1 · p. 2
2.2 Relation between PIF and Target Basket
- Collaborative purchase patterns retrieve more than half of target-basket items across four datasets, exceeding 0.8 in three, while repeated-purchase importance varies by dataset.The analysis uses 300 nearest neighbors; the authors expect RecallN to increase with more neighbors.Source: §2.2 · p. 2, Table 1 · p. 2
- Combining repeated and collaborative purchase patterns leaves only a small part of target-basket items uncovered, indicating potential for PIF in NBR.The collaborative pattern also provides signal beyond the overlap with repeated purchases.Source: §2.2 · p. 3
2.3 Existing NBR Methods
- Markov-chain methods model transitions from recent baskets, whereas RNN-based methods aggregate representations across the full history to model longer-term dependencies.Some methods use attention to select relevant items or baskets.Source: §2.3 · p. 3
2.4 Difficulty in Learning Item Frequency
- Markov-chain methods miss high-order PIF, while RNNs would need to aggregate basket vectors like vector addition for their hidden state to capture it.The section investigates whether existing methods can learn the sum of a user's basket vectors.Source: §2.4 · p. 3
2.4.1 Difficulty in Learning Vector Addition.
- Training loss converged to 4, above the zero-vector baseline's 1.6 average MSE, and remained similar after removing embeddings, changing optimizers, or doubling data.The synthetic test used 2,500 sequences of ten one-hot vectors, with two repeated items placed at the end; the RNN module followed the existing NBR aggregation structure.Source: §2.4.1 · pp. 3–4
2.4.2 Closed-form Solution for Vector Addition with RNN.
- A closed-form solution shows vanilla RNNs can represent vector addition, yet nonlinear-free training still converged around 4, suggesting optimization misses the global minimum.The authors conclude that RNN-based methods fail to capture PIF in their setting.Source: §2.4.2 · pp. 4–5
- Initializing with the closed-form solution may overcome this optimization difficulty, but its correlated weights may make learning temporal dynamics harder.The authors therefore argue that PIF should be captured carefully because RNNs have difficulty learning it.Source: §2.4.3 · p. 5
3 PROPOSED METHOD
TIFUKNN is a user-kNN method that combines the two patterns associated with personalized item frequency and incorporates temporal dynamics. It uses hierarchically time-decayed user vectors to find neighbors, then blends target-user and neighbor representations for prediction.
3 PROPOSED METHOD
- TIFUKNN directly uses the two patterns associated with personalized item frequency and considers temporal dynamics when selecting items.The authors propose this as a direct neighbor-based alternative to model-based methods, which they leave for future work.Source: §3 · p. 5
3.1 Integrating Temporal Dynamics
- Because item frequency cannot distinguish items with equal counts, TIFUKNN assigns smaller weights to earlier repeated purchases.The authors report that short gaps dominate, while gap distributions vary across datasets.Source: §3.1 · p. 5
3.2 Nearest Neighbors based Method
- For similarity search, historical baskets are aggregated into user vectors using hierarchical decay within and across groups, giving more weight to recent records.The method uses Euclidean distance to find the k nearest neighbors; other similarity functions are left for future work.Source: §3.2 · p. 5
- Prediction blends the target user's representation, associated with repeated purchases, and the average neighbor representation, associated with collaborative purchases; the top s entries are recommended.A hyperparameter α balances the two components.Source: §3.2 · pp. 5–6
4 RELATED WORK
Related work distinguishes next-basket recommendation from recommendation based on item sets or item sequences. It also identifies a gap in kNN methods for NBR and a difficulty for RNNs in learning vector addition.
Next-basket recommendation
- NBR predicts item sets from sequences of past baskets, unlike traditional collaborative recommendation and sequential recommendation, which use item sets and item sequences, respectively.Source: §4 · p. 6
- The related-work review identifies a lack of kNN-based NBR methods, which this paper's proposed method addresses.Source: §4 · p. 6
Difficulty in Training RNNs
- The paper presents difficulty learning vector addition as a distinct RNN training phenomenon and calls for further theoretical analysis.Source: §4 · p. 6
5 EXPERIMENTS
The experiments assess whether the proposed methods outperform state-of-the-art NBR methods. They also examine temporal dynamics, TIFU-KNN components, and hyperparameter effects.
- The experiments ask whether the proposed methods outperform state-of-the-art NBR methods.Source: §5 · p. 6
- The study evaluates temporal dynamics and the contribution of each TIFU-KNN component to target-basket prediction.Source: §5 · p. 6
- The experiments examine how hyperparameters affect performance and whether each TIFU-KNN factor brings benefits.Source: §5 · p. 6
5.1 Experimental Settings
The experiments use four public transaction datasets and evaluate next-basket predictions using recall and NDCG. They compare frequency-based baselines, established NBR methods, and tuned versions of the proposed methods.
5.1.1 Data sets.
- The experiments use Dunnhumby, ValuedShopper, Instacart, and TaFeng transaction data, with preprocessing that removes customers with fewer than three baskets.Dunnhumby uses a 50k-user sample; Instacart and TaFeng retain items accounting for more than 95% of purchases.Source: §5.1.1 · pp. 6–7
5.1.2 Evaluation Protocol.
- Recall and NDCG evaluate predicted next baskets, with NDCG computed on the top-s sorted item list.The data are partitioned across users into five folds, with four for training and one for testing; 10% of training users are reserved for validation.Source: §5.1.2 · p. 7
5.1.3 Compared Methods.
- Baselines include global and personalized top-frequency methods, userKNN, RepeatNet, FPMC, DREAM, SHAN, and Sets2Sets.The compared methods represent frequency-based, collaborative-filtering, sequential, and NBR approaches.Source: §5.1.3 · p. 7
- The methods' hyperparameters are tuned by grid search, and the proposed method's search covers neighbor count, time-decay ratios, fusion weight, and group count.The search ranges vary by parameter and, for group count, by dataset.Source: §5.1.3 · p. 7, §5.1.4 · p. 7, Table 3 · p. 7
5.2 Performance Comparison (RQ1)
TIFU-KNN leads the comparisons on ValuedShopper, Instacart, and TaFeng, while Dunnhumby shows a metric-specific exception. Personalized frequency baselines also perform strongly against existing NBR methods.
5.2 Performance Comparison (RQ1)
- TIFU-KNN outperforms other methods on ValuedShopper, Instacart, and TaFeng; on Dunnhumby, it has slightly better recall while Sets2Sets has better NDCG.The authors attribute the Dunnhumby exception to more unseen patterns in that dataset.Source: Table 4 · p. 8, §5.2 · p. 8
- Top-n frequency has reasonable recall but is nearly worst overall, indicating that shared popular items do not capture users' distinct items.Source: §5.2 · p. 8
- Personalized top-n frequency is competitive across datasets, supporting the importance of target users' repeated-purchase patterns in prediction.Source: §5.2 · p. 8
- Personalized top-n frequency surpasses existing NBR methods other than Sets2Sets by a large margin on ValuedShopper, Instacart, and Dunnhumby.It also outperforms Sets2Sets on ValuedShopper and Instacart; the authors suggest Sets2Sets' learned coefficients do not perfectly balance its PIF and RNN components.Source: §5.2 · p. 8
- UserKNN and RepeatNet perform worse than Sets2Sets; RepeatNet can outperform methods without repeat modeling when repeats matter, except on TaFeng.The authors note that RepeatNet also introduces a non-existing order among items within each basket.Source: §5.2 · p. 8
5.3 Effectiveness of Temporal Dynamics (RQ2)
The analysis tests whether temporal dynamics reduce unseen patterns covered by repeated-purchase and collaborative-purchase signals. Without temporal decay, the method usually has the most unseen patterns, indicating that temporal dynamics help find better neighbors.
5.3 Effectiveness of Temporal Dynamics (RQ2)
- RecallP∩N measures the amount of unseen patterns using items shared by the repeated-purchase and collaborative-purchase components.The weights rb and rд are set to the same ratio for this analysis.Source: §5.3 · p. 8
- With ratio = 1, the method usually has the largest number of unseen patterns, while temporal dynamics help reduce them by finding better neighbors.The analysis uses RecallP∩N, based on items appearing in both the repeated-purchase and collaborative-purchase components, to quantify unseen patterns.Source: §5.3 · pp. 8–9
- The analysis represents the absence of temporal dynamics with ratio = 1.Source: §5.3 · p. 9
5.4 Effectiveness of Different Components (RQ3)
The full TIFU-KNN performs best when it combines the target user’s personalized item frequency with that of the most similar users. The target user’s repeated purchases dominate, while collaborative purchase information adds discrimination.
5.4 Effectiveness of Different Components (RQ3)
- The target user’s repeated-purchase pattern dominates the prediction.Source: §5.4 · p. 9
- The collaborative-purchase pattern provides discriminative information that further improves prediction.Source: §5.4 · p. 9
- The full TIFU-KNN combination achieves the best performance, supporting the use of the target user’s and most similar users’ personalized item frequencies together.Source: Table 5 · p. 9, §5.4 · p. 9
5.5 Sensitivity of the Hyperparameters (RQ4)
On Instacart, the authors examine recall on the test set with predicted basket size s = 20. Their observations indicate that performance depends on choosing suitable hyperparameter values, including two time-decayed weights below 1.
5.5 Sensitivity of the Hyperparameters (RQ4)
- Both time-decayed weights rb and rд should be below 1 for best performance, supporting the two-level decay design over a single decay weight.Source: §5.5 · p. 9
- Parameters selected on the validation set are close to the test-set optimal configuration.Source: §5.5 · p. 9
- All hyperparameters require suitable values to achieve the best performance.The reported recall is on the Instacart test set with predicted basket size s = 20.Source: §5.5 · p. 9
6 CONCLUSION
The proposed kNN method generally outperforms state-of-the-art deep-learning methods, and the paper examines why RNNs may struggle to approximate vector addition. The authors identify further theoretical analysis and investigation of other frequency-related patterns as directions for future work.
6 CONCLUSION
- The proposed kNN method generally outperforms state-of-the-art deep-learning methods, with the paper linking this advantage to RNN difficulty in approximating vector addition.Source: §6 · p. 9
- The authors call for more theoretical analysis of RNNs’ vector-addition difficulty and an optimizer with a theoretical guarantee of finding the global optimum.They distinguish this difficulty from vanishing and exploding gradient problems.Source: §6 · p. 9
- Future work could test whether other commonly used functions challenge deep models and investigate additional PIF or item-frequency patterns, including global, local, and inverse item frequency.Source: §6 · p. 9