第22卷第10期2023年10月Vol.22No.10Oct.2023软件导刊SoftwareGuide结合注意力机制与循环神经网络的序列推荐模型吴晓,成卫青(南京邮电大学计算机学院,江苏南京210046)摘要:在真实场景的推荐系统中,使用用户所有数据以训练推荐模型,存在忽略数据间时间顺序和学习到的用户兴趣是静态的问题。鉴于此,提出一种结合注意力机制与GRU循环神经网络的序列推荐模型,对用户的行为序列进行显式的动态建模,挖掘用户的长期偏好与短期偏好,并结合用户自身信息构建自适应分配权重的门控单元,将长期偏好与短期偏好结合,以此预测用户可能发生的下一个行为。在Amazon数据集上的实验结果表明,相较于目前基准推荐模型GRU4REC、STAMP、SASREC等,该模型在归一化折损累计增益(NDCG)和命中率(HIT)指标上分别至少提升了14.7%和8.8%,表明该模型能够更加准确地捕捉用户兴趣。关键词:序列推荐;注意力机制;循环神经网络;深度学习;长短期偏好DOI:10.11907/rjdk.222134开放科学(资源服务)标识码(OSID):中图分类号:TP183文献标识码:A文章编号:1672-7800(2023)010-0095-10SequenceRecommendationModelCombiningAttentionMechanismandRecurrentNeuralNetworkWUXiao,CHENGWeiqing(SchoolofComputerScience,NanjingUniversityofPostsandTelecommunications,Nanjing210046,China)Abstract:Inareal-worldrecommendationsystem,alluserdataisusedtotraintherecommendationmodel,butthereisaproblemofignor⁃ingthetemporalorderbetweendataandthestaticlearningofuserinterests.Inviewofthis,asequencerecommendationmodelcombiningat⁃tentionmechanismandGRUrecurrentneuralnetworkisproposed,whichexplicitlyanddynamicallymodelstheuser´sbehaviorsequence,minestheuser´slong-termandshort-termpreferences,andcombinestheuser´sowninformationtoconstructanadaptiveweightedgatingunittocombinelong-termandshort-termpreferences,inordertopredictthenextbehaviorthattheusermayexperience.TheexperimentalresultsontheAmazondatasetshowthatcomparedtothecurrentbenchmarkrecommendationmodelsGRU4REC,STAMP,SASREC,etc.,themodelhasimprovedatleast14.7%and8.8%innormalizeddiscountedcumulativegain(NDCG)andhitrate(HIT)indicators,respectively,indicat⁃ingthatthemodelcanmoreaccuratelycaptureuserinterest.K...