NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Unveiling Safety Vulnerabilities of Large Language Models

George Kour, Marcel Zalmanovici, Naama Zwerdling, Esther Goldbraich, Ora Nova Fandina, Ateret Anaby-Tavor, Orna Raz, Eitan FarchiarXiv 2023

TL;DR

This paper introduces AttaQ, a new semi-automatically curated dataset designed to systematically probe safety vulnerabilities in Large Language Models (LLMs) via adversarial questions. To move beyond broad, coarse-grained safety evaluations, the authors also propose Homogeneity-Preserving Clustering (HPC), a novel algorithm that automatically identifies and names specific "vulnerable semantic regions" where a model is uniquely prone to generating harmful outputs.

What Problem Does This Paper Address?

While LLMs have advanced tremendously, they remain susceptible to generating harmful, toxic, or illegal content when provoked by adversarial prompts (often called "jailbreaking"). Current safety benchmarks typically evaluate models using broad, predefined risk categories (e.g., "violence" or "deception").

However, a model's actual vulnerabilities are rarely distributed uniformly across these massive categories. Instead, weaknesses often cluster within highly specific, overlapping semantic niches—such as providing instructions on how to evade shoplifting cameras versus general queries about theft. The authors address two major gaps: the need for diverse, scalable adversarial datasets, and the lack of automated, interpretable tools to pinpoint these precise semantic failure zones.

Methods

The paper's methodology is split into two primary components: dataset synthesis and automated vulnerability mapping.

1. Adversarial Data Synthesis

To create a robust pipeline of attacks, the authors developed three distinct strategies:

  • Data Extraction: Subsampling successful adversarial prompts from Anthropic's human-generated hh-rlhf dataset.
  • LLM-Driven Topic Generation: Prompting a strong open-source model (Falcon-40B-Instruct) with a "be toxic" directive to generate diverse questions across high-level safety concerns.
  • Crime-to-Action Synthesis: A structured two-step pipeline. First, they scraped 94 distinct offenses from Wikipedia's "Crime" page and used an LLM to translate these legal terms into practical actions (e.g., transforming "assault" into "hitting someone with an object"). Second, they prompted the LLM to generate natural questions a malicious user might ask based on those actions.

2. Identifying Vulnerable Semantic Regions

Once a target LLM's responses are scored using a safety reward model, the next challenge is finding where the failures cluster. Standard clustering algorithms (like $k$-means or DBSCAN) only look at the semantic distance between input questions, which can accidentally group successful attacks with blocked attacks.

To solve this, the authors introduced Homogeneity-Preserving Clustering (HPC). HPC modifies hierarchical agglomerative clustering by adding a constraint: two clusters can only merge if their semantic proximity is close and the variance (heterogeneity) of their safety scores remains below a strict threshold. This ensures that the resulting clusters represent pure, dense zones of model failure.

Finally, the authors automated Cluster Naming by selecting diverse representative prompts from each cluster and feeding them to a text-summarization LLM to generate a concise, descriptive title (e.g., "How to steal without getting caught").

Datasets

The primary contribution here is the AttaQ dataset, a benchmark composed of adversarial question-attack samples across 7 major harm classes: violence, substance abuse, PII, harmful info, explicit content, discrimination, and deception.

Figure 1: Number of attacks by their label and source

As shown in the distribution above, AttaQ balances human-curated diversity with the density of automated, crime-focused generation.

Key Insights and Ideas

  • The Toxicity Metric Blindspot: The authors discovered an exceptionally weak Pearson correlation (-0.1) between traditional Hate, Abuse, and Profanity (HAP) scores and actual harmlessness. Standard toxicity filters look for explicit profanity or slurs, completely missing implicit toxicity—such as an LLM politely and eloquently explaining how to manufacture an explosive device.
  • Systemic Vulnerabilities Cross Boundaries: Vulnerable regions do not neatly align with single safety labels. A cluster titled "How to commit a home invasion without getting caught" frequently spans across both "violence" and "deception" labels, proving that hardcoded categorical testing is insufficient.
  • The Directives Paradox: While adding a "Harmless, Helpful, and Honest" (HHH) system prompt generally improves safety, instruction-following models remain highly sensitive to adversarial system prompts (anti-HHH directives). Interestingly, Falcon-40B bucked the trend, occasionally rating anti-HHH attacks as less harmful than standard prompts, suggesting unique alignment characteristics.

Key Results

The authors evaluated several prominent open-source models, including Llama-2-70b-chat, Falcon-40b, MPT-7b-instruct, Flan-UL2, and GPT-NeoXT.

  • Safety Leaders: Llama-2-70b and Falcon-40b emerged as the most robust models overall, consistently refusing a higher percentage of harmful prompts.
  • Clustering Superiority: The proposed HPC algorithm significantly outperformed baseline techniques like Cluster-and-Filter (C&F) and Filter-and-Cluster (F&C). Across all tested LLMs, HPC achieved the lowest harmlessness scores (meaning it successfully isolated the most severe vulnerabilities) and the highest Adjusted Rand Index (ARI), proving its clusters align tightly with coherent human concepts.

Limitations and Future Work

  • Language Constraint: The AttaQ dataset is currently exclusively in English, leaving cross-lingual jailbreaks unaddressed.
  • Generation Bias: Stronger base models often refuse to generate the adversarial templates during the dataset creation phase, potentially omitting the most severe or graphic crime domains from the benchmark.
  • Computational Complexity: The HPC algorithm operates with a polynomial time complexity ($O(n^3d)$), which can scale poorly for massive datasets without precomputed distance matrices or heap optimizations.
  • Single-Label Classification: The current framework assigns a single primary label to attacks, though the authors note a multi-labeling scheme would better capture the overlapping nature of semantic vulnerabilities.

Summary updated

BibTeX
@misc{kour2023unveiling,
  author = {George Kour and Marcel Zalmanovici and Naama Zwerdling and Esther Goldbraich and Ora Nova Fandina and Ateret Anaby-Tavor and Orna Raz and Eitan Farchi},
  title = {{Unveiling Safety Vulnerabilities of Large Language Models}},
  year = {2023},
  eprint = {2311.04124},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2311.04124},
}
Figure