首页 > 其他分享 >LGMRec Local and Global Graph Learning for Multimodal Recommendation

LGMRec Local and Global Graph Learning for Multimodal Recommendation

时间:2024-05-27 11:44:25浏览次数:16  
标签:mathbb 模态 mathbf tilde Graph Global Multimodal mathcal embeddings

目录

Guo Z., Li J., Li G., Wang C., Shi S. and Ruan B. LGMRec: Local and global graph learning for multimodal recommendation. AAAI, 2024.

本文采用分解的方法进行对 ID 和 模态信息进行独立处理, 再加上利用超图对模态信息进行 global 的处理.

符号说明

  • \(\mathcal{U} = \{u\}\), users;
  • \(\mathcal{I} = \{i\}\), items;
  • \(\mathbf{e}_u \in \mathbb{R}^d\), user ID embeddings;
  • \(\mathbf{e}_i \in \mathbb{R}^d\), item ID embeddings;
  • \(\mathbf{E}^{id} \in \mathbb{R}^{(|\mathcal{U}| + |\mathcal{I}|) \times d}\), ID embeddings;
  • \(\mathbf{R} \in \mathbb{R}^{|\mathcal{U}| \times |\mathcal{I}|}\), interaction matrix;
  • \(m \in \mathcal{M} = \{v, t\}\), 模态;
  • \(\mathbf{e}_i^m \in \mathbb{R}^{d_m}\), item \(i\) 对应模态 embedding;
  • \(\tilde{\mathbf{e}}_i^m = \mathbf{W}_m \mathbf{e}_i^m \in \mathbb{R}^d\), 经过模态映射后的
  • \(\mathbf{A}\), 邻接矩阵;
  • \(\tilde{\mathbf{A}}\), normalized 邻接矩阵

Motivation

  • 过往的方法, 往往模态 embeddings 和 ID embeddings 共享一个 user embeddings, 但是作者发现这种情况会导致在训练的时候, 二者对于 user embeddings 的更新的贡献可能是截然相反的:

  • 如上图所示, 在训练的开始, 这种情况更外明显.

  • 此外, 作者认为, 模态信息的很重要的一个点是能够反映用户对于 color, style, shape 等属性信息的偏好, 所以应该特别显式建模出这一点.

LGMRec

Local Graph Embedding

  • 首先对于 ID, 采用 LightGCN 进行信息传播:

    \[\mathbf{E}_{lge}^{id} = \frac{1}{L + 1} \sum_{l=0}^L \mathbf{A}^l \mathbf{E}^{id}. \]

  • 其次对于模态, 首先我们初始化 user 的 embeddings 为

    \[\tilde{\mathbf{e}}_u^m = \frac{1}{|\mathcal{N}_u|} \sum_{i \in \mathcal{N}_u} \tilde{\mathbf{e}}_i^m. \]

  • 接着

    \[\tilde{\mathbf{E}}_{lge}^m = \tilde{A}^K \tilde{\mathbf{E}}^{m}. \]

Global Graph Embedding

  • 作者首先引入 \(\mathbf{V}^m \in \mathbb{R}^{|\mathcal{I}| \times A}, \mathbf{H}^m \in \mathbb{R}^{|\mathcal{U}| \times A}\) 去学习 item, user 的属性偏好,

    \[\mathbf{H}_i^m = \mathbf{E}_i^m {\mathbf{V}^m}^T, \quad \mathbf{H}_u^m = \mathbf{E}_u^m {\mathbf{H}^m}^T. \]

    其中 \(\mathbf{A}_u \in \mathbb{R}^{|\mathcal{U}| \times \mathcal{I}|}\) 是 user-related adjacency matrix (是不是 \(\mathbf{R}\) 的行归一化?).

  • 这样一来, 每个 item, user 都映射到了一个属性 \(a\), 为了确保每个 item 都尽可能映射到一个属性上, 作者额外通过 Gumbel-Softmax 来强化.

  • 接下来, item 的 embeddings 更新方式如下:

    \[\mathbf{E}_{i}^{m, h + 1} = \text{Drop}(\tilde{\mathbf{H}}_i^m) \text{Drop}(\tilde{\mathbf{H}_i^m}^{T}) \mathbf{E}_i^{m, h}. \]

    Drop 表示 dropout.
    需要注意的是, 这里 \(\mathbf{E}_i^{m, 0} = \mathbf{E}_{i, lge}^{id}\). 对于 user, 更新方式是类似的.

  • 最后,

    \[\mathbf{E}_{ghe} = \sum_{m \in \mathcal{M}} \mathbf{E}^{m, H}, \quad \mathbf{E}^{m, H} = [\mathbf{E}_u^{m, H}, \mathbf{E}_{i}^{m, H}]. \]

  • 为了保证不同模态学到的兴趣是一致的, 作者引入对比损失:

    \[\mathcal{L}_{\text{HCL}}^u = \sum_{u \in \mathcal{U}} -\log \frac{ \exp(s(\mathbf{E}_u^{v, H}, \mathbf{E}_u^{t, H}) / \tau) }{ \sum_{u' \in \mathcal{U}} \exp(s(\mathbf{E}_u^{v, H}, \mathbf{E}_{u'}^{t, H})/ \tau) }, \]

    \(s(\cdot, \cdot)\) 表示 cosine 相似度.
    对于 item 的 \(\mathcal{L}_{\text{HCL}}^i\) 是类似定义的.

Fusion

  • 最后的 embeddings 为

    \[\mathbf{E}^* = \mathbf{E}_{lge}^{id} + \sum_{m \in \mathcal{M}} \text{Norm}(\mathbf{E}_{lge}^m) + \alpha \text{Norm} (\mathbf{E}_{ghe}). \]

  • score 通过内积完成, 损失采用的是 BPR 损失加上上面说的对比损失.

代码

[official]

标签:mathbb,模态,mathbf,tilde,Graph,Global,Multimodal,mathcal,embeddings
From: https://www.cnblogs.com/MTandHJ/p/18215187

相关文章

  • 风控图算法Graph Embedding(DeepWalk&Node2Vec)代码实现
    风控图算法GraphEmbedding(DeepWalk&Node2Vec)代码实现在上一篇中我们简单介绍了常用的GraphEmbedding算法,今天来对其中较为常用的两种算法——DeepWalk和Node2Vec进行python代码实现。文章目录风控图算法GraphEmbedding(DeepWalk&Node2Vec)代码实现一、KarateClub算......
  • php$GLOBALS['HTTP_RAW_POST_DATA']报错一例
    下载下来的代码提示HTTP_RAW_POST_DATA已经废弃,不再支持,这个报错又引起header(因为用了session)之前输出信息报错。查半天查不到原因。我找了php5.6不支持HTTP_RAW_POST_DATA,不知道php7,php8更会报什么错呢开始以为某php文件,引用了HTTP_RAW_POST_DATA,引起的,不是的,访问任意文件都报......
  • Codeforces Global Round 12 C2. Errich-Tac-Toe (Hard Version) 题解 构造
    Errich-Tac-Toe(HardVersion)题目描述TheonlydifferencebetweentheeasyandhardversionsisthattokensoftypeOdonotappearintheinputoftheeasyversion.ErrichtogaveMonogonthefollowingchallengeinordertointimidatehimfromtakingh......
  • java 通过 microsoft graph 调用outlook(三)
    这次会添加一个Reply接口,并且使用6.10.0版本 直接上代码一,POM<!--office365--><dependency><groupId>com.microsoft.graph</groupId><artifactId>microsoft-graph</artifactId><......
  • 二分图的判定(Bipartite graph pending)
    二分图的判定(Bipartitegraphpending)////CreatedbyLANSGANBSon24-5-23.///**codetemplate:https://github.com/LANSGANBS/code-template*local:C:\Users\18019\CLionProjects\.cpp-code*URL:NULL*Last_Status:NULL*写完这道就去原*/#include<b......
  • vue搭建脚手架 出现问题Command vue init requires a global addon to be installed.
    使用vue-cli脚手架命令vueinitwebpackmy-App创建项目回车时显示Commandvueinitrequiresa global addontobeinstalled.Pleaserun yarn globaladd@vue/cli-initandtryagain. 解决方法:npminstall-g@vue/cli-init 然后创建项目,正常。 ......
  • 论文阅读:Multi-Grained Dependency Graph Neural Network for Chinese Open Informati
    LyuZ,ShiK,LiX,etal.Multi-graineddependencygraphneuralnetworkforChineseopeninformationextraction[C]//Pacific-AsiaConferenceonKnowledgeDiscoveryandDataMining.Cham:SpringerInternationalPublishing,2021:155-167.MGD-GNN开源代码引言......
  • 【论文阅读】FlexGraph: A Flexible and Efficient Distributed Framework for GNN Tr
    阅读思考问题:PleasebrieflydescribehowhierarchicaldependencygraphsarebuiltinFlexGraph,andpointoutthespecificstageintheNAUabstractionwherethisprocesstakesplace.请简要描述在FlexGraph中如何构建分层依赖图,并指出在NAU抽象中的具体阶段发生此......
  • Vue-与-GraphQL-应用构建指南-全-
    Vue与GraphQL应用构建指南(全)原文:zh.annas-archive.org/md5/60CC414A1AE322EC97E6A0F8A5BBE3AD译者:飞龙协议:CCBY-NC-SA4.0前言自2012年Facebook发布以来,GraphQL已经席卷了互联网。像Airbnb和Audi这样的大公司已经开始采用它,而中小型公司现在也意识到了这种基......
  • Qt 中用Q_GLOBAL_STATIC来实现线程安全的单例模式
    官方说明:Qt中有个宏Q_GLOBAL_STATIC可以用来创建一个全局静态变量,下面看下官方文档的说明:Q_GLOBAL_STATIC(Type,VariableName)CreatesaglobalandstaticobjectoftypeQGlobalStatic,ofnameVariableNameandthatbehavesasapointertoType.Theobjectcr......