TL;DR
This paper tackles the challenge of creating robust safety evaluations for text-to-image (T2I) models by developing a scalable method to augment existing adversarial prompt datasets. By combining human creativity with automated techniques, they generate realistic, semantically similar prompts that effectively test T2I model vulnerabilities, maintaining a high failure rate while improving dataset diversity.
What Problem Does This Paper Address?
Text-to-image (T2I) models, like DALL-E and Stable Diffusion, are becoming increasingly powerful and accessible. However, ensuring their safety is a critical concern. A significant challenge arises when these models generate harmful or inappropriate content from seemingly innocuous prompts – a phenomenon termed "implicitly adversarial prompts." Existing methods for creating datasets to test these vulnerabilities fall into two camps: human-driven approaches, which are often small and unbalanced, and purely automated methods, which can scale but tend to produce prompts lacking diversity and realism. This gap hinders our ability to thoroughly evaluate and improve T2I model safety against a wide range of potential harms.
Methods
The authors propose a "lexically-constrained automated prompt augmentation" technique. They leverage two specific attack strategies identified from a human-generated dataset (Adversarial Nibbler Dataset):
- Typographical Errors: They use the SymSpell package to identify and correct misspelled words in existing prompts. The corrected prompts are then used to generate new images, allowing them to assess if fixing typos reduces safety failures.
- Semantic Ambiguity: They explore how semantic ambiguity in "trigger words" contributes to safety failures. For a selected set of trigger words, they generate synonyms using GPT-3.5-turbo and replace the original trigger word in prompts. They also experiment with rephrasing entire prompts to understand the impact of broader context versus specific word meanings.
This approach aims to balance scalability with the realism and diversity of human-generated prompts.
Datasets
- Source Dataset: The primary source for this work is the Adversarial Nibbler Dataset by Quaye et al. This dataset contains 1,241 unique prompts that successfully bypassed text safety filters to trigger inappropriate image generations. Each prompt is labeled with the attack strategy used by the human participant.
- Augmented Dataset: The paper describes the creation of a new, augmented dataset through their proposed methods.
Key Insights and Ideas
- Human-Machine Collaboration is Key: The paper strongly advocates for combining human creativity (from the initial dataset) with automated scaling techniques to create more effective and realistic adversarial datasets.
- Typographical Errors Matter: Correcting simple typographical errors in prompts can significantly reduce safety failures, particularly for sexually explicit content, suggesting that models are sensitive to subtle linguistic variations.
- Semantic Ambiguity is Complex: While semantic ambiguity of trigger words plays a role, especially in sexually explicit categories, the broader context of the prompt also significantly influences safety failures, particularly in violent categories.
- Realistic Prompts are Crucial: Automated generation methods that lack grounding in human interaction patterns can produce "inorganic" results, which may not accurately reflect real-world vulnerabilities.
Key Results
- Typographical Errors: Correcting spelling errors led to a reduction in persistent failures. For instance, in the sexually explicit category, 62% of failures persisted after correction, while for bias and hate, failures were eliminated. However, manual inspection revealed that some bias and hate failures persisted even after correction, highlighting the limitations of automated safety classifiers.
- Semantic Ambiguity:
- For sexually explicit failures, replacing trigger words with synonyms was highly effective, causing models to fail at least 50% of the time in 79.6% of cases. This suggests that the identified trigger words are indeed responsible for these failures.
- For violent failures, rephrasing the entire prompt was slightly more effective (17.1% of prompts causing >50% failure) than just replacing trigger words (15.1%), indicating that the broader context of the prompt is more influential than specific trigger words in this category.
Limitations and Future Work
- Limitations:
- The authors acknowledge challenges in finding automatic safety classifiers that can reliably detect "bias" and "hate" violations, necessitating manual inspection for these categories.
- The current work focuses on only two attack strategies from the Adversarial Nibbler dataset.
- Future Work:
- Scale up automation techniques to cover all attack strategies from the Adversarial Nibbler dataset and other well-annotated datasets.
- Utilize a wider range of state-of-the-art large language models with complementary strengths to refine prompting techniques.
- Extend augmentation beyond synonym generation.
- The authors aim to pave the way for the ML community to scale red-teaming efforts without compromising on the reality and relevance of generated content.
Summary updated