{"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/advprefix-an-objective-for-nuanced-llm","title":"AdvPrefix: An Objective for Nuanced LLM Jailbreaks","arxiv_id":"2412.10321","date":"2024-12-13","proceeding":null,"authors":["Sicheng Zhu","Brandon Amos","Yuandong Tian","Chuan Guo","Ivan Evtimov"],"abstract":"Many jailbreak attacks on large language models (LLMs) rely on a common objective: making the model respond with the prefix \"Sure, here is (harmful request)\". While straightforward, this objective has two limitations: limited control over model behaviors, often resulting in incomplete or unrealistic responses, and a rigid format that hinders optimization. To address these limitations, we introduce AdvPrefix, a new prefix-forcing objective that enables more nuanced control over model behavior while being easy to optimize. Our objective leverages model-dependent prefixes, automatically selected based on two criteria: high prefilling attack success rates and low negative log-likelihood. It can further simplify optimization by using multiple prefixes for a single user request. AdvPrefix can integrate seamlessly into existing jailbreak attacks to improve their performance for free. For example, simply replacing GCG attack's target prefixes with ours on Llama-3 improves nuanced attack success rates from 14% to 80%, suggesting that current alignment struggles to generalize to unseen prefixes. Our work demonstrates the importance of jailbreak objectives in achieving nuanced jailbreaks.","url_abs":"https://arxiv.org/abs/2412.10321v1","url_pdf":"https://arxiv.org/pdf/2412.10321v1.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":"advprefix-an-objective-for-nuanced-llm","repo_url":"https://github.com/facebookresearch/jailbreak-objectives","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"NOASSERTION"}}],"tasks":[],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":"https://syntology.ai/paper/2412.10321","atlas_url":"https://app.syntology.ai/?focus=2412.10321","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2412.10321"}},"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/facebookresearch/jailbreak-objectives","reach":{"status":"ok","spdx":"NOASSERTION"}}],"summary":{"unverified":2},"by_repo_kind":{"official":{"samples":2,"ran":0,"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":2,"samples":[{"code_sha256_prefix":"c037a5295fe65ab2","entry":"none_filter","repo":"facebookresearch/jailbreak-objectives","repo_kind":"official","path":"scorer_pasr.py","file_url":"https://github.com/facebookresearch/jailbreak-objectives/blob/HEAD/scorer_pasr.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"c037a5295fe65ab2"}},{"code_sha256_prefix":"9722ea54df647991","entry":"remove_padded_tokens","repo":"facebookresearch/jailbreak-objectives","repo_kind":"official","path":"llm_generator.py","file_url":"https://github.com/facebookresearch/jailbreak-objectives/blob/HEAD/llm_generator.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"9722ea54df647991"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}