Papers › gSASRec: Reducing Overconfidence in Sequential Recommendation Trained with Negative Sampling

gSASRec: Reducing Overconfidence in Sequential Recommendation Trained with Negative Sampling

14 Aug 2023arXiv:2308.07192archive 2025-07-28

Aleksandr Petrov, Craig Macdonald

A large catalogue size is one of the central challenges in training recommendation models: a large number of items makes them memory and computationally inefficient to compute scores for all items during training, forcing these models to deploy negative sampling. However, negative sampling increases the proportion of positive interactions in the training data, and therefore models trained with negative sampling tend to overestimate the probabilities of positive interactions a phenomenon we call overconfidence. While the absolute values of the predicted scores or probabilities are not important for the ranking of retrieved recommendations, overconfident models may fail to estimate nuanced differences in the top-ranked items, resulting in degraded performance. In this paper, we show that overconfidence explains why the popular SASRec model underperforms when compared to BERT4Rec. This is contrary to the BERT4Rec authors explanation that the difference in performance is due to the bi-directional attention mechanism. To mitigate overconfidence, we propose a novel Generalised Binary Cross-Entropy Loss function (gBCE) and theoretically prove that it can mitigate overconfidence. We further propose the gSASRec model, an improvement over SASRec that deploys an increased number of negatives and the gBCE loss. We show through detailed experiments on three datasets that gSASRec does not exhibit the overconfidence problem. As a result, gSASRec can outperform BERT4Rec (e.g. +9.47% NDCG on the MovieLens-1M dataset), while requiring less training time (e.g. -73% training time on MovieLens-1M). Moreover, in contrast to BERT4Rec, gSASRec is suitable for large datasets that contain more than 1 million items.

PaperPDFCodeCode Syntology ran

In Syntology Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="2308.07192")

Code

Syntology Ran 4 of 8 code samples harvested from 2 repositories linked to this paper; 4 have no recorded run. Of those that ran: 1 ran · honoured contract; 1 ran · violated contract; 2 ran · our draft was wrong.

By repository: official repository: 5 samples from 1 repository, 4 ran; community (archive-listed): 3 samples from 1 repository, 0 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

asash/gsasrec officialmentioned in papermentioned on GitHubtf report
asash/gsasrec-pytorch mentioned on GitHubpytorchApache-2.0 report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

8 samples harvested; 4 ran; 1 honoured the contract we drafted; 4 have no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.

1ran · honoured contract
1ran · violated contract
2ran · our draft was wrong
4unverified

Licence: 0 of the 8 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from 2 repositories linked to this paper, official or community; each sample names its own and says which. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

get_max_test_users asash/gsasrec/evaluation/run_experiment.py official repository ran · honoured contract Apache-2.0 (permissive) · 81e3e95accb45fcd · report
get_metrics asash/gsasrec/evaluation/analyze_experiment_in_progress.py official repository ran · our draft was wrong fingerprinted Apache-2.0 (permissive) · 455c95e4d2eb8300 · report
is_experiment_start asash/gsasrec/evaluation/analyze_experiment_in_progress.py official repository ran · violated contract Apache-2.0 (permissive) · 90f30c1ba3ef9bf4 · report
parse_experiment asash/gsasrec/evaluation/analyze_experiment_in_progress.py official repository ran · our draft was wrong Apache-2.0 (permissive) · d2263417dafdd010 · report
get_global_tensorboard_dir asash/gsasrec/evaluation/run_experiment.py official repository unverified Apache-2.0 (permissive) · c77b2756000b5584 · report
collate_val_test asash/gsasrec-pytorch/dataset_utils.py community (archive-listed) unverified Apache-2.0 (permissive) · 61aa1a96b85940bd · report
collate_with_random_negatives asash/gsasrec-pytorch/dataset_utils.py community (archive-listed) unverified Apache-2.0 (permissive) · 7eab2ae2aa929824 · report
get_num_items asash/gsasrec-pytorch/dataset_utils.py community (archive-listed) unverified Apache-2.0 (permissive) · df8bda213ff3826a · report

Tasks

Sequential Recommendation

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

Methods

fail

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections