Git Product home page Git Product logo

graphcw's Introduction

Explainable AI in Drug Discovery: Self-interpretable Graph Neural Network for molecular property prediction using Concept Whitening

This is the official repository of the paper "Explainable AI in Drug Discovery: Self-interpretable Graph Neural Network for molecular property prediction using Concept Whitening. Michela Proietti,Alessio Ragno Biagio La Rosa, Rino Ragno, and Roberto Capobianco. Machine Learning (2024)".

Description

This repository implements the first concept-based explanability method for graph neural networks, obtained by adapting the code for (https://github.com/zhiCHEN96/ConceptWhitening "Concept Whitening"). It consists of a module which can be inserted straight after a convolutional layer in a GNN, in place of batch normalization layers. The module aligns the axes of the latent space with known concept of interest, in our case molecular properties that are known to influence the bioactivity of molecules.

Usage

In the config.yaml file in the config folder, you need to change the paths in the base_dir, statistics_dir, and concept_dir items. In order to use concept whitening, you will need to extract the molecular properties from the dataset's molecules. This can be done by executing the command:

python extract_molecular_concepts.py

To train a new model or test a pre-trained one, execute the command

python train_gnns.py

after setting the desired parameters by changing the files in the config folder.

Citation


@article{proietti2024explainable,
  title={Explainable AI in drug discovery: self-interpretable graph neural network for molecular property prediction using concept whitening},
  author={Proietti, Michela and Ragno, Alessio and Rosa, Biagio La and Ragno, Rino and Capobianco, Roberto},
  journal={Machine Learning},
  volume={113},
  number={4},
  pages={2013--2044},
  year={2024},
  publisher={Springer}
}

Contact

If you have any question, do not hesitate to contact us at mproietti[at]diag[dot]uniroma1[dot]it.

graphcw's People

Contributors

michelaproietti avatar

Stargazers

 avatar Liu Jac avatar

Watchers

Roberto Capobianco avatar

graphcw's Issues

Import error in visualize: Can't import visualize_attrs from visualize

Hello,

First of all I would like to appreciate your work in the field of predictive modelling with explainability.
I'm trying out your repository for getting visual inspects of substructures that are contributing to the prediction.

I'm getting this error while importing module from visualize from visualize_atttrs.

ImportError                               Traceback (most recent call last)
Cell In[22], [line 35](vscode-notebook-cell:?execution_count=22&line=35)
     [33](vscode-notebook-cell:?execution_count=22&line=33) from rdkit import Chem
     [34](vscode-notebook-cell:?execution_count=22&line=34) from torch_geometric.data import Data
---> [35](vscode-notebook-cell:?execution_count=22&line=35) from visualize import visualize_attrs
     [36](vscode-notebook-cell:?execution_count=22&line=36) from dig.xgraph.dataset.mol_dataset import *
     [38](vscode-notebook-cell:?execution_count=22&line=38) from time import sleep

ImportError: cannot import name 'visualize_attrs' from 'visualize'

I couldn't find any code file named visualize in your repository.

Could you help me to solve this error asap?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.