1.Task
异构图表示学习
2.Motivation
先前的工作存在如下问题:
- 忽略节点的属性特征
- 舍弃元路径内部节点,仅使用元路径中的头尾节点
- 仅使一种元路径
3.Methodology
为解决上述三个问题,作者提出了MAGNN,该模型含有三个组件,每个组件对应解决上述提到的三个问题:
3.1 node content transformation
目的:合理利用节点的属性特征
动机:使用节点的原始属性特征面临以下两个问题:
- 不同类型节点的属性特征维度可能不同
- 若特征维度相同,特征向量也并非存在于同一个特征空间
方法:通过给每个节点类型都设置了参数W来将其特征映射到同一个特征空间中
3.2 intra-metapath aggregation
目的:使得节点嵌入包含某种metapath的结构和语义信息
动机和方法:1.metapath的内部节点含有可利用的信息,因此提出了mepath instance encoder。2.同类metapath下不同的实例重要程度不同,因此使用了attention。
metapath instance encoder:
- Mean
- Linear:mean后再线性变换
- Relational rotation:前两种方法将metapath中的点看作集合处理,而忽略了metapath中的序列信息。引入两两节点之间的关系向量r来获得该metapath embedding
输入:目标节点v和该节点所在的metapath,输出:该节点在该metapath下的embedding
通过该组件,可以获得任一节点v(节点类型为A,A可以是任一节点类型)在所有以A为起始或终止节点的metapath下的embedding
3.3 inter-metapath aggregation
目的:使得node embedding含有丰富的结构、语义信息
动机:每个节点在不同metapath下的信息不同,并且不同metapath在异构图中的重要性不同
方法:
1.得到每种metapth的embedding
2.计算每条metapath在该类metapath(以同一节点类型起始或终止的metapath)下的权重占比
3.目标节点v最终embedding = 某metapath下的embedding * 该metapath权重的加权和
4.最后再加一层映射
3.4 总流程
3.5 训练策略
1.半监督(用于node classification&node clustering):使用带有label的节点最小化交叉熵损失
2.无监督(用于link prediction):原理与对比学习类似。正样本对为图中连接的边,负样本对为未连接的同类型边
4. Datasets
- node classification & node clustering:
- IMDB(movie节点有label:Action, Comedy, and Drama)
- DBLP(author节点有label:Database, Data Mining, Artificial Intelligence,
and Information Retrieval)
- link predication:Last.fm(无label无feature)
5. Metrics
- node classification(SVM):Marco-F1、Micro-F1
- node clustering(K-Means):normalized mutual information (NMI) and adjusted Rand
index (ARI) - link prediction:area under the ROC curve (AUC) and average precision (AP)
6. About baseline
- traditional homogeneous models:
- LINE
- node2vec
- traditional heterogeneous models
- ESim
- metapath2vec
- HERec
- homogeneous GNNs
- GCN
- GAT
- heterogeneous GNNs
- GATNE
- HAN
7. Questions and Ideas
7.1 Graph attention的原理?
不理解为什么两个节点向量拼接后经过参数矩阵的点积映射为的标量表示为注意力值。站在模型训练优化目标视角上可以有所感觉,但是不能理解。
7.2 inter-metapath aggregation选取的metapath的合理性?
节点v(类型为A)提取信息时利用以节点类型A起始或终止的metapath(如A-P-A或A-P-P-A),但并不包括A位于路径内部节点的metapath(如P-A-P,而P-A-P是用于提取类型P的节点时使用的metapath),这样是否存在信息损失?
7.3 Relational rotation encoder中的关系向量r是如何得到的?
8. “One sentence” summary
To solve three previous problems(omit nodes’ attribute feature, do not use the intermediate nodes in the metapath, and only apply one kind of metapath) in heterogeneous graph embedding works, MAGNN proposed three main components to handle these problems correspondingly. First, MAGNN uses node content transformation to ensure the original feature of all kinds of nodes is in the same vector space. Second, MAGNN applies metapath instance encoder to extract the structure and semantic information of the metapath instance which can later be used to calculate the importance of the metapath instance to the target node by using graph attention mechanism, after that we can obtain different representations of target node in different metapaths. Third, the attention mechanism is applied to assign different weights to different metapaths which helps to aggregate a more comprehensive node embedding.