Red teaming ChatGPT via Jailbreaking: Bias, Robustness, Reliability and Toxicity

Terry Yue Zhuo, Yujin Huang, Chunyang Chen, Zhenchang Xing · DOI

Abstract: Recent breakthroughs in natural language processing (NLP) have permitted the synthesis and comprehension of coherent text in an open-ended way, translating theoretical algorithms into practical applications. Large language models (LLMs) have significantly impacted businesses such as report summarization and copywriting. Observations indicate, however, that LLMs may exhibit social prejudice and toxicity, posing ethical and societal dangers. While empirical investigations reveal ethical difficulties in advanced LLMs, there is little systematic examination of the risks in current usage. To educate future efforts on constructing ethical LLMs responsibly, we perform a qualitative "red teaming" on OpenAI's ChatGPT (Dec 15th version) to understand ethical dangers across four perspectives: Bias, Reliability, Robustness, and Toxicity. We empirically benchmark ChatGPT on multiple datasets and find that many ethical risks cannot be addressed by existing benchmarks, illustrating them via additional case studies. Our findings shed light on determining and mitigating ethical hazards in LLM applications.

Introduction

As Large Language Models (LLMs) transition from research curiosities to ubiquitous tools in search engines, copywriting, and coding assistance, their potential for societal harm scales accordingly. Previous research has identified risks like social prejudice, toxicity, and misinformation, but these studies often focus on older models or theoretical risks. This paper identifies a "gap in the wild": standard benchmarks often fail to capture how models behave under adversarial pressure or in complex, real-world scenarios. By specifically targeting ChatGPT, we investigate whether its safety filters are truly robust or merely a thin veneer that can be bypassed by clever adversarial prompting.

Evaluation Framework

The research employs a dual-track evaluation strategy to probe the limits of ChatGPT's safety guardrails. First, empirical benchmarking tests ChatGPT in a zero-shot setting against standard metrics for bias, sentiment robustness, and factual accuracy. Second, qualitative "red teaming" (jailbreaking) involves manually crafting adversarial prompts to bypass safety mechanisms. This includes persona-assigned injections (e.g., asking the model to act as a villain), scenario-based safety bypasses, and multilingual probing.

The evaluation framework for red teaming ChatGPT across four ethical dimensions: Bias, Robustness, Reliability, and Toxicity.

The study utilizes a wide array of established benchmarks, including BBQ and BOLD for bias, IMDB and BoolQ for robustness, and OpenBookQA and TruthfulQA for reliability. These are augmented with human-evaluated case studies to capture nuances missed by automated metrics.

Key Insights: The Jailbreak Reality

The Multilingual but Monocultural Trap

ChatGPT exhibits inconsistent biases depending on the language used. For instance, when queried about the ownership of the disputed Kunashir Island, the model provided biased answers in Japanese and Russian but a neutral, balanced answer in English. This suggests that safety alignment may be more mature in English than in other languages.

Multilingual bias in ChatGPT: Inconsistent responses regarding territorial disputes across different languages.

Biased Induction in Code and Personas

ChatGPT's safety filters are remarkably easy to circumvent by assigning it a persona. By asking the model to act like a "rude and poisonous" character, the toxicity fraction of its responses jumped from near-zero to over 97%. Furthermore, the model readily wrote Python functions that used race and gender as logic gates for professional success (e.g., an is_doctor function returning True only for certain demographics), struggling to remove this logic even when prompted to "un-bias" the code.

Quantitative Results

  • Bias: On the BBQ benchmark, ChatGPT achieved a 0.904 Exact Match (EM) score, significantly outperforming GPT-3 (0.392). This suggests strong baseline fairness in standard, non-adversarial QA.
  • Robustness: ChatGPT showed superior accuracy and invariance to typos compared to baselines. However, in the "Jailbreak" case study, 95 out of 98 previously protected unsafe scenarios were successfully bypassed using adversarial prompts.
  • Reliability: The model remains prone to hallucinations, correctly answering no more than 65% of factual test cases. Human evaluators found a 24% hallucination rate in open-ended QA.
  • Toxicity: Under default conditions, ChatGPT is extremely safe (toxic fraction of 0.005). When jailbroken with a toxic persona, this skyrocketed to 0.977.

Conclusion and Future Directions

While ChatGPT represents a significant step forward in baseline safety and performance, it remains vulnerable to sophisticated adversarial attacks. The "moving target" nature of proprietary models and their lack of transparency regarding training data present ongoing challenges for researchers. Future efforts must focus on "Internal Ethics" (improving model architecture and training data cleanliness) and "External Ethics" (developing more robust, adversarial benchmarks that go beyond simple multiple-choice questions).

Summary updated

Abstract

Recent breakthroughs in natural language processing (NLP) have permitted the synthesis and comprehension of coherent text in an open-ended way, therefore translating the theoretical algorithms into practical applications. The large language models (LLMs) have significantly impacted businesses such as report summarization software and copywriters. Observations indicate, however, that LLMs may exhibit social prejudice and toxicity, posing ethical and societal dangers of consequences resulting from irresponsibility. Large-scale benchmarks for accountable LLMs should consequently be developed. Although several empirical investigations reveal the existence of a few ethical difficulties in advanced LLMs, there is little systematic examination and user study of the risks and harmful behaviors of current LLM usage. To further educate future efforts on constructing ethical LLMs responsibly, we perform a qualitative research method called ``red teaming'' on OpenAI's ChatGPT\footnote{In this paper, ChatGPT refers to the version released on Dec 15th.} to better understand the practical features of ethical dangers in recent LLMs. We analyze ChatGPT comprehensively from four perspectives: 1) \textit{Bias} 2) \textit{Reliability} 3) \textit{Robustness} 4) \textit{Toxicity}. In accordance with our stated viewpoints, we empirically benchmark ChatGPT on multiple sample datasets. We find that a significant number of ethical risks cannot be addressed by existing benchmarks, and hence illustrate them via additional case studies. In addition, we examine the implications of our findings on AI ethics and harmal behaviors of ChatGPT, as well as future problems and practical design considerations for responsible LLMs. We believe that our findings may give light on future efforts to determine and mitigate the ethical hazards posed by machines in LLM applications.
BibTeX
@misc{zhuo2023red,
  author = {Terry Yue Zhuo and Yujin Huang and Chunyang Chen and Zhenchang Xing},
  title = {{Red teaming ChatGPT via Jailbreaking: Bias, Robustness, Reliability and Toxicity}},
  year = {2023},
  eprint = {2301.12867},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2301.12867},
}
Figure