Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/thunlp/sememepso-attack
Code and data of the ACL 2020 paper "Word-level Textual Adversarial Attacking as Combinatorial Optimization"
https://github.com/thunlp/sememepso-attack
adversarial-attacks adversarial-examples nlp pso sememe
Last synced: 4 days ago
JSON representation
Code and data of the ACL 2020 paper "Word-level Textual Adversarial Attacking as Combinatorial Optimization"
- Host: GitHub
- URL: https://github.com/thunlp/sememepso-attack
- Owner: thunlp
- License: mit
- Created: 2020-04-28T14:28:38.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2021-04-11T10:55:12.000Z (over 3 years ago)
- Last Synced: 2024-04-20T13:04:21.910Z (7 months ago)
- Topics: adversarial-attacks, adversarial-examples, nlp, pso, sememe
- Language: Python
- Size: 58.7 MB
- Stars: 85
- Watchers: 9
- Forks: 14
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# SememePSO-Attack
Code and data of the ACL 2020 paper "Word-level Textual Adversarial Attacking as Combinatorial Optimization". [[paper]](https://arxiv.org/pdf/1910.12196.pdf)
## 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
## General Required Data and Tools
- Download [Glove vectors](http://nlp.stanford.edu/data/glove.840B.300d.zip)- Download [Stanford POS Tagger](https://nlp.stanford.edu/software/tagger.shtml#Download)
## 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 IMDB-related experiments from [TsinghuaCloud](https://cloud.tsinghua.edu.cn/d/b6b35b7b7fdb43c1bf8c/). 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.