Hi
I’m interested in using the GCN model with additional edge weights defined by a Gaussian kernel as described here in Equation 1 via
where
is the kernel weight between nodes v and u, for kernel k, given the node feature vectors at layer l, and where w_{p,q,k} is the usual weight for the q-th input feature and p-th output feature, but now augmented for the k-th kernel, so that W^{(l)} \in \mathbb{R}^{Q, P, K}
I found this post indicating how to use a single edge weight – however, I’m interested in parameterizing the number of kernels for each layer, so that we are not restricted to one weight per edge, but rather K weights per edge:
with graph.local_scope():
graph.ndata['h'] = h
graph.apply_edges(fn.u_sub_v('h', 'h', 'diff'))
difference = (graph.edata['diff'].unsqueeze(1) - mu)
return -1*sigma*torch.sqrt(torch.sum(difference*difference, dim=1))
where mu (K x P) and sigma (1 x K), so that our edges weights are (|E| x K).
How can I go about do this?
Thank you.
Krisitan
Edit:
I guess it would seem possible to combine the GATConv and GraphConv layers together – whereby, instead of computing attention weights via the heads of the GATConv layer compute, we reformulate the GATConv layer to compute kernel weights instead – my question then is how to combine the kernel weights and GraphConv weights into this process?