ZikangZhou/HiVT

A question about AAEncoder

Elnath-123 opened this issue · 1 comments

Thanks for contributing such amazing work!
Just a question, when we compute the cross-attention for the center agent and its neighbor agents, why do we index the edge_index[1] as rotate_mat for x_j (the neighbor agents) rather than edge_index[0]? As far as I know, the edge_index[0] represents the source, i.e., the center agent, and the edge_index[1] represents the target, i.e., the neighbor agents. Here we want to rotate the neighbor agents according to the center agent angles \theta. Thus, I think rotate_mat[edge_index[0]] is the rotate_mat parametrized by the center agent angle \theta, which is used to rotate neighbor agents.

center_rotate_mat = rotate_mat[edge_index[1]]

Hi @lrq1999,

You're mostly right. The edge_index[0] represents the source, and the edge_index[1] represents the target. In the default setting of message passing used in PyG, the message is passed from the source node to the target node; the source node denotes neighbors (with index j), and the target node denotes the ego (with index i). Here we're passing messages from neighbors to the ego. Feel free to ask me if you have further questions.