Cooperative Classification and Rationalization for Graph Generalization

Linan Yue, Qi Liu, Ye Liu, Weibo Gao, Fangzhou Yao, Wenfeng Li

Introduction

Graph Neural Networks (GNNs) have demonstrated remarkable success in various domains, yet they often struggle with Out-of-Distribution (OOD) generalization. This failure typically stems from "shortcut learning," where models rely on spurious correlations present in the training data rather than invariant structural features. For instance, if a training set predominantly features "House" motifs attached to "Tree" structures, a standard GNN might incorrectly associate the "Tree" background with the "House" label. When presented with a "House" attached to a "Wheel" in a test set, the model's performance degrades significantly.

The Out-of-Distribution (OOD) challenge: training on specific motif-background pairs leads to failure when those pairs are decoupled in testing.

The C2R Framework

To address these challenges, the Cooperative Classification and Rationalization (C2R) framework introduces a novel approach that forces two distinct modules—classification and rationalization—to work in tandem.

Architecture and Methodology

The C2R framework consists of two primary components:

  1. Classification Module: This module processes the entire graph $g$ to learn a robust, environment-invariant representation $\mathbf{h}_{en}$. It utilizes an environment-conditional generator to create counterfactual representations, training the model to maintain consistent predictions across diverse synthetic environments.
  2. Rationalization Module: This module employs a "separator" to decompose the graph into a rationale subgraph (yielding representation $\mathbf{h}_r$) and a non-rationale subgraph (yielding $\mathbf{h}_n$).
The C2R architecture showing the interaction between the classification and rationalization modules via knowledge distillation.

The core innovation of C2R is the "Cooperative Glue"—a Knowledge Distillation (KD) mechanism. The classification module acts as a teacher, guiding the rationalization module to align its rationale representations ($\mathbf{h}_r$) with the robust features ($\mathbf{h}_{en}$) identified by the classifier. This alignment significantly reduces the search space for rationales, preventing the model from selecting irrelevant subgraphs that happen to minimize training loss.

Furthermore, C2R incorporates an Environment Inductor. By clustering non-rationale subgraphs ($\mathbf{h}_n$) across the entire dataset using k-means, the model infers global environments. These environments are then fed back into the classification module to refine the counterfactual generation process in subsequent iterations.

Experimental Evaluation

The researchers evaluated C2R against state-of-the-art baselines, including DIR, GSAT, and GIL, using both synthetic and real-world benchmarks.

  • Synthetic Benchmarks: On the Spurious-Motif dataset, which specifically tests OOD performance under high bias, C2R achieved an accuracy of 56.01% with a GIN backbone, vastly outperforming the vanilla GIN's 37.68%.
  • Real-World Applications: In molecular property prediction tasks from the Open Graph Benchmark (OGB), C2R demonstrated superior performance. On the MolHIV dataset, it reached an AUC of 0.7919, surpassing specialized rationalization methods like DIR (0.6303) and DisC (0.7731).

Conclusion

C2R represents a significant step forward in graph OOD generalization by effectively bridging the gap between whole-graph classification and subgraph rationalization. By leveraging knowledge distillation and global environment induction, the framework ensures that models focus on invariant rationales rather than spurious shortcuts. While the current reliance on k-means for environment induction presents a dependency on the hyperparameter $k$, the framework's ability to boost the performance of other rationalization methods highlights its versatility and potential for broader application in robust graph learning.

Summary updated

BibTeX
@inproceedings{yue2024cooperative,
  author = {Linan Yue and Qi Liu and Ye Liu and Weibo Gao and Fangzhou Yao and Wenfeng Li},
  title = {{Cooperative Classification and Rationalization for Graph Generalization}},
  booktitle = {The Web Conference},
  year = {2024},
}
Figure