Model-Agnostic Augmentation for Accurate Graph Classification

Jaemin Yoo, Sooyeon Shim, U Kang

Abstract

Graph data augmentation is a critical yet challenging task due to the risk of altering a graph's underlying identity through naive structural changes. This paper introduces two novel, model-agnostic augmentation techniques: NodeSam (Node Split and Merge) and SubMix (Subgraph Mix). NodeSam preserves structural properties like triangle counts through a balanced split-merge-adjust cycle, while SubMix leverages graph diffusion to swap meaningful subgraphs between instances. Evaluated across nine benchmark datasets, these methods achieve up to 2.1x the accuracy improvement of existing techniques while maintaining linear scalability for large-scale networks.

Introduction

In domains like computer vision, data augmentation is straightforward—flipping an image of a cat preserves its "cat-ness." However, in graph-structured data, such as molecular networks or social graphs, randomly deleting an edge can fundamentally change the graph's identity. Existing graph augmentation methods often suffer from being model-specific or relying on simple heuristics that destroy essential structural characteristics like community clusters.

Model-agnostic graph augmentation enables learning richer decision boundaries compared to baseline methods.

The authors identify a need for augmentation that is "model-agnostic" (compatible with any Graph Neural Network) yet "smart" enough to preserve the essential structural properties of the graph.

Methods

The researchers propose five desired properties for effective graph augmentation: preserving size, preserving connectivity, changing nodes, changing edges, and linear complexity. They introduce two algorithms that satisfy these requirements:

NodeSam (Node Split and Merge)

NodeSam is a balanced approach designed to maintain structural density. It operates through a cycle of splitting and merging nodes while ensuring the graph doesn't lose its structural "density" via a clever adjustment operation.

The NodeSam process: splitting a node $v_i$, adjusting edges to preserve motifs, and merging nodes to maintain graph size.
  1. Split: A random node is split into two adjacent nodes.
  2. Adjust: Specific edges are added back to maintain the original count of triangles (motifs) in the graph.
  3. Merge: A different pair of adjacent nodes is merged back into one to maintain the original node count.

SubMix (Subgraph Mix)

Inspired by "CutMix" in image processing, SubMix swaps subgraphs between two different graphs. To ensure the swapped components are meaningful, it uses Personalized PageRank (PPR) to identify tightly connected clusters. The resulting hybrid graph is assigned a "soft label" (e.g., 70% Class A, 30% Class B) based on the ratio of edges contributed by each parent graph.

Experimental Evaluation

The methods were evaluated on nine diverse benchmark datasets, including molecular graphs (e.g., MUTAG, NCI1) and social networks (e.g., COLLAB, Twitter). Scalability was verified on the massive Reddit dataset, which contains over 232k nodes and 11M edges.

Key Results and Insights

  • Accuracy Boost: NodeSam and SubMix improved the average accuracy of the GIN (Graph Isomorphism Network) classifier by 1.71 and 1.75 percentage points, respectively. This improvement is roughly 2.0x to 2.1x larger than the best existing competitors like MotifSwap.
  • Reliability: While many baseline methods lowered accuracy on certain datasets by distorting data too much, the proposed methods consistently improved or maintained performance across all benchmarks.
  • Scalability: Both algorithms exhibit linear scalability ($O(|V| + |E|)$). On the Reddit dataset, NodeSam and SubMix processed graphs in seconds, while the strongest baseline, MotifSwap, failed due to memory constraints.

Conclusion

NodeSam and SubMix provide a robust, scalable framework for graph augmentation that respects the structural integrity of the data. While SubMix requires tuning for its mixing ratio, both methods offer significant advantages for graph classification tasks. Future work may extend these techniques to handle high-dimensional node features or apply them to graph-level contrastive learning.

Summary updated

BibTeX
@inproceedings{yoo2022model,
  author = {Jaemin Yoo and Sooyeon Shim and U Kang},
  title = {{Model-Agnostic Augmentation for Accurate Graph Classification}},
  booktitle = {The Web Conference},
  year = {2022},
  doi = {10.1145/3485447.3512175},
}
Figure