A Cognac shot to forget bad memories: Corrective Unlearning in GNNs

Varshita Kolipaka, Akshit Sinha, Debangan Mishra, Sumit Kumar, Arvindh Arun, Shashwat Goel, Ponnurangam Kumaraguru · DOI

TL;DR

This paper introduces Cognac, a novel method for corrective unlearning in Graph Neural Networks (GNNs). Cognac effectively removes the detrimental effects of manipulated data from trained GNNs, even when only a small fraction of the manipulated data is identified, outperforming existing methods and achieving near-oracle performance. This is crucial for building more robust and trustworthy GNNs in real-world applications where data integrity can be compromised.

What Problem Does This Paper Address?

Graph Neural Networks (GNNs) are powerful tools for analyzing graph-structured data, but their message-passing mechanism makes them susceptible to adversarial manipulations or incorrect data. These issues can propagate through the graph, significantly degrading model performance. While "corrective unlearning" aims to remove these adverse effects post-training, existing methods struggle, even when the entire set of manipulated data is known. This paper tackles the challenge of corrective unlearning in GNNs, specifically when only a subset of the manipulated data is identified, which is a more realistic scenario. The goal is to restore the model's performance on the affected data distribution without sacrificing performance on the clean data.

Methods

Cognac is a two-component method designed to address the unique challenges of unlearning in GNNs:

  1. Contrastive Unlearning on Graph Neighborhoods (CoGN): This component focuses on identifying nodes affected by the manipulation (even those not explicitly in the deletion set) and then uses a contrastive loss to push their representations away from the manipulated entities while keeping them close to their unaffected neighbors. This leverages the graph structure to correct representations.
  2. AsCent DesCent deCoupled (ACDC): This component adapts the classic i.i.d. unlearning technique by performing gradient ascent on the identified manipulated subset (Sf) to "forget" incorrect labels and gradient descent on the remaining data to retain useful information. This is done with separate optimizers and learning rates to balance the two objectives.

The paper also introduces an Affected Node Identification heuristic that uses feature inversion and logit differences to efficiently pinpoint nodes influenced by the deletion set, which is crucial for CoGN.

Datasets

The authors evaluate their method on a variety of standard graph datasets, including:

  • Citation Networks: Cora, CiteSeer, PubMed
  • Co-author Networks: Coauthor CS, Coauthor Physics
  • Co-purchase Networks: Amazon Photos, Amazon Computers
  • Other: DBLP, CoraFull, OGB-arXiv

They also introduce a significant variation in the degree of manipulation across these datasets to rigorously test unlearning effectiveness under different scales of data corruption.

Key Insights and Ideas

  • Existing GNN unlearning methods are insufficient: Even when the entire set of manipulated data is known, current methods fail to effectively recover performance. This highlights the need for more sophisticated approaches.
  • Graph structure is key for unlearning: Cognac's success stems from leveraging the graph's neighborhood information (CoGN) to identify and correct affected nodes, going beyond simple label or feature manipulation.
  • Partial identification is a realistic challenge: The ability of Cognac to perform well even when only 5% of the manipulated data is identified is a significant practical advantage.
  • Component synergy is crucial: Neither CoGN nor ACDC alone is sufficient; their combination is what makes Cognac effective. CoGN handles representation correction, while ACDC addresses label-specific forgetting.
  • Retraining is not always the gold standard: For corrective unlearning, especially with partial data identification, retraining from scratch can be less effective than targeted unlearning methods.

Key Results

  • State-of-the-art performance: Cognac consistently outperforms existing graph unlearning methods and even surpasses retraining from scratch.
  • Near-oracle performance: Cognac recovers most of the performance of an "oracle" model (trained on perfectly clean data) even when only 5% of the manipulated data is identified.
  • Efficiency: Cognac is up to 8x more efficient than retraining and comparable to other unlearning methods, making it practical for large datasets.
  • Robustness: Cognac demonstrates strong performance across various datasets, manipulation types (edge addition, label flip, feature poisoning), and even on larger datasets like OGB-arXiv.
  • Ablation studies confirm component importance: Removing either CoGN or ACDC significantly degrades Cognac's performance, underscoring the necessity of both.

Limitations and Future Work

  • Homophily assumption: The current work primarily evaluates on homophilic datasets. Future work should explore unlearning on heterophilic datasets.
  • Affected node identification: The heuristic for identifying affected nodes is effective but not perfect. More sophisticated influence functions could potentially improve performance.
  • Theoretical guarantees: While empirical results are strong, further theoretical analysis for unlearning in GNNs, especially concerning the impact of partial data identification, would be beneficial.
  • Broader attack scenarios: While the paper covers several attack types, exploring unlearning against more complex or obfuscated real-world attacks remains an open area.

Summary updated

Abstract

Graph Neural Networks (GNNs) are increasingly being used for a variety of ML applications on graph data. Because graph data does not follow the independently and identically distributed (i.i.d.) assumption, adversarial manipulations or incorrect data can propagate to other data points through message passing, which deteriorates the model's performance. To allow model developers to remove the adverse effects of manipulated entities from a trained GNN, we study the recently formulated problem of Corrective Unlearning. We find that current graph unlearning methods fail to unlearn the effect of manipulations even when the whole manipulated set is known. We introduce a new graph unlearning method, Cognac, which can unlearn the effect of the manipulation set even when only 5% of it is identified. It recovers most of the performance of a strong oracle with fully corrected training data, even beating retraining from scratch without the deletion set while being 8x more efficient. We hope our work assists GNN developers in mitigating harmful effects caused by issues in real-world data post-training. Our code is publicly available at https://github.com/varshitakolipaka/corrective-unlearning-for-gnns
BibTeX
@inproceedings{kolipaka2025cognac,
  author = {Varshita Kolipaka and Akshit Sinha and Debangan Mishra and Sumit Kumar and Arvindh Arun and Shashwat Goel and Ponnurangam Kumaraguru},
  title = {{A Cognac shot to forget bad memories: Corrective Unlearning in GNNs}},
  booktitle = {International Conference on Machine Learning},
  year = {2025},
  url = {https://openreview.net/forum?id=epDkt44mkq},
}
Figure