使用 PyG 进行图神经网络训练
使用 PyG 进行图神经网络训练
前言
最近一直在想创新点,搭模型,想尝试一下图神经网络,想着自己实现一个,但是之前也没有尝试过写 GNN 模型,对其中的实现细节也没有实际尝试过,最后找到了 PyG ,尝试一下之后发现还是挺简单的,也比较好拿到现有模型里面,于是开始挖坑。
PyG (PyTorch Geometric) 是一个基于 PyTorch 的库,可轻松编写和训练图形神经网络 (GNN),用于与结构化数据相关的广泛应用。
目前网上对 PyG 的相关文档并不多,大本部也都是比较重复的内容,因此我主要参考的还是官方文档。具体安装方式参考 PyG Installation。
图结构
建图
首先,我们需要根据数据集进行建图,在 PyG 中,一个 Graph 的通过torch_geometric.data.Data进行实例化,它包括下面两个最主要的属性:
data.x: 节点的特征矩阵,形状为[num_nodes, num_node_features];
data.edge_index: 图的边索引,用 COO 稀疏矩阵格式保存。形状为[2, num_edges];
稀疏矩阵是数值计 ...
【论文阅读】ST-PIL:Spatial-Temporal Periodic Interest Learning for Next Point-of-Interest Recommendation
【论文阅读】ST-PIL: Spatial-Temporal Periodic Interest Learning for Next Point-of-Interest Recommendation
Metadata
authors:: Qiang Cui, Chenrui Zhang, Yafeng Zhang, Jinpeng Wang, Mingchen Cai
container:: Proceedings of the 30th ACM International Conference on Information & Knowledge Management
year:: 2021
DOI:: 10.1145/3459637.3482189
rating:: ⭐⭐⭐
share:: false
comment:: 模型主体为 LSTM,分别学习长期和短期的用户行为模式,并通过 Attention 融合
前言
CIKM,2021:ST-PIL: Spatial-Temporal Periodic Interest Learning for Next Point-of ...
【论文阅读】Next point-of-interest recommendation with auto-correlation enhanced
multi-modal transformer network
【论文阅读】Next point-of-interest recommendation with auto-correlation enhanced multi-modal transformer network
Metadata
authors:: Yanjun Qin, Yuchen Fang, Haiyong Luo, Fang Zhao, Chenxing Wang
container:: Proceedings of the 45th international ACM SIGIR conference on research and development in information retrieval
year:: 2021
DOI:: 10.1145/3477495.3531905
rating:: ⭐⭐⭐⭐
share:: false
comment:: 框架为 Transformer,计算序列自相关性,并考虑访问子序列,同时预测 POI 及其类别
前言
2022,SIGIR: Next point-of-interest recommendation with ...
【论文阅读】Empowering next POI recommendation with multi-relational modeling
【论文阅读】Empowering next POI recommendation with multi-relational modeling
Metadata
authors:: Zheng Huang, Jing Ma, Yushun Dong, Natasha Zhang Foutz, Jundong Li
container:: Proceedings of the 45th international ACM SIGIR conference on research and development in information retrieval
year:: 2021
DOI:: 10.1145/3477495.3531801
rating:: ⭐⭐
share:: false
comment:: 强调用户之间的社交关系建模,使用耦合的 RNN 相互更新用户和 POI 表示
前言
2022 年 SIGIR, Empowering next POI recommendation with multi-relational modeling
问题描述
分别给定用户集合U={u ...
【论文阅读】Hierarchical multi-task graph recurrent network for next POI recommendation
【论文阅读】Hierarchical multi-task graph recurrent network for next POI recommendation
Metadata
authors:: Nicholas Lim, Bryan Hooi, See-Kiong Ng, Yong Liang Goh, Renrong Weng, Rui Tan
container:: Proceedings of the 45th international ACM SIGIR conference on research and development in information retrieval
year:: 2021
DOI:: 10.1145/3477495.3531989
rating:: ⭐⭐⭐⭐
share:: false
comment:: 框架为 LSTM,在隐藏层加入全局时空信息,以多任务预测的形式同时预测 POI 以及 POI 所在区域,并通过区域对 POI 预测进行指导,建立层次结构预测 POI。
前言
SIGIR 2022:Hierarchical multi ...
【论文阅读】Learning Graph-based Disentangled Representations for Next POI Recommendation
【论文阅读】Learning Graph-based Disentangled Representations for Next POI Recommendation
Metadata
authors:: Zhaobo Wang, Yanmin Zhu, Haobing Liu, Chunyang Wang
container:: Proceedings of the 45th International ACM SIGIR Conference on Research and Development in Information Retrieval
year:: 2022
DOI:: 10.1145/3477495.3532012
rating:: ⭐⭐⭐⭐
share:: false
comment:: 将 POI 分解为多个维度进行表示,利用 GCN 进行特征提取,采用多头注意力对各个分解维度进行处理
前言
2022 年 SIGIR:Learning Graph-based Disentangled Representations for Next POI Recommenda ...
【论文阅读】Curriculum Meta-Learning for Next POI Recommendation
【论文阅读】Curriculum Meta-Learning for Next POI Recommendation
Metadata
authors:: Yudong Chen, Xin Wang, Miao Fan, Jizhou Huang, Shengwen Yang, Wenwu Zhu
container:: Proceedings of the 27th ACM SIGKDD Conference on Knowledge Discovery & Data Mining
year:: 2021
DOI:: 10.1145/3447548.3467132
rating:: ⭐⭐⭐
share:: false
comment:: 着眼于 POI 推荐的城市转移问题,使用元学习概念,并引入了困难度 Hardness 概念
前言
2021 年,KDD 会议 POI 推荐:Curriculum Meta-Learning for Next POI Recommendation
OverView
POI 推荐能够为不同城市的用户提供满意的服务,然而,可用的数据通常是稀缺的。 ...
【论文阅读】Location prediction over sparse user mobility traces using RNNs: Flashback in hidden states!
【论文阅读】Location prediction over sparse user mobility traces using RNNs: Flashback in hidden states!
Metadata
authors:: Dingqi Yang, Benjamin Fankhauser, Paolo Rosso, Philippe Cudre-Mauroux
container:: Proceedings of the twenty-ninth international joint conference on artificial intelligence, IJCAI-20
year:: 2020
DOI:: 10.24963/ijcai.2020/302
rating:: ⭐⭐⭐
share:: false
comment:: 模型主体框架为 RNN,在隐藏层更新过程中手动加入时空信息
前言
2020 年,IJCAI 论文:Location prediction over sparse user mobility traces using RNNs: Flashb ...
【论文阅读】Next Point-of-Interest Recommendation with Inferring Multi-step Future Preferences
【论文阅读】Next Point-of-Interest Recommendation with Inferring Multi-step Future Preferences
Metadata
authors:: Lu Zhang, Zhu Sun, Ziqing Wu, Jie Zhang, Yew Soon Ong, Xinghua Qu
container:: Proceedings of the Thirty-First International Joint Conference on Artificial Intelligence
year:: 2022
DOI:: 10.24963/ijcai.2022/521
rating:: ⭐⭐⭐
share:: false
comment:: 学习目标 POI 的左右上下文信息,将用户轨迹分为历史轨迹和当前轨迹,历史轨迹使用 Transformer 用以表示未来偏好,当前轨迹使用 LSTM 学习并进行多步预测,最后整合结果。
前言
2022 年 IJCAI 的一篇论文,POI 推荐:Next Point-of-Interest ...
【论文阅读】Graph-Flashback Network for Next Location Recommendation
【论文阅读】Graph-Flashback Network for Next Location Recommendation
Metadata
authors:: Xuan Rao, Lisi Chen, Yong Liu, Shuo Shang, Bin Yao, Peng Han
container:: Proceedings of the 28th ACM SIGKDD Conference on Knowledge Discovery and Data Mining
year:: 2022
DOI:: 10.1145/3534678.3539383
rating:: ⭐⭐⭐⭐
share:: true
comment:: 构建 STKG 并设计相似度函数生成 POI 转移矩阵,利用 POI 转移矩阵对 POI 进行加强并获取用户偏好信息,模型主体框架为 RNN,同时在隐藏层更新过程中手动加入额外信息。另外几个相似度函数也是亮点。
前言
依旧是 POI 推荐方向的论文,2022KDD 最新的:Graph-Flashback Network for Next Location R ...