Graphormer icon indicating copy to clipboard operation
Graphormer copied to clipboard

Argument edge_type

Open paridhimaheshwari2708 opened this issue 3 years ago • 1 comments

What does the argument edge_type (which is set to "multi_hop" default) do? How is the model different?

paridhimaheshwari2708 avatar Aug 23 '22 18:08 paridhimaheshwari2708

The argument edge_type assigns the way to calculate attention bias between every two nodes. It defaults to multi_hop, which means using the edge in the shortest path to calculate attention bias (details could be found in Graphormer's paper Do Transformers Really Perform Badly for Graph Representation?) If edge_type was assigned with other values, attention bias would use other calculation methods. You can refer to graphormer/modules/graphormer_layers.py for more details.

mavisguan avatar Aug 24 '22 06:08 mavisguan