Skip to content

BERT4Rec性能问题 #1293

Answered by Sherry-XLL
kuzma-long asked this question in Q&A
May 23, 2022 · 1 comments · 1 reply
Discussion options

You must be logged in to vote

@kuzma-long 您好,首先 DuoRec 论文中固定的训练集批次大小为 256(The training batch size is set to 256.),即 train_batch_size=256,但是您提供的配置文件中设置的值为 128,与原文不符。

其次,论文中提到 The Dropout [40] rate on the embedding matrix and the Transformer module are chosen from {0.1, 0.2, 0.3, 0.4, 0.5}.,即模型的超参数 hidden_dropout_probattn_dropout_prob 都需要经过调节才能达到最优结果。

我们团队经过调节 hidden_dropout_probattn_dropout_prob 得到在 Amazon Beauty 数据集上的最优参数配置为:

best params:  {'attn_dropout_prob': 0.2, 'hidden_dropout_prob': 0.3}

在最优的参数配置下,BERT4Rec 的结果为:

attn_dropout_prob:0.2, hidden_dropout_prob:0.3
Valid result:
recall@5 : 0.0377    recall@10 : 0.0619    mrr@5 : 0.0188    mrr@10 : 0.022    ndcg@5 : 0.0235    ndcg@10 : 0.0313    hit@5 : 0.0377    hit

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@kuzma-long
Comment options

Answer selected by kuzma-long
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
FAQ Frequently Asked Questions
2 participants