Evaluation, Benchmarking & Red-Teaming

automated red-teaming

Hand-crafting attacks does not scale to the combinatorial space of prompts, so automated red-teaming uses algorithms — search, optimization, or another model — to generate adversarial inputs at scale. An attacker model is trained or prompted to elicit unsafe responses from a target, turning red-teaming into a tractable optimization problem with a measurable objective: maximize the attack-success rate against the defended model.

Several families exist. Gradient-based methods like GCG optimize an adversarial suffix against a white-box model to maximize the probability of an affirmative prefix such as "Sure, here." Black-box methods treat attack discovery as search or reinforcement learning, rewarding an attacker LLM for both diversity and high attack-success rate, as in red-teaming language models with language models. A judge or classifier scores each attempt for harmfulness, closing the loop; the output is large, labeled attack sets usable for evaluation and for safety fine-tuning.

Automated attacks can be unnatural — gibberish suffixes that a perplexity filter catches — and tend to collapse onto a few high-yield templates without explicit diversity pressure. They complement rather than replace human red teams, who still find the contextual, socially engineered exploits that matter most in real deployments, but automation provides the scale and regression coverage humans cannot.

\max_{s}\ \log p_{\theta}\!\left(\text{``Sure, here''} \mid x \oplus s\right)

A GCG-style objective: optimize an adversarial suffix s appended to prompt x to maximize the affirmative-prefix probability.

Also called
automated red teaming自動化攻擊生成