All models

OpenHGNN-HetGNN

HetGNN embeds nodes of a heterogeneous graph by aggregating typed neighbors with Bi-LSTMs and attention.

Graphs and geometry · 3,072 operations Checked

100%

Showing the top corner; full diagram not loaded yetShowing a small copy; full diagram not loaded yetLarge diagram, not loaded yet

Open SVG

This diagram has 3,072 operations (79 KB) and is drawn when you ask.

Open in a new tab

Click or tap a spot to read it up close. Scroll or drag inside the diagram to move through it. Zoom with + and − or Ctrl and scroll. Press 0 for the whole graph. Swipe inside the diagram to move through it. Use + and − to zoom.

At a glance

Parameters
597K
Operations
3,072
Framework
PyTorch
Recurrent
No
Published
KDD 2019
Cited by
1,591 (as of 22 October 2026)
Authors
Chuxu Zhang, Dongjin Song, Chao Huang and others
License
Apache-2.0
Checked
Passed: the trace was replayed operation by operation and matched the model's own output for this input.

Files

The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.

Details
Stable ID
m2019
Graph hash
f9c9ab8764d770333db7d1737604d39a4dec97257d930b6e6c454692e2d0ddd4
Skeleton hash
5824f16a865fe2ddf815d90b02f08c42b91555a485a4fbf8e262e22e0802d79f
Architecture hash
9d50e51edc292a2bfdeeca065039a2523ad468ba5d0d64720c459935726ae884
Diagram SHA-256
c68b672ff3a8df1a7aff165f0a1f846b57ced1bc8b725daaa871ad78d21849ed
TorchLens version
2.36.0
Renderer
graphviz 2.43.0+pyvips 3.2.0+libvips 8.18.7+render-opts@06c1f0d3
Check
Forward pass replayed in PyTorch

What it is

HetGNN is a graph neural network for heterogeneous graphs: graphs with several types of nodes and edges, whose nodes also carry mixed contents such as text or images. It learns a vector representation for each node that downstream applications such as link prediction, recommendation and node classification can use.

The model first samples a fixed-size set of strongly correlated neighbors for each node with a random walk with restart, and groups them by node type. A first module encodes a node's contents: separate fully connected layers transform the different content features and a Bi-LSTM captures their interactions. A second module uses another Bi-LSTM to aggregate the content embeddings of all neighbors of one type, averaging over the hidden states. The per-type results are then combined with the node's own content embedding by an attention mechanism, on the reasoning that different types of neighbors contribute differently to the final representation. Both Bi-LSTMs run over unordered sets, an idea the paper credits to GraphSAGE.

The paper sets the embedding dimension to 128 and, on its academic data, samples 10 author, 10 paper and 3 venue neighbors per node. This model is the HetGNN implementation in OpenHGNN, an open-source heterogeneous graph neural network toolkit built on DGL and PyTorch.

Key idea. HetGNN jointly handles heterogeneous graph structure and heterogeneous node contents by sampling typed neighbors with random walk with restart and aggregating them with recurrent networks and attention.

  • hetgnn
  • heterogeneous graph neural network
  • heterogeneous graph
  • heterogeneous graph embedding
  • node embedding
  • random walk with restart
  • link prediction
  • node classification
  • openhgnn

AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.

Cite the paper

@inproceedings{Zhang_2019, series={KDD ’19}, title={Heterogeneous Graph Neural Network}, url={http://dx.doi.org/10.1145/3292500.3330961}, DOI={10.1145/3292500.3330961}, booktitle={Proceedings of the 25th ACM SIGKDD International Conference on Knowledge Discovery & Data Mining}, publisher={ACM}, author={Zhang, Chuxu and Song, Dongjin and Huang, Chao and Swami, Ananthram and Chawla, Nitesh V.}, year={2019}, month=July, pages={793–803}, collection={KDD ’19} }