mlsanityData to 7 Oct 2026

A Generative Approach to LLM Harmfulness Mitigation with Red Flag Tokens

arXiv 2502.16366 ↗First posted 22 Feb 2025cs.CL cs.AI cs.CRcited by 1

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

  1. 2022Training language models to follow instructions with human feedbackcited by 15,712
  2. 2021LoRA: Low-Rank Adaptation of Large Language Modelscited by 14,084
  3. 2023Direct Preference Optimization: Your Language Model is Secretly a Reward Modelcited by 7,916
  4. 2020Measuring Massive Multitask Language Understandingcited by 7,768
  5. 2017Towards Deep Learning Models Resistant to Adversarial Attackscited by 6,326
  6. 2023Toolformer: Language Models Can Teach Themselves to Use Toolscited by 4,072
  7. 2023Efficient Streaming Language Models with Attention Sinkscited by 2,115
  8. 2023Jailbroken: How Does LLM Safety Training Fail?cited by 1,565
  9. 2024HarmBench: A Standardized Evaluation Framework for Automated Red Teaming and Robust Refusalcited by 1,330
  10. 2023Jailbreaking Black Box Large Language Models in Twenty Queriescited by 1,326
  11. 2023Llama Guard: LLM-based Input-Output Safeguard for Human-AI Conversationscited by 1,124
  12. 2023Fine-tuning Aligned Language Models Compromises Safety, Even When Users Do Not Intend To!cited by 1,106
24 more
  1. 2022Red Teaming Language Models with Language Modelscited by 983
  2. 2024Refusal in Language Models Is Mediated by a Single Directioncited by 960
  3. 2023Enhancing Chat Language Models by Scaling High-quality Instructional Conversationscited by 825
  4. 2023AutoDAN: Generating Stealthy Jailbreak Prompts on Aligned Large Language Modelscited by 738
  5. 2024How Johnny Can Persuade LLMs to Jailbreak Them: Rethinking Persuasion to Challenge AI Safety by Humanizing LLMscited by 533
  6. 2023XSTest: A Test Suite for Identifying Exaggerated Safety Behaviours in Large Language Modelscited by 477
  7. 2024Jailbreaking Leading Safety-Aligned LLMs with Simple Adaptive Attackscited by 450
  8. 2023Catastrophic Jailbreak of Open-source LLMs via Exploiting Generationcited by 439
  9. 2023Detecting Language Model Attacks with Perplexitycited by 411
  10. 2023Learning to Compress Prompts with Gist Tokenscited by 379
  11. 2023Think before you speak: Training Language Models With Pause Tokenscited by 254
  12. 2024Latent Adversarial Training Improves Robustness to Persistent Harmful Behaviors in LLMscited by 158
  13. 2024Efficient Adversarial Training in LLMs with Continuous Attackscited by 104
  14. 2024Soft Prompt Threats: Attacking Safety Alignment and Unlearning in Open-Source LLMs through the Embedding Spacecited by 88
  15. 2024Defending Against Unforeseen Failure Modes with Latent Adversarial Trainingcited by 82
  16. 2020Memory Transformercited by 74
  17. 2024Best-of-N Jailbreakingcited by 71
  18. 2023Self-Guard: Empower the LLM to Safeguard Itselfcited by 52
  19. 2023Bypassing the Safety Training of Open-Source LLMs with Priming Attackscited by 48
  20. 2024Style Outweighs Substance: Failure Modes of LLM Judges in Alignment Benchmarkingcited by 35
  21. 2024Phi-3 Safety Post-Training: Aligning Language Models with a "Break-Fix" Cyclecited by 32
  22. 2025Virus: Harmful Fine-tuning Attack for Large Language Models Bypassing Guardrail Moderationcited by 28
  23. 2024Endless Jailbreaks with Bijection Learningcited by 18
  24. 2024Refusal Tokens: A Simple Way to Calibrate Refusals in Large Language Modelscited by 12

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2026: 1.

1 paper.