Skip to main content
. 2021 Nov 1;23(11):1453. doi: 10.3390/e23111453
Algorithm 1 Our embedding generation algorithm for directed graphs.
Input:
  • Digraph G(V,E); hop K; input features xv,vs.V; weight matrices Wk,k{1,,K}; non-linearity σ; the aggregator functions: MeanLayer and AttentionLayer; the gate function: gate; the concatenate function: Concat; the neighborhood sampling function N:vs.2ν; the weight coefficient: μ

Output:
      Node representations zv for all vV
1 hv0xv,vs.V
2FOR k=1K DO
3FOR vV DO
4IF k==1 DO
5 Aggregator=MeanLayer;
8ELSE DO
5 Aggregator=AttentionLayer;
9 hN(v)k+Aggregatorhuk1,uN(v)+;
10 hN(v)kAggregatorhuk1,uN(v);
11 hN(v)kConcathvk1+,hvk1;
12 hvkσWk·hN(v)k
13   END
14    hvkhvk/hvk2,vs.V
15 END
16 zvgate{hv1,,hvK},vs.V