Giter Site home page Giter Site logo

args's Introduction

Sparse but Strong: Crafting Adversarially Robust Graph Lottery Tickets

《Sparse but Strong: Crafting Adversarially Robust Graph Lottery Tickets》的非官方复现。 This is the unofficial repository for Sparse but Strong: Crafting Adversarially Robust Graph Lottery Tickets which has been accepted at the NeurIPS 2023 GLFrontiers

Table of Contents

  1. 安装/Installation
  2. 使用/Usage
  3. Baseline Results

Installation

(本人使用的是python 3.10) This project requires Python 3.8 and the following Python libraries installed:

  • torch==1.13.1
  • dgl==1.0.4 -cu116
  • scikit-learn
  • networkx
  • scipy
  • matplotlib
  • pickle-mixin
  • argparse
  • numpy
  • warnings

要安装这些依赖项,cd到项目目录并运行以下命令: To install these dependencies, navigate to your project's directory and run the following command:

pip install -r requirements.txt

Usage

You can test the performance of the trained adversarially robust GLTs by executing these commands on the terminal:

Evaluating the performance of ARGLTs for Cora and Citeseer Datasets attacked by PGD attack

python main_test.py --dataset cora --embedding-dim 1433 512 7 --attack_name pgd --ptb_rate 0.05
python main_test.py --dataset cora --embedding-dim 1433 512 7 --attack_name pgd --ptb_rate 0.1
python main_test.py --dataset cora --embedding-dim 1433 512 7 --attack_name pgd --ptb_rate 0.15
python main_test.py --dataset cora --embedding-dim 1433 512 7 --attack_name pgd --ptb_rate 0.2

python main_test.py --dataset citeseer --embedding-dim 3703 512 6 --attack_name pgd --ptb_rate 0.05
python main_test.py --dataset citeseer --embedding-dim 3703 512 6 --attack_name pgd --ptb_rate 0.1
python main_test.py --dataset citeseer --embedding-dim 3703 512 6 --attack_name pgd --ptb_rate 0.15
python main_test.py --dataset citeseer --embedding-dim 3703 512 6 --attack_name pgd --ptb_rate 0.2

Baseline Results

Here are the baseline accuracies for GCN on the Cora and Citeseer datasets under PGD attack for comparison:

GCN with PGD Attack on Cora Dataset

Perturbation Rate Accuracy
0.05 78.81
0.1 78.46
0.15 77.93
0.2 77.99

GCN with PGD Attack on Citeseer Dataset

Perturbation Rate Accuracy
0.05 73.28
0.1 73.96
0.15 74.62
0.2 73.52

You can also train the models by executing the following commands on the terminal:

Training ARGLT for Cora Dataset

 python main_train.py --dataset cora --embedding-dim 1433 512 7 --lr 0.008 --weight-decay 8e-5 --pruning_percent_wei 0.2 --pruning_percent_adj 0.05 --total_epoch 10 --s1 1e-2 --s2 1e-2 --init_soft_mask_type all_one --attack_name pgd --ptb_rate 0.05 --k 30 --alpha 1 --beta 0.01 --gamma 1 --alpha_fix_mask 1 --gamma_fix_mask 1


作者只提供了PGD的数据集。

args's People

Contributors

subhajitduttachowdhury avatar dkhonker 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.