Open Chienwang5 opened 2 months ago
I think it is indeed a 2-hop path: cid_1 - extra_node - cid_2
, where cid_1
and cid_2
may be question and answer nodes that come from the qa_nodes
of a statement.
Recall that in the code, the extra_nodes
are the intersection of the neighbouring nodes of the each qid and aid.
https://github.com/snap-stanford/GreaseLM/blob/65d7ac84854293f630d6f8ce1428234126c74281/preprocess_utils/graph.py#L322
So I think your conclusion
but it just extract 1-hop nodes from kg actually.
is correct, in the sense that the extra_nodes
are just a 1-hop neighbour of qid
and aid
. However, by taking the intersection, the extra_nodes
are the nodes that bridges qid
and aid
such that together they form a 2-hop path.
Please correct me if my interpretations were wrong:)
In these code https://github.com/snap-stanford/GreaseLM/blob/65d7ac84854293f630d6f8ce1428234126c74281/preprocess_utils/graph.py#L315 It extract 2-hop nodes from KG, but it just extract 1-hop nodes from kg actually.