Coder Social home page Coder Social logo

deceptrax123 / defending-graph-neural-networks-against-adversarial-attacks Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 0.0 22 KB

A self-supervised approach to train Graph Neural Networks to defend itself against Adversarial Attacks through Contrastive Learning and Negative Sampling

Python 100.00%
adversarial-attacks explainable-ai graph-neural-networks self-supervised-learning

defending-graph-neural-networks-against-adversarial-attacks's Introduction

Defending Graph Neural Networks against Adversarial Attacks

This repository was used in the Molecular Property Prediction Project. The pre-trained backbone can be extended for several other uses cases as well.

Running the Scripts

  • Follow the procedure detailed here to save the tensors of all molecular graphs.
  • You may use the SMILE strings from either Zinc or TwoSides. Note that TwoSides has 2 molecules per instance and different pairing and batching strategies need to be used to successfully run the scripts. The procedure for such a usecase is detailed here
  • Run the following command:
    pip install -r requirements.txt
  • Set the values for the paths in a .env file. The keys are detailed below.
  • Run train.py for the dataset of your choice. Further, you may be required to re-set the environment path. For such cases, linux/macOS users may use:
    export PYTHONPATH="/path/to/project/root"
  • Windows users are suggested to use bash terminal and run the above command.

Datasets Used

  • ZINC
  • TwoSIDES

Environment Variables

Key Value
graph_files path/to/graphs/data/processed/

You may send an email or raise an issue if there are any bugs.

defending-graph-neural-networks-against-adversarial-attacks's People

Contributors

deceptrax123 avatar

Stargazers

Ali avatar

Watchers

Kostas Georgiou avatar  avatar

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.