Giter Club home page Giter Club logo

ct-gat's Introduction

CT-GAT

Code, data and model parameter of the EMNLP 2023 paper "CT-GAT: Cross-Task Generative Adversarial Attack based on Transferability"

This repository contains code modified from Advbench, many thanks!

Dependencies

You can create the same running environment and install dependencies as us by using the following commands:

conda env create -f environment.yaml

Data Preparation and Preprocess

Please visit the /data folder, read the README.md there to obtain and process the data.

Folder Creation

Execute the following code to create the required folders

mkdir param
mkdir victim
mkdir output

Experiments

In this step, you need to operate under the CT-GAT directory.

First, you need to train the CT-GAT generator. You can run the following command for training. You can also directly download our parameters from Google Cloud: here. Or you can download our trained model parameters from Baidu Cloud: here

bash scripts/train_CT-GAT.sh

Then you should fine-tune the pre-trained model on our security datasets collection Advbench.

bash scripts/train_victim.sh

To conduct the baseline attack experiments in default settings:

bash scripts/base_attack.sh

To conduct attack experiments via ROCKET in default settings:

bash scripts/ROCKT.sh

To conduct attack experiments via CT-GAT in our settings:

bash scripts/CT-GAT.sh

Citation

Please kindly cite our paper:

@misc{lv2023ctgat,
      title={CT-GAT: Cross-Task Generative Adversarial Attack based on Transferability}, 
      author={Minxuan Lv and Chengwei Dai and Kun Li and Wei Zhou and Songlin Hu},
      year={2023},
      eprint={2310.14265},
      archivePrefix={arXiv},
      primaryClass={cs.CL}
}

ct-gat's People

Contributors

xiaoxuannlp 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.