Token Highlighter: Inspecting and Mitigating Jailbreak Prompts for Large Language Models
On the map: LLM safety and security → Jailbreaking
Abstract (arXiv)
Large Language Models (LLMs) are increasingly being integrated into services such as ChatGPT to provide responses to user queries. To mitigate potential harm and prevent misuse, there have been concerted efforts to align the LLMs with human values and legal compliance by incorporating various techniques, such as Reinforcement Learning from Human Feedback (RLHF), into the training of the LLMs. However, recent research has exposed that even aligned LLMs are susceptible to adversarial manipulations known as Jailbreak Attacks. To address this challenge, this paper proposes a method called Token Highlighter to inspect and mitigate the potential jailbreak threats in the user query. Token Highlighter introduced a concept called Affirmation Loss to measure the LLM's willingness to answer the user query. It then uses the gradient of Affirmation Loss for each token in the user query to locate the jailbreak-critical tokens. Further, Token Highlighter exploits our proposed Soft Removal technique to mitigate the jailbreak effects of critical tokens via shrinking their token embeddings. Experimental results on two aligned LLMs (LLaMA-2 and Vicuna-V1.5) demonstrate that the proposed method can effectively defend against a variety of Jailbreak Attacks while maintaining competent performance on benign questions of the AlpacaEval benchmark. In addition, Token Highlighter is a cost-effective and interpretable defense because it only needs to query the protected LLM once to compute the Affirmation Loss and can highlight the critical tokens upon refusal.
Key facts. Cited by 7 papers in the map (data through 14 Oct 2026). Placed in Jailbreaking, one of 12 directions in LLM safety and security. Builds on 22 of its 27 references that are in the map. First posted on arXiv 24 Dec 2024.
Builds on
22 of 27 references.
Closest ancestors · 11
Same direction, newest first
- 2024Gradient Cuff: Detecting Jailbreak Attacks on Large Language Models by Exploring Refusal Loss Landscapes1 Mar
- 2024Defending Large Language Models against Jailbreak Attacks via Semantic Smoothing25 Feb
- 2024Weak-to-Strong Jailbreaking on Large Language Models30 Jan
- 2023Tree of Attacks: Jailbreaking Black-Box LLMs Automatically4 Dec
- 2023Jailbreaking Black Box Large Language Models in Twenty Queries12 Oct
- 2023Jailbreak and Guard Aligned Language Models with Only Few In-Context Demonstrations10 Oct
- 2023SmoothLLM: Defending Large Language Models Against Jailbreaking Attacks5 Oct
- 2023AutoDAN: Generating Stealthy Jailbreak Prompts on Aligned Large Language Models3 Oct
- 2023Certifying LLM Safety against Adversarial Prompting6 Sep
- 2023Universal and Transferable Adversarial Attacks on Aligned Language Models27 Jul
- 2023Jailbroken: How Does LLM Safety Training Fail?5 Jul
Other references · 11
- 2023GPT-4 Technical Reportcited by 18,396
- 2022Training language models to follow instructions with human feedbackcited by 15,971
- 2023Llama 2: Open Foundation and Fine-Tuned Chat Modelscited by 13,028
- 2023Judging LLM-as-a-Judge with MT-Bench and Chatbot Arenacited by 8,626
- 2022Training a Helpful and Harmless Assistant with Reinforcement Learning from Human Feedbackcited by 3,720
- 2019Certified Adversarial Robustness via Randomized Smoothingcited by 1,340
- 2021A General Language Assistant as a Laboratory for Alignmentcited by 1,055
- 2023Baseline Defenses for Adversarial Attacks Against Aligned Language Modelscited by 651
- 2020On Adaptive Attacks to Adversarial Example Defensescited by 555
- 2023The Art of Defending: A Systematic Evaluation and Analysis of LLM Defense Strategies on Safety and Over-Defensivenesscited by 67
- 2022In conversation with Artificial Intelligence: aligning language models with human valuescited by 62
Built on by
Citing papers per year: 2025: 6; 2026: 1.
7 papers.
- 2025SoK: Evaluating Jailbreak Guardrails for Large Language Modelscited by 21
- 2025CARE: Decoding Time Safety Alignment via Rollback and Introspection Interventioncited by 6
- 2025Attention Slipping: A Mechanistic Understanding of Jailbreak Attacks and Defenses in LLMscited by 5
- 2025Unified Defense for Large Language Models against Jailbreak and Fine-Tuning Attacks in Educationcited by 5
- 2025LLM in the Middle: A Systematic Review of Threats and Mitigations to Real-World LLM-based Systemscited by 1
- 2026ShallowJail: Steering Jailbreaks against Large Language Modelscited by 1
- 2025Exploiting Latent Space Discontinuities for Building Universal LLM Jailbreaks and Data Extraction Attackscited by 0
- 2026ShallowJail: Steering Jailbreaks against Large Language Models6 Feb 2026
- 2025Unified Defense for Large Language Models against Jailbreak and Fine-Tuning Attacks in Education18 Nov 2025
- 2025Exploiting Latent Space Discontinuities for Building Universal LLM Jailbreaks and Data Extraction Attacks1 Nov 2025
- 2025LLM in the Middle: A Systematic Review of Threats and Mitigations to Real-World LLM-based Systems12 Sep 2025
- 2025CARE: Decoding Time Safety Alignment via Rollback and Introspection Intervention1 Sep 2025
- 2025Attention Slipping: A Mechanistic Understanding of Jailbreak Attacks and Defenses in LLMs6 Jul 2025
- 2025SoK: Evaluating Jailbreak Guardrails for Large Language Models12 Jun 2025
Similar, not cited
Close in wording, no citation either way
- 2025Layer-Level Self-Exposure and Patch: Affirmative Token Mitigation for Jailbreak Attack Defense
- 2024Improved Large Language Model Jailbreak Detection via Pretrained Embeddings
- 2024Mind the Inconspicuous: Revealing the Hidden Weakness in Aligned LLMs' Refusal Boundaries
- 2024Jailbreak Attacks and Defenses Against Large Language Models: A Survey
- 2023Tricking LLMs into Disobedience: Formalizing, Analyzing, and Detecting Jailbreaks
- 2024Defending Large Language Models Against Jailbreak Attacks via Layer-specific Editing
- 2024JailbreakBench: An Open Robustness Benchmark for Jailbreaking Large Language Models
- 2025DETAM: Defending LLMs Against Jailbreak Attacks via Targeted Attention Modification