wpgrec-eval
WPGRec: Wavelet Packet Guided Graph Enhanced Sequential Recommendation — Liu et al. (2026) (arXiv:2604.21305, 2026)
What this evaluates
Evaluates a model's ability to perform sequential recommendation by predicting the next item a user will interact with based on their chronological interaction history. It probes the model's capacity to capture temporal dynamics and collaborative filtering signals while ranking items against a full candidate set.
Datasets
- MovieLens-1M* — total ?; splits: train (-1), val (-1), test (-1)
- Amazon-Beauty — total ?; splits: train (-1), val (-1), test (-1)
- Amazon-Sports — total ?; splits: train (-1), val (-1), test (-1)
- LastFM (HetRec 2011) — total ?; splits: train (-1), val (-1), test (-1)
Metrics
HR@10 (primary) — range: [0, 1]
- Hit Ratio at K equals 1 if the ground-truth item appears in the top-K predicted items, otherwise 0.
HR@20 — range: [0, 1]
- Hit Ratio at K equals 1 if the ground-truth item appears in the top-K predicted items, otherwise 0.
NDCG@10 — range: [0, 1]
- Normalized Discounted Cumulative Gain at K computes the discounted gain at the predicted rank of the ground-truth item, normalized by the ideal DCG (which is 1 for a single relevant item), capped at K.
NDCG@20 — range: [0, 1]
- Normalized Discounted Cumulative Gain at K computes the discounted gain at the predicted rank of the ground-truth item, normalized by the ideal DCG (which is 1 for a single relevant item), capped at K.
Input / output format
Input: A user's chronological sequence of previously interacted items (training history), optionally padded or truncated to a fixed maximum length.
Output: A score or ranking for every item in the catalog, used to produce a top-K ranked list excluding training items.
Scoring recipe
def compute_metrics(predictions, ground_truth, k_values=[10, 20]):
ranked_items = np.argsort(predictions)[::-1]
results = {}
for k in k_values:
top_k = ranked_items[:k]
hit = 1 if ground_truth in top_k else 0
results[f'HR@{k}'] = hit
if hit:
rank_pos = np.where(ranked_items == ground_truth)[0][0] + 1
results[f'NDCG@{k}'] = 1.0 / np.log2(rank_pos + 1)
else:
results[f'NDCG@{k}'] = 0.0
return results
Common pitfalls
- Using sampled negatives for training or evaluation instead of full-softmax/full-ranking over the entire item set.
- Failing to exclude items present in the user's training history from the candidate set during evaluation, which artificially inflates metrics.
- Not splitting data chronologically, which leaks future interactions into the training set.
Evidence (verbatim from paper)
We use a full-ranking Top-$K$ protocol, where the ground-truth test item is ranked against the entire item set (excluding items seen in the user’s training history). We report HR@10, HR@20, NDCG@10, and NDCG@20. No sampled negatives are used in either training or evaluation: training uses full-softmax cross-entropy over the entire item set, and evaluation uses full-ranking over all candidate items.
Citation
@misc{liu2026wpgrec,
title={WPGRec: Wavelet Packet Guided Graph Enhanced Sequential Recommendation},
author={Liu et al. (2026)},
year={2026},
note={arXiv:2604.21305}
}
1---2name: wpgrec-eval3description: Evaluates a model's ability to perform sequential recommendation by predicting the next item a user will interact with based on their chronological interaction history. It probes the model's capacity to capture temporal dynamics and collaborative filtering signals while ranking items against a full candidate set. Use when the user wants to benchmark on MovieLens-1M*, Amazon-Beauty, Amazon-Sports, LastFM (HetRec 2011), or asks about evaluating this task. Reports HR@10.4---56# wpgrec-eval78> WPGRec: Wavelet Packet Guided Graph Enhanced Sequential Recommendation — Liu et al. (2026) (arXiv:2604.21305, 2026)910## What this evaluates1112Evaluates a model's ability to perform sequential recommendation by predicting the next item a user will interact with based on their chronological interaction history. It probes the model's capacity to capture temporal dynamics and collaborative filtering signals while ranking items against a full candidate set.1314## Datasets1516- **MovieLens-1M*** — total ?; splits: train (-1), val (-1), test (-1)17- **Amazon-Beauty** — total ?; splits: train (-1), val (-1), test (-1)18- **Amazon-Sports** — total ?; splits: train (-1), val (-1), test (-1)19- **LastFM (HetRec 2011)** — total ?; splits: train (-1), val (-1), test (-1)2021## Metrics2223- `HR@10` **(primary)** — range: [0, 1]24 - Hit Ratio at K equals 1 if the ground-truth item appears in the top-K predicted items, otherwise 0.25- `HR@20` — range: [0, 1]26 - Hit Ratio at K equals 1 if the ground-truth item appears in the top-K predicted items, otherwise 0.27- `NDCG@10` — range: [0, 1]28 - Normalized Discounted Cumulative Gain at K computes the discounted gain at the predicted rank of the ground-truth item, normalized by the ideal DCG (which is 1 for a single relevant item), capped at K.29- `NDCG@20` — range: [0, 1]30 - Normalized Discounted Cumulative Gain at K computes the discounted gain at the predicted rank of the ground-truth item, normalized by the ideal DCG (which is 1 for a single relevant item), capped at K.3132## Input / output format3334**Input**: A user's chronological sequence of previously interacted items (training history), optionally padded or truncated to a fixed maximum length.3536**Output**: A score or ranking for every item in the catalog, used to produce a top-K ranked list excluding training items.3738## Scoring recipe3940```python41def compute_metrics(predictions, ground_truth, k_values=[10, 20]):42 ranked_items = np.argsort(predictions)[::-1]43 results = {}44 for k in k_values:45 top_k = ranked_items[:k]46 hit = 1 if ground_truth in top_k else 047 results[f'HR@{k}'] = hit48 if hit:49 rank_pos = np.where(ranked_items == ground_truth)[0][0] + 150 results[f'NDCG@{k}'] = 1.0 / np.log2(rank_pos + 1)51 else:52 results[f'NDCG@{k}'] = 0.053 return results54```5556## Common pitfalls5758- Using sampled negatives for training or evaluation instead of full-softmax/full-ranking over the entire item set.59- Failing to exclude items present in the user's training history from the candidate set during evaluation, which artificially inflates metrics.60- Not splitting data chronologically, which leaks future interactions into the training set.6162## Evidence (verbatim from paper)6364> We use a full-ranking Top-$K$ protocol, where the ground-truth test item is ranked against the entire item set (excluding items seen in the user’s training history). We report HR@10, HR@20, NDCG@10, and NDCG@20. No sampled negatives are used in either training or evaluation: training uses full-softmax cross-entropy over the entire item set, and evaluation uses full-ranking over all candidate items.6566## Citation6768```bibtex69@misc{liu2026wpgrec,70 title={WPGRec: Wavelet Packet Guided Graph Enhanced Sequential Recommendation},71 author={Liu et al. (2026)},72 year={2026},73 note={arXiv:2604.21305}74}75```7677- arXiv: 2604.21305