# Safeguarding LLMs via Model-Agnostic Latent Safety Signals from Dark Knowledge

*Wonjun Lee, Kyungsik Yang, Gaeun Ji, Vaidehi Patil, Haon Park, Bumsub Ham, Mohit Bansal, Suhyun Kim*

[NeurIPS page](https://neurips.cc/virtual/2026/poster/154611) · [OpenReview](https://openreview.net/forum?id=CIcsWVLkb3) · [alphaXiv](https://www.alphaxiv.org/abs/2610.07532) · [Open on the map](../papers.html#p154611)

Category: [AI Safety, Security & Alignment](../pcat/16.md) › [LLM Safety Alignment](../pgroup/208.md) · Type: new method · Keywords: latent safety signals, dark knowledge, model-agnostic defense, jailbreak attacks, LLM safety

Areas: [Safety & Security](../areas/safety.md) › Language Model Security › Jailbreak Defense

## Summary
LADE extracts latent safety signals from dark knowledge in the first-token probability distribution to provide a model-agnostic defense against jailbreak attacks with minimal over-refusal.

## Explained to a 5-year-old
Big computer programs called language models can be tricked into saying bad things. We want to stop that without making them stop answering nice questions. The idea is to look at the first word the model thinks of when asked a question, and see which words appear more often for bad questions than for good ones. Then we use those special words to decide if a new question is safe. This works for many different language models.

## Explained to a 5-year-old, longer
Language models are computer programs that can write and understand text. Sometimes people try to make them say things they shouldn't, like how to do something bad. We want to protect them so they keep answering nice questions but refuse bad ones. The new idea looks at the very first word the model thinks about when it sees a question. It compares how likely each word is for a bad question versus a good question. Some words show up much more often for bad questions and not for good ones. These special words are called latent safety signals. They are hidden in the model's thinking, not just in the final answer. The method maps these words so it can work even if the model uses a different set of words. Then it uses a simple rule, like finding the nearest similar words, to decide if a new question is safe. This way the defense works for many different language models without needing to change each one. It helps keep the models helpful while stopping harmful requests.

## For a technical reader
The paper identifies that safety defenses based on hidden states are architecture-specific and can hurt model helpfulness. It shows that the first-token probability distribution of language models contains latent safety signals-words whose probabilities differ sharply between harmful and benign queries. By extracting these discriminative tokens, mapping them across tokenizers, and using a k-nearest-neighbors classifier, the approach builds a model-agnostic defense. Experiments on six LLMs demonstrate robustness against jailbreak attacks while keeping over-refusal low. This provides a practical way to add safety to any language model without extensive per-model tuning.

## Problem
Decoding-stage safety defenses for LLMs often trade off safety against helpfulness and are tied to specific model architectures, limiting generalization. This creates a need for a model-agnostic safety defense that avoids over-refusal while remaining robust to attacks.

## Method
The approach extracts safety-discriminative tokens from the first-token probability distribution by contrasting harmful and benign queries, maps these tokens across tokenizers, and classifies queries using a k-nearest-neighbors search over the mapped tokens.

## Results
The approach remains robust against various jailbreak attacks across six LLMs and multiple benchmarks, reducing attack success rates while keeping over-refusal low.

## Contributions
It identifies latent safety signals in dark knowledge that are consistent across models, proposes a tokenizer-mapping scheme for model-agnostic application, and demonstrates effective defense via k-NN classification.

## Practical relevance
It enables safer deployment of LLMs across diverse models by providing a broadly applicable defense against jailbreak attacks.

This page was written by language models from the title and abstract of each paper, and the answers were checked by two other models. It can be wrong: check the paper itself. [Suggest a correction](../feedback/?on=p/154611)
