Exclude edges using both reverse_id and reverse_types


I was looking to use EdgeDataloader to sample edges from a heterogenous graph. My graph has two types of nodes - A and B, and 3 types of edges - A->A, A->B, B->A. Every edge in my graph (u, v) has an opposite edge (v, u).

For A->A type edges, I’d like to exclude using reverse_id and for A->B type edges I’d like to use reverse_types. But it seems that I cannot use both.

My current way to solve this is to have another dummy edge type from A->A(so my graph has 4 edge types), use reverse_types, and handle both types for A->A correctly in my NN.

Do you suggest any alternative way to tackle this?


I would prefer your method actually, since the relation A → A and the relation A ← A may be modeled with different parameters.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.