• 中国计算机学会会刊
  • 中国科技核心期刊
  • 中文核心期刊

计算机工程与科学 ›› 2025, Vol. 47 ›› Issue (5): 902-911.

• 人工智能与数据挖掘 • 上一篇    下一篇

基于注意力机制的特征融合推荐模型

马汉达,李腾飞   

  1. (江苏大学计算机科学与通信工程学院,江苏 镇江 212013) 
  • 收稿日期:2024-01-15 修回日期:2024-05-16 出版日期:2025-05-25 发布日期:2025-05-27
  • 基金资助:
    镇江市重点研发计划(GY2023034)

A feature fusion recommendation model based on attention mechanism

MA Handa,LI Tengfei   

  1. (School of Computer Science and Communication Engineering,Jiangsu University,Zhenjiang 212013,China)
  • Received:2024-01-15 Revised:2024-05-16 Online:2025-05-25 Published:2025-05-27

摘要: 针对目前推荐系统难以获得特征信息,缺乏有效的方法来表示特征信息的权重的问题,提出了一种基于注意力机制与特征融合的推荐模型FFADeepCF_SPS。首先,针对特征表示不够充分的问题,使用因子分解机融合特征,将特征从一维扩展到高维,从而获得特征的低阶表示,然后使用深度神经网络学习高阶特征,并通过一个全连接层将2种特征组合起来,以获得所需的特征表示;其次,针对单头注意力机制过度倾斜权重的问题,使用将输入切分成多个单头分别计算其注意力权重的多头注意力机制,再经由线性变换将各结果进行拼接,获得最终的输出;最后,结合上述2点构建了基于注意力机制与特征融合的推荐模型。为了验证模型的有效性,在4个公开数据集上与基线模型GMF、DeepCF_SPS和CNN- BiLSTM进行了对比实验以及消融实验。实验结果表明,在不同规模的数据集上,所提模型与基线模型相比在MSE、RMSE、MAE评价指标上表现出的性能均更优。

关键词: 注意力机制, 特征融合, 推荐模型, 评分预测

Abstract: Addressing the current challenges in recommendation systems, which include difficulties in obtaining feature information and the lack of effective methods to represent the weights of feature information, this study proposes a recommendation model based on the attention mechanism and feature fusion, named FFADeepCF_SPS. Firstly, to address the inadequate feature representation, the Factorization Machines (FM) are employed to fuse features, extending them from one-dimensional to high- dimensional space to obtain low-order feature representations. Subsequently, a Deep Neural Network (DNN) is used to learn high-order features, and the two types of features are combined through a fully connected layer to obtain the required feature representation. Secondly, to address the issue of excessive weight skewing in the single-head attention mechanism, a multi-head attention mechanism is adopted, where the input is divided into multiple single heads to calculate their attention weights separately. The results from each head are then concatenated through a linear transformation to obtain the final output. Finally, combining the above two points, a recommendation model based on the attention mechanism and feature fusion is constructed. To validate the effectiveness of the model, comparative experiments and ablation studies are conducted on four public datasets against baseline models such as GMF, DeepCF_SPS, and CNN-BiLSTM. The experimental results show that the proposed model outperforms the baseline models in terms of MSE, RMSE, and MAE evaluation metrics across datasets of different sizes.

Key words: attention mechanism, feature fusion, recommendation model, score prediction