ART: Automatic Red-teaming for Text-to-Image Models to Protect Benign Users

Large-scale pre-trained generative models are taking the world by storm, due to their abilities in generating creative content. Meanwhile, safeguards for these generative models are developed, to protect users' rights and safety, most of which are designed for large language models. Existing methods primarily focus on jailbreak and adversarial attacks, which mainly evaluate the model's safety under malicious prompts. Recent work found that manually crafted safe prompts can unintentionally trigger unsafe generations. To further systematically evaluate the safety risks of text-to-image models, we propose a novel Automatic Red-Teaming framework, ART. Our method leverages both vision language model and large language model to establish a connection between unsafe generations and their prompts, thereby more efficiently identifying the model's vulnerabilities. With our comprehensive experiments, we reveal the toxicity of the popular open-source text-to-image models. The experiments also validate the effectiveness, adaptability, and great diversity of ART. Additionally, we introduce three large-scale red-teaming datasets for studying the safety risks associated with text-to-image models. Datasets and models can be found in https://github.com/GuanlinLee/ART.

Paper

References (38)

Scroll for more · 26 remaining

Similar papers

Peer review

Reviewer b5LW4/10 · confidence 4/52024-07-11

Summary

In this paper, the authors propose a new framework called Automatic Red-Teaming (ART) designed to identify safety risks in text-to-image models. The framework leverages both vision language models (VLMs) and large language models (LLMs) to establish connections between unsafe generations and their prompts. ART systematically evaluates the safety of text-to-image models by using an iterative interaction between LLMs and VLMs, fine-tuning them to generate and improve prompts that expose the model’s vulnerabilities. The authors introduce three large-scale red-teaming datasets to further aid in studying these safety risks. The paper also highlights the effectiveness, adaptability, and diversity of ART through comprehensive experiments on popular open-source text-to-image models like Stable Diffusion.

Strengths

1. The introduction of the ART framework is a significant innovation in the field of text-to-image model safety, combining LLMs and VLMs to automatically identify safety risks. 2. The creation of three large-scale red-teaming datasets enhances the research community's ability to study and improve model safety. 3. The paper conducts extensive experiments to validate the effectiveness of ART, demonstrating its success in identifying safety risks across different models and settings. 4. ART shows adaptability and can generalize to various categories of harmful content, making it a versatile tool for developers. 5. The framework is effective under different generation settings, ensuring robustness in real-world applications.

Weaknesses

1. The ART framework is complex, involving multiple stages of fine-tuning and iterative interactions, which might be challenging to implement and reproduce. 2. The framework heavily relies on pre-trained models, which might not be accessible or practical for all researchers or developers. 3. While the paper provides comprehensive experimental results, the evaluation metrics could be further detailed to cover more nuanced aspects of model safety and performance.

Questions

1. The ART framework is complex, involving multiple stages of fine-tuning and iterative interactions, which might be challenging to implement and reproduce. 2. The framework heavily relies on pre-trained models, which might not be accessible or practical for all researchers or developers. 3. While the paper provides comprehensive experimental results, the evaluation metrics could be further detailed to cover more nuanced aspects of model safety and performance.

Rating

4

Confidence

4

Soundness

3

Presentation

3

Contribution

3

Limitations

1. The ART framework is complex, involving multiple stages of fine-tuning and iterative interactions, which might be challenging to implement and reproduce. 2. The framework heavily relies on pre-trained models, which might not be accessible or practical for all researchers or developers. 3. While the paper provides comprehensive experimental results, the evaluation metrics could be further detailed to cover more nuanced aspects of model safety and performance.

Reviewer 7SKE6/10 · confidence 3/52024-07-12

Summary

This work proposes an automatic red-teaming frame to evaluate the safety of generated images for text-to-image models. The proposed method adopt a multi-agent framework. It consists of a LLM as Writer Model, a VLM as Guide Model, a set of toxic text and image detectors as Judge Models. The safe prompts likely eliciting unsafe content are generated through multi-round interaction between Writer Model and Guide Model. Both Writer Model and Guide Model are fine-tuned on purpose-built datasets. The empirical results suggest the effectiveness of the proposed method in generating safe prompts likely eliciting harmful generation of a target model.

Strengths

1. The motivation of "protecting normal users from unsafe content" is important and has practical meaning. 2. although the idea of using LLM to automate red teaming is not novel, but the implementation of multi-agent approach and the fine-tuning of core models are well-designed. 3. the performance improvement over the competitive works is large. 4. the paper is well-written and easy to follow.

Weaknesses

1. The proposed evaluation heavily depends on the effectiveness of two sets of detectors. Have authors done any verification on their accuracy? For example, use the human-inspected Adversarial Nibbler to do a sanity check. 2. Adversarial Nibbler is closely related to the proposed method, but it is not compared in the discussion (tab 1) and experiments. 3. although "our method is a form of red-teaming aimed at improving the model’s inherent safety and thus reducing reliance on other safety modules", given the current state of defense, those safety measures are necessary today for safe generation. It is therefore helpful to understand how the proposed methods perform when these safety measures are deployed. 4. IMO, the point of preventing unsafe content from safe prompts should be that the users do not expect the unsafe content when they input the safe prompts. However, given the visualization in Fig. 1, I personally feel that the generated images can be expected from the query prompts. Therefore, the generated unsafe images are not "unintentional" as claimed by the authors at Line 37.

Questions

1. have authors tried to add the output of Judge Models as the feedback in each red-teaming round for LLM/VLM to refine the prompt.

Rating

6

Confidence

3

Soundness

3

Presentation

4

Contribution

3

Limitations

discussed well in appendix L.

Reviewer vKvj6/10 · confidence 4/52024-07-13

Summary

This paper introduces a novel Automatic Red-Teaming framework to evaluate the safety of text-to-image models systematically which also investigate the benign prompts in addition to adversarial prompts. It shows that current text-to-image models are toxic in fact. This paper also introduces three large datasets.

Strengths

1. The paper is well-written and clearly state the contribution. 2. This work does not ignore the scenarios where benign users might unintentionally make the generation of unsafe content. 3. The three large-scale datasets introduced in this paper could be a benchmark for future text-to-image models' safety assessments.

Weaknesses

1. The implementation of ART involves multiple components, including language models and vision language models, which may make the inference slow. 2. For online models, ART only tests DALL.E-3. It would be better if the author could test other online text-to-image models like Midjourney.

Questions

1. How does ART differentiate between vulnerabilities exposed by benign prompts versus those exposed by adversarial prompts? 2. How long does ART take? Is the running time much slower or similar to that of previous methods?

Rating

6

Confidence

4

Soundness

2

Presentation

2

Contribution

3

Limitations

Yes.

Reviewer N2jw5/10 · confidence 2/52024-07-17

Summary

The paper proposes a safety evaluation framework for text-to-image models. This is motivated by protecting benign users from unintentional harmful content generated by these models. In particular, the method combines vision language models and LLMs to identify and mitigate unsafe generations that are likely triggered by safe prompts. The experiment results show the effectiveness of ART on iteratively refining prompts to reveal model vulnerabilities.

Strengths

1. The paper focuses on an under-explored area by exploring the harmful content generated by safe prompts, which is different from classical safety related text-to-image research. 2. The experiments are extensive based on various categories and open-sourced large models.

Weaknesses

1. The datasets used to finetune different models may contain biases from the collection sources, which could affect the discovery of certain types of harmful content that are underrepresented in the training data. 2. The proposed method consists of multiple pretrained large models and their interactions, which may complicate its implementation. Simplifying the framework or providing more detailed implementation guidelines could help.

Questions

1. How are the harmful categories be created and summarized? Is there any reference or evidence that they cover the common toxicity within the prompts? 2. Can the authors provide more details on how the datasets were curated, such as the balance between different categories of harmful content? Are there any efforts to mitigate potential biases in the data?

Rating

5

Confidence

2

Soundness

3

Presentation

2

Contribution

3

Limitations

No potential negative societal impact is observed.

Reviewer 7SKE2024-08-09

Thanks much for your detailed responses. Kindly please find below my remaining concerns: 1. I understand that there must exist evaluation reports for these detectors. However, I still think it is a good practice to include at least those numbers in the current manuscript for completeness. A better approach I would prefer is to report their accuracy in the authors' test set. 2. I understand that Adversarial Nibbler and the proposed method adopt different mechanism, but they are both proposed to conduct the same task: craft prompts to elicit harmful generation. It is therefore still worth of comparing. I also don't think there is a fairness concern. For example, the authors can test Adversarial Nibbler's prompts on a model that it was not optimized (filtered) for. I would suggest the authors to include the results and comparison in the revised manuscript. 3. I appreciate the case studies on DALL-E and Midjourney. However, it only shows that the method can works on these systems, but how effective it is remains unclear. I am wondering why not run the quantitative evaluation on these models like what have been done on Stable Diffusion in Tab. 3 and 4.

Authorsrebuttal2024-08-11

Thank you for your insightful comments. We have carefully considered your concerns and provide the following responses: **Regarding Q1:** We agree that adding the evaluation results for our detectors will enhance the completeness. Following your suggestion, we evaluated the accuracy of our detectors on the Adversarial Nibbler dataset. Due to Google’s restrictions—only open-sourcing prompts while requiring access applications for the generated images—we began by evaluating our prompt detectors. We plan to add the results of our image detectors once we obtain access to these images (we have been waiting for their approval for about three months). The table below demonstrates the effectiveness of our prompt detectors. We observe that most of the detectors show impressive detection accuracy on the safety of the prompts. For image detectors, [34] has previously reported accuracy on harmful images, and we will supplement this with new evaluations of image detectors on the Adversarial Nibbler dataset as soon as possible. | Detector | TD | NSFW-P | TCD | LlamaGuard | |:--------:|:-----:|:------:|:-----:|:----------:| | Accuracy | 94.08 | 82.71 | 96.33 | 96.02 | **Regarding Q2:** Thanks for your suggestions on the comparison between our method and Adversarial Nibbler. Notably, the text-to-image models used in their competition align with those in our study (i.e., DALL-E, Stable Diffusion, and Midjourney). Therefore, their successful cases would trigger the models in our papers to generate unsafe images as well. To ensure a fair comparison, we consider using the success ratio (the number of successful cases divided by the total number of attempted cases) as a metric for Adversarial Nibbler. After considering all three rounds in their data processing, the success rate of Adversarial Nibbler is 1.79%, based on 3853 successful cases out of 215825 attempts. We will include this result in the revised manuscript. **Regarding Q3:** We would like to emphasize that the primary intention of our proposed automated red-teaming method is to enable model developers to test **the models they own**. When testing models such as OpenAI or Midjourney, which we do not own, we encounter many limitations. To demonstrate the effectiveness of our method on these deployed commercial models, we have still conducted tests on them. However, quantitative evaluations on DALL-E and Midjourney present significant challenges for several reasons: - Firstly, OpenAI and Midjourney actively monitor user accounts (see https://help.openai.com/en/articles/7039943-data-usage-for-consumer-services-faq, https://docs.midjourney.com/docs/privacy-policy), and thus generating a large number of unsafe images intentionally could lead to account bans. We encountered this issue during our experiments and had to use multiple accounts to mitigate this risk. However, for the extensive testing required for quantitative evaluations, the risk of account suspension makes such evaluations impractical. - Secondly, during our evaluation, we experienced numerous failures due to various factors, such as exceeding usage limits, high API demand, and blocking by the safeguards of OpenAI or Midjourney. These failures prevent us from executing a full, automated evaluation process. Consequently, we have opted to present case studies for these two commercial models. Nonetheless, our method remains applicable for model developers, including those of DALL-E and Midjourney, if these limitations and failure cases were not present. We hope our explanations address your concerns.

Reviewer 7SKE2024-08-12

Thanks for your new results and detailed responses. For the response to Q2, the reported comparison makes little sense and is not what I suggested. If you think that these manually filtered prompts are over-optimized for the used T2I models, you could test those prompts with yours on the unseen/unoptimized models to show the better generalization of your method if have. Otherwise, if those manual static prompts would transfer well to unseen models and even outperform the automated methods, I will find the latter less meaningful. For the response to Q3, I think the reasons why not applicable to closed-source models give several limitations of the proposed method such as high API demand and vulnerable to the deployed safeguard. Besides, how about reducing the scale of evaluation? Is it feasible to test like 100 cases? While the small scale may introduce some bias, I believe it is still better than having none.

Authorsrebuttal2024-08-13

Thank you for your response. We sincerely apologize for any confusion we may have caused. **Response to Q2:** We apologize for the misunderstanding. We now understand your question clearly: you are suggesting that we test an unseen model using both Google’s static red-teaming benchmark prompts and our proposed dynamic automated red-teaming method to observe the difference in success rates between the two approaches. Firstly, we are currently looking for a new T2I model to serve as the target for this experiment. However, due to time constraints, we are unable to complete this experiment in time. We will discuss the results in the revision. Secondly, even if Nibbler benchmark has good transferability across models, our automated red-teaming method still offers significant advantages. - The benchmark prompts obtained in Adversarial Nibbler are **static**, providing the model with only limited information to improve its security. In contrast, our automated method enables a continuous red-teaming process, consistently uncovering diverse security vulnerabilities. - As noted in the limitations of Adversarial Nibbler [1], manual red-teaming severely restricts the diversity and scale of test cases, resulting in tests that are conducted **“at a smaller scale”**. In comparison, our automated method efficiently generates a large number of test cases to thoroughly evaluate the model. - Moreover, manual assessment of the safety of prompts and images can **introduce significant biases**, especially when evaluators have backgrounds that are prone to certain biases, as discussed in Adversarial Nibbler [1]. Our automated red-teaming method, on the other hand, employs multiple validated safe detectors to minimize biases during the evaluation process. Based on these factors, we believe that automated red-teaming remains essential, particularly in the context of safe prompts red-teaming. **Response to Q3:** Thank you for your suggestions. We would like to emphasize that the primary goal of the red-teaming process is to help model developers identify vulnerabilities within their models. As such, red-teaming typically requires the consent of the model developers (external red-teaming) or is conducted directly by the developers using red-teaming tools (internal red-teaming). In these scenarios, red-teaming is not constrained by factors such as exceeding usage limits or high API demand, allowing automated red-teaming methods to be fully utilized. Nevertheless, following your suggestion, and to demonstrate the effectiveness of our method on closed-source commercial models, we submitted 50 test cases (safe prompts) to DALL-E and Midjourney, respectively. Among them, DALL-E produced 15 unsafe images (a 30% success rate), and Midjourney generated 20 unsafe images (a 40% success rate). We hope these explanations address your concerns. [1] Quaye, Jessica, et al. "Adversarial Nibbler: An Open Red-Teaming Method for Identifying Diverse Harms in Text-to-Image Generation." The 2024 ACM Conference on Fairness, Accountability, and Transparency. 2024.

Reviewer 7SKE2024-08-13

Thanks again for your responses. I appreciate much the authors' effort. However, I still have some concerns about the significance of the proposed method's performance compared to existing approaches, so I have decided to maintain my current score.

Reviewer N2jw2024-08-12

Thanks for the authors' response. They partially address my questions related to the data bias issue. I have updated my scores.

Authorsrebuttal2024-08-12

Thank you so much for your positive feedback! It encourages us a lot! We noticed that you mentioned in your response that you have updated your score. Again, we sincerely appreciate this! However, the current score remains unchanged (as 5). We speculate that you may have forgotten to make changes in your busy schedule. We would be very grateful if you could kindly update the score before the end of the author-reviewer discussion at your convenience, in case of potential misunderstandings during the reviewer discussion period.

Program Chairsdecision2024-09-25

Decision

Accept (poster)

© 2026 NYSGPT2525 LLC