Skip to content

LOGO-CUHKSZ/NGA

Repository files navigation

Neural Graduated Assignment for Maximum Common Edge Subgraphs

Overview

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.

Quick Start

Requirements

  • Python 3.9+
  • PyTorch
  • PyTorch Geometric
  • NetworkX
  • NumPy
  • Scipy

Installation

pip install -r requirements.txt

Data Generation

Use the following command to generate data:

bash data_gen.sh

Or you can use our pre-generated data by unzipping the data.py file.

Training

Use the following command to start training the model:

bash run.sh

Evaluation

Evaluate the results by the following command

python evaluate.py

Project Structure

NGA/
├── 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
    

Key Parameters

  • --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

Citation

@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}
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors