Skip to main content
QUICK REVIEW

[Paper Review] Memory-Based Graph Networks

Amir Hosein Khasahmadi, Kaveh Hassani|arXiv (Cornell University)|Feb 21, 2020
Advanced Graph Neural NetworksComputer Science60 references11 citations
TL;DR

This paper proposes a memory-based graph network (MemGNN) and graph memory network (GMN) that jointly learn hierarchical node representations and coarsen graphs via a multi-head memory layer, achieving state-of-the-art performance on eight out of nine graph classification and regression benchmarks, including accurate identification of chemically meaningful substructures in molecules.

ABSTRACT

Graph neural networks (GNNs) are a class of deep models that operate on data with arbitrary topology represented as graphs. We introduce an efficient memory layer for GNNs that can jointly learn node representations and coarsen the graph. We also introduce two new networks based on this layer: memory-based GNN (MemGNN) and graph memory network (GMN) that can learn hierarchical graph representations. The experimental results shows that the proposed models achieve state-of-the-art results in eight out of nine graph classification and regression benchmarks. We also show that the learned representations could correspond to chemical features in the molecule data. Code and reference implementations are released at: https://github.com/amirkhas/GraphMemoryNet

Motivation & Objective

  • To develop an efficient memory layer that jointly performs graph coarsening and node representation learning in graph neural networks.
  • To design two novel architectures—MemGNN and GMN—that leverage this memory layer for hierarchical graph representation learning.
  • To enable end-to-end learning of meaningful, interpretable graph structures such as functional groups in molecular data.
  • To reduce computational overhead compared to existing pooling mechanisms by avoiding iterative message passing after each pooling step.

Proposed method

  • The memory layer uses a multi-head array of learnable keys to cluster node representations into global, abstracted clusters without relying on explicit connectivity information.
  • Node representations from the previous layer serve as queries to attend to memory keys, producing coarsened node representations through soft cluster assignment and aggregation.
  • The memory layer employs a convolutional operator to aggregate attention scores from multiple heads, enabling robust and differentiable clustering.
  • MemGNN combines a GNN for initial representation learning with stacked memory layers to build hierarchical representations up to the global graph level.
  • GMN replaces message passing entirely by learning hierarchical representations directly through multiple memory layers, enabling faster inference.
  • Topological embeddings are initialized using graph diffusion (e.g., random walk or heat kernel) to enhance structural awareness without explicit edge dependencies.

Experimental results

Research questions

  • RQ1Can a memory-based layer jointly learn node representations and coarsen graphs more efficiently than existing pooling mechanisms?
  • RQ2Do the learned memory keys correspond to semantically meaningful substructures in molecular graphs, such as functional groups?
  • RQ3How does the number of keys and heads affect model performance and generalization across datasets with varying graph sizes?
  • RQ4Can a model based purely on memory layers (GMN) outperform message-passing GNNs in graph-level prediction tasks?
  • RQ5Does the absence of explicit connectivity in the memory layer hinder performance on topologically complex graphs?

Key findings

  • MemGNN achieved state-of-the-art performance on eight out of nine graph classification and regression benchmarks, including SOTA results on ESOL (RMSE = 0.52) and Lipophilicity.
  • The model achieved 73.9% 10-fold cross-validation accuracy on the Collab dataset using random neighbor sampling, outperforming RWR-based sampling (73.1%).
  • Visualization of learned clusters revealed that memory keys correspond to known chemical substructures such as hydroxyl (OH), carboxyl (COOH), and benzene rings in molecules.
  • With fixed parameter budget, increasing the number of memory heads improved performance—e.g., 32 keys and 5 heads achieved RMSE = 0.53 vs. 160 keys and 1 head (RMSE = 0.54) on ESOL.
  • Randomly initialized memory keys performed comparably to K-Means-initialized keys, suggesting that end-to-end training effectively learns meaningful cluster centroids without warm-starting.
  • The memory layer effectively coarsens graphs and aggregates representations without relying on local topology, avoiding over-smoothing and enabling efficient inference.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.