Counterfactual Neighborhood Risk Fields: Evidence-Grounded Selective Safety for Vision-Language Models
Organizations: Tongji University · Mohamed bin Zayed University of Artificial Intelligence · University of Electronic Science and Technology of China · Shanghai Artificial Intelligence Laboratory
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.
Figures & tables
| Defense success rate (%) | Benign utility (%) | Joint | |||||||
|---|---|---|---|---|---|---|---|---|---|
| Method | JOOD | JBV | UBR | HDS | MJB | MOSS | MMV | MMMU | SUS |
| Qwen2.5-VL-7B | |||||||||
| Native | 44.12 | 72.50 | 38.73 | 76.00 | 46.69 | 72.00 | 68.19 | 52.67 | 60.24 |
| AdaShield-A (ECCV 2024) | 58.82 | 80.71 | 38.73 | 79.60 | 66.91 | 67.67 | 68.88 | 51.67 | 64.35 |
| ECSO (ECCV 2024) | 53.53 | 75.00 | 71.75 | 82.80 | 56.62 | 72.00 | 68.19 | 52.67 | 66.80 |
| CIDER (EMNLP-F 2024) | 47.65 | 73.93 | 52.38 | 91.60 | 68.38 | 57.67 | 48.25 | 47.00 | 58.58 |
Appendix figures & tables10 assets
Supplementary material from the paper’s appendix.
Appendix
| Role | Cohort | Evaluation unit | |
|---|---|---|---|
| Attack | JOOD | 510 | 170 goals, best of three |
| Attack | JailbreakV | 280 | Sample |
| Attack | UltraBreak | 315 | Sample |
| Attack | HADES | 750 | Sample |
| Attack | MMJailBench | 544 | Sample |
| Benign | MOSSBench | 300 | Refusal failure |
| Setting | Qwen2.5-VL-7B | InternVL3-8B |
|---|---|---|
| Input observation | Verbalizer prompt | Native + verbalizer |
| Normalized blocks | 8 | 16 |
| Projection rank | 8 | 4 |
| Distinct-parent neighbors | 16 | 4 |
| Projection ridge | 0.01 | 1 |
| Reliability shrinkage | 0.01 | 0.1 |
| Defense success rate (%) | Benign utility (%) | Joint | |||||||
|---|---|---|---|---|---|---|---|---|---|
| Method | JOOD | JBV | UBR | HDS | MJB | MOSS | MMV | MMMU | SUS |
| Qwen2.5-VL-7B | |||||||||
| Native | 74.12 | 88.57 | 53.97 | 76.80 | 61.21 | 73.00 | 68.56 | 52.67 | 67.84 |
| AdaShield-A | 84.71 | 92.86 | 53.65 | 79.47 | 76.47 | 68.00 | 68.00 | 51.67 | 69.99 |
| ECSO | 83.53 | 88.57 | 82.54 | 82.80 | 68.75 | 72.33 | 68.56 | 52.67 | 72.94 |
| CIDER | 77.06 | 86.43 | 68.57 | 93.20 | 79.78 | 57.67 | 47.38 | 47.00 | 65.84 |
| Method | AUROC | TPR@5 | pAUC | R | MOSS | Vet | MMMU |
|---|---|---|---|---|---|---|---|
| Qwen2.5-VL-7B | |||||||
| HiddenDetect | 85.81 | 37.62 | 66.23 | 39.84 | 90.33 | 93.12 | 100.00 |
| RCS-MCD | 49.50 | 13.68 | 54.57 | 58.48 | 80.33 | 29.37 | 2.33 |
| RCS-KCD | 51.16 | 20.72 | 57.98 | 55.72 | 85.33 | 34.38 | 8.00 |
| VLMGuard | 46.01 | 14.17 | 54.01 | 67.89 | 58.67 | 8.75 | 0.00 |
| CNRF | 87.87 | 60.76 | 77.30 | 74.55 | 79.33 | 92.50 | 94.00 |
| Evidence | AUROC | TPR@5% FPR | pAUROC |
|---|---|---|---|
| Matched local | 94.14 | 83.64 | 89.24 |
| Global | 93.29 | 78.18 | 85.92 |
| Random neighborhood | 86.05 | 56.84 | 75.24 |
| Far neighborhood | 49.19 | 1.82 | 48.59 |
| Direction mismatch | 77.25 | 54.80 | 75.32 |
| Control | All 770 | Paired subset (430) |
|---|---|---|
| Global | 0.85 [-1.17, 2.67] | 0.58 [-2.02, 2.92] |
| Random neighborhood | 8.09 [4.99, 11.53] | 7.22 [4.01, 10.65] |
| Far neighborhood | 44.95 [36.93, 52.89] | 30.08 [20.77, 39.91] |
| Direction mismatch | 16.89 [11.14, 23.50] | 3.46 [0.34, 7.15] |
| Victim | Matched | Global | Novelty | Equal | Reassigned |
|---|---|---|---|---|---|
| Qwen2.5-VL-7B | 94.14 | 93.29 | 92.97 | 78.54 | 66.54–87.77 |
| InternVL3-8B | 87.17 | 76.78 | 95.54 | 86.01 | 86.25–89.36 |
| Carrier | n | Matched | Global | Novelty |
|---|---|---|---|---|
| Qwen2.5-VL-7B | ||||
| document | 80 | 95.31 | 96.19 | 86.44 |
| FigStep style | 80 | 95.94 | 97.56 | 85.81 |
| native text | 80 | 96.88 | 95.81 | 78.69 |
| Native + background | 80 | 96.31 | 97.13 | 73.75 |
| plain card | 80 | 94.44 | 96.19 | 83.69 |
| Action | ASR | ASR 3 | MOSS F | Vet | MMMU |
|---|---|---|---|---|---|
| Native | 29.88 | 38.00 | 23.33 | 78.50 | 56.00 |
| + refusal | 9.97 | 13.59 | 34.00 | 75.63 | 56.00 |
| + generic review | 9.93 | 13.56 | 34.00 | 75.63 | 56.00 |
| + full review | 10.70 | 15.02 | 29.67 | 75.63 | 56.00 |
| Victim | ASR | MOSS F | Vet | MMMU |
| InternVL3-8B | +0.77 [0.34, 1.27] | -4.33 [-6.67, -2.00] | 0 [0, 0] | 0 [0, 0] |
VLM Robustness
Vision-language model robustness studies whether models remain reliable under visual, textual, and distribution shifts, adversarial inputs, and safety challenges.
See all 455 papers