This repository contains the official implementation of our paper
Path Complex Neural Network for Molecular Property Prediction,
presented at the ICML 2024 Workshop on Geometry-grounded Representation Learning and Generative Modeling.
As a generalization of simplicial complexes, path complexes provide a powerful framework for modeling the connections and interactions within a set, such as the atoms in a molecule. By integrating with molecular mechanics models, path complexes can enhance the accuracy of predictions related to molecular properties.
PCNN (Path Complex Neural Network) is a model that utilizes path complexes to represent and predict molecular data. Our findings highlight the potential of path-based approaches in the molecular sciences, providing new insights into the relationships between molecular structure and function.
The Path Complex Message-passing Architecture:

The Path Complex Neural Network Module:

- Environment Requirements
- Installation Steps
- Data Download and Configuration
- Running the Project
- Experimental Results
This project requires:
- Python Version: 3.11
- Use Python 3.11, as this is the version used for development and testing of the code.
- CUDA Version: 11.7
- To fully utilize GPU acceleration, ensure that your environment supports CUDA 11.7.
Recommended to use conda:
conda create -n myenv python=3.11
conda activate myenvInstall the necessary Python libraries from requirements.txt:
pip install -r requirements.txtCheck that CUDA 11.7 is correctly installed on your system:
nvcc --versionDownload the datasets from MoleculeNet. Place the datasets into the data directory in your project folder.
To use different datasets, modify the path.yaml file in the config directory:
select_dataset: "qm7" # Replace "qm8" with "qm7" or "qm9" as neededExecute the project with the configured dataset by running:
python main_c.pyor
python main_r.py
The following table presents the comparison of PCNN with various GNN architectures. The best performance values are highlighted in bold, and standard deviation values are indicated in subscripts.
| Method | QM7 | QM9 | Tox21 | HIV | MUV |
|---|---|---|---|---|---|
| GNN | |||||
| GIN | 110.3 (7.2) | 0.00886 (0.00005) | * | * | * |
| GAT | 103.0 (4.4) | 0.01117 (0.00018) | * | * | * |
| GCN | 100.0 (3.8) | 0.00923 (0.00019) | * | * | * |
| D-MPNN | 103.5 (8.6) | 0.00812 (0.00009) | 0.759 (0.007) | 0.771 (0.005) | 0.786 (0.014) |
| Attentive FP | 72.0 (2.7) | 0.00812 (0.00001) | 0.761 (0.005) | 0.757 (0.014) | 0.766 (0.015) |
| GTransformer | 161.3 (7.1) | 0.00923 (0.00019) | * | * | * |
| SGCN | 131.3 (11.6) | 0.01459 (0.00055) | * | * | * |
| DimNet | 95.6 (4.1) | 0.01031 (0.00076) | * | * | * |
| HMGNN | 101.6 (3.2) | 0.01239 (0.00001) | * | * | * |
| Mol-GDL | 62.2 (0.4) | 0.00952 (0.00013) | 0.791 (0.005) | 0.808 (0.007) | 0.675 (0.014) |
| Pretrain_GNN | |||||
| N-Gram_RF | 92.8 (4.0) | 0.01037 (0.00016) | 0.758 (0.009) | 0.787 (0.004) | 0.748 (0.002) |
| N-Gram_XGB | 81.9 (1.9) | 0.00964 (0.00031) | 0.758 (0.009) | 0.787 (0.004) | 0.748 (0.002) |
| PretrainGNN | 113.2 (0.6) | 0.00922 (0.00004) | 0.781 (0.006) | 0.799 (0.007) | 0.813 (0.021) |
| GROVER_base | 94.5 (3.8) | 0.00986 (0.00055) | 0.743 (0.001) | 0.625 (0.009) | 0.673 (0.018) |
| GROVER_large | 92.0 (0.9) | 0.00986 (0.00025) | 0.735 (0.001) | 0.682 (0.011) | 0.673 (0.018) |
| MolCLR | * | * | * | 0.750 (0.002) | 0.796 (0.019) |
| GEM | 58.9 (0.8) | 0.00746 (0.00001) | 0.781 (0.001) | 0.806 (0.009) | 0.817 (0.005) |
| DMP | 74.4 (1.2) | * | 0.791 (0.004) | 0.814 (0.004) | * |
| SMPT | * | * | 0.797 (0.001) | 0.812 (0.001) | 0.822 (0.008) |
| PCNN | 53.6 (2.1) | 0.00683 (0.00005) | 0.801 (0.002) | 0.823 (0.004) | 0.827 (0.015) |
If you find this code useful, please cite:
@inproceedings{
li2024path,
title={Path Complex Neural Network for Molecular Property Prediction},
author={Longlong Li and Xiang LIU and Guanghui Wang and Yu Guang Wang and KELIN XIA},
booktitle={ICML 2024 Workshop on Geometry-grounded Representation Learning and Generative Modeling},
year={2024},
url={https://openreview.net/forum?id=FlnGcMp6FL}
}