Giter Site home page Giter Site logo

whatissimondoing / sememepso-attack Goto Github PK

View Code? Open in Web Editor NEW

This project forked from thunlp/sememepso-attack

0.0 0.0 0.0 60.09 MB

Code and data of the ACL 2020 paper "Word-level Textual Adversarial Attacking as Combinatorial Optimization"

License: MIT License

Python 82.78% Jupyter Notebook 17.22%

sememepso-attack's Introduction

SememePSO-Attack

Code and data of the ACL 2020 paper "Word-level Textual Adversarial Attacking as Combinatorial Optimization". [paper]

Citation

Please cite our paper if you find it helpful.

@inproceedings{zang2020word,
  title={Word-level Textual Adversarial Attacking as Combinatorial Optimization},
  author={Zang, Yuan and Qi, Fanchao and Yang, Chenghao and Liu, Zhiyuan and Zhang, Meng and Liu, Qun and Sun, Maosong},
  booktitle={Proceedings of ACL},
  year={2020}
}

This repository is mainly contributed by Yuan Zang and Chenghao Yang.

Requirements

  • tensorflow-gpu == 1.14.0
  • keras == 2.2.4
  • sklearn == 0.0
  • anytree == 2.6.0
  • nltk == 3.4.5
  • OpenHowNet == 0.0.1a8
  • pytorch_transformers == 1.0.0
  • loguru == 0.3.2

Make sure you have run the following codes to complete the installation of OpenHowNet before running any codes in this repo.

import OpenHowNet
OpenHowNet.download()

General Required Data and Tools

Reproducibility Support

Since data processing and models training may take a lot of time and computing resources, we provide the data and models we use for experiments. You can directly download the data and models we used for related experiments from TsinghuaCloud or Google Drive. The instructions of how to use these files can be found in the README.md files in IMDB/, SNLI/ and SST/.

Running Instructions

Please see the README.md files in IMDB/, SNLI/ and SST/ for specific running instructions for each attack models on corresponding downstream tasks.

sememepso-attack's People

Contributors

yangalan123 avatar fanchao-qi 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.