{"about":{"site":"https://codewithpapers.app","non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page"},"url":"/paper/holistic-automated-red-teaming-for-large","title":"Holistic Automated Red Teaming for Large Language Models through Top-Down Test Case Generation and Multi-turn Interaction","arxiv_id":"2409.16783","date":"2024-09-25","proceeding":null,"authors":["Jinchuan Zhang","Yan Zhou","Yaxin Liu","Ziming Li","Songlin Hu"],"abstract":"Automated red teaming is an effective method for identifying misaligned behaviors in large language models (LLMs). Existing approaches, however, often focus primarily on improving attack success rates while overlooking the need for comprehensive test case coverage. Additionally, most of these methods are limited to single-turn red teaming, failing to capture the multi-turn dynamics of real-world human-machine interactions. To overcome these limitations, we propose HARM (Holistic Automated Red teaMing), which scales up the diversity of test cases using a top-down approach based on an extensible, fine-grained risk taxonomy. Our method also leverages a novel fine-tuning strategy and reinforcement learning techniques to facilitate multi-turn adversarial probing in a human-like manner. Experimental results demonstrate that our framework enables a more systematic understanding of model vulnerabilities and offers more targeted guidance for the alignment process.","url_abs":"https://arxiv.org/abs/2409.16783v1","url_pdf":"https://arxiv.org/pdf/2409.16783v1.pdf","source":{"archive":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","row_kind":"abstracts"},"code_links":[{"paper_slug":"holistic-automated-red-teaming-for-large","repo_url":"https://github.com/jc-ryan/holistic_automated_red_teaming","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok"}}],"tasks":[{"task_slug":"diversity","task_name":"Diversity"},{"task_slug":"red-teaming","task_name":"Red Teaming"}],"methods":[{"method_slug":"focus","method_name":"Focus"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":"https://syntology.ai/paper/2409.16783","atlas_url":"https://app.syntology.ai/?focus=2409.16783","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2409.16783"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-25T09:33:49+00:00","read_at_is":"when the build read Syntology's graph, not when any sample ran","claim":"Per-sample execution status on synthesized fixtures; not a correctness claim about the paper. Samples come from repositories linked to the paper, official or community; repo_kind says which.","repos":[{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/jc-ryan/holistic_automated_red_teaming","reach":{"status":"ok"}}],"summary":{"ran":6,"unverified":4},"by_repo_kind":{"official":{"samples":10,"ran":6,"repositories":1}},"repo_kind_vocabulary":{"official":"The archive marks this repository official for the paper","named_in_paper":"The archive records that the paper mentions this repository; it is not marked official","listed":"In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper","found_in_text":"Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted","community":"Not in the archive's code links for this paper; a community repository Syntology harvested"},"n_pointer_only_for_licence":10,"samples":[{"code_sha256_prefix":"fc552a445b401936","entry":"deduplicate_questions","repo":"jc-ryan/holistic_automated_red_teaming","repo_kind":"official","path":"eda_generated_questions.py","file_url":"https://github.com/jc-ryan/holistic_automated_red_teaming/blob/HEAD/eda_generated_questions.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"fc552a445b401936"}},{"code_sha256_prefix":"8c2e00ee44269d9a","entry":"filter_unexisted_path","repo":"jc-ryan/holistic_automated_red_teaming","repo_kind":"official","path":"eda_generated_questions.py","file_url":"https://github.com/jc-ryan/holistic_automated_red_teaming/blob/HEAD/eda_generated_questions.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"8c2e00ee44269d9a"}},{"code_sha256_prefix":"a1bd7d1d00d9b068","entry":"format_with_blue_model_chat_template","repo":"jc-ryan/holistic_automated_red_teaming","repo_kind":"official","path":"multi-turn/multi-turn_interaction_with_chat_template.py","file_url":"https://github.com/jc-ryan/holistic_automated_red_teaming/blob/HEAD/multi-turn/multi-turn_interaction_with_chat_template.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"a1bd7d1d00d9b068"}},{"code_sha256_prefix":"0af272a21479d52a","entry":"prompt_construction","repo":"jc-ryan/holistic_automated_red_teaming","repo_kind":"official","path":"async_top_down_generation.py","file_url":"https://github.com/jc-ryan/holistic_automated_red_teaming/blob/HEAD/async_top_down_generation.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"0af272a21479d52a"}},{"code_sha256_prefix":"7d946945ccd62315","entry":"read_json_lines","repo":"jc-ryan/holistic_automated_red_teaming","repo_kind":"official","path":"eda_generated_questions.py","file_url":"https://github.com/jc-ryan/holistic_automated_red_teaming/blob/HEAD/eda_generated_questions.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"7d946945ccd62315"}},{"code_sha256_prefix":"6644223ff07e9d5c","entry":"read_txt","repo":"jc-ryan/holistic_automated_red_teaming","repo_kind":"official","path":"utils.py","file_url":"https://github.com/jc-ryan/holistic_automated_red_teaming/blob/HEAD/utils.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"6644223ff07e9d5c"}},{"code_sha256_prefix":"8167023ac6b59aa6","entry":"batch_reward_computation","repo":"jc-ryan/holistic_automated_red_teaming","repo_kind":"official","path":"multi-turn/multi-turn_reward_computation.py","file_url":"https://github.com/jc-ryan/holistic_automated_red_teaming/blob/HEAD/multi-turn/multi-turn_reward_computation.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"8167023ac6b59aa6"}},{"code_sha256_prefix":"55a9e856e2635e40","entry":"convert_dialogue_to_all_turns","repo":"jc-ryan/holistic_automated_red_teaming","repo_kind":"official","path":"multi-turn/multi-turn_reward_computation.py","file_url":"https://github.com/jc-ryan/holistic_automated_red_teaming/blob/HEAD/multi-turn/multi-turn_reward_computation.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"55a9e856e2635e40"}},{"code_sha256_prefix":"c42ff941082619bc","entry":"load_model_werights","repo":"jc-ryan/holistic_automated_red_teaming","repo_kind":"official","path":"multi-turn/rejection_sampling.py","file_url":"https://github.com/jc-ryan/holistic_automated_red_teaming/blob/HEAD/multi-turn/rejection_sampling.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"c42ff941082619bc"}},{"code_sha256_prefix":"46122ace162507f6","entry":"read_json","repo":"jc-ryan/holistic_automated_red_teaming","repo_kind":"official","path":"utils.py","file_url":"https://github.com/jc-ryan/holistic_automated_red_teaming/blob/HEAD/utils.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"46122ace162507f6"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}