Files
claudini/claudini/methods/original/gbda
5b6058b3c4 Initial commit
Co-Authored-By: Alexander Panfilov <sasha_pusha@mail.de>
Co-Authored-By: Claude <noreply@anthropic.com>
2026-03-25 02:09:26 +00:00
..
2026-03-25 02:09:26 +00:00
2026-03-25 02:09:26 +00:00
2026-03-25 02:09:26 +00:00

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.