mirror of
https://github.com/QData/TextAttack.git
synced 2021-10-13 00:05:06 +03:00
Merge pull request #281 from QData/update-readme
Update readme with CheckList recipes
This commit is contained in:
@@ -109,6 +109,8 @@ Attacks on classification tasks, like sentiment classification and entailment:
|
||||
- **alzantot**: Genetic algorithm attack from (["Generating Natural Language Adversarial Examples" (Alzantot et al., 2018)](https://arxiv.org/abs/1804.07998)).
|
||||
- **bae**: BERT masked language model transformation attack from (["BAE: BERT-based Adversarial Examples for Text Classification" (Garg & Ramakrishnan, 2019)](https://arxiv.org/abs/2004.01970)).
|
||||
- **bert-attack**: BERT masked language model transformation attack with subword replacements (["BERT-ATTACK: Adversarial Attack Against BERT Using BERT" (Li et al., 2020)](https://arxiv.org/abs/2004.09984)).
|
||||
- **checklist**: Invariance testing implemented in CheckList that contract, extend, and substitutes name entities. (["Beyond Accuracy: Behavioral
|
||||
Testing of NLP models with CheckList" (Ribeiro et al., 2020)](https://arxiv.org/abs/2005.04118)).
|
||||
- **faster-alzantot**: modified, faster version of the Alzantot et al. genetic algorithm, from (["Certified Robustness to Adversarial Word Substitutions" (Jia et al., 2019)](https://arxiv.org/abs/1909.00986)).
|
||||
- **deepwordbug**: Greedy replace-1 scoring and multi-transformation character-swap attack (["Black-box Generation of Adversarial Text Sequences to Evade Deep Learning Classifiers" (Gao et al., 2018)](https://arxiv.org/abs/1801.04354)).
|
||||
- **hotflip**: Beam search and gradient-based word swap (["HotFlip: White-Box Adversarial Examples for Text Classification" (Ebrahimi et al., 2017)](https://arxiv.org/abs/1712.06751)).
|
||||
|
||||
@@ -48,6 +48,12 @@ BERT-Attack: (BERT-Attack: Adversarial Attack Against BERT Using BERT)
|
||||
|
||||
.. automodule:: textattack.attack_recipes.bert_attack_li_2020
|
||||
:members:
|
||||
|
||||
CheckList: (Beyond Accuracy: Behavioral Testing of NLP models with CheckList)
|
||||
*******************************************************************************
|
||||
|
||||
.. automodule:: textattack.attack_recipes.checklist_ribeiro_2020
|
||||
:members:
|
||||
|
||||
DeepWordBug (Black-box Generation of Adversarial Text Sequences to Evade Deep Learning Classifiers)
|
||||
******************************************************************************************************
|
||||
|
||||
@@ -17,14 +17,11 @@ from .attack_recipe import AttackRecipe
|
||||
class CheckList2020(AttackRecipe):
|
||||
"""An implementation of the attack used in "Beyond Accuracy: Behavioral
|
||||
Testing of NLP models with CheckList", Ribeiro et al., 2020.
|
||||
This attack focuses on a number of attacks used in the Invariance Testing
|
||||
Method:
|
||||
- Contraction
|
||||
- Extension
|
||||
- Changing Names, Number, Location
|
||||
https://arxiv.org/abs/2005.04118
|
||||
|
||||
:param model: Model to attack.
|
||||
This attack focuses on a number of attacks used in the Invariance Testing
|
||||
Method: Contraction, Extension, Changing Names, Number, Location
|
||||
|
||||
https://arxiv.org/abs/2005.04118
|
||||
"""
|
||||
|
||||
@staticmethod
|
||||
|
||||
Reference in New Issue
Block a user