On Offline Evaluation of Recommender Systems

Yitong Ji, Aixin Sun, Jie Zhang, Chenliang LiarXiv 2020 · arXiv · OpenReview

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.

Temporal dynamics of item popularity in MovieLens-25M and Yelp datasets.

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.

Activeness of iPad models over time alongside their official release dates.

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:

  1. Unpredictable Accuracy: Leakage does not always improve accuracy; it can also deteriorate it, making the resulting bias chaotic and difficult to correct for.
  2. 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.
  3. 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

Abstract

Recommender models are hard to evaluate, particularly under offline setting. In this paper, we provide a comprehensive and critical analysis of the data leakage issue in recommender system offline evaluation. Data leakage is caused by not observing global timeline in evaluating recommenders e.g., train/test data split does not follow global timeline. As the result, a model may learn from interactions that are not expected to be available at prediction time. We first show the temporal dynamics of user-item interactions along global timeline, and then explain why data leakage exists for collaborative filtering models. Through experiments, we show that all models indeed recommend future items that are not available at the time point of test instance, as the result of data leakage. The experiments are conducted with four widely used baseline models - BPR, NeuMF, SASRec, and LightGCN, on four popular offline datasets - MovieLens-25M, Yelp, Amazon-music, and Amazon-electronic, adopting leave-last-out data split. We further show that data leakage impacts models' recommendation accuracy, and their relative performance orders become unpredictable with different amount of future data in training. To evaluate recommenders in a realistic manner in offline setting, we propose a timeline scheme, which calls for a revisit of recommendation model design.
BibTeX
@misc{ji2020offline,
  author = {Yitong Ji and Aixin Sun and Jie Zhang and Chenliang Li},
  title = {{On Offline Evaluation of Recommender Systems}},
  year = {2020},
  eprint = {2010.11060},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2010.11060},
}
Figure