sequential-recsys-eval
A Reproducible Analysis of Sequential Recommender Systems — Betello et al. (2024) (arXiv:2408.03873, 2024)
What this evaluates
Evaluates the performance and reproducibility of sequential recommender system (SRS) models across multiple user-item interaction datasets. It probes how architectural choices, hyperparameter settings, and training configurations affect ranking metrics and computational emissions.
Datasets
- Beauty — total 7113; splits: train (-1), val (-1), test (-1); repo https://github.com/antoniopurificato/recsys_repro_conf
- FS-NYC — total 179468; splits: train (-1), val (-1), test (-1); repo https://github.com/antoniopurificato/recsys_repro_conf
- FS-TKY — total 494807; splits: train (-1), val (-1), test (-1); repo https://github.com/antoniopurificato/recsys_repro_conf
- ML-100k — total 99287; splits: train (-1), val (-1), test (-1); repo https://github.com/antoniopurificato/recsys_repro_conf
- ML-1M — total 999611; splits: train (-1), val (-1), test (-1); repo https://github.com/antoniopurificato/recsys_repro_conf
- ML-20M — total 19984024; splits: train (-1), val (-1), test (-1); repo https://github.com/antoniopurificato/recsys_repro_conf
Metrics
NDCG@10 (primary) — range: [0, 1]
- Normalized Discounted Cumulative Gain at rank 10. Calculated as DCG@10 divided by the ideal DCG@10, where DCG discounts relevance by the logarithm of the rank position.
Recall@20 — range: [0, 1]
- Proportion of relevant items found in the top-20 recommended items out of all relevant items in the ground truth.
Precision — range: [0, 1]
- Proportion of recommended items in the top-K list that are relevant.
MAP — range: [0, 1]
- Mean Average Precision across all users, averaging the precision at each relevant item's rank position.
Input / output format
Input: User-item interaction sequences (lists of item IDs) representing a user's historical behavior, processed to generate predictions for the next item(s).
Output: Ranked list of candidate items (or top-K recommendations) for the next interaction, evaluated against ground-truth next items.
Scoring recipe
def compute_metrics(predictions, ground_truth, k=10):
# predictions: list of item IDs ranked by model
# ground_truth: list of relevant item IDs (usually 1 for next-item rec)
# Recall@k
recall = len(set(predictions[:k]) & set(ground_truth)) / max(len(ground_truth), 1)
# NDCG@k
dcg = sum(1.0 / math.log2(i + 2) for i, item in enumerate(predictions[:k]) if item in ground_truth)
idcg = sum(1.0 / math.log2(i + 2) for i in range(min(len(ground_truth), k)))
ndcg = dcg / idcg if idcg > 0 else 0.0
return ndcg, recall
Common pitfalls
- Using different loss functions (e.g., BPR vs BCE) or training durations across models, which heavily skews performance rankings.
- Inconsistent data splitting (e.g., random vs temporal last-interaction split) or negative sampling strategies.
- Ignoring computational emissions and training time, which are critical for fair comparison in modern SRS evaluations.
Evidence (verbatim from paper)
To evaluate the performance of sequential recommendation algorithms, we use four widely used metric, also common in Information Retrieval (IR): Precision, Recall, NDCG and MAP. ... For testing, as in (Sun et al., [2019]; Kang and McAuley, [2018]), we keep the last interaction for each user, while for the validation set, the second to last action is retained. All remaining interactions contribute to the training set.
Citation
@misc{betello2024reproducible,
title={A Reproducible Analysis of Sequential Recommender Systems},
author={Betello et al. (2024)},
year={2024},
note={arXiv:2408.03873}
}
1---2name: sequential-recsys-eval3description: Evaluates the performance and reproducibility of sequential recommender system (SRS) models across multiple user-item interaction datasets. It probes how architectural choices, hyperparameter settings, and training configurations affect ranking metrics and computational emissions. Use when the user wants to benchmark on Beauty, FS-NYC, FS-TKY, ML-100k, ML-1M, ML-20M, or asks about evaluating this task. Reports NDCG@10.4---56# sequential-recsys-eval78> A Reproducible Analysis of Sequential Recommender Systems — Betello et al. (2024) (arXiv:2408.03873, 2024)910## What this evaluates1112Evaluates the performance and reproducibility of sequential recommender system (SRS) models across multiple user-item interaction datasets. It probes how architectural choices, hyperparameter settings, and training configurations affect ranking metrics and computational emissions.1314## Datasets1516- **Beauty** — total 7113; splits: train (-1), val (-1), test (-1); repo https://github.com/antoniopurificato/recsys_repro_conf17- **FS-NYC** — total 179468; splits: train (-1), val (-1), test (-1); repo https://github.com/antoniopurificato/recsys_repro_conf18- **FS-TKY** — total 494807; splits: train (-1), val (-1), test (-1); repo https://github.com/antoniopurificato/recsys_repro_conf19- **ML-100k** — total 99287; splits: train (-1), val (-1), test (-1); repo https://github.com/antoniopurificato/recsys_repro_conf20- **ML-1M** — total 999611; splits: train (-1), val (-1), test (-1); repo https://github.com/antoniopurificato/recsys_repro_conf21- **ML-20M** — total 19984024; splits: train (-1), val (-1), test (-1); repo https://github.com/antoniopurificato/recsys_repro_conf2223## Metrics2425- `NDCG@10` **(primary)** — range: [0, 1]26 - Normalized Discounted Cumulative Gain at rank 10. Calculated as DCG@10 divided by the ideal DCG@10, where DCG discounts relevance by the logarithm of the rank position.27- `Recall@20` — range: [0, 1]28 - Proportion of relevant items found in the top-20 recommended items out of all relevant items in the ground truth.29- `Precision` — range: [0, 1]30 - Proportion of recommended items in the top-K list that are relevant.31- `MAP` — range: [0, 1]32 - Mean Average Precision across all users, averaging the precision at each relevant item's rank position.3334## Input / output format3536**Input**: User-item interaction sequences (lists of item IDs) representing a user's historical behavior, processed to generate predictions for the next item(s).3738**Output**: Ranked list of candidate items (or top-K recommendations) for the next interaction, evaluated against ground-truth next items.3940## Scoring recipe4142```python43def compute_metrics(predictions, ground_truth, k=10):44 # predictions: list of item IDs ranked by model45 # ground_truth: list of relevant item IDs (usually 1 for next-item rec)46 # Recall@k47 recall = len(set(predictions[:k]) & set(ground_truth)) / max(len(ground_truth), 1)48 # NDCG@k49 dcg = sum(1.0 / math.log2(i + 2) for i, item in enumerate(predictions[:k]) if item in ground_truth)50 idcg = sum(1.0 / math.log2(i + 2) for i in range(min(len(ground_truth), k)))51 ndcg = dcg / idcg if idcg > 0 else 0.052 return ndcg, recall53```5455## Common pitfalls5657- Using different loss functions (e.g., BPR vs BCE) or training durations across models, which heavily skews performance rankings.58- Inconsistent data splitting (e.g., random vs temporal last-interaction split) or negative sampling strategies.59- Ignoring computational emissions and training time, which are critical for fair comparison in modern SRS evaluations.6061## Evidence (verbatim from paper)6263> To evaluate the performance of sequential recommendation algorithms, we use four widely used metric, also common in Information Retrieval (IR): Precision, Recall, NDCG and MAP. ... For testing, as in (Sun et al., [2019]; Kang and McAuley, [2018]), we keep the last interaction for each user, while for the validation set, the second to last action is retained. All remaining interactions contribute to the training set.6465## Citation6667```bibtex68@misc{betello2024reproducible,69 title={A Reproducible Analysis of Sequential Recommender Systems},70 author={Betello et al. (2024)},71 year={2024},72 note={arXiv:2408.03873}73}74```7576- arXiv: 2408.03873