Editable Graph Neural Network for Node Classifications

Zirui Liu, Zhimeng Jiang, Shaochen Zhong, Kaixiong Zhou, Li Li, Rui Chen, Soo-Hyun Choi, Xia Hu

TL;DR

Graph Neural Networks (GNNs) are notoriously difficult to "edit" because their message-passing nature causes local corrections to ruin global performance. This paper introduces Editable Graph Neural Networks (EGNN), which bypasses this issue by stitching a small, trainable MLP to a frozen GNN backbone, allowing for precise error correction without destabilizing the rest of the graph.

What Problem Does This Paper Address?

As GNNs are increasingly deployed in high-stakes applications like credit risk assessment and fake news detection, the ability to "patch" specific errors becomes critical. In fields like Computer Vision and NLP, researchers use model editing to correct specific misclassifications without retraining the entire model from scratch.

However, the authors observe that standard editing techniques fail miserably for GNNs, often causing a catastrophic drop in overall accuracy (up to 50%). The culprit is the GNN's core strength: neighbor propagation. Because nodes are interconnected, updating weights to fix a single node's prediction propagates changes across the entire graph, pushing other node representations far from their original, correct states.

Methods

The authors first quantify this problem by visualizing the "loss landscape" of the Kullback-Leibler (KL) divergence between node embeddings before and after editing. They found that GNNs have a much "sharper" landscape than Multi-Layer Perceptrons (MLPs), meaning even tiny weight perturbations cause massive shifts in node representations.

Figure 1: The loss landscape of various model architectures on Cora dataset. Similar results can be found in Appendix C

To solve this, they propose EGNN, which follows a three-step process:

  1. Stitching: A small, randomly initialized MLP is added to the output of a well-trained, frozen GNN backbone.
  2. Initialization: The MLP is briefly trained to ensure the combined model ($GNN + MLP$) matches the original GNN's predictions, using a task loss and a locality loss (KL divergence).
  3. Propagation-Free Editing: When a misclassified node is identified, only the MLP weights are updated using the node's local features. The GNN weights remain frozen, effectively "disabling" the neighbor propagation during the edit phase while still leveraging structural features for the final prediction.
Figure 2: The overview of EGNN . We fix the backbone of GNNs (in blue), while only update the small MLPs (in orange) during editing. The wrongly predicted nodes are highlighted with orange color, and the MLP only require its node feature.

Datasets

The researchers evaluated EGNN across a wide range of benchmarks:

  • Small-scale: Cora (citations), Amazon Computers, Amazon Photo, and Coauthor-CS.
  • Large-scale: Reddit (social posts), Flickr (images), ogbn-arxiv (citations), and ogbn-products (Amazon co-purchasing).
  • Backbones: The method was integrated with two popular GNN architectures: GCN and GraphSAGE.

Key Insights and Ideas

  • The Locality Problem: In GNNs, "locality" refers to how much an edit on one node affects others. The authors prove that neighborhood aggregation inherently makes node features more similar (over-smoothing), which inversely increases the sensitivity of the model to weight changes during editing.
  • Decoupling is Key: By freezing the GNN, EGNN treats the structural information as a static feature and uses the MLP as a flexible "patch" that only processes local node features during the update.
  • Efficiency through Simplicity: Because the MLP update doesn't require traversing the graph or performing sparse matrix operations, the editing process is significantly faster and more memory-efficient.

Key Results

EGNN consistently outperformed vanilla gradient descent (GD) and existing editable neural network (ENN) baselines:

  • Minimal Drawdown: On the Reddit dataset, while standard editors caused accuracy drops of 20-40%, EGNN maintained a drawdown of nearly 0% (see Table 2).
  • Scalability: EGNN successfully edited the million-node ogbn-products dataset, whereas vanilla editors failed due to Out-of-Memory (OOM) errors.
  • Speed: The method is 2–5x faster than baseline editors in terms of wall-clock edit time.
  • Generalization: Correcting a single node often generalized to other similar nodes in the same class, effectively cleaning up clusters of errors.
Table 2: The results on four small scale datasets after applying one single edit. The reported number is averaged over 50 independent edits. SR is the edit success rate, Acc is the test accuracy after editing, and DD are the test drawdown, respectively. “OOM” is the out-of-memory error.

Limitations and Future Work

The authors acknowledge that adding an extra MLP module slightly increases inference latency. However, they note this overhead is negligible because MLP computations involve dense matrix operations, which are much faster than the sparse operations required by the GNN backbone.

Future research directions include:

  • Improving the efficiency of the initial MLP training phase.
  • Exploring why vanilla editing fails from an information-theoretic perspective.
  • Extending the framework to other graph tasks like link prediction and knowledge graph completion.

Summary updated

BibTeX
@misc{liu2023editable,
  author = {Zirui Liu and Zhimeng Jiang and Shaochen Zhong and Kaixiong Zhou and Li Li and Rui Chen and Soo-Hyun Choi and Xia Hu},
  title = {{Editable Graph Neural Network for Node Classifications}},
  year = {2023},
  eprint = {2305.15529},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2305.15529},
}
Figure