bdi-lab / InGram

InGram: Inductive Knowledge Graph Embedding via Relation Graphs (ICML 2023)
46 stars 22 forks source link

Questions #8

Closed waterlhb closed 5 months ago

waterlhb commented 5 months ago

Dear Writer: Thank you for sharing your code, After carefully reviewing your code, it appears that the entity information aggregation and relationship information aggregation are both based on the minimum spanning tree,the code is in file dataset.py. I'm eager to understand the reasoning behind utilizing the minimum spanning tree in this context. Looking forward to your prompt response. Thank you.

jaejunlee714 commented 5 months ago

Hi, thanks for your interest in our paper. We used the spanning tree to 1) ensure that all entities (relations) are connected in the graph for message passing 2) ensure the transductivity (i.e., all entities (relations) appear in the graph for message passing).

Thank you.

Best, Jaejun Lee.

waterlhb commented 5 months ago

I am sorry to bother you again, I have another questions. The spanning tree for the graph maybe more than one, how to choose the best one? Have you tried other ways of obtaining the graph structure? The previous subgraph extraction-based approaches, such as RMPI, perform subgraph extraction once for each edge during implementation, node labelling of the extracted subgraphs, and then perform relationship prediction. In your approach, directly generate a minimum spanning tree for the whole graph, and construct a relationship graph based on the generated minimum spanning tree, and then construct a neural network for predicting unknown relationships. I'm not sure I fully understand the basic principle behind this prediction, so I'd love to hear your thoughts!

jaejunlee714 commented 5 months ago

Basically, what we want is to see different graph structures of the training graph in the training stage, so that InGram can generalize to new graphs unseen during training. Unlike subgraph-based methods such as GraIL or RMPI, InGram extracts a single graph that is shared for predicting all triplets; and therefore, we need all entities and relations to be in the extracted graph. We thought the minimum spanning tree is a good solution, because it contains all entities, can be modified (by adding triplets) to contain all relations in a reasonable cost of time. For InGram's generalization, we wanted to have different graphs every epoch. Therefore, based on the spanning tree, we extract different triplets every epoch, which we call the dynamic split strategy in the paper.

waterlhb commented 5 months ago

Thank you for your answer