REVIEW 3 major objections 5 minor 32 references
SAFERec: Self-Attention and Frequency Enriched Model for Next Basket Recommendation
T0 review · 3 major / 5 minor · reviewed 2026-08-11 · deepseek-v4-flash
Pith's one-line read Adding item-frequency signals lets transformer models compete with frequency-based baselines in next-basket recommendation.
desk verdict Useful incremental model oversold by a false 'outperforms all' claim; the architecture and code are worth a look, but the paper needs major fixes before acceptance. read the letter →
The pith
A machine-rendered reading of the paper's core claim, the machinery that carries it, and where it could break.
The reading
What carries the argument
The central object is the Frequency Module. For each user-item pair it builds a binary history vector $h_i^u$ marking whether item $i$ appeared in each of the user's past baskets, adds a learned item embedding $i_2$ and a learned frequency embedding for the count clipped at $F_{\max}$, concatenates these, and pushes them through fully connected layers to produce an item-specific frequency score. SAFERec adds that score to the dot product between the item's collaborative embedding $i_1$ and the transformer's user representation, and trains the whole model with cross-entropy loss on full-basket prediction.
What would settle it
Run the paper's leave-one-basket protocol with the same preprocessing and hyperparameter tuning procedure but add ReCaNet, TAIW, BTBR, and PerNIR to the baselines; if any of them exceeds SAFERec's Recall@10 on Dunnhumby or makes the 8% gap statistically insignificant, the claim that SAFERec outperforms all other baselines is falsified.
Extended reading notes
Core claim
The paper's central claim is that a next-item transformer can be turned into a strong next-basket recommender by adding a frequency-aware scoring path alongside the user-representation path. On Dunnhumby the combined model reaches Recall@10 of 0.1619, an 8% relative improvement over the best baseline, and on TaFeng it improves Recall@100, NDCG@10, and NDCG@100 while narrowly trailing DNNTSP on Recall@10; on TaoBao, GP-Pop and TIFU-KNN still hold some advantages, which the paper attributes to the dataset's emphasis on rare items. The paper concludes that the frequency component makes the transformer competitive with frequency-based methods and also yields more novel recommendations.
Load-bearing premise
The reported state-of-the-art claim rests on the choice of the baseline set: models that directly target repeat purchases or time-aware weights (ReCaNet, TAIW, BTBR, PerNIR) were left out, and if those were included the 8% Recall@10 margin on Dunnhumby could shrink or disappear.
Editorial extensions
If this is right
- Frequency-aware transformers can close the gap with pure frequency-based NBR methods, so future NBR architectures should treat item repetition as a first-class signal rather than leaving it to implicit sequence modeling.
- The model's gains on Dunnhumby and TaFeng suggest the approach works best on grocery-style data with long, repetitive purchase histories.
- On datasets like TaoBao where rare items dominate, frequency scoring does not surpass popularity- or neighbor-based baselines on every metric, so the method is not uniformly superior.
- Higher UserNovelty@K at comparable accuracy means the model can surface items a user has not bought before without sacrificing ranking quality.
Reading between the lines
- If the repeat-aware model ReCaNet and the time-aware TAIW, both excluded from the baseline set, were included, the claimed margins on Dunnhumby and TaFeng could shrink; the paper's own justification for excluding them describes exactly the repetition phenomenon SAFERec models.
- The Frequency Module can be viewed as a differentiable version of TIFU-KNN's personalized frequency counts; a natural test is whether the transformer layer is still needed once the frequency path is present, or whether a simple aggregation of basket embeddings would match performance.
- The TaoBao results suggest a boundary condition: on sparse, rare-item-heavy catalogs, explicit frequency signals may be less useful than global popularity or neighbor-based scores; a frequency gate or dataset-dependent weighting could be a practical extension.
Signed reviews
Editorial analysis
A structured set of objections, weighed in public.
Referee Report
Summary. The paper proposes SAFERec, a next-basket recommendation (NBR) model that extends a SASRec-style transformer with a frequency module. For each user-item pair, the model computes a user-specific score via dot product of the user representation and an item embedding, plus an item-specific score derived from a frequency embedding and the user's purchase history vector; the two scores are summed. Experiments on TaFeng, Dunnhumby, and TaoBao use leave-one-basket evaluation and compare SAFERec with P-Pop, GP-Pop, TIFU-KNN, UP-CF, DNNTSP, and an ablation SASRec*. The authors report that SAFERec outperforms all baselines, with up to 8% improvement in Recall@10, and they release the code.
Significance. The architectural idea is sensible: augmenting self-attention with an explicit frequency signal addresses a known weakness of transformer models for repetitive NBR scenarios. The paper provides a clear ablation (SASRec*) and releases code, which supports reproducibility. If the performance claims were fully supported, this would be a useful contribution to the NBR literature. However, the paper's own Table 2 contradicts the headline 'outperforms all baselines' claim, and the UN@K definition appears to be inverted, so the reported results as currently presented do not substantiate the main conclusions.
major comments (3)
- [Section 3.2, Table 2] The abstract and conclusion claim that SAFERec 'outperforms all other baselines,' but the table shows otherwise. On TaFeng, DNNTSP achieves Recall@10 = 0.1276 versus SAFERec's 0.1256 (marked †, i.e., no significant difference). On TaoBao, TIFU-KNN achieves higher Recall@10 (0.0721†) and NDCG@10 (0.0843 vs 0.0800, without †), and GP-Pop achieves higher Recall@100 (0.1028†). The text in §3.2 acknowledges only the TaoBao exceptions, not the TaFeng Recall@10 result. The '8% improvement in Recall@10' is a Dunnhumby-only gain over UP-CF (Table 2), not a general result. The central claim must be revised to a dataset- and competitor-specific statement, or the experiments must be extended to support the universal claim.
- [Section 3.1, Metrics] The definition of UserNovelty@K is inverted. The formula 'UN@K = Pk j=1 1 [j ∈ Bu]' counts items that belong to the user's purchase history (or the ground-truth basket), which is the opposite of 'new items for user u.' The reported values and the discussion in §3.2 (e.g., 'recommending 28% more novel items') are consistent with the complement, 1[j ∉ Bu]. Please correct the definition and verify that the computed metric matches the intended notion of novelty.
- [Section 3.1, Baselines] The exclusion of ReCaNet [3] and TAIW [24] is not justified by the stated reason. ReCaNet is explicitly a repeat-consumption-aware model, and TAIW is a time-aware extension of TIFU-KNN; both directly target the same repetitive-purchase phenomenon that SAFERec is designed to exploit. The exclusion of these strong, relevant baselines means the paper's claim of outperforming state-of-the-art NBR methods is not supported, since a plausible competitor set would include them. At least ReCaNet and TAIW should be included, or the claim should be restricted to the selected baseline set.
minor comments (5)
- [Abstract] The '8% improvement in Recall@10' is reported without specifying the baseline and dataset; it should state that it is relative to UP-CF on Dunnhumby (as in Table 2).
- [Section 2.1, Architecture] The notation 'ci u = (i2 + fi; hi u)' uses a semicolon to indicate concatenation, but this is not defined; please define the concatenation operator.
- [Table 2 caption] The symbols '△' and '▽' are not defined in the caption; they appear to denote relative improvement or degradation, but this should be stated explicitly.
- [Section 3.1, Evaluation Protocol] The early stopping and hyperparameter optimization are described, but the paper does not report the final hyperparameters (e.g., number of attention heads, number of layers, Fmax) in the main text; please add a table with the optimal values or state them explicitly for reproducibility.
- [Section 3.2] The claim that 'This balance means users receive accurate recommendations while also discovering new products' is an interpretive statement based on offline metrics; it should be softened or supported with a user study or additional analysis.
Circularity Check
No circularity found: SAFERec's contribution is an empirical architecture plus evaluation; the headline performance claim is a measured outcome, not a construction from fitted inputs.
full rationale
The paper proposes an architecture (transformer user representation plus a frequency module) and reports experimental results. There is no derivation chain in which a parameter fitted to data is later renamed as a prediction: the final prediction score is the sum p_u = p_uu + p_ui, where p_uu is a dot product of learned embeddings and p_ui is produced by a separate frequency-aware network, both trained jointly with cross-entropy loss. The claimed 8% Recall@10 improvement is a measured result from Table 2, not an algebraic consequence of the model definition. The only self-citation is TAIW [24] (Romanov, Lashinin, Ananyeva, Kolesnikov), which the paper transparently excludes because it explicitly models time intervals, leaving time-awareness for future work; this exclusion affects the strength of the empirical SOTA claim but is not a load-bearing circular step in any derivation. The paper's own Table 2 shows that SAFERec does not beat all baselines on every dataset (e.g., DNNTSP on TaFeng Recall@10, TIFU-KNN on TaoBao Recall@10/NDCG@10), and the abstract's 'outperforms all other baselines' is therefore an overstatement. That is an internal-consistency or correctness concern, not circularity: the result still has independent empirical content and is not equivalent to its inputs by construction. No circular step can be exhibited.
Assumptions & free parameters
free parameters (4)
- Fmax =
The value is not specified in the text; it is tuned via Optuna and recorded in the repository.
- L =
The value is not specified in the text; it is tuned via Optuna and recorded in the repository.
- d =
The value is not specified in the text; it is tuned via Optuna and recorded in the repository.
- attention heads and layers =
The values are not specified in the text; they are tuned via Optuna and recorded in the repository.
assumptions (3)
- domain assumption The binary history vector h_i^u, which records only presence or absence of item i in each past basket, is a sufficient representation of repurchase behavior.
- ad hoc to paper The summation of transformer score and frequency score is an effective way to combine the two signals.
- domain assumption The leave-one-basket evaluation with random half of users for validation and test is representative of real-world performance.
Cite this review
Pith. "Pith review of SAFERec: Self-Attention and Frequency Enriched Model for Next Basket Recommendation." pith.science (2026). https://pith.science/paper/FGRW3W5V
@misc{pith2026241214302,
author = {Pith},
title = {Pith review of: SAFERec: Self-Attention and Frequency Enriched Model for Next Basket Recommendation},
year = {2026},
howpublished = {\url{https://pith.science/paper/FGRW3W5V}},
note = {Machine review of arXiv:2412.14302}
}
read the original abstract
Transformer-based approaches such as BERT4Rec and SASRec demonstrate strong performance in Next Item Recommendation (NIR) tasks. However, applying these architectures to Next-Basket Recommendation (NBR) tasks, which often involve highly repetitive interactions, is challenging due to the vast number of possible item combinations in a basket. Moreover, frequency-based methods such as TIFU-KNN and UP-CF still demonstrate strong performance in NBR tasks, frequently outperforming deep-learning approaches. This paper introduces SAFERec, a novel algorithm for NBR that enhances transformer-based architectures from NIR by incorporating item frequency information, consequently improving their applicability to NBR tasks. Extensive experiments on multiple datasets show that SAFERec outperforms all other baselines, specifically achieving an 8\% improvement in Recall@10.
Figures
Reference graph
Works this paper leans on
-
[3]
Ariannezhad, M., Jullien, S., Li, M., Fang, M., Schelter, S., de Rijke, M.: Recanet: A repeat consumption-aware neural network for next basket recommendation in grocery shopping. In: Proceedings of the 45th International ACM SIGIR Confer- ence on Research and Development in Information Retrieval. pp. 1240–1250 (2022)
work page 2022
-
[24]
In: Proceedings of the 17th ACM Con- ference on Recommender Systems
Romanov,A.,Lashinin,O.,Ananyeva,M.,Kolesnikov,S.:Time-awareitemweight- ing for the next basket recommendations. In: Proceedings of the 17th ACM Con- ference on Recommender Systems. pp. 985–992 (2023)
work page 2023
-
[1]
In: Proceedings of the 18th ACM Conference on Recommender Systems
Abbattista, D., Anelli, V.W., Di Noia, T., Macdonald, C., Petrov, A.V.: En- hancing sequential music recommendation with personalized popularity aware- ness. In: Proceedings of the 18th ACM Conference on Recommender Systems. p. 1168–1173. RecSys ’24, Association for Computing Machinery, New York, NY, USA(2024). https://doi.org/10.1145/3640457.3691719, htt...
arXiv 2024
-
[2]
In: Proceedings of the 25th ACM SIGKDD International Conference on Knowledge Discovery and Data Min- ing (2019)
Akiba, T., Sano, S., Yanase, T., Ohta, T., Koyama, M.: Optuna: A next- generation hyperparameter optimization framework. In: Proceedings of the 25th ACM SIGKDD International Conference on Knowledge Discovery and Data Min- ing (2019)
2019
-
[4]
In: Proceed- ings of the Sixteenth ACM International Conference on Web Search and Data Mining
Ariannezhad, M., Li, M., Schelter, S., De Rijke, M.: A personalized neighborhood- based model for within-basket recommendation in grocery shopping. In: Proceed- ings of the Sixteenth ACM International Conference on Web Search and Data Mining. pp. 87–95 (2023)
work page 2023
-
[5]
Ophthalmic and Physi- ological Optics34(5), 502–508 (2014)
Armstrong, R.A.: When to use the b onferroni correction. Ophthalmic and Physi- ological Optics34(5), 502–508 (2014)
work page 2014
-
[6]
In: Proceedings of the 28th ACM Conference on User Modeling, Adaptation and Personalization
Faggioli, G., Polato, M., Aiolli, F.: Recency aware collaborative filtering for next basket recommendation. In: Proceedings of the 28th ACM Conference on User Modeling, Adaptation and Personalization. pp. 80–87 (2020)
work page 2020
-
[7]
ACM Transactions on Information Systems (TOIS) 22(1), 5–53 (2004)
Herlocker, J.L., Konstan, J.A., Terveen, L.G., Riedl, J.T.: Evaluating collaborative filtering recommender systems. ACM Transactions on Information Systems (TOIS) 22(1), 5–53 (2004)
work page 2004
Show all 32 references
-
[8]
In: Proceedings of the 43rd international ACM SIGIR conference on research and development in information retrieval
Hu, H., He, X., Gao, J., Zhang, Z.L.: Modeling personalized item frequency infor- mation for next-basket recommendation. In: Proceedings of the 43rd international ACM SIGIR conference on research and development in information retrieval. pp. 1071–1080 (2020)
2020
-
[9]
In: Proceedings of the 29th ACM Confer- ence on User Modeling, Adaptation and Personalization
Jannach, D., Jesse, M., Jugovac, M., Trattner, C.: Exploring multi-list user inter- faces for similar-item recommendations. In: Proceedings of the 29th ACM Confer- ence on User Modeling, Adaptation and Personalization. pp. 224–228 (2021)
2021
-
[10]
ACM Transactions on Interactive Intelligent Systems (TiiS)7(1), 1–42 (2016) 8 O
Kaminskas, M., Bridge, D.: Diversity, serendipity, novelty, and coverage: a survey and empirical analysis of beyond-accuracy objectives in recommender systems. ACM Transactions on Interactive Intelligent Systems (TiiS)7(1), 1–42 (2016) 8 O. Lashinin et al
2016
-
[11]
Kang,W.C.,McAuley,J.:Self-attentivesequentialrecommendation.In:2018IEEE international conference on data mining (ICDM). pp. 197–206. IEEE (2018)
2018
-
[12]
In: Pro- ceedings of the 16th ACM Conference on Recommender Systems
Katz, O., Barkan, O., Koenigstein, N., Zabari, N.: Learning to ride a buy-cycle: A hyper-convolutional model for next basket repurchase recommendation. In: Pro- ceedings of the 16th ACM Conference on Recommender Systems. pp. 316–326 (2022)
2022
-
[13]
In: Proceedings of the 32nd ACM International Conference on Information and Knowledge Management
Kou, Z., Manchanda, S., Lin, S.T., Xie, M., Wang, H., Zhang, X.: Modeling se- quential collaborative user behaviors for seller-aware next basket recommendation. In: Proceedings of the 32nd ACM International Conference on Information and Knowledge Management. pp. 1097–1106 (2023)
2023
-
[14]
In: Proceedings of the 2016 Conference on User Modeling Adap- tation and Personalization
Lerche,L.,Jannach,D.,Ludewig,M.:Onthevalueofreminderswithine-commerce recommendations. In: Proceedings of the 2016 Conference on User Modeling Adap- tation and Personalization. pp. 27–35 (2016)
2016
-
[15]
In: Proceed- ings of the 17th ACM Conference on Recommender Systems
Li, M., Ariannezhad, M., Yates, A., de Rijke, M.: Masked and swapped sequence modeling for next novel basket recommendation in grocery shopping. In: Proceed- ings of the 17th ACM Conference on Recommender Systems. pp. 35–46 (2023)
2023
-
[16]
ACM Transactions on Information Systems41(4), 1–29 (2023)
Li, M., Jullien, S., Ariannezhad, M., de Rijke, M.: A next basket recommendation reality check. ACM Transactions on Information Systems41(4), 1–29 (2023)
2023
-
[17]
In: Proceedings of the 2018 world wide web conference
Liang, D., Krishnan, R.G., Hoffman, M.D., Jebara, T.: Variational autoencoders for collaborative filtering. In: Proceedings of the 2018 world wide web conference. pp. 689–698 (2018)
2018
-
[18]
In: European Conference on Information Retrieval
Liu, Y., Li, M., Ariannezhad, M., Mansoury, M., Aliannejadi, M., de Rijke, M.: Measuring item fairness in next basket recommendation: A reproducibility study. In: European Conference on Information Retrieval. pp. 210–225. Springer (2024)
2024
-
[19]
arXiv preprint arXiv:2404.03637 (2024)
Liu, Z., Liu, S., Zhang, Z., Cai, Q., Zhao, X., Zhao, K., Hu, L., Jiang, P., Gai, K.: Sequential recommendation for optimizing both immediate feedback and long-term retention. arXiv preprint arXiv:2404.03637 (2024)
2024 arXiv
-
[20]
arXiv preprint arXiv:2403.04875 (2024)
Petrov, A., Macdonald, C.: Aligning gptrec with beyond-accuracy goals with rein- forcement learning. arXiv preprint arXiv:2403.04875 (2024)
2024 arXiv
-
[21]
In: Proceedings of the 17th ACM Conference on Recommender Systems
Petrov, A.V., Macdonald, C.: gsasrec: Reducing overconfidence in sequential rec- ommendation trained with negative sampling. In: Proceedings of the 17th ACM Conference on Recommender Systems. pp. 116–128 (2023)
2023
-
[22]
In: Proceed- ings of the AAAI conference on artificial intelligence
Ren, P., Chen, Z., Li, J., Ren, Z., Ma, J., De Rijke, M.: Repeatnet: A repeat aware neural recommendation machine for session-based recommendation. In: Proceed- ings of the AAAI conference on artificial intelligence. vol. 33, pp. 4806–4813 (2019)
2019
-
[23]
In: Proceedings of the 19th in- ternational conference on World wide web
Rendle, S., Freudenthaler, C., Schmidt-Thieme, L.: Factorizing personalized markov chains for next-basket recommendation. In: Proceedings of the 19th in- ternational conference on World wide web. pp. 811–820 (2010)
2010
-
[25]
In: 2022 IEEE 9th International Conference on Data Science and Advanced Analytics (DSAA)
Shao, Z., Wang, S., Zhang, Q., Lu, W., Li, Z., Peng, X.: A systematical evalua- tion for next-basket recommendation algorithms. In: 2022 IEEE 9th International Conference on Data Science and Advanced Analytics (DSAA). pp. 1–10. IEEE (2022)
2022
-
[26]
arXiv preprint arXiv:2402.09766 (2024)
Shevchenko, V., Belousov, N., Vasilev, A., Zholobov, V., Sosedka, A., Semenova, N., Volodkevich, A., Savchenko, A., Zaytsev, A.: From variability to stability: Ad- vancing recsys benchmarking practices. arXiv preprint arXiv:2402.09766 (2024)
2024 arXiv
-
[27]
Singh, A., Hosein, P.: On the prediction of possibly forgotten shopping basket items.In:ArtificialIntelligenceandAppliedMathematicsinEngineeringProblems: Title Suppressed Due to Excessive Length 9 Proceedings of the International Conference on Artificial Intelligence and Appli...
2020
-
[28]
In: Proceedings of the 28th ACM international conference on information and knowl- edge management
Sun, F., Liu, J., Wu, J., Pei, C., Lin, X., Ou, W., Jiang, P.: Bert4rec: Sequential recommendation with bidirectional encoder representations from transformer. In: Proceedings of the 28th ACM international conference on information and knowl- edge management. pp. 1441–1450 (2019)
2019
-
[29]
Advances in neural information pro- cessing systems30 (2017)
Vaswani,A.,Shazeer,N.,Parmar,N.,Uszkoreit,J.,Jones,L.,Gomez,A.N.,Kaiser, Ł., Polosukhin, I.: Attention is all you need. Advances in neural information pro- cessing systems30 (2017)
2017
-
[30]
arXiv preprint arXiv:2201.13313 (2022)
Wang, B.L., Schelter, S.: Efficiently maintaining next basket recommendations un- der additions and deletions of baskets and items. arXiv preprint arXiv:2201.13313 (2022)
2022 arXiv
-
[31]
In: Proceedings of the Fifteenth ACM International Conference on Web Search and Data Mining
Xin,X.,Karatzoglou,A.,Arapakis,I.,Jose,J.M.:Supervisedadvantageactor-critic for recommender systems. In: Proceedings of the Fifteenth ACM International Conference on Web Search and Data Mining. pp. 1186–1196 (2022)
2022
-
[32]
In: Proceedings of the 26th ACM SIGKDD International Conference on Knowledge Discovery & Data Mining
Yu, L., Sun, L., Du, B., Liu, C., Xiong, H., Lv, W.: Predicting temporal sets with deep neural networks. In: Proceedings of the 26th ACM SIGKDD International Conference on Knowledge Discovery & Data Mining. pp. 1083–1091 (2020)
2020
Reviewed August 11, 2026 · model on record in the stance chip above.
Discussion (0). Continue with ORCID to comment.