This repository contains the implementation accompanying the WWW 2026 paper:
Revisiting and Enhancing Graph Neural Networks through the Lens of Amortized Flows
This codebase studies graph neural networks from the perspective of amortized flows and provides a unified training pipeline under a common formulation. The current release focuses on node classification and includes the experimental setup used for the paper, together with a runnable example on the Squirrel dataset.
The implementation supports both the proposed amortized-flow variant and the corresponding original model setting, making it straightforward to reproduce comparisons reported in the paper.
.
├── train.py # main training and evaluation script
├── models.py # model architectures
├── models_mp.py # propagation and message-passing modules
├── dataset_loader.py # dataset processing and loading
├── utils.py # utility functions
└── data/
└── squirrel/ # included example dataset; other supported datasets will be downloaded automatically
The code has been verified with the following software stack:
- Python
3.8 - PyTorch
1.12.1 - PyTorch Geometric
2.0.3 torch-scatter2.0.9torch-sparse0.6.18numpy,scipy,matplotlib,seaborn,tqdm
To reproduce the main GCN result on Squirrel, run:
python train.py \
--Original_ot ot \
--lr 0.05 \
--weight_decay 0.0005 \
--lambda_ 100.0 \
--q_linear_lr 0.001 \
--q_linear_delay 0.0 \
--dataset Squirrel \
--net GCNThen you will get the experimental result for Squirrel of GCN+AF in Table 3, which is roughly as follows.
GCN on dataset Squirrel, in 10 repeated experiment: test acc mean = 53.5735 ± 0.6535 val acc mean = 53.961
The default configuration runs 10 repeated experiments and reports the mean test performance.
The --net argument currently supports:
GCN, GAT, GIN, GSAGE, APPNP, BernNet, ChebNetII
The --dataset argument currently supports:
Cora, Citeseer, Pubmed, Computers, Photo, Chameleon, Squirrel, Actor, Texas, Cornell
| Argument | Description |
|---|---|
--lambda_ |
Trade-off coefficient in the amortized-flow objective. |
--q_linear_lr |
Learning rate for the flow-related linear layer. |
--q_linear_delay |
Weight decay for the flow-related linear layer. |
If you find this repository useful in your research, please cite:
@inproceedings{cheng2026revisiting,
title={Revisiting and Enhancing Graph Neural Networks through the Lens of Amortized Flows},
author={Cheng, Minjie and Yan, Bokai and Luo, Dixin and Xu, Hongteng},
booktitle={Proceedings of the ACM Web Conference 2026},
pages={1422--1432},
year={2026}
}