Abstract
Recommender models are notoriously difficult to evaluate, particularly in offline settings. This paper provides a comprehensive analysis of the data leakage issue in recommender system offline evaluation. Data leakage occurs when the global timeline is ignored during the train/test data split, allowing models to learn from interactions that would not be available at prediction time. We demonstrate the temporal dynamics of user-item interactions and show that common collaborative filtering models (BPR, NeuMF, SASRec, and LightGCN) frequently recommend "future items" due to this leakage. Our experiments across four major datasets (MovieLens-25M, Yelp, Amazon-music, and Amazon-electronic) reveal that leakage makes model performance unpredictable and leaderboards unstable. We propose a new timeline scheme to ensure realistic offline evaluation.
Introduction
In academic research, recommender systems are typically evaluated offline by partitioning historical interaction data into training and testing sets. However, standard practices often ignore the temporal context of these interactions. If a model is trained on data from 2022 to predict a user's preference in 2020, it is effectively "cheating" by utilizing future information. While some strategies respect individual user timelines, they often fail to account for the global timeline, allowing the model to bridge gaps through the community's collective future interactions.
Temporal Dynamics of Interactions
The fundamental issue stems from the fact that user-item interactions are not static; they evolve over time. Items have distinct lifecycles, and their popularity shifts as new products enter the market and old ones fade.
As shown in Figure 3, item popularity varies significantly across years. When evaluations ignore these shifts, they fail to represent the real-world scenario where a recommender must operate without knowledge of future trends.
The "Time Traveler" Recommender
The most striking consequence of data leakage is the recommendation of "future items"—products that had not yet been released at the time of the test instance. Collaborative filtering (CF) is the primary driver of this leak. By learning that "User A is like User B," a model can infer that User A will want an item simply because it knows User B purchased it in the future.
Figure 5 illustrates this with iPad models. A model suffering from leakage might recommend an iPad Pro (released in late 2015) to a user based on a test case from 2013. This "time travel" is a direct result of including future community interactions in the training set.
Impact on Evaluation and Leaderboards
Our stress tests, which involved gradually adding future data (Years 6–10) to a training set while testing on Year 5, revealed several critical insights:
- Unpredictable Accuracy: Leakage does not always improve accuracy; it can also deteriorate it, making the resulting bias chaotic and difficult to correct for.
- Unstable Leaderboards: The relative ranking of models (e.g., SASRec vs. LightGCN) changes depending on the amount of future data leaked. A model appearing to be "State of the Art" (SOTA) in a leaked evaluation may perform worse than a simple baseline when a strict timeline is enforced.
- Extrinsic Similarity: As leakage increases, the recommendation lists diverge significantly from those generated in a "clean" (no leakage) environment, proving that leakage fundamentally alters the model's learned representations.
Conclusion
To evaluate recommenders realistically, we propose a Timeline Scheme that evaluates models incrementally as data arrives. This approach highlights a significant challenge: the high computational cost of retraining batch-based models. Consequently, this paper calls for a shift in focus toward incremental learning for recommender systems—developing models that can update efficiently without full retraining. Until the global timeline is strictly respected, offline evaluations will remain a distorted reflection of real-world performance.
Summary updated