TroubleLLM: Align to Red Team Expert
Zhuoer Xu, Jianping Zhang, Shiwen Cui, Changhua Meng, Weiqiang Wang
TL;DR
This work tackles the need for scalable safety testing of large language models by introducing TroubleLLM, an LLM designed to generate controllable test prompts for safety evaluation. It frames test-prompt generation as a text style transfer task conditioned on keywords, topics, and instruction attacks, and trains TroubleLLM using unsupervised Rank Query from Model Feedback (RQMF) to align with expert adversaries and boost prompt effectiveness. Through extensive experiments on SafetyPrompts with BLOOM-7B-LoRA and a BELLE student, TroubleLLM demonstrates strong generation quality, diversity, and controllability, often surpassing baselines and approaching human performance in safety testing. The work highlights practical impact for pre-deployment safety assessment and suggests avenues for future improvements via model ensembles and broader domain coverage.
Abstract
Large Language Models (LLMs) become the start-of-the-art solutions for a variety of natural language tasks and are integrated into real-world applications. However, LLMs can be potentially harmful in manifesting undesirable safety issues like social biases and toxic content. It is imperative to assess its safety issues before deployment. However, the quality and diversity of test prompts generated by existing methods are still far from satisfactory. Not only are these methods labor-intensive and require large budget costs, but the controllability of test prompt generation is lacking for the specific testing domain of LLM applications. With the idea of LLM for LLM testing, we propose the first LLM, called TroubleLLM, to generate controllable test prompts on LLM safety issues. Extensive experiments and human evaluation illustrate the superiority of TroubleLLM on generation quality and generation controllability.
