NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Are All Edges Necessary? A Unified Framework for Graph Purification

Zishan Gu, Jintang Li, Liang ChenarXiv 2022

Abstract

Graph Neural Networks (GNNs) as deep learning models working on graph-structure data have achieved advanced performance in many works. However, it has been proved repeatedly that, not all edges in a graph are necessary for the training of machine learning models. In other words, some of the connections between nodes may bring redundant or even misleading information to downstream tasks. In this paper, we try to provide a method to drop edges in order to purify the graph data from a new perspective. Specifically, it is a framework to purify graphs with the least loss of information, under which the core problems are how to better evaluate the edges and how to delete the relatively redundant edges with the least loss of information. To address the above two problems, we propose several measurements for the evaluation and different judges and filters for the edge deletion. We also introduce a residual-iteration strategy and a surrogate model for measurements requiring unknown information. The experimental results show that our proposed measurements for KL divergence with constraints to maintain the connectivity of the graph and delete edges in an iterative way can find out the most edges while keeping the performance of GNNs. What's more, further experiments show that this method also achieves the best defense performance against adversarial attacks.

Introduction

Graph Neural Networks (GNNs) have become the standard for processing non-Euclidean data, such as social networks and recommendation systems. However, their reliance on the provided graph structure is a double-edged sword. GNNs typically assume that every edge represents a meaningful relationship. In practice, real-world graphs are often noisy, containing redundant connections or even malicious "poisoned" edges introduced by adversarial attacks to deceive the model.

Existing techniques like DropEdge attempt to mitigate this by randomly removing edges, but they lack a systematic way to distinguish between informative and harmful connections. This paper introduces the Unified Graph Purification (UGP) framework, a modular approach designed to prune graphs systematically, retaining only the most valuable information while preserving the graph's essential structural integrity.

The Unified Graph Purification (UGP) Framework

The UGP framework is organized into three primary modules that work in sequence to refine the graph structure.

The Unified Graph Purification pipeline, illustrating the flow from the original graph through scoring, judging, and filtering to produce a purified graph.

1. Scorer

The Scorer module evaluates each edge's contribution to the graph. The authors explored five distinct metrics:

  • Jaccard & Cosine Similarity: These measure the feature similarity between connected nodes, under the assumption that edges connecting highly dissimilar nodes are more likely to be noise.
  • SVD: This uses low-rank approximation to identify edges that deviate from the global graph structure.
  • Neighborhood Entropy: This quantifies how much an edge contributes to the "disorder" of local features or labels.
  • KL-Divergence (KLD): This measures the discrepancy between the predicted probability distributions of two connected nodes.

2. Judge

The Judge module determines which edges should be removed based on the scores provided by the Scorer.

  • P-Judge: Removes a fixed percentage of the lowest-scoring edges.
  • T-Judge: Removes all edges with scores falling below a predefined threshold.

3. Filter

The Filter serves as a safety mechanism to ensure the graph remains functional after pruning.

  • S-Filter (Singleton): Prevents any node from becoming completely isolated.
  • C-Filter (Connectivity): Employs a Minimum Spanning Tree (MST) approach to maintain the graph's original level of connectivity.

Residual-Iteration Strategy

A significant challenge in graph purification is that high-performing scorers, like KLD, often require a pre-trained "surrogate" model to generate predictions. If the initial graph is heavily poisoned, the surrogate model's predictions may be unreliable. To overcome this, the authors propose a Residual-Iteration (RI) strategy.

The Residual-Iteration strategy, showing the iterative process of graph purification where the graph is refined across multiple stages.

In this iterative process, edges are removed conservatively in stages. After each round of purification, the surrogate model is retrained on the cleaner graph. This allows the model to "self-correct" and provide increasingly accurate scores for subsequent pruning steps, leading to a progressively more refined graph.

Experimental Evaluation

The framework was rigorously tested on standard citation benchmarks (Citeseer, Cora, and Cora-ml) against various adversarial attacks, including DICE, FGSM, PGD, and Metattack.

Robustness Against Attacks

The UGP framework demonstrated exceptional defense capabilities. For instance, against a 25% perturbation rate from Metattack, a standard GCN's accuracy plummeted to approximately 56%. By applying the KLD-TS configuration (KLD scorer with T-Judge and S-Filter), the accuracy was restored to 73.8%.

Performance on Clean Data

Crucially, the purification process did not significantly degrade performance on clean, unattacked datasets. In many cases, removing redundant edges actually improved accuracy by reducing noise, proving that even "clean" graphs contain unnecessary information.

Discussion and Insights

  • Iterative Refinement is Key: The I-KLD (Iterative KL-Divergence) method was the most effective, as it leverages the full probability distribution of neighbors and improves as the graph is cleaned.
  • Connectivity Matters: Maintaining connectivity via the C-Filter is vital for effective message passing in GNNs, even when individual edges appear weak.
  • Adversarial Edges are Dissimilar: The success of similarity-based scorers confirms that attackers often connect dissimilar nodes to disrupt the GNN's aggregation process.

Conclusion

The Unified Graph Purification framework provides a robust and modular solution for enhancing GNN reliability. By systematically identifying and removing harmful edges through iterative scoring and filtering, UGP significantly improves model performance under attack while maintaining efficiency on clean data. Future research will focus on automating threshold selection and exploring dynamic, machine-learning-based edge evaluation.

Summary updated

BibTeX
@misc{gu2022are,
  author = {Zishan Gu and Jintang Li and Liang Chen},
  title = {{Are All Edges Necessary? A Unified Framework for Graph Purification}},
  year = {2022},
  eprint = {2211.05184},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2211.05184},
}
Figure