Source-linked AI summary

ThinkingGuard: Decoding Implicit Hazards via Step-by-Step Risk Attribution in Multimodal Large Language Models

Ruochen Zhang, Yao Huang, Yitong Sun, Jiahe Xie, Jin Yan, Jifan Ma, Yuanfang Guo, Xingxing Wei

arXiv:2609.36562v1cs.CVcs.AIcs.LG

TL;DR

Implicit multimodal risks arise when benign text and visual elements interact, while existing approaches lack explicit modeling of the risk-activation mechanism. The paper constructs TriggerBench and trains ThinkingGuard using structured, step-supervised reasoning; ThinkingGuard achieves strong performance across implicit and general safety benchmarks.

  • Problem

    Existing methods lack explicit modeling of how individually benign text and visual elements interact to activate implicit risks, while current data can leave single-modality residues and reasoning chains can become post-hoc rationalizations.

    Source: §1 · p. 2
  • Method

    The paper constructs TriggerBench by separating Key Elements from contextual Trigger Elements and trains ThinkingGuard with staged reasoning, SA-MCTS trajectory search, and preference alignment.

    Source: §1 · p. 2, §4.1 · p. 4
  • Results

    ThinkingGuard achieves strong performance across implicit and general safety benchmarks, consistently outperforming leading proprietary models and specialized open-source detectors.

    Source: §1 · p. 2, §6 · p. 8
  • Takeaways & Limitations

    The paper concludes that structured reasoning can ground multimodal safety judgments in risk attribution rather than statistical correlation.

    Source: §6 · p. 8

    ShieldVLM’s training data includes part of MSSBench and partially overlaps with USB data sources, as well as data from VLSBench and MMSafetyBench.

    Source: §5.2 · p. 7

Abstract

from arXiv · show

While Multimodal Large Language Models (MLLMs) are increasingly deployed in safety-critical domains, their reliability is threatened by multimodal implicit risks. Unlike explicit threats, these hazards emerge when individually benign text and neutral visual entities logically converge to induce unsafe outputs. Current detection methods fail to address this because they overlook the underlying risk activation mechanisms that govern cross-modal risk activation, leading to single-modality shortcut learning and hallucinated rationalizations. To bridge this gap, we first construct TriggerBench, the first dataset explicitly modeling risk compositionality (5,600 instances). By formally isolating Key Elements and Trigger Elements to build counterfactual contrastive pairs, TriggerBench eliminates risk residues and forces models to perform genuine logical deduction rather than superficial pattern matching, which provides a rigorous foundation for both large-scale training and fine-grained evaluation. Building on this, we propose a Step-Supervised Structured Reasoning training framework and employ it to train ThinkingGuard, a specialized guard model. Inspired by Situation Awareness theory, we decouple implicit risk identification into progressive cognitive stages, and utilize a step-reward Monte Carlo Tree Search algorithm to explore optimal reasoning trajectories, which are then distilled into the model through Dual-Constraint Preference Alignment. Extensive experiments across both standard and implicit safety benchmarks demonstrate that ThinkingGuard achieves strong performance. Project resources are available at https://github.com/FroggyChen/ThinkingGuard.

1 Introduction

Implicit multimodal risks arise when benign text and visual elements interact to imply an unsafe outcome, a mechanism existing approaches do not explicitly model. The paper introduces TriggerBench and a structured reasoning framework to support risk attribution and train ThinkingGuard.

Motivation

  • Implicit risks emerge when individually benign text and visual elements interact, while existing methods lack explicit modeling of how that interaction activates risk.The paper identifies shortcut learning from single-modality residues and post-hoc, potentially hallucinated reasoning as related concerns.Source: §1 · p. 2

Contributions

  • The proposed Step-Supervised Logical Reasoning framework trains ThinkingGuard through staged reasoning, SA-MCTS trajectory search, and Dual-Constraint Preference Alignment.Its stages include intent summarization, entity extraction, attribute description, relational risk analysis, and a comprehensive safety judgment.Source: §1 · p. 2
  • ThinkingGuard achieves strong performance across implicit and general safety benchmarks, outperforming leading proprietary models and specialized open-source detectors.The paper attributes this to precise risk attribution and evidence-grounded safety judgments.Source: §1 · p. 2
  • TriggerBench contains 5,600 image-text pairs across nine safety dimensions and models risk compositionality by separating Key Elements from Trigger Elements.Counterfactual safe replacements preserve the key element and text query while changing the trigger, creating matched safe/unsafe pairs.Source: §1 · p. 2

2 Related Work

Prior work establishes implicit multimodal safety as a cross-modal reasoning challenge and has moved from direct classification toward reasoning-based detection. Existing datasets and methods nevertheless leave risk composition or fine-grained trigger relations insufficiently modeled.

2.1 Implicit Hazard Datasets

  • Existing implicit-hazard benchmarks cover situational safety, implicit toxicity, and broader risk settings, but mainly conceal risks within individual modalities rather than explicitly modeling their logical composition.MSSBench contains 1,820 image-query pairs; MMIT includes 2,100 statements and prompts across 7 risk categories, 31 subcategories, and 5 cross-modal correlation modes.Source: §2.1 · pp. 2–3

2.2 Multimodal Risk Detection

  • Multimodal risk detection spans direct classification and reasoning-enhanced approaches, yet methods still struggle with fine-grained relations, long-range context, and latent trigger conditions.The cited approaches include moderation and guard classifiers, cross-modal deliberation, structured reasoning with preference optimization, and jailbreak detection.Source: §2.2 · p. 3

3 TriggerBench

TriggerBench is designed to model implicit risk as a composition of benign elements and to provide matched examples for training and evaluation. Its construction synthesizes unsafe scenarios, then creates safe counterparts by changing the contextual trigger while preserving the key element and query.

3 TriggerBench

  • TriggerBench is a fine-grained implicit-risk dataset of 5,600 image-text pairs (3,864 training; 1,736 testing), built by generating rule-violating unsafe samples and constructing contrastive safe counterparts via counterfactual replacement.Source: §3 · p. 3

3.1 Rule-Guided Risk Synthesis

  • Key Elements map directly to text intent, while Trigger Elements are contextual image content that induces risk through cross-modal interaction.The synthesis pipeline plans unsafe tuples across nine safety dimensions and generates image-text scenarios whose text and image descriptions contain no explicit harmful concepts.Source: §3.1 · p. 3

3.2 Construction of Triggered Risk Pairs

  • Counterfactual safe replacement changes the unsafe trigger to a benign environmental counterpart while preserving the original key element and text query.The rendered safe image retains the key element and changes only the surrounding trigger; these matched pairs are intended to reduce reliance on spurious correlations.Source: §3.2 · pp. 3–4, Figure 2 · p. 4

4 ThinkingGuard

ThinkingGuard models implicit-risk detection as a progressive, evidence-grounded reasoning trajectory rather than a one-shot classification. It searches for strong attribution paths and distills them through full-trajectory and crucial-step preference alignment.

4 ThinkingGuard

  • The framework combines progressive risk reasoning, SA-MCTS trajectory exploration, and dual-constraint preference alignment to train ThinkingGuard for implicit-risk detection.SA-MCTS explores and scores trajectories, which are distilled into full-trajectory and crucial-step preference pairs.Source: §4 · p. 4, Figure 3 · p. 5, §4.3 · p. 6

4.1 Logical Risk Attribution

  • Risk analysis proceeds from intent summarization and entity perception to attribute description, relational risk analysis, and a final safety judgment.Step-level rewards evaluate intermediate states and guide both search and preference-pair construction.Source: §4.1 · p. 4

4.2 SA-MCTS for Trajectory Exploration

  • SA-MCTS scores candidate reasoning steps for attribution accuracy, coherence and conciseness, and visual hallucination, while expanding more broadly at complex reasoning stages.The method uses fewer branches for intent summarization and increases branching for later multimodal interaction and risk analysis.Source: §4.2 · p. 5
  • SA-MCTS backs up the maximum evaluation value found in a subtree and prunes branches whose step reward falls below a threshold.Pruning targets logical contradictions or severe hallucinations, allowing search to focus on promising trajectories.Source: §4.2 · p. 5

4.3 Dual-Constraint Preference Alignment

  • Preference alignment pairs the highest-reward complete path with a logically flawed or visually hallucinated path, then adds critical-step preferences for unsafe samples.The critical-step comparison uses the same historical context, targeting the key-entity and trigger-entity interaction; benign samples receive no such step-level enhancement.Source: §4.3 · p. 6

5 Experiments

Experiments compare ThinkingGuard with commercial, proprietary, open-source safety, and jailbreak detectors across implicit-risk, general-safety, and jailbreak benchmarks. Results favor ThinkingGuard overall, while ablations highlight contributions from structured analysis and step-level preference alignment.

5.1 Experimental Settings

  • ThinkingGuard is trained with LoRA-DPO on TriggerBench-Train, using SA-MCTS to explore trajectories and a 2:1 ratio of full-trajectory to crucial-step pairs.Offline search averages 352 seconds per sample on one A100 GPU; training takes approximately 90 minutes on four A100-80GB GPUs.Source: §5.1 · p. 6
  • Evaluation covers TriggerBench, implicit-hazard benchmarks, general-safety and jailbreak benchmarks, and baselines spanning commercial, proprietary, open-source, and jailbreak detectors.TriggerBench reports dimension-wise F1-Unsafe and Recall; other benchmarks use Accuracy and, where applicable, F1-Unsafe, F1-Safe, and Recall.Source: §5.1 · p. 6

5.2 Research Questions (RQs) and Findings

  • 0.764 average score: ThinkingGuard outperforms all baseline categories on TriggerBench.The authors attribute this result to structured risk attribution and fine-grained preference alignment.Source: §5.2 · p. 6, Table 1 · p. 7
  • 0.718 MSSBench Accuracy accompanies strong generalization across implicit-risk benchmarks, while ShieldVLM’s MMIT result has a data-overlap qualification.ThinkingGuard also achieves superior performance on MSSBench and USB; ShieldVLM’s training includes MMIT and partially overlaps MSSBench and USB data sources.Source: §5.2 · p. 7, Table 2 · p. 7
  • 3.5 seconds and 352 output tokens per sample make ThinkingGuard comparable in efficiency to ShieldVLM, while GuardReasoner-VL is faster but detects substantially worse.These figures are reported under the authors’ evaluation setup.Source: §5.2 · p. 7
  • ThinkingGuard reaches state-of-the-art performance on VLSBench, SafeBench, and JailbreakV-28K-mini, including 0.914 accuracy on jailbreak scenarios.The authors attribute robustness in these settings to intent summarization and risk attribution beneath adversarial perturbations.Source: §5.2 · pp. 7–8, Table 2 · p. 7

5.3 Ablation Study

  • Removing structured analysis drops unsafe recall from 0.749 to 0.505, and the full configuration performs best across safety metrics.The untrained baseline reaches 0.670 accuracy and 0.588 recall on implicit hazards; the ablation results are averaged by benchmark group.Source: §5.3 · p. 8, Table 3 · p. 8
  • SFT-only yields 0.683 accuracy, while removing step-DPO reduces accuracy to 0.756 and F1-Unsafe to 0.779.The authors conclude that structured situational analysis and dual-constraint preference alignment jointly contribute to ThinkingGuard’s effectiveness.Source: §5.3 · p. 8

6 Conclusion

ThinkingGuard combines a dataset that explicitly models implicit-risk compositionality with structured reasoning training for multimodal risk detection. Experiments demonstrate superior performance.

6 Conclusion

  • ThinkingGuard uses SA-MCTS and Dual-Constraint Preference Alignment to train grounded, hallucination-resistant structured reasoning.The framework is designed to internalize this reasoning in the guard model.Source: §6 · p. 8
  • TriggerBench supports implicit-risk training and evaluation by decoupling neutral Key Elements from contextual Trigger Elements.The paper describes it as the first dataset to explicitly model risk compositionality.Source: §6 · p. 8
  • Experiments demonstrate that ThinkingGuard achieves superior performance in implicit risk detection.Source: §6 · p. 8
Loading 2609.36562v1…