Edge Classification

Hi, i just started using DGL not long ago and currently i am trying out some custom GNN in predicting the rel_type on FB15k-237 dataset. The current training procedure is as follows:

  1. Uniform sampling of triplets from training set and build a graph from these sampled triplets at every epoch
  2. Treat graph as homogenous (since i am using one hot encoding as both node and edge feature)
  3. Feed the graph into the model, consisting of Conv layer which output the node embeddings and feed the embeddings into a MLP classifier to generate predicted relation for every triplets.
  4. Optimize with Cross Entropy Loss
    I am worried that with deeper conv layers, feature data is unable to propagate through the fragmented graph as a result of uniform sampling.

Thus my question:

  1. What will be the appropriate sampler to use, given that my conv layer propagates both node and edge feature (i will need to sample nodes that are k-hops away, together with the edges linking up to the k-th neighbor node)
  2. I have tried MultiLayerFullNeighborSampler with EdgeDataLoader, and passing the blocks into the model, however, i received error “Current HeteroNodeDataView has multiple node types, please passing the node type and the corresponding data through a dict” although my graph is to be treated as homogenous.

Thank you.

  1. You can try sampling enclosed subgraphs for each relation. In such cases, message passing will make more sense. An example will be Inductive Relation Prediction by Subgraph Reasoning.

  2. I have tried MultiLayerFullNeighborSampler with EdgeDataLoader, and passing the blocks into the model, however, i received error “Current HeteroNodeDataView has multiple node types, please passing the node type and the corresponding data through a dict” although my graph is to be treated as homogenous.

    Can you share a code snippet for reproducing the issue?