[论文精读]Do Transformers Really Perform Bad for Graph Representation?

news2024/10/5 15:28:38

论文网址:[2106.05234] Do Transformers Really Perform Bad for Graph Representation? (arxiv.org)

论文代码:https://github.com/Microsoft/Graphormer

英文是纯手打的!论文原文的summarizing and paraphrasing。可能会出现难以避免的拼写错误和语法错误,若有发现欢迎评论指正!文章偏向于笔记,谨慎食用!

1. 省流版

1.1. 心得

1.2. 论文总结图

2. 论文逐段精读

2.1. Abstract

        ①Transformer did not achieve ideal performance comparing with mainstream GNN variants

        ②The authors put forward Graphormer to change this situation

leaderboard  n. 排行榜;通栏广告

2.2. Introduction

        ①Graphormer performs outstanding on Open Graph Benchmark Large-Scale Challenge (OGB-LSC), and several popular leaderboards such as OGB and Benchmarking-GNN 

        ②Transformer only takes node similarity into consideration, whereas dose not focus on structural relationship. Ergo, Graphormer add structural encoding

        ③They capture node importance by Centrality Encoding, extract centrality by Degree centrality and present structural relationship by Spatial Encoding

        ④Graphormer occupies the top spot on the OGB-LSC, MolHIV, MolPCBA, ZINC and other rankings

de-facto  实际上的:指在实际上拥有某种地位或权力,而不是在法律上或正式上拥有

canonical  adj. 根据教规的,按照宗教法规的;真经的,正经的;标准的,典范的;准确的,权威的;公认的,依据科学法则的;(数学表达式)最简洁的;(与)公理(或标准公式)(有关)的;(与)教会(或教士)(有关)的

2.3. Preliminary

(1)Graph Neural Network (GNN)

        ①Presenting graph as G=\left ( V,E \right ), where V=\{v_{1},v_{2},\cdots,v_{n}\} denotes the node set, n=\left | V \right | denotes the number of nodes. Define the feature vector of v_i named x_i and node representation of v_i at the l-th layer is h_i^{\left ( l \right )}h_i^{\left ( 0 \right )}=x_i

        ②The usual GNN is representated as:

a_i^{(l)}=\text{AGGREGATE}^{(l)}\left(\left\{h_j^{(l-1)}:j\in\mathcal{N}(v_i)\right\}\right)\\\quad h_i^{(l)}=\text{COMBINE}^{(l)}\left(h_i^{(l-1)},a_i^{(l)}\right)\\h_G=\text{READOUT}\left(\left\{h_i^{(L)}\mid v_i\in G\right\}\right)

where \mathcal{N}(v_i) denotes the neighbors (unknow hops) of v_i

(2)Transformer

        ①Each layer in Transformer contains a self-attention module and a position-wise feed-forward network (FFN)

        ②The input of self-attention module is {H}=\left[h_{1}^{\top},\cdots,h_{n}^{\top}\right]^{\top}\in\mathbb{R}^{n\times d}, where d represents the hidden dimension, h_{i}\in\mathbb{R}^{1\times d} denotes the hidden representation at position i

        ③The function of attention mechanism:

\begin{aligned}Q&=HW_Q,W_{Q}\in\mathbb{R}^{d\times d_{K}} \quad K=HW_K,W_{K}\in\mathbb{R}^{d\times d_{K}} \quad V=HW_V,W_{V}\in\mathbb{R}^{d\times d_{V}} \\A&=\frac{QK^\top}{\sqrt{d_K}},\quad\mathrm{Attn}\left(H\right)=\mathrm{softmax}\left(A\right)V\end{aligned}

where A is a similarity matrix of queries and keys

        ④They apply simple single-head self-attention mechanism and define d_K=d_V=d. Moreover, they eliminate bias in multi-head attenton part

2.4. Graphormer

2.4.1. Structural Encodings in Graphormer

        The overall framework of Graphormer, which contains three modules:

(1)Centrality Encoding

        ①For directed graph, their centrality encoding for input will be:

h_{i}^{(0)}=x_{i}+z_{\deg^{-}(v_{i})}^{-}+z_{\deg^{+}(v_{i})}^{+}

where z_{\deg^{-}(v_{i})}^{-}\in \mathbb{R}^d is the learnable embedding vector of indegree \deg^{-}(v_{i})z_{\deg^{+}(v_{i})}^{+}\in \mathbb{R}^d is the learnable embedding vector of outdegree \deg^{+}(v_{i})呃呃我现在不太能想象z是个什么样的玩意儿

        ②For undirected graph, just one \deg(v_{i}) replaces \deg^{+}(v_{i}) and \deg^{-}(v_{i})

(2)Spatial Encoding

        ①There is no sequence in graph presentation. To this end, they provide a new spatial encoding method to present spatial relations between v_i and v_j:

{\phi\left(v_{i},v_{j}\right):V\times V\rightarrow\mathbb{R}}

where \phi\left(v_{i},v_{j}\right) they choose there is the shortest path (SPD). If there is no path, then set value as -1.

        ②⭐Assigning a learnable scalar to each feasible output value as bias term in self-attention part(鼠鼠注意力学得太菜了捏

        ③The Q-K product matrix A can be calculated by:

A_{ij}=\frac{(h_iW_Q)(h_jW_K)^T}{\sqrt{d}}+b_{\phi(v_i,v_j)}

where b_{\phi(v_i,v_j)} denotes learnable scalar

        ④Paraphrase不动了这里上一句中文,文中的意思大概是上式比起传统的GNN可以体现全局视野,每个节点都开天眼。然后还能体现一下学习性,作者举例说如果b_{\phi(v_i,v_j)}\phi\left(v_{i},v_{j}\right)负相关的话可能每个节点会更在意邻近节点。

(3)Edge Encoding in the Attention

        ①In the previous works, adding edge features into corresponding node features or adding edge features and aggregated node features into corresponding node features are two traditional edge encoding methods. However, it is too superficial and limited in that it can just express the adjacent relationships rather than global relationships.

        ②The SP of each pair node can be SP_{ij}=\left ( e_1,e_2,...,e_N \right )

        ③They calculate the average of the dot-products of the edge feature x_{e_{n}} in the n-th edge e_n and a learnable embedding weight w_{n}^{E}\in\mathbb{R}^{d_{E}} in the n-th along the path:

c_{ij}=\frac{1}{N}\sum_{n=1}^{N}x_{e_{n}}(w_{n}^{E})^{T}

where d_E denotes the dimensionality of edge feature

2.4.2. Implementation Details of Graphormer

(1)Graphormer Layer

(2)Special Node

2.4.3. How Powerful is Graphormer?

(1)Fact 1

(2)Fact 2

2.5. Experiments

2.5.1. OGB Large-Scale Challenge

(1)Baselines

(2)Settings

(3)Results

2.5.2. Graph Representation

(1)Baselines

(2)Settings

(3)Results

2.5.3. Ablation Studies

(1)Node Relation Encoding

(2)Centrality Encoding

(3)Edge Encoding

2.6. Related Work

2.6.1. Graph Transformer

2.6.2. Structural Encodings in GNNs

(1)Path and Distance in GNNs

(2)Positional Encoding in Transformer on Graph

(3)Edge Feature

2.7. Conclusion

2.8. Proofs

2.8.1. SPD can Be Used to Improve WL-Test

2.8.2. Proof of Fact 1

2.8.3. Proof of Fact 2

2.9. Experiment Details

2.9.1. Details of Datasets

2.9.2. Details of Training Strategies

(1)PCQM4M-LSC

(2)OGBG-MolPCBA

(3)OGBG-MolHIV

(4)ZINC

2.9.3. Details of Hyper-parameters for Baseline Methods

(1)PCQM4M-LSC

(2)OGBG-MolPCBA

(3)OGBG-MolHIV

2.10. More Experiments

2.11. Discussion & Future Work

3. 知识补充

3.1. Permutation invariant

参考学习1:【神经网络】Deep Sets:满足置换不变性(permutation-invariant)与置换同变性(permutation-equivariant)的通用网络结构 - 知乎 (zhihu.com)

4. Reference List

Ying C. et al. (2021) 'Do Transformers Really Perform Bad for Graph Representation?', NeurIPS 2021. doi: https://doi.org/10.48550/arXiv.2106.05234

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/1463231.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

EAP-TLS实验之Ubuntu20.04环境搭建配置(FreeRADIUS3.0)(二)

上篇文章简要介绍了freeradius的搭建及配置,在最后数据库连接阶段还没进行测试验证,今天继续。 修改相关文件 1 radiusd.conf 打开762行注释($INCLUDE mods-enabled/sql); 2 sites-available/default …

智慧工地uniapp项目管理系统源码

目录 智慧工地的核心 智慧工地特点 智慧工地的优势 智慧工地应用场景 智慧工地平台---项目版(端) 智慧工地数字栾生平台 三位一体全数据贯通 智慧工地是指应用物联网、大数据、云计算、人工智能等新兴技术,对建筑工地进行数字化、信息…

http://127.0.0.1:9222/json打不开Chrome环境变量问题

解决方案: 系统环境变量Path设置错误, 1、先看下端口是否占用:netstat -ano|findstr “9222” , 如下127.0.0.1:9222端口显示LISTENING是正常的 如果是SYN_SENT可能不太正常,这个时候, taskkill /PID 端…

Ubuntu使用Docker部署Redis并实现远程访问本地数据库

文章目录 前言1. 安装Docker步骤2. 使用docker拉取redis镜像3. 启动redis容器4. 本地连接测试4.1 安装redis图形化界面工具4.2 使用RDM连接测试 5. 公网远程访问本地redis5.1 内网穿透工具安装5.2 创建远程连接公网地址5.3 使用固定TCP地址远程访问 前言 本文主要介绍如何在Ub…

uniapp微信小程序-项目实战修改密码

图标是使用uview里面的图标&#xff0c;icfont也可以 以下是所有代码 <template><view><!-- 密码三个 --><view class"password" v-for"(item,index) in userList"><view class"contentuser"><view class&qu…

先进语言模型带来的变革与潜力

用户可以通过询问或交互方式与GPT-4这样的先进语言模型互动&#xff0c;开启通往知识宝库的大门&#xff0c;即时访问人类历史积累的知识、经验与智慧。像GPT-4这样的先进语言模型&#xff0c;能够将人类历史上积累的海量知识和经验整合并加以利用。通过深度学习和大规模数据训…

基于springboot+vue的知识管理系统(前后端分离)

博主主页&#xff1a;猫头鹰源码 博主简介&#xff1a;Java领域优质创作者、CSDN博客专家、阿里云专家博主、公司架构师、全网粉丝5万、专注Java技术领域和毕业设计项目实战&#xff0c;欢迎高校老师\讲师\同行交流合作 ​主要内容&#xff1a;毕业设计(Javaweb项目|小程序|Pyt…

SAC8542行车记录仪解决方案

一、方案描述&#xff1a; SAC8542是高度集成的行车记录仪解决方案,主芯片为ARM Cortex A53 ,dual core, 主频高达1.2GHz&#xff0c;集成了64-bit dual-core RISC 处理器.领先的ISP及H.265/H.264/MJPEG编码器.颜色引擎&#xff0c;外置DDR3,最大容量达16Gb,速率高达2133Mbps;…

探索盲盒扭蛋机小程序开发:开启互动新纪元

在当今数字化的时代&#xff0c;小程序已经成为一种新型的应用程序形态&#xff0c;为我们的生活和工作带来了极大的便利。其中&#xff0c;盲盒扭蛋机小程序的崛起更是引领了新一轮的互动热潮。本文将深入探讨盲盒扭蛋机小程序开发的关键要素、用户体验设计以及未来的发展趋势…

我国硅胶出口量有所下降 市场集中度有望不断提升

我国硅胶出口量有所下降 市场集中度有望不断提升 硅胶又称为硅酸凝胶、氧化硅胶等&#xff0c;是一种高活性吸附材料&#xff0c;在常温常压下多表现为一种具有开放多孔结构的透明或乳白色粒状非晶态物质。相较于其它化工材料&#xff0c;硅胶具有柔软、耐高温、耐腐蚀、绝缘性…

由面试题“Redis是否为单线程”引发的思考

&#x1f468;‍&#x1f393;博主简介 &#x1f3c5;云计算领域优质创作者   &#x1f3c5;华为云开发者社区专家博主   &#x1f3c5;阿里云开发者社区专家博主 &#x1f48a;交流社区&#xff1a;运维交流社区 欢迎大家的加入&#xff01; &#x1f40b; 希望大家多多支…

Modern C++ std::variant的5个特性+原理

1 前言 上一节《Modern C std::variant的实现原理》我们简单分析了std::variant的实现原理&#xff0c;其实要学好C编程&#xff0c;除了看优秀的代码包括标准库实现&#xff0c;读文档也是很便捷且必须的一种办法。 本节我将逐条解析文档中的五个特性&#xff0c;解析的办法有…

webstorm光标变成方块解决办法_webstorm光标变粗不能换行

webstorms光标变了 键盘上的insert是切换的快捷键&#xff0c;敲insert就可以来回切换了

C++之Easyx——图形库的基本功能(1):界面操作

最近&#xff0c;我觉得使用控制台编写游戏太没意思了&#xff01;&#xff01; 所以我开始研究图形库了~ 一、setinitmode 函数定义 void EGEAPI setinitmode(int mode, int x CW_USEDEFAULT, int y CW_USEDEFAULT); //设置初始化模式&#xff0c;mode0为普通&#xff0c…

公司网站建设费用怎么算,花销影响因素有哪些?

企业网站建设成本如何计算&#xff1f; 建立一个网站需要多少钱&#xff1f; 这个问题的答案并不容易说出来。 一般来说&#xff0c;网站建设分为模板网站和定制网站。 如果想要价格低廉&#xff0c;就选择模板建站&#xff0c;如果想要强大的推广营销功能&#xff0c;就选择定…

【数据库】达梦数据库DM8开发版安装

目录 一、达梦数据库概述 1.1 达梦数据库简介 1.2 产品特性 1.3 产品架构 二、安装前准备 2.1 新建 dmdba 用户 2.2 修改文件打开最大数 2.3 挂载镜像 2.4 新建安装目录 2.5 修改安装目录权限 三、数据库安装 3.1 命令行安装 3.2 配置环境变量 四、配置实例 4.1…

OLED透明屏厂家:开启2024年新征程

随着科技的不断进步和创新&#xff0c;OLED透明屏作为一种前沿的显示技术&#xff0c;正逐渐走进人们的视野&#xff0c;成为多个领域的焦点。在2024年2月21日这个特殊的日子&#xff0c;我们这家领先的OLED透明屏厂家正式开工&#xff0c;预示着我们将迎来一个充满机遇和挑战的…

二建过来人的大实话,信息闭塞真的很致命!

球球了&#xff0c;别像个大冤种一样&#xff0c;还没了解清楚就开始盲目的备考&#xff0c;真的会输的很惨.... 作为自信满满却一站失利的过来人&#xff0c;我有话要讲&#xff01;谁再说二建简单&#xff0c;就让她替我考 几个重要时间点&#xff1a; 报名开始&#xff1a…

Dynamo批量操作之提取族库族参数写入Excel

你好&#xff0c;我是九哥~ 今天&#xff0c;来开一个新的系列教程——Dynamo批量操作。 批量操作&#xff0c;可以说是Dynamo最擅长做的事&#xff0c;可以批量改参数值&#xff0c;批量放置族等等&#xff0c;但是批量操作起复杂的数据结构&#xff0c;还是需要一些技巧的&…

Java项目:24 基于SpringBoot+freemarker实现的人事管理系统

作者主页&#xff1a;舒克日记 简介&#xff1a;Java领域优质创作者、Java项目、学习资料、技术互助 文中获取源码 项目介绍 基于SpringBootfreemarker实现的人事管理系统分为七大模块&#xff1a;绩效考核&#xff0c;招聘管理&#xff0c;档案管理&#xff0c;工资管理&…