mirror of
https://github.com/romovpa/claudini.git
synced 2026-09-22 03:10:41 +02:00
Co-Authored-By: Alexander Panfilov <sasha_pusha@mail.de> Co-Authored-By: Claude <noreply@anthropic.com>
name, full_name, reference, paper_url, code
| name | full_name | reference | paper_url | code |
|---|---|---|---|---|
| GBDA | Gradient-Based Distributional Attack | guo2021gradient | https://arxiv.org/abs/2104.13733 | https://github.com/facebookresearch/text-adversarial-attack |
GBDA — Gradient-Based Distributional Attack
Paper: Guo et al., "Gradient-based Adversarial Attacks against Text Transformers" (EMNLP 2021) Links: arXiv | Code \cite{guo2021gradient}
Reference implementation: https://github.com/centerforaisafety/HarmBench/blob/main/baselines/gbda/gbda.py
Algorithm
Optimizes a logit matrix over the vocabulary via Gumbel-Softmax relaxation. Temperature anneals linearly from tau_init to tau_final, progressively sharpening the soft distribution toward discrete tokens.
Differences from original paper
Now paper-faithful (previously followed HarmBench adaptation):
- Constant temperature tau=1.0 (no annealing)
- Plain Adam (no LR scheduler)
- 10 Gumbel-Softmax samples per step for variance reduction (not 1)
The original paper targets text classifiers (BERT). The adaptation to causal LM target-token CE loss is from HarmBench.