Graphormer icon indicating copy to clipboard operation
Graphormer copied to clipboard

Can Graphormer be modified to accommodate node classification and link prediction problems?

Open zsz00 opened this issue 3 years ago • 3 comments

Can Graphormer be modified to accommodate node classification and link prediction problems?

Can you give a few examples?

zsz00 avatar Dec 29 '21 08:12 zsz00

is this question solved?

Austinzhenghua avatar Jun 27 '22 12:06 Austinzhenghua

可以修改 Graphormer 以适应节点分类和链接预测问题吗?

你能举几个例子吗? 你好,可以用到链接预测问题吗?

LOUGBERTI avatar Sep 03 '22 07:09 LOUGBERTI

Hi, sorry for the late response. For the node classification problem, you can modify Graphormer's forward method to produce predictions for each node. The GraphormerGraphEncoder's forward method will return graph_node_feature (contained in the variable x) in inner_states, and you can use it to predict node features. For now Graphormer can't be used to solve the link prediction problem directly, but the variable attn_bias might be helpful if you want to develop a Graphormer variant yourself to solve the problem. You can use the debugging tool I mentioned in issue #133 to see each tensor's shape and guess each tensor's meaning. We might provide some example code in the future, thanks for your suggestions.

mavisguan avatar Sep 04 '22 03:09 mavisguan