potentialpaper

A Generative Approach to LLM Harmfulness Mitigation with Red Flag Tokens

David Dobre, Mehrnaz Mofakhami, Sophie Xhonneux, Leo Schwinn, Gauthier Gidel

SoLaR @ COLM 2025

Edit this page

Or clone it with git

Run in a terminal:

Needs Git LFS. To push, use an API key from your profile as the password.

Or let your agent set it up

It checks and sets up everything: signing in, git, the clone, credentials and an SSH key.

Abstract. 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 (⟨rf⟩\langle\texttt{rf}\rangle) 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' generalisation capabilities, such as in-context learning (ICL) and out-of-distribution generalisation 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 ⟨rf⟩\langle\texttt{rf}\rangle 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 techniques—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.

Are you an author? Claim this paper to see who's reading it, with views and other statistics, and to write about it here.

Claim this paper
How does this paper connect to your work? Write how you built on it, compared with it or reproduced it, or add a summary, a critique or errata.
Or make it interactive:
Start writing

edit · history

FromAToBDateVersionSubmitted toPDFEvidence
28 Jun 2025SoLaR @ COLM 2025submittedSoLaR @ COLM 2025Accepted · Poster—[1]
20 Sep 2025ICLR 2026submittedICLR 2026Rejected—[1]
Their titles, abstracts and, where both have a PDF, the text.Missing a version?

We don't know of a submission of this paper to a venue with open reviews. Missing a submission?

Loading the discussion…