Skip to content

Please add subgraph sampling-related modules to the HGT code. #7901

Open

Description

@gmnnnhh

Hello,

I noticed that the PyG version of the HGT (Heterogeneous Graph Transformer) model includes modules related to subgraph sampling, whereas the DGL version does not have such modules. I attempted to add subgraph sampling functionality using block-related code, but I encountered some issues during implementation.

Specifically, in the full graph, the source and target nodes for each layer are the same across the entire graph, so the number of nodes remains constant. However, with block sampling, the number of nodes in the subgraph differs across layers. Additionally, in the full-graph code, the source nodes are used to construct the query (q) and value (v) for the attention mechanism, while the target nodes are used to construct the key (k). In the block sampling code, however, the source and target nodes represent the connections between subgraph samples across different layers, which makes it difficult for me to complete the subgraph sampling process.

Since my implementation may have some issues, I would greatly appreciate guidance from experts in this area. Looking forward to your help and response!

Activity

  1. github-actions commented on Sep 29, 2025

    @github-actions

    This issue has been automatically marked as stale due to lack of activity. It will be closed if no further activity occurs. Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions