RichardHGL / WSDM2021_NSM

Improving Multi-hop Knowledge Base Question Answering by Learning Intermediate Supervision Signals. WSDM 2021.
132 stars 22 forks source link

Some question about the code #24

Closed Ttixan closed 4 months ago

Ttixan commented 1 year ago

What do the reason_layer do in the GNN_reasoning.py file? What is the meaning of the variable: fact_rel, fact_prior, fact_value, fact_query, and neighbor_rep? I refer the implement of Graft-net, but I still don't understand. Thank you for your reply.

RichardHGL commented 1 year ago
fact_rel: relation embedding in the subgraph
fact_prior: according to current entity distribution to identify the weight for each edge, refer to the p in the formula 4 in our paper
fact value: the embedding on edge, refer to formula 3
fact_query: instruction vector
neightbor_rep is the outcome of formula 4.
Ttixan commented 1 year ago

I already clarify some of these variables under your help, thank you! There's one more question, does the current_dist variable mean p(k) in your paper? According to this, does the score_tp mean E(k) in formular 6? Where is the implement of formular 6 in code?

RichardHGL commented 1 year ago

In every reasoning step, we start with a distribution of entities, and update that distribution after GNN reasoning. Formula 6 means we update the distribution with one step of reasoning, see gnn_reasoning.py line 81