Closed Ana-hita closed 3 years ago
edge_index
returns the graph-structure where nodes correspond to tuples in the original graph. As a result, assignment_index
maps each node in the original graph to the tuples which contain this node. iso_type
defines the isomorphism type of each tuple in the processed graph (just a label), in order to distinguish any given tuple.
Thank you very much for the reply. I'm not sure if I could understand properly. More specifically the rows and columns in each of these attributes. Here I have used an example of a simple graph with 3 nodes and 2 connections:
v = torch.tensor([1,5,1]).unsqueeze(1)
e = torch.tensor([[0,1,0],[1,0,1],[0,1,0]])
o = graph_cpu.two_local(e,v,3)
then o
outputs:
Out[1]: [tensor([[0, 0, 1, 1, 2, 2], [1, 2, 0, 2, 0, 1]]), tensor([[0, 1, 0, 2, 1, 2], [0, 0, 1, 1, 2, 2]]), tensor([1, 0, 0])]
I understand that each are edge_index_2
, assignment_index_2
, and iso_type_2
respectively.
I could guess that assignment_index_2
gives that e.g. node_0 in the high order graph (listed in the second row) is from the (node_0, node_1) in the original graph (shown in the first row) and so on. But I'm still confused about the dge_index_2
rows and columns.
A graph with 3 nodes will result in in three tuples of size 2 each. Therefore, edge_index_2
will contain values between 0 and 2. Here, edge_index_2
denotes a fully-connected graph, since for each tuple, there exist a node inside this tuple that is connected to another node outside this tuple. You can find a formal definition in the paper.
You are absolutely right with your understanding regarding assignment_index_2
.
Thank you again. It was as I was expecting it to be, and now I'm certain. 🙂
Hi,
There are three outputs to the functions such as
two_local
andconnected_two_local
which areedge_index
,assignment_index
, andiso_type
from the according higher order graph. Could you please explain what each are and what they indicate? I have already read your paper but I could not figure the implementation out regarding these features.Thank you in advance.