A Generative Approach to LLM Harmfulness Mitigation with Red Flag Tokens
Not on the map. Why?
Abstract (arXiv)
Many safety post-training methods for large language models (LLMs) are designed to modify the model's behaviour from producing unsafe answers to issuing refusals. However, such distribution shifts are often brittle and degrade performance on desirable tasks. To address these pitfalls, we propose augmenting the model's vocabulary with a special red flag token, and training the model to insert this token whenever harmful content is generated or imminent. This approach enables the model to explicitly learn the concept of harmfulness in its representations, with minimal impact on utility due to the marginal change in the generated distribution of natural language. Moreover, because the token is embedded in the model's vocabulary, we can naturally leverage the LLMs' generalization capabilities, such as in-context learning (ICL) and out-of-distribution generalization to languages that are not formally supported (e.g., Japanese for Llama3). In particular, we demonstrate that through ICL alone, the model can learn to initiate reflective reasoning upon generating the red flag token at inference, which steers the response away from harmful continuations or enables self-correction when the flag is raised falsely. This approach is orthogonal and complementary to existing safety technique (such as safety classifiers or standard safety training) and easier to evaluate in comparison to natural language refusals, as it does not require a human or automated judge to assess the harmlessness of the answers.
Key facts. Cited by 1 paper in the map (data through 7 Oct 2026). Builds on 36 of its 50 references that are in the map. First posted on arXiv 22 Feb 2025.
Builds on
36 of 50 references.
References · 36
- 2022Training language models to follow instructions with human feedbackcited by 15,712
- 2021LoRA: Low-Rank Adaptation of Large Language Modelscited by 14,084
- 2023Direct Preference Optimization: Your Language Model is Secretly a Reward Modelcited by 7,916
- 2020Measuring Massive Multitask Language Understandingcited by 7,768
- 2017Towards Deep Learning Models Resistant to Adversarial Attackscited by 6,326
- 2023Toolformer: Language Models Can Teach Themselves to Use Toolscited by 4,072
- 2023Efficient Streaming Language Models with Attention Sinkscited by 2,115
- 2023Jailbroken: How Does LLM Safety Training Fail?cited by 1,565
- 2024HarmBench: A Standardized Evaluation Framework for Automated Red Teaming and Robust Refusalcited by 1,330
- 2023Jailbreaking Black Box Large Language Models in Twenty Queriescited by 1,326
- 2023Llama Guard: LLM-based Input-Output Safeguard for Human-AI Conversationscited by 1,124
- 2023Fine-tuning Aligned Language Models Compromises Safety, Even When Users Do Not Intend To!cited by 1,106
24 more
- 2022Red Teaming Language Models with Language Modelscited by 983
- 2024Refusal in Language Models Is Mediated by a Single Directioncited by 960
- 2023Enhancing Chat Language Models by Scaling High-quality Instructional Conversationscited by 825
- 2023AutoDAN: Generating Stealthy Jailbreak Prompts on Aligned Large Language Modelscited by 738
- 2024How Johnny Can Persuade LLMs to Jailbreak Them: Rethinking Persuasion to Challenge AI Safety by Humanizing LLMscited by 533
- 2023XSTest: A Test Suite for Identifying Exaggerated Safety Behaviours in Large Language Modelscited by 477
- 2024Jailbreaking Leading Safety-Aligned LLMs with Simple Adaptive Attackscited by 450
- 2023Catastrophic Jailbreak of Open-source LLMs via Exploiting Generationcited by 439
- 2023Detecting Language Model Attacks with Perplexitycited by 411
- 2023Learning to Compress Prompts with Gist Tokenscited by 379
- 2023Think before you speak: Training Language Models With Pause Tokenscited by 254
- 2024Latent Adversarial Training Improves Robustness to Persistent Harmful Behaviors in LLMscited by 158
- 2024Efficient Adversarial Training in LLMs with Continuous Attackscited by 104
- 2024Soft Prompt Threats: Attacking Safety Alignment and Unlearning in Open-Source LLMs through the Embedding Spacecited by 88
- 2024Defending Against Unforeseen Failure Modes with Latent Adversarial Trainingcited by 82
- 2020Memory Transformercited by 74
- 2024Best-of-N Jailbreakingcited by 71
- 2023Self-Guard: Empower the LLM to Safeguard Itselfcited by 52
- 2023Bypassing the Safety Training of Open-Source LLMs with Priming Attackscited by 48
- 2024Style Outweighs Substance: Failure Modes of LLM Judges in Alignment Benchmarkingcited by 35
- 2024Phi-3 Safety Post-Training: Aligning Language Models with a "Break-Fix" Cyclecited by 32
- 2025Virus: Harmful Fine-tuning Attack for Large Language Models Bypassing Guardrail Moderationcited by 28
- 2024Endless Jailbreaks with Bijection Learningcited by 18
- 2024Refusal Tokens: A Simple Way to Calibrate Refusals in Large Language Modelscited by 12
Built on by
Citing papers per year: 2026: 1.
1 paper.
- 2026Training Agents to Self-Report Misbehaviorcited by 3
- 2026Training Agents to Self-Report Misbehavior25 Feb 2026