This project implements a deep learning-based algorithm that can find the maximum common edge subgraph between two molecular graphs and compute their similarity. The project supports multiple datasets including AIDS, MCF-7, and MOLHIV.
- Python 3.9+
- PyTorch
- PyTorch Geometric
- NetworkX
- NumPy
- Scipy
pip install -r requirements.txtUse the following command to generate data:
bash data_gen.shOr you can use our pre-generated data by unzipping the data.py file.
Use the following command to start training the model:
bash run.shEvaluate the results by the following command
python evaluate.pyNGA/
├── NGA_main.py # Main training script
├── model.py # Neural network model definition
├── data.py # Data processing module
├── utils.py # Utility functions
├── modular_product.py # Association common graph construction
├── sinkhorn.py # Sinkhorn algorithm implementation
├── evaluate.py # Model evaluation script
├── combine_data.py # Data combination script
├── data_gen.sh # Data generation script
├── run.sh # Training execution script
└── data/ # Data directory
--dataset: Dataset selection--hidden: Hidden layer dimension--lr: Learning rate--epochs: Number of training epochs--device: Computing device--retrieval: Compute MCES or graph similarity & retrieval
@inproceedings{
ying2026neural,
title={Neural Graduated Assignment for Maximum Common Edge Subgraphs},
author={Chaolong Ying and Yingqi Ruan and Xuemin Chen and Yaomin Wang and Tianshu Yu},
booktitle={The Fourteenth International Conference on Learning Representations},
year={2026},
url={https://openreview.net/forum?id=ZVlTIyRe35}
}