Code Monkey home page Code Monkey logo

maui's Introduction

Maui

This repository contains the source code for the paper, "Maui: Black-Box Edge Privacy Attack on Graph Neural Networks" by Haoyu He, Isaiah J. King and H. Howie Huang, presented at PETS 2024.

framework

[Paper]

@article{he2024maui,
  title={Maui: Black-Box Edge Privacy Attack on Graph Neural Networks},
  author={He, Haoyu and King, Isaiah J and Huang, H Howie},
  journal={Proceedings on Privacy Enhancing Technologies},
  volume={4},
  pages={364--380},
  year={2024}
}

Requirements

We use Pytorch Geometric 2.4.0 (PyG) and later for implementation. Please follow the instruction to install PyG.

Datasets

The datasets can be directly loaded from PyG.

Usage

Configuring the experiment

We use configs.py to configure the experiment. Please check this file to see the complete list of options.

Specifications

The trained models are saved in the ./src folder.

The matrices of influence nodes and influence values are saved in the ./influence_values folder, separated by datasets. They are saved as .npz files in coo format.

For small datasets, we run *.py. For large datasets, we run *_sample.py, which selects a random subgraph to attack in each round.

In the following sections, we provide simple commands for running the experiment on small datasets.

Training a GNN model

To train a target model, run the following:

python train.py --dataset DATASET_NAME --model MODEL_NAME

We provide GCN, GAT and GraphSAGE.

Attacking a GNN model

To use Maui, simply run:

python get_influence_values.py --dataset DATASET_NAME --model MODEL_NAME --attacker 0

To use Maui_comb, run:

python get_influence_values.py --dataset DATASET_NAME --model MODEL_NAME --attacker 0 --combo --combo_bar THRESHOLD

We use attacker to specify which attacker to use, specifically, 0: Maui, 1: LinkTeller, 2: LSA2.

Evaluating the attack performance

eval_baseline.py can provide the all the evaluations from the paper. The command to run it is similar to running the attack, where you need to specify the dataset, model and the attack. Additionally, you can specify topk for precision and recall.

eval_k.py can provide precisions and recalls at different topk.

We also provide the evaluation for decoders in decode.py and decode_k.py.

maui's People

Contributors

haoyu-he avatar

Watchers

 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.