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

CLINIC: Towards High-quality Graph Out-Of-Distribution Detection

Yifan Wang, Haodong Zhang, Changhu Wang, Tao Ren, Dongjie Wang, Wei Ju, Chong Chen, Xian-Sheng Hua, Xiao LuoICML 2026

Introduction

Graph Neural Networks (GNNs) typically operate under the independent and identically distributed (i.i.d.) assumption, expecting test data to mirror the training distribution. However, in real-world applications, this assumption frequently breaks down, necessitating robust graph out-of-distribution (OOD) detection to identify anomalous graphs.

Historically, OOD detection methods have heavily relied on internal topological structures—how nodes connect within a single graph. The authors of this paper argue that this topological focus creates a blind spot: structurally dissimilar graphs (e.g., a ring-shaped molecule versus a chain-shaped one) can share the same semantic distribution, while structurally similar graphs might represent entirely different concepts. To address this, the authors introduce CLINIC (Contextual Affinity Exploration with Twin Concordance), a novel framework that shifts the paradigm from isolated topology to contextual affinity—evaluating how graphs relate to one another within a broader semantic space.

The CLINIC Framework

CLINIC operates through three core modules designed to capture and exploit semantic relationships across graphs:

1. Contextual Affinity Exploration

Rather than processing graphs in isolation, CLINIC constructs a "graph of graphs" for each batch. It employs a Meta-GNN to capture high-order relationships between data points. If two graphs share many of the same neighbors in the hidden feature space, they are deemed contextually affinitive. This allows the model to capture semantic similarity beyond mere structural wiring.

2. Twin Concordance Learning

To ensure robust representations, CLINIC utilizes a self-supervised approach. It generates two "views" of a graph (the original and an augmented version, such as one with dropped nodes) and enforces consistency in their relationship distributions with neighbors. Additionally, a Contextual-aware Concordance mechanism uses a clustering function to group similar in-distribution (ID) graphs together, ensuring that a graph's representation is anchored by its neighborhood.

3. Decision Boundary Compression

Most OOD methods are passive, simply measuring distance. CLINIC, however, actively reshapes the feature space. Inspired by the silhouette score used in clustering, this module minimizes the distance between an ID graph and its cluster center while maximizing its distance to the nearest neighboring cluster. This "tightens" the ID space, creating a sharper, more discriminative boundary that leaves more empty space for OOD anomalies to fall into.

Experimental Setup and Datasets

The researchers evaluated CLINIC across 10 pairs of real-world datasets sourced from the Open Graph Benchmark (OGB) and the TU Dataset (e.g., BZR+COX2, PTC-MR+MUTAG, AIDS+DHFR, ENZYMES+PROTEIN, Tox21, SIDER).

In their evaluation setup, 90% of one dataset serves as the ID training set. The test set comprises the remaining 10% of the ID set mixed with an equal number of OOD samples from the paired dataset.

Key Results

CLINIC was benchmarked against 15 baseline methods, ranging from non-deep approaches like OCSVM to two-step deep methods like GraphCL, and modern end-to-end OOD detectors like GOOD-D and HGOE.

  • State-of-the-Art Performance: CLINIC achieved the highest Area Under the Curve (AUC) on nearly all tested datasets.
  • Significant Margins: It delivered average AUC improvements of 1.16% over HGOE and 2.65% over GOOD-D, representing substantial gains in the graph OOD detection domain.
  • Ablation Insights: Ablation studies revealed that the Decision Boundary Compression was the most impactful component, validating the hypothesis that actively tightening the feature space around normal data is highly effective for anomaly detection.

Limitations and Future Directions

While highly effective, CLINIC has a few notable constraints. Its performance is sensitive to hyperparameters, specifically the number of neighbors ($k$) and clusters ($C$) used in the contextual affinity graph. Although the authors provide recommended ranges ($k_1 \in \{5, 10, 15\}$, $k_2 \in \{3, 5\}$), these may require retuning for entirely new domains. Furthermore, because the contextual matrix is estimated online within a batch, batch size can influence the stability of the affinity graph.

Looking forward, the authors suggest that CLINIC's dual approach of affinity and concordance could be adapted for broader open-world scenarios, such as general anomaly detection in massive, complex networks or open-set graph classification.

Summary updated

BibTeX
@inproceedings{wang2026clinic,
  author = {Yifan Wang and Haodong Zhang and Changhu Wang and Tao Ren and Dongjie Wang and Wei Ju and Chong Chen and Xian-Sheng Hua and Xiao Luo},
  title = {{CLINIC: Towards High-quality Graph Out-Of-Distribution Detection}},
  booktitle = {International Conference on Machine Learning},
  year = {2026},
  url = {https://openreview.net/forum?id=iU0G5m6dhf},
}
Figure