ThinkingGuard: Decoding Implicit Harm in Multimodal Large Language Models via Stepwise Risk AttributionThinkingGuard: Decoding Implicit Hazards via Step-by-Step Risk Attribution in Multimodal Large Language Models
The authors construct TriggerBench (5,600 pairs) and train ThinkingGuard to detect multimodal implicit risks using stepwise risk attribution; on TriggerBench the average F1-Unsafe is 0.764.
Detecting multimodal implicit risks: individually benign text and neutral visual entities induce unsafe outputs only through cross-modal interaction. ThinkingGuard acts as a guard model for image-text input, performing safety judgment and risk attribution without assuming the input contains explicit harmful signals.
- Multimodal implicit risks arise from interactions between individually benign text and neutral visual entities, and existing detectors tend to take unimodal shortcuts or give hallucinated rationales. The authors argue that data and models capable of logical risk attribution are needed.
- TriggerBench separates key elements from trigger elements and uses counterfactual replacement to construct safe controls, with 5600 pairs in total. ThinkingGuard performs step-by-step reasoning based on situational awareness, uses SA-MCTS to search trajectories, and then distills via dual preference alignment at both the trajectory level and key steps.
- The authors report ThinkingGuard achieves an average F1-Unsafe of 0.764 and Recall of 0.866 on TriggerBench, higher than the listed baselines. MSSBench accuracy 0.718, JailbreakV-28K-mini accuracy 0.914; on MMIT ShieldVLM is higher, but the footnote states its training data is related to that benchmark.
- The authors state that reasoning chains may still exhibit attribution bias and visual hallucination, and rely on synthetic data and process reward models. Evaluation covers nine categories of implicit risk and several general safety and jailbreak benchmarks, with backbone Qwen3-VL-8B-Instruct, SA-MCTS depth 5, branching factor 2, and 30 iterations.
- Evaluated models
- ThinkingGuard(Qwen3-VL-8B-Instruct)
- Benchmarks
- TriggerBenchMSSBenchMMITUSBVLSBenchSafeBenchMMSafetyBenchJailbreakV-28K-mini
- Metrics
- F1-UnsafeRecallAccuracyF1-SafeF1-ULatencyOutput tokens
Targeting the implicit risk in multimodal large language models where text and visual entities are individually harmless but logically combined induce unsafe outputs, the research proposes a stepwise supervised structured reasoning framework and trains a dedicated guard model, ThinkingGuard. The team also constructs the first dataset explicitly modeling risk compositionality, TriggerBench (5,600 entries), by isolating Key Elements and Trigger Elements to create counterfactual contrast pairs, eliminating risk residue. ThinkingGuard uses stepwise-reward Monte Carlo tree search to explore optimal reasoning trajectories, and is distilled into the model via dual-constraint preference alignment, achieving strong performance on both standard and implicit safety benchmarks.
Paper analysis
What problem does this paper attempt to solve?
How individually benign images and text become implicit risks through interaction is underexplored by existing detectors, which lack compositional data and verifiable attribution reasoning.
Multimodal implicit risks lack detection of localizable activation conditions: individually harmless text and neutral visual entities only induce unsafe outputs after interaction, and existing methods tend to take single-modality shortcuts or post-hoc rationalization.
- Scenario: The authors state that MLLMs are used in high-risk domains such as healthcare, finance, and education, and early defenses mainly intercept explicit harmful image-text pairs and adversarial inputs. Implicit risks have no explicit harmful signal in a single modality and often bypass conventional filters. Fig. 1 uses a pest control request and a kitchen scene as an example: the risk is activated only when alcohol-containing pesticide and open flame appear together.
- Existing shortcomings: The authors point out two gaps. On data, existing collections mostly disguise explicit harm rather than synthesizing risk from individually benign components, leaving single-modality residue, allowing models to learn "which elements look dangerous." On reasoning, without targeted supervision, intermediate steps degrade into post-hoc rationalization, with reasons disconnected from subtle cross-modal interactions.
- Core observation: The authors believe reliable detection requires logical risk attribution, i.e., tracing how neutral visual triggers interact with latent text intent and violate safety rules. This requires both data encoding compositional logic and models that can provide visually grounded attribution rather than surface matching.
- This work proposes: Construct TriggerBench (5,600 image-text pairs, nine safety dimensions), separating key elements from trigger elements and using counterfactual safe replacements to eliminate risk residue; then train a dedicated guard model ThinkingGuard with stepwise supervised structured reasoning.
- Threat model:
- Victim system: Deployed MLLMs and their safety filters; the detection target is whether an image-text input constitutes implicit risk.
- Risk definition: The text and image individually do not imply a preset violation, but the interaction of key elements, visual context, and hidden intent logically implies a violation, activating the risk.
- Detection goal: Output an evidence-based safe/unsafe judgment and risk category, attributing to the relationship between key and trigger elements.
- Knowledge and capabilities: The paper positions ThinkingGuard as a dedicated guard model, with input being the image-text pair under test; it does not treat attacker white-box or black-box access as a premise of the task.
What related research exists?
Related work is divided into implicit harm datasets and multimodal risk detection; the authors state that existing data do not explicitly model logical combinations of risks.
Implicit Harm Datasets
- MSSBench (Zhou et al., 2024) — Contextual safety: the same query can be safe or dangerous in different visual contexts, containing 1,820 image-text query pairs, balanced between safe and unsafe contexts.
- MMIT — Multimodal implicit toxicity: each modality is benign alone but harmful when combined; contains 2,100 statements and prompts, 7 risk categories, 31 subcategories, and 5 cross-modal association patterns.
- USB (Zheng et al., 2025) — Covers multiple risk categories and modality combinations, and examines both vulnerability and over-sensitivity. The authors state these benchmarks illustrate the difficulty of implicit multimodal safety, but they mainly hide risks within a single modality rather than explicitly modeling their logical combinations.
Direct Classification Detectors
- OpenAI Moderation API and Llama Guard 3 Vision — Treat detection as category prediction or binary classification. The authors state they are efficient and practical, but often rely on predefined taxonomies and surface signals, making it difficult to handle risks from subtle context or cross-modal interactions.
Reasoning-Enhanced and Jailbreak Detection
- ShieldVLM performs cross-modal deliberative reasoning to detect implicit toxicity; GuardReasoner and its multimodal extension apply structured reasoning and preference optimization to complex safety judgments.
- JailDAM uses adaptive policy memory to detect unsafe prompts at inference time; HiddenDetect identifies jailbreaks by monitoring hidden states without additional fine-tuning. The authors state these works reflect a shift from direct classification to context-aware, reasoning-based detection, but still struggle with fine-grained relationships, long-range context, or latent trigger conditions.
Baseline Methods and Benchmarks
- Baselines: GPT-5.1, Claude-Sonnet-4-6, OpenAI Moderation API, Llama-Guard3-Vision, ShieldVLM, GuardReasoner-VL, HiddenDetect, JailDam. ShieldVLM and GuardReasoner-VL use public checkpoints, both with Qwen2.5-VL-7B backbones.
- Benchmarks: TriggerBench-Test; implicit harm benchmarks MSSBench, MMIT, USB; general safety and jailbreak benchmarks VLSBench, SafeBench, MMSafetyBench, JailbreakV-28K-mini.
The authors position this work as addressing the above limitations with logical risk attribution and preference alignment: using TriggerBench to explicitly model risk compositionality, and using ThinkingGuard to internalize stepwise attribution into a guard model.
How does the paper address this problem?
TriggerBench constructs controls with counterfactual trigger replacement, and ThinkingGuard uses SA-MCTS to search step-by-step attribution trajectories and distills with dual preference alignment.
Overall, first build a dataset that isolates risk activation conditions, TriggerBench, then train a guard model ThinkingGuard: decompose the judgment into stepwise trajectories based on situational awareness, use SA-MCTS to search for high-reward trajectories, distill via Dual-Constraint Preference Alignment, and no longer search at inference time.
Problem Formulation and Data Synthesis
- Element decomposition: Image content directly corresponding to the text intent is the key element E_K, and contextual image content that induces risk is the trigger element E_T. Implicit risk is written as a cross-modal interaction violating rules: the risk is 1 only when the semantic consequence of that interaction logically implies a preset violation set.
- Synthesis constraints: Each risk sample's image-text combination should imply a violation, while the image alone and text alone do not. The nine dimensions are physical harm, illegal activities, privacy, property damage, ethical violations, region and belief, offensiveness, misinformation, violence.
- Pipeline: A closed-source model first plans an unsafe tuple {E_K, E_T, H} for each scenario, then writes input text T and fine-grained image descriptions, avoiding explicit harmful concepts in the text or description; then uses FLUX.2-klein-9b to render descriptions into images. The authors state that all image-text pairs are manually filtered by domain experts, with annotation process, quality control, and consistency analysis in the supplementary materials. This stage yields 2,800 implicit risk samples.
- Scale: The full TriggerBench has 5,600 image-text pairs, with 3,864 for training and 1,736 for testing. Index i is one of the nine safety dimensions, and j is the sample within that dimension.
Counterfactual Safe Replacement
- Mechanism: Replace the unsafe trigger E_T with a pre-planned benign environment E_T', strictly preserving E_K and the text query T, so that the new combination no longer implies a violation. Then use FLUX.2 to render the safe image, changing only the contextual trigger and preserving the key element.
- Purpose: The authors state that contrast pairs force the model to learn the logical dependency between specific triggers and risk activation, weakening shortcuts that directly bind neutral key entities (e.g., a scalpel) to dangerous labels. Fig. 2 shows the pipeline from category selection, scenario generation, sensitive entity and trigger selection, to risk samples and safe replacement samples.
Stepwise Logical Risk Attribution
- Trajectory: Inspired by Situation Awareness theory, the authors view analysis as a trajectory τ=(a1,…,an). The initial state contains the image-text pair under test and a system prompt template; state transitions append new steps to the context. Steps correspond to: intent summarization, entity extraction, attribute description, relational risk analysis, comprehensive safety judgment, and risk category.
- Constraints: Inject analysis examples into the initial state, and assign exclusive stop tokens to each action to segment steps. The process reward R scores each intermediate state, both guiding search and constructing preference pairs.
SA-MCTS
- Search: Maximum depth 5, branching factor 2, 30 iterations. The authors state that the intent summarization search space is narrow, so fewer branches are allocated; later stages involving multimodal interaction and key risk analysis increase the branching factor. Offline search averages 352 seconds per sample on one A100. Both trajectory exploration and the backbone detection model use Qwen3-VL-8B-Instruct.
- Step rewards: An LLM judge scores candidate steps according to a fixed template, with three dimensions: attribution accuracy (whether it correctly discusses E_K and E_T), coherence and conciseness with historical context, and visual hallucination penalty (whether claims are grounded in the input image). The authors state that the three are evaluated holistically without manually assigned weights; the design motivation comes from preliminary error analysis of MLLM reasoning trajectories, with details and human verification in the supplementary materials.
- Backpropagation and pruning: For non-leaf nodes, Q is the maximum evaluation value in the subtree, not the average Q. Nodes with rewards below a preset threshold are immediately terminated and pruned. The paper does not give the value of this threshold in the main text.
Dual-Constraint Preference Alignment
- Full-trajectory pairs: Both unsafe and benign samples collect paths from the search tree. The path with the highest cumulative process reward is chosen, and another path that falls into logical flaws or visual hallucinations but has high initial semantic similarity is rejected.
- Key-step enhancement: Only for unsafe samples. The authors state the difficulty lies in the interaction between E_K and E_T, usually in relational risk analysis and comprehensive assessment. Under the same historical context, pair the optimal analysis of that pivot with the lowest-scoring sibling branch. For benign samples, the authors believe they generally only need to consistently enumerate facts, so this enhancement is not applied.
- Training: Use LoRA-DPO on TriggerBench-Train, with four A100-80GB, about 90 minutes. Full-trajectory pairs and key-step pairs are sampled at a 2:1 ratio (the authors state this ratio is validated in the supplementary materials). Learning rate 3×10^−5, batch size 32, LoRA rank/alpha 8/16, DPO β=0.1. No tree search is performed at inference time.
What experiments did the paper conduct?
ThinkingGuard's average F1-Unsafe on TriggerBench is 0.764; it leads on most out-of-distribution and jailbreak benchmarks, but is lower than ShieldVLM on MMIT.
Experimental Setup
- Model under test: ThinkingGuard, with Qwen3-VL-8B-Instruct as the backbone. Compared against GPT-5.1, Claude-Sonnet-4-6, OpenAI Moderation API, Llama-Guard3-Vision, ShieldVLM, GuardReasoner-VL, HiddenDetect, JailDam. Among the latter, ShieldVLM and GuardReasoner-VL are public checkpoints with Qwen2.5-VL-7B backbones. Prompts and evaluation for closed-source models are in the supplementary materials.
- Data: TriggerBench-Test; implicit harm benchmarks are MSSBench (referred to as 1,820 pairs in the main text), MMIT (2,100 statements and prompts), USB; general safety and jailbreak benchmarks are VLSBench, SafeBench, MMSafetyBench, JailbreakV-28K-mini. Per-dimension sample sizes for the test split are not listed in the paper's main text.
- Metrics: TriggerBench reports F1-Unsafe and Recall for nine dimensions and their averages. Other benchmarks containing both safe and unsafe samples report Accuracy, F1-Unsafe, F1-Safe, Recall; benchmarks containing only unsafe samples report Accuracy. Table 2 also reports latency (seconds) and output token counts.
- Training setup: See Question 3; the paper does not report the number of evaluation repetitions, nor does it report agreement values with human judgments (the authors state that agreement analysis is in the supplementary materials).
- Table 2 footnote: ShieldVLM was trained on MMIT, which includes part of MSSBench and partially overlaps with USB's data sources, and also used data from VLSBench and MMSafetyBench.
Main Results
Table 1 shows the nine-dimension averages on TriggerBench (F1-Unsafe / Recall):
Method F1-Unsafe Recall GPT-5.1 0.642 0.619 Claude-Sonnet-4-6 0.676 0.587 OpenAI Moderation 0.099 0.063 Llama-Guard3-Vision 0.210 0.144 HiddenDetect 0.106 0.060 JailDam 0.242 0.176 ShieldVLM 0.634 0.744 GuardReasoner-VL 0.361 0.282 ThinkingGuard 0.764 0.866 According to Table 1. ThinkingGuard is highest on the nine-dimension average. Per-dimension, it is not highest in every cell: for F1-Unsafe, Claude-Sonnet-4-6 has 0.686 vs 0.697 on Privacy (here ThinkingGuard is higher), 0.746 on Offensiveness vs ThinkingGuard's 0.720, and GPT-5.1 has 0.870 on Violence vs ThinkingGuard's 0.821. For Recall, ShieldVLM has 0.940 on Property Damage, lower than ThinkingGuard's 0.980; on Privacy ShieldVLM has 0.760 and ThinkingGuard 0.700. On Region & Belief, GPT-5.1's F1-Unsafe is 0.293 and Recall 0.189, while ThinkingGuard in the same table is 0.711 / 0.767.
- Authors' interpretation (RQ1): The authors state that OpenAI Moderation, HiddenDetect, and JailDam have average scores below 0.25 because they mainly target explicit keywords or adversarial language patterns, while TriggerBench's text queries are often semantically benign. GPT-5.1 and Claude-Sonnet-4-6 have average scores between 0.642 and 0.676; the authors believe their end-to-end structures often ignore subtle interactions between benign entities.
- Open-source detectors: The authors report ShieldVLM at 0.634 and GuardReasoner-VL at 0.361, and state that having only a detection structure or merely generating reasoning steps is insufficient to reliably identify implicit risks; these models exhibit logical hallucinations when reasoning chains are not grounded in visual evidence.
- ThinkingGuard: The authors state that the 0.764 average supports stepwise risk attribution and fine-grained preference alignment; after decomposing the scenario into verified intermediate steps such as entity extraction and relational risk analysis, the judgment is based on understanding of context-triggered interactions. Fig. 4 provides qualitative examples, which the authors say illustrate the model's ability to identify latent risks across various implicit harm scenarios. An excerpt from the main text shows an intent summary about whether a toddler can play in a room; other text in the figure is incomplete in the provided text.
Out-of-Distribution Implicit Risks and Jailbreaks
Table 2 shows Accuracy (as labeled in the paper; "–" indicates that latency and tokens were not given for that row):
Swipe horizontally to read the table
Method MSS MMIT USB VLS Safe MMSafety JailbreakV GPT-5.1 0.618 0.748 0.860 0.855 0.916 0.540 0.907 Claude-Sonnet-4-6 0.577 0.740 0.737 0.721 0.832 0.390 0.825 OpenAI Moderation 0.503 0.500 0.397 0.302 0.678 0.105 0.629 Llama-Guard3-Vision 0.500 0.524 0.297 0.037 0.554 0.296 0.650 HiddenDetect 0.502 0.517 0.270 0.021 0.678 0.461 0.307 JailDam 0.553 0.545 0.530 0.095 0.615 0.644 0.761 ShieldVLM 0.695 0.898 0.913 0.892 0.862 0.670 0.886 GuardReasoner-VL 0.507 0.569 0.040 0.424 0.908 0.332 0.796 ThinkingGuard 0.718 0.769 0.927 0.933 0.924 0.677 0.914 According to Table 2. On MSSBench, ThinkingGuard's F1-U / F1-S / Recall are 0.668 / 0.755 / 0.567; on MMIT they are 0.772 / 0.780 / 0.757. ShieldVLM's Accuracy on MMIT is 0.898, higher than ThinkingGuard's 0.769. On MMSafetyBench, both are 0.677 and 0.670, with ThinkingGuard slightly higher; that column is not the one where ThinkingGuard has the largest gap relative to all baselines.
- Authors' interpretation (RQ2): The authors state that ThinkingGuard performs better on MSSBench and USB; on MMIT ShieldVLM leads, but this is affected by the data dependency noted in the table footnote. The authors believe that ThinkingGuard, without such prior exposure, still maintains competitive accuracy, indicating that the reasoning-based approach learns transferable safety principles rather than fitting a specific benchmark distribution. The MSSBench accuracy of 0.718 is used by the authors to illustrate that the situational awareness framework can handle risk dependencies under different task characteristics.
- Efficiency: Under the evaluation setup, ThinkingGuard takes 3.5 seconds per sample and 352 output tokens, which the authors state is comparable to ShieldVLM (3.7 seconds, 381 tokens). GuardReasoner-VL is 2.4 seconds and 162 tokens, faster and shorter, but with much lower detection performance, which the authors consider a poor accuracy-efficiency trade-off. GPT-5.1 is 13.4 seconds and 429 tokens; Claude-Sonnet-4-6 is 17.5 seconds and 473 tokens.
- General safety and jailbreaks: The authors state that ThinkingGuard achieves new SOTA on VLSBench, SafeBench, and JailbreakV-28K-mini. JailbreakV-28K-mini accuracy is 0.914; the authors attribute this to the required situational reasoning and state that such attacks typically use complex language to bypass standard filters. On MMSafetyBench, ThinkingGuard is 0.677, close to ShieldVLM's 0.670, and higher than GPT-5.1's 0.540.
Other Ablations and Analyses
- The main text gives a training ratio of full-trajectory pairs to key-step pairs of 2:1, which the authors state is validated in the supplementary materials; metrics for other ratios are not listed in the main text.
- For the three-dimensional criteria of process rewards and human verification, pruning thresholds, and closed-source model prompts, the authors refer to the supplementary materials; the main text does not provide corresponding ablation numbers.
- Low-score segment of Table 1: OpenAI Moderation has F1-Unsafe of 0.024 and Recall of 0.012 on Physical Harm; HiddenDetect has 0.000 / 0.000 on Illegal Activities. The authors link these low scores to "text queries being semantically benign and risks lying in contextual coupling," without providing additional per-dimension explanations.
What are some points that can be further explored?
The main text experiments cover nine categories of implicit risks and several out-of-distribution benchmarks; the supplementary material handles quality control, reward validation, and ratio selection.
Limitations and Future Directions Noted by the Authors
The paper's main text does not list a separate Limitations or Future Work section in the provided text. The introduction and concluding statements present contributions as achieved detection performance, without explicitly labeling any result as a limitation. Therefore, we do not rewrite experimental result discussions as shortcomings noted by the authors.
- Process supervision relies on external review: Section 4.2 states that step rewards are given by JudgeLLM, with details of the three-dimensional criteria and human verification placed in the supplementary materials. The authors do not state in the main text that "the reward model may be wrong" as a limitation.
- Search cost is only on the training side: Section 4.3 states that dual alignment is to avoid expensive tree search at inference time. This is a design explanation, not a future work listed by the authors.
- If counting self-acknowledged scope in the main text, the authors explicitly place the annotation process, quality control, reliability analysis, human verification of reward design, closed-source model prompts, and validation of the 2:1 ratio in the supplementary materials; the main text does not expand on these analyses' numbers.
Experimental Coverage
- Data: TriggerBench has 5,600 image-text pairs in total, with 3,864 for training and 1,736 for testing; the unsafe base set has 2,800 entries, plus counterfactual safe controls. The nine safety dimensions are described in Section 3.1. MSSBench is written as 1,820 pairs in related work, and MMIT as 2,100 entries.
- Systems under test: ThinkingGuard's backbone is Qwen3-VL-8B-Instruct; there are 8 baselines in total, including two closed-source general models, one commercial moderation API, and open-source guard and jailbreak detectors. ShieldVLM and GuardReasoner-VL have Qwen2.5-VL-7B backbones.
- Metrics and benchmarks: TriggerBench uses per-dimension F1-Unsafe and Recall (Table 1). Table 2 covers MSSBench, MMIT, USB, VLSBench, SafeBench, MMSafetyBench, JailbreakV-28K-mini, and reports latency and output tokens. The paper does not report the number of evaluation repetitions.
- Training and search: SA-MCTS has maximum depth 5, branching factor 2, and 30 iterations; offline search averages 352 seconds per sample on one A100. LoRA-DPO takes about 90 minutes on four A100-80GB, with a full-trajectory to key-step sample ratio of 2:1. The paper does not report in the main text experiments with an adaptive attacker rewriting triggers against ThinkingGuard.
- Data overlap: Table 2's footnote states that ShieldVLM was trained on MMIT and has overlapping or partially overlapping data sources with MSSBench, USB, VLSBench, and MMSafetyBench; ThinkingGuard's training data is stated in the main text as TriggerBench-Train.
Summarize the main content of the paper
TriggerBench isolates trigger conditions, and ThinkingGuard uses step-by-step attribution to achieve the authors' reported higher average scores on implicit risk detection.
This work studies multimodal implicit risk detection: the image and text are each benign, and the risk only emerges when key elements interact with trigger elements.
- Problem: The authors believe existing data hides risks within a single modality, causing detection models to take shortcuts or give reasons disconnected from visual evidence, thus failing to perform cross-modal logical attribution reliably.
- Data: TriggerBench has 5,600 pairs in total (3,864 for training, 1,736 for testing). The synthesis stage yields 2,800 unsafe samples covering nine safety dimensions; then only the trigger element is replaced, preserving key elements and text, to obtain counterfactual safe controls. Images are rendered by FLUX.2-klein-9b and manually filtered.
- Model: ThinkingGuard uses Qwen3-VL-8B-Instruct as the backbone, decomposing the judgment into intent, entities, attributes, relations, and comprehensive judgment. SA-MCTS scores each step based on attribution, coherence, and visual grounding, with pruning (depth 5, branching factor 2, 30 iterations), then aligns with trajectory-level DPO and key-step preferences only for unsafe samples. No tree search at inference time.
- Results: On TriggerBench, the nine-dimension average F1-Unsafe / Recall for ThinkingGuard is 0.764 / 0.866 (Table 1), higher than the average of closed-source and open-source baselines in the table; individual cells such as Offensiveness F1-Unsafe and Privacy Recall are not the highest. MSSBench accuracy 0.718, USB 0.927, JailbreakV-28K-mini 0.914 (Table 2). On MMIT, ShieldVLM is 0.898 and ThinkingGuard 0.769; the authors remind that the former's training data is related to that benchmark. Latency is 3.5 seconds per sample and 352 tokens.
- Authors' conclusion: The authors state that structured risk attribution and fine-grained preference alignment are necessary to identify harm arising from multimodal entity interactions, and that the reasoning framework remains effective on out-of-distribution implicit risks and jailbreak wrappers. The authors state that project resources will be provided with the paper; the main text does not describe open-sourcing as an additional plan beyond what has been done.