Manuscript Offprint

arXiv:2610.20679

Counterfactual Neighborhood Risk Fields: Evidence-Grounded Selective Safety for Vision-Language Models

Tianshi Wang, Jingsong Wang, Fengling Li, Jingjing Li, Xin Li, Lei Zhu

Abstract

Representation-based safety defenses for vision-language models (VLMs) often learn to separate harmful from benign inputs, but separation alone does not establish what a risk score means or when it should be trusted. We introduce Counterfactual Neighborhood Risk Fields (CNRF), an evidence-grounded framework for selective VLM safety. CNRF constructs context-matched benign-harmful counterfactual pairs, uses their representation differences as capability-related risk directions, and estimates neighborhood support separately from risk. This separation prevents unfamiliarity from being conflated with harmfulness and enables selective intervention rather than blanket rejection. A victim-adaptive interface accommodates different safety observations across VLM architectures and routes selected requests for same-victim response review, which either releases acceptable candidates or produces constrained alternatives with reduced harmful capability. Across three VLMs and five multimodal jailbreak families, CNRF achieves 86.06-89.30% macro defense success rate while retaining substantial benign-task utility. Controlled experiments further show that query-matched references and preserved context-direction correspondence materially improve risk ranking in the low-false-positive regime. CNRF thus reframes representation-based VLM safety from learning harmfulness boundaries to constructing applicable evidence for selective risk decisions.

1 Introduction

Vision-language models (VLMs) must balance two objectives: providing useful assistance while preventing harmful capability activation. However, safety decisions remain challenging because harmful and benign requests can share similar topics, entities, and visual contexts. For example, a request about preventing a harmful operation may contain the same concepts and images as a request seeking to perform it. Safety-oversensitivity benchmarks demonstrate the cost of failing to distinguish these cases, where excessive rejection reduces model utility (Röttger et al., 2024; Li et al., 2025). Meanwhile, multimodal jailbreaks introduce additional complexity: typography, distracting images, and cross-modal composition can alter how intent is represented by the model (Gong et al., 2025; Yang et al., 2025; Jeong et al., 2025). Effective VLM safety therefore requires identifying harmful capability requests while preserving appropriate responses under benign variations.

Recent representation-based safety defenses address this challenge by extracting safety-related signals from the protected model's internal representations (Jiang et al., 2025; Hua et al., 2026; Fang et al., 2026). These methods often learn a representation space where harmful and benign inputs become separable, enabling risk estimation without modifying the victim model. However, separation alone does not establish what a risk score represents or when its evidence should be trusted. A risk score

Figure

Figure 1: Schematic comparison of safety decision strategies. Left: a permissive boundary may allow harmful assistance. Middle: an overly strict boundary may reject benign requests with risk-related context. Right: CNRF constructs context-matched local evidence and performs selective review, preserving benign assistance while declining harmful requests.

can conflate harmful capability with unfamiliarity or insufficient reference coverage, leading to unsafe compliance or unnecessary rejection. As illustrated in Figure 1, boundary-based decisions may fail in two directions: a permissive boundary can allow harmful assistance, while an overly strict boundary can reject benign requests. This motivates a shift from learning harmfulness boundaries toward constructing applicable safety evidence for selective risk decisions.

The key challenge is therefore not simply whether safety representations are global or local. Existing approaches such as Representational Contrastive Scoring (RCS) already exploit class-relative distances and neighborhood comparisons to distinguish maliciousness from novelty (Hua et al., 2026). Instead, we ask what relationships reference examples should preserve to provide meaningful evidence for a query. A context-matched benign-harmful counterfactual pair changes the requested capability while preserving surrounding content. Its representation difference provides a directed capability-related comparison, while nearby pairs establish a local reference context. Separately estimating neighborhood support measures whether such evidence applies to the query. We define safety evidence as the combination of capability-related comparison and assessed applicability, rather than a direct certificate that a request is safe or unsafe.

Based on this perspective, we introduce Counterfactual Neighborhood Risk Fields (CNRF), an evidence-grounded framework for selective VLM safety. CNRF constructs context-matched benign-harmful counterfactual pairs and uses their representation differences as capability-related risk directions. A neighborhood risk field aggregates these directions to estimate risk, while a separate support estimator measures reference applicability. This separation prevents unfamiliarity from being conflated with harmfulness and enables selective intervention rather than blanket rejection. CNRF further adopts a two-stage inference-time defense framework: a victim-adaptive interface accommodates different safety observations across VLM architectures, and selected requests undergo same-victim response review, which either releases acceptable candidates or generates constrained alternatives with reduced harmful capability.

Our contributions are summarized as follows:

• We introduce an evidence-grounded perspective for representation-based VLM safety, shifting from harmfulness boundary learning to constructing applicable evidence for selective risk decisions. This formulation separates capability-related risk from evidence applicability.

• We propose Counterfactual Neighborhood Risk Fields (CNRF), a two-stage inference-time safety framework that constructs capability-related risk directions from context-matched counterfactual pairs and models neighborhood support separately from risk estimation.

• We evaluate CNRF across three victim VLMs and five multimodal jailbreak families. Experiments validate the importance of query-matched references, preserved context-direction correspondence, and same-victim response review for effective safety-utility trade-offs.

References (100)

Couldn't load all references. Reload the page to try again.