{"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/coercing-llms-to-do-and-reveal-almost","title":"Coercing LLMs to do and reveal (almost) anything","arxiv_id":"2402.14020","date":"2024-02-21","proceeding":null,"authors":["Jonas Geiping","Alex Stein","Manli Shu","Khalid Saifullah","Yuxin Wen","Tom Goldstein"],"abstract":"It has recently been shown that adversarial attacks on large language models (LLMs) can \"jailbreak\" the model into making harmful statements. In this work, we argue that the spectrum of adversarial attacks on LLMs is much larger than merely jailbreaking. We provide a broad overview of possible attack surfaces and attack goals. Based on a series of concrete examples, we discuss, categorize and systematize attacks that coerce varied unintended behaviors, such as misdirection, model control, denial-of-service, or data extraction. We analyze these attacks in controlled experiments, and find that many of them stem from the practice of pre-training LLMs with coding capabilities, as well as the continued existence of strange \"glitch\" tokens in common LLM vocabularies that should be removed for security reasons.","url_abs":"https://arxiv.org/abs/2402.14020v1","url_pdf":"https://arxiv.org/pdf/2402.14020v1.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":"coercing-llms-to-do-and-reveal-almost","repo_url":"https://github.com/jonasgeiping/carving","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2402.14020","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2402.14020"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-24T18:15:14+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/jonasgeiping/carving","reach":{"status":"ok","spdx":"MIT"}}],"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":0,"samples":[{"code_sha256_prefix":"af4d91549465a11f","entry":"flatten","repo":"jonasgeiping/carving","repo_kind":"official","path":"carving/utils.py","file_url":"https://github.com/jonasgeiping/carving/blob/HEAD/carving/utils.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"af4d91549465a11f"}},{"code_sha256_prefix":"3850987c11cdd03e","entry":"get_data_iterators","repo":"jonasgeiping/carving","repo_kind":"official","path":"carving/data_utils.py","file_url":"https://github.com/jonasgeiping/carving/blob/HEAD/carving/data_utils.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"3850987c11cdd03e"}},{"code_sha256_prefix":"4138c5f696ea2167","entry":"set_chat_template","repo":"jonasgeiping/carving","repo_kind":"official","path":"carving/model_interface.py","file_url":"https://github.com/jonasgeiping/carving/blob/HEAD/carving/model_interface.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"4138c5f696ea2167"}},{"code_sha256_prefix":"a0b20deb16f63bcf","entry":"set_system_prompt","repo":"jonasgeiping/carving","repo_kind":"official","path":"carving/model_interface.py","file_url":"https://github.com/jonasgeiping/carving/blob/HEAD/carving/model_interface.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"a0b20deb16f63bcf"}},{"code_sha256_prefix":"bf78966d269c8d51","entry":"shorten_str","repo":"jonasgeiping/carving","repo_kind":"official","path":"carving/optimizers/generic_optimizer.py","file_url":"https://github.com/jonasgeiping/carving/blob/HEAD/carving/optimizers/generic_optimizer.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"bf78966d269c8d51"}},{"code_sha256_prefix":"ef123b64470adcdc","entry":"system_startup","repo":"jonasgeiping/carving","repo_kind":"official","path":"carving/utils.py","file_url":"https://github.com/jonasgeiping/carving/blob/HEAD/carving/utils.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"ef123b64470adcdc"}},{"code_sha256_prefix":"82786413c99b6efd","entry":"load_and_prep_dataset","repo":"jonasgeiping/carving","repo_kind":"official","path":"carving/data_utils.py","file_url":"https://github.com/jonasgeiping/carving/blob/HEAD/carving/data_utils.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"82786413c99b6efd"}},{"code_sha256_prefix":"cc717c3fca1441a6","entry":"load_local_harmful_behavior_dataset","repo":"jonasgeiping/carving","repo_kind":"official","path":"carving/data_utils.py","file_url":"https://github.com/jonasgeiping/carving/blob/HEAD/carving/data_utils.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"cc717c3fca1441a6"}},{"code_sha256_prefix":"832c4bb5405dc600","entry":"load_model_and_tokenizer","repo":"jonasgeiping/carving","repo_kind":"official","path":"carving/model_interface.py","file_url":"https://github.com/jonasgeiping/carving/blob/HEAD/carving/model_interface.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"832c4bb5405dc600"}},{"code_sha256_prefix":"e3207f3fcc44ddda","entry":"pathfinder","repo":"jonasgeiping/carving","repo_kind":"official","path":"carving/utils.py","file_url":"https://github.com/jonasgeiping/carving/blob/HEAD/carving/utils.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"e3207f3fcc44ddda"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}