# ReSAM: Representation-Level Safety Margin Alignment for Vision–Language Models

*jiachen ma, Jiawen Zhang, Bo Zou, Xiangtian Li, Chaochao Lu, Chao Yang*

[NeurIPS page](https://neurips.cc/virtual/2026/poster/152823) · [OpenReview](https://openreview.net/forum?id=Q8etLWU90b) · [Open on the map](../papers.html#p152823)

Category: [AI Safety, Security & Alignment](../pcat/16.md) › [Multimodal Safety Steering](../pgroup/341.md) · Type: new method · Keywords: vision-language model safety, representation alignment, safety margin learning, pseudo-benign failures, self-supervised safety

Areas: [Multimodal](../areas/multimodal.md) › Multimodal Integration and Robustness › Multimodal Jailbreak Safety; [Safety & Security](../areas/safety.md) › Safe Alignment › Steering Safety Across Modalities

## Summary
ReSAM aligns vision-language model representations to improve safety by learning a margin that separates unsafe from pseudo-benign inputs without manual annotations.

## Explained to a 5-year-old
Some computer programs that look at pictures and answer questions sometimes say bad things when the picture looks harmless. This happens because the program mixes up its ideas of safe and unsafe answers. We teach the program to separate good answers from bad ones by drawing a line in its brain. We do this without asking people to label the pictures. After learning, the program is much safer and only needs a few examples to get good.

## Explained to a 5-year-old, longer
Computers can look at pictures and answer questions, which is called vision-language models. Sometimes these computers say something dangerous even though the picture seems safe. The problem happens because the computer thinks safe and unsafe answers are too close together. To fix this, we give the computer a way to draw a line that separates safe answers from unsafe ones. The computer learns this line by looking at its own thoughts, without needing people to tell it what is safe. It measures how close an answer is to the safe side of the line. Then it tries to move unsafe answers to the far side of the line and keep safe answers on the other side. This training uses only a few examples that look safe, as few as five. After learning, the computer becomes much better at refusing dangerous answers. It improves safety by about two-thirds compared to older methods. The computer also discovers that the important safety information lives in a small part of its brain. This helps us understand how to make future safe computer systems more reliably.

## For a technical reader
The paper identifies a safety issue in vision-language models where seemingly benign inputs can trigger unsafe responses due to misalignment in the model's embedding space. ReSAM computes a direction vector that separates refusal and non-refusal representations, projects embeddings onto this direction to quantify refusal, and optimizes a margin loss that pushes unsafe and pseudo-benign queries above a learned threshold while pulling safe queries below it. Because supervisory signals are derived from the model's own representation space, no manual annotations are required, making the method lightweight and scalable. Experiments show a 68% safety improvement over strong baselines, and with as few as five pseudo-benign queries the safety rises to 94.6%. The analysis also reveals that safety gradients concentrate in a low-rank subspace, indicating an intrinsic structure that can be systematically identified and controlled.

## Problem
Vision-language models can produce dangerous responses to inputs that appear harmless because their internal embedding spaces lack adequate safety margins between benign and unsafe representations.

## Method
The approach computes direction vectors that separate refusal and non-refusal representations, projects embeddings onto this direction to quantify refusal, and optimizes a safety-margin loss that pushes unsafe and pseudo-benign queries above a learned margin while pulling safe queries below it, using only self-derived supervisory signals.

## Results
The approach achieves a 68% improvement in safety over strong baselines, and with as few as five pseudo-benign queries during training, safety rises to 94.6%.

## Contributions
It introduces a lightweight representation-space alignment method that derives supervisory signals from the model's own embedding space, eliminating the need for manual annotations, and shows that safety gradients concentrate in a low-rank subspace.

## Research questions this paper is counted under

- [How can we reliably prevent large language models from generating harmful content across diverse contexts and modalities?](../q/24.md)

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/152823)
