Adversarial NLP Robustness NLP Tools

Tools, datasets, and methods for generating adversarial attacks on NLP models, evaluating model robustness, and developing defense mechanisms against adversarial perturbations. Does NOT include general model evaluation, bias detection without adversarial intent, or data augmentation for improving performance.

There are 39 adversarial nlp robustness tools tracked. 1 score above 50 (established tier). The highest-rated is thunlp/OpenAttack at 56/100 with 772 stars and 218 monthly downloads.

Get all 39 projects as JSON

curl "https://pt-edge.onrender.com/api/v1/datasets/quality?domain=nlp&subcategory=adversarial-nlp-robustness&limit=20"

Open to everyone — 100 requests/day, no key needed. Get a free key for 1,000/day.

# Tool Score Tier
1 thunlp/OpenAttack

An Open-Source Package for Textual Adversarial Attack.

56
Established
2 thunlp/TAADpapers

Must-read Papers on Textual Adversarial Attack and Defense

42
Emerging
3 osoleve/glitchlings

Enemies for your LLM

42
Emerging
4 jind11/TextFooler

A Model for Natural Language Attack on Text Classification and Inference

40
Emerging
5 thunlp/OpenBackdoor

An open-source toolkit for textual backdoor attack and defense (NeurIPS 2022...

36
Emerging
6 thunlp/SememePSO-Attack

Code and data of the ACL 2020 paper "Word-level Textual Adversarial...

34
Emerging
7 thunlp/HiddenKiller

Code and data of the ACL-IJCNLP 2021 paper "Hidden Killer: Invisible Textual...

34
Emerging
8 aonotas/adversarial_text

Code for Adversarial Training Methods for Semi-Supervised Text Classification

31
Emerging
9 thunlp/Advbench

Code and data of the EMNLP 2022 paper "Why Should Adversarial Perturbations...

31
Emerging
10 thunlp/BkdAtk-LWS

Code and data of the ACL 2021 paper "Turn the Combination Lock: Learnable...

31
Emerging
11 salesforce/adversarial-polyglots

Code for the paper "Code-Mixing on Sesame Street: Dawn of the Adversarial...

30
Emerging
12 lancopku/Avg-Avg

[Findings of EMNLP 2022] Holistic Sentence Embeddings for Better...

30
Emerging
13 INK-USC/RobustLR

A Diagnostic Benchmark for Evaluating Logical Robustness of Deductive Reasoners

27
Experimental
14 SecHack365-Fans/prompt2slip

This library is testing the ethics of language models by using natural...

27
Experimental
15 pramodkaushik/np_analysis

Adversarial attacks generated for the ACL paper "Did the Model Understand...

26
Experimental
16 mirbostani/RobustQA

RobustQA: A Framework for Adversarial Text Generation Analysis on Question...

26
Experimental
17 snowood1/BERT-ENN

Uncertainty-Aware Reliable Text Classification (KDD 2021)

24
Experimental
18 pramodkaushik/acl18_results

Code to reproduce results in our ACL 2018 paper "Did the Model Understand...

24
Experimental
19 thunlp/RobTest

Source code for ACL 2023 Findings paper "From Adversarial Arms Race to...

21
Experimental
20 LCS2-IIITD/HIT-ACL2021-Codemixed-Representation

This repo contains the source code of HIT: A Hierarchically Fused Deep...

20
Experimental
21 Samanth-ai/robust-transformer-qa-adversarial-inoculation

Transformer-based extractive QA robustness: adversarial distractor...

19
Experimental
22 ruizheng20/robust_data

Codes for the ACL Findings paper "Characterizing the Impacts of Instances on...

17
Experimental
23 Kyle1668/LLM-TTA

Code for the paper: Improving Black-box Robustness with In-Context Rewriting

16
Experimental
24 alekseevskaia/OrderBkd

Backdoor attack in NLP

15
Experimental
25 Efi-Pecani/Literary-LLM-Knowledge-Data-Poisoning

Data poisoning attacks on LLMs — corrupting Harry Potter knowledge via...

15
Experimental
26 karanparekh14/ADTA5760--Group-4

Contaminated knowledge base of 150 academic PDFs (450 contaminants) for LLM...

14
Experimental
27 xinzhel/attack_alta

Experiment for the paper published on ALTA2021: "Exploring the Vulnerability...

14
Experimental
28 lancopku/DAN

[Findings of EMNLP 2022] Expose Backdoors on the Way: A Feature-Based...

14
Experimental
29 leonardodalinky/zero-shot-GLS

[NAACL'24] ZGLS: Zero-shot Generative Linguistic Steganography

14
Experimental
30 gallilmaimon/LUNATC

This is the official implementation of "A Universal Adversarial Policy for...

14
Experimental
31 YangLinyi/GLUE-X

We leverage 14 datasets as OOD test data and conduct evaluations on 8 NLU...

14
Experimental
32 claws-lab/multimodal-robustness

Code and resources for EMNLP 2022 paper on 'Robustness of Fusion-based...

13
Experimental
33 chong-z/nlp-second-order-attack

[NAACL 2021] Code for "Double Perturbation: On the Robustness of Robustness...

13
Experimental
34 REACT-NLP/tcab_generation

Code to generate and extend the TCAB dataset.

12
Experimental
35 princeton-nlp/rationale-robustness

NAACL 2022: Can Rationalization Improve Robustness? https://arxiv.org/abs/2204.11790

12
Experimental
36 nishiwen1214/AT_Papers

Must-read papers on Adversarial training for neural networks!

12
Experimental
37 jrohsc/MSDT

Code of the IEEE UV2022 accepted paper "MSDT: Masked Language Model Scoring...

12
Experimental
38 lexicalcomputing/hamod

a High Agreement Multi-lingual Outlier Detection dataset

12
Experimental
39 95anantsingh/NYU-Attacking-Compressed-NLP

Testing transferability of Adversarial samples across NLP models.

10
Experimental