|
| 1 | +# Consensus-Driven Distillation for Trustworthy Explanations in Self-Interpretable GNNs |
| 2 | + |
| 3 | +**💻 Official implementation of our TPAMI submission (extension of ICML 2025): Consensus-Driven Distillation for Trustworthy Explanations in Self-Interpretable GNNs** |
| 4 | + |
| 5 | +> 🧠 Authors: [Wenxin Tai](https://scholar.google.com/citations?user=YyxocAIAAAAJ&hl=en), [Fan Zhou](https://scholar.google.com/citations?user=Ihj2Rw8AAAAJ&hl=en), [Ting Zhong](https://scholar.google.com/citations?user=Mdr0XDkAAAAJ&hl=en), [Goce Trajcevski](https://scholar.google.com/citations?user=Avus2kcAAAAJ&hl=en), [Kunpeng Zhang](https://scholar.google.com/citations?user=rnpemAoAAAAJ&hl=en&oi=ao), [Jing Gao](https://scholar.google.com/citations?user=Ftj1h4cAAAAJ&hl=en&oi=ao), [Philip S. Yu](https://scholar.google.com/citations?user=D0lL1r0AAAAJ&hl=en&oi=ao) |
| 6 | +> 📍 Institutions: University of Electronic Science and Technology of China & Iowa State University & University of Maryland, College Park & Purdue University & University of Illinois, Chicago. |
| 7 | +> 🔗 [Paper Link](https://icml.cc/virtual/2025/poster/44426) |
| 8 | +> 🤖 This repository is maintained by [ICDM Lab](https://www.icdmlab.com/) |
| 9 | +
|
| 10 | +--- |
| 11 | + |
| 12 | +## 🧩 Overview |
| 13 | + |
| 14 | +<p align="center"> |
| 15 | + <img src="assets/intro.png" width="100%" /> |
| 16 | +</p> |
| 17 | + |
| 18 | +**TL;DR: Our ICML paper proposed Explanation Ensemble (EE), which improves the trustworthiness of SI-GNNs by aggregating multiple explanations from independently trained models. While effective, it has high computational cost during inference (limits its deployment) and is incompatible with single-explanation metrics such as FID (limits its evaluation). In this extension, we propose Consensus Distillation (CD), which distills the ensemble’s consensus knowledge into a single model, retaining EE’s capability while addressing its limitations. |
| 19 | + |
| 20 | +--- |
| 21 | + |
| 22 | +## 📦 Repository Structure |
| 23 | + |
| 24 | +```bash |
| 25 | +├── assets |
| 26 | +├── configs # configuration |
| 27 | +├── criterion.py # loss function |
| 28 | +├── dataloader.py # load data |
| 29 | +├── dataset.py # process data |
| 30 | +├── datasets # raw dataset |
| 31 | +├── explainer.py # explainer in self-interpretable GNNs (MLP) |
| 32 | +├── main.py # entry |
| 33 | +├── model.py # GNN backbone (GIN/GCN) |
| 34 | +├── outputs # checkpoints/logs |
| 35 | +├── README.md |
| 36 | +├── run.sh |
| 37 | +└── trainer.py # train/valid/test |
| 38 | +```` |
| 39 | + |
| 40 | +--- |
| 41 | + |
| 42 | +## ⚙️ Installation |
| 43 | + |
| 44 | +We recommend creating a fresh Python environment (e.g., with conda): |
| 45 | + |
| 46 | +```bash |
| 47 | +conda create -n exgnn python=3.9 |
| 48 | +conda activate exgnn |
| 49 | +pip install -r requirements.txt |
| 50 | +``` |
| 51 | + |
| 52 | +--- |
| 53 | + |
| 54 | +## 📚 Datasets |
| 55 | + |
| 56 | +We evaluate our method on a variety of datasets: |
| 57 | + |
| 58 | +* Synthetic: BA-2MOTIFS |
| 59 | +* Molecular: MUTAGENICITY, 3MR, BENZENE |
| 60 | + |
| 61 | +Datasets can be downloaded from [Google Drive](https://drive.google.com/drive/folders/1RaOKbWABerHfea_sJZGIbXSy0FcOzK0O?usp=sharing), place all datasets (e.g., `ba_2motifs`, `benzene`, `mr`, `mutag`) in the `datasets/` folder. |
| 62 | + |
| 63 | +--- |
| 64 | + |
| 65 | +## 🏃♀️ Quick Start |
| 66 | + |
| 67 | +### 1. Train self-interpretable GNNs |
| 68 | + |
| 69 | +```bash |
| 70 | +python main.py --run_time 10 --dataset ba_2motifs --method gsat_cd |
| 71 | +``` |
| 72 | + |
| 73 | + |
| 74 | +### 2. Evaluate redundancy (SHD and AUC) |
| 75 | + |
| 76 | +```bash |
| 77 | +python main.py --run_time 10 --dataset ba_2motifs --method gsat_cd --calculate_shd |
| 78 | +``` |
| 79 | + |
| 80 | +```bash |
| 81 | +python main.py --run_time 10 --dataset ba_2motifs --method gsat_cd --test_by_sample_ensemble |
| 82 | +``` |
| 83 | + |
| 84 | +--- |
| 85 | + |
| 86 | +## 📁 Pretrained Checkpoints |
| 87 | +We provide **pretrained model checkpoints** for quick evaluation and reproduction. |
| 88 | + |
| 89 | +You can download them from the [Releases](https://github.com/ICDM-UESTC/ConsensusDistillation/releases) tab |
| 90 | + |
| 91 | +To use the checkpoint, place it in the `outputs/checkpoints/` folder and run: |
| 92 | +```bash |
| 93 | +python main.py --run_time 10 --dataset ba_2motifs --method gsat_cd --calculate_shd |
| 94 | +python main.py --run_time 10 --dataset ba_2motifs --method gsat_cd --test_by_sample_ensemble |
| 95 | +``` |
| 96 | + |
| 97 | +--- |
| 98 | + |
| 99 | +## 📌 Citation |
| 100 | + |
| 101 | +If you find this work useful, please cite us: |
| 102 | + |
| 103 | +```bibtex |
| 104 | +@inproceedings{tai2025redundancy, |
| 105 | + title = {Redundancy Undermines the Trustworthiness of Self-Interpretable GNNs}, |
| 106 | + author = {Tai, Wenxin and Zhong, Ting and Trajcevski, Goce and Zhou, Fan}, |
| 107 | + booktitle = {Proceedings of the 42nd International Conference on Machine Learning (ICML)}, |
| 108 | + year = {2025} |
| 109 | +} |
| 110 | +``` |
| 111 | + |
| 112 | +--- |
| 113 | + |
| 114 | +## 📬 Contact |
| 115 | + |
| 116 | +If you have questions or suggestions, feel free to reach out via GitHub Issues or email: wxtai [AT] outlook [DOT] com |
0 commit comments