acbull/pyHGT

Script for Meta Relation Hierarchy Tree

kexinhuang12345 opened this issue · 3 comments

Hi,

Thanks for the great work. I am wondering if you can provide more details about the meta relation tree (fig 5) generation? If possible, can you provide scripts to generate this tree? Thanks!

Hi,

In the code, I explicitly save the attention value for each forward pass

self.att = softmax(res_att, edge_index_i)

, which you can plot for a given input.

For the tree, I just manually select top-K children with the highest normalized attention score for visualization. If you have further questions just ask me and I can see what I can help.

Hi, thanks for the prompt reply. I am using the DGL version, is it true it corresponds to this variable?

https://github.com/acbull/HGT-DGL/blob/182cc56a133454770a8c1043047cb44555f79853/model.py#L57

yes, that is the attention value.