Toward Autonomous Laboratory Safety Monitoring with Vision Language Models: Learning to See Hazards Through Scene Structure

Trishna Chakraborty, Udita Ghosh, Aldair Ernesto Gongora, Ruben Glatt, Yue Dong, Jiachen Li, Amit K. Roy-Chowdhury, Chengyu SongarXiv 2026

TL;DR

While Vision-Language Models (VLMs) possess strong safety reasoning capabilities, they struggle to detect laboratory hazards directly from raw pixels due to a failure to extract structured object relationships. To bridge this gap, this paper introduces a structured synthetic data generation pipeline to create a benchmark of 1,207 laboratory safety images and proposes a post-training context-engineering approach called scene-graph–guided alignment. By prompting VLMs to first reconstruct a textual scene graph from an image before evaluating safety, the method significantly boosts hazard detection performance in visual-only settings.

Figure 1. Overview of our approach. (A) Structured Data Gener- ation: Textual laboratory scenarios are first translated into scene graphs by an LLM acting as an architect, which are then used to condition a text-to-image model acting as a renderer to synthesize photorealistic laboratory images. (B) VLM as Hazard Detectors: In the visual-only setting, VLMs often fail to identify hazards directly from raw images, whereas asking VLMs to first infer a structured scene representation from the image enables safety reasoning and leads to correct hazard detection.

What Problem Does This Paper Address?

Continuous safety monitoring in scientific laboratories is critical to preventing severe injuries and equipment damage, yet it is heavily constrained by human availability. While Vision-Language Models (VLMs) are natural candidates for automated monitoring via camera feeds, evaluating their effectiveness has been nearly impossible due to a lack of visual data. Most real-world laboratory safety incidents are documented purely as unstructured text.

Furthermore, when presented with the few available laboratory images, VLMs consistently fail to identify hazards. The authors identify a core bottleneck: VLMs possess the underlying safety logic to understand what is dangerous, but their visual perception modules fail to implicitly extract the precise spatial and semantic relationships between objects (e.g., distinguishing between a biohazard container merely being present versus being improperly stored near incompatible materials).

Methods

The authors tackle this problem with a two-pronged approach:

  1. Structured Data Generation Pipeline: To build a reliable dataset, they decouple the generation process into an Architect and a Renderer. A strong LLM (GPT-5) acts as the Architect, translating unstructured text safety scenarios into structured, Visual-Genome-style scene graphs (nodes for objects/attributes, edges for relationships). A state-of-the-art text-to-image model (Google DeepMind's nano-banana-pro) then acts as the Renderer, translating these scene graphs into photorealistic laboratory images. Finally, a VLM-as-judge (Gemini-3-Pro) filters the images to ensure strict structural and hazard consistency.
  2. Scene-Graph–Guided Visual Reasoning (SG-Guided): To fix VLM performance at inference time without expensive retraining, the authors introduce a two-stage context-engineering prompt. Instead of asking a VLM to detect hazards directly from an image, the model is prompted to:
  3. Stage 1: Analyze the image and generate a structured textual scene graph detailing visible objects, their states, and their relationships.
  4. Stage 2: Perform hazard classification and reasoning solely by evaluating the text-based scene graph it just generated.
Figure 2. End-to-end pipeline for dataset construction and hazard detection settings. (Left.) Textual laboratory scenarios are converted into structured scene graphs and ground-truth hazard annotations, which are then used to synthesize and align photorealistic laboratory images, yielding aligned triples through human and VLM-as-judge verification. (Right.) VLMs are evaluated under text-only, vision+text, and vision-only inputs. With our post-training context-engineering approach, scene-graph–guided reasoning, where VLMs first reconstruct a structured scene graph from visual input before performing hazard inference, improve performance for visual-only settings.

Datasets

The authors introduced a new synthetic dataset derived from textual laboratory scenarios in the existing LabSafetyBench benchmark.

  • Size: 1,207 aligned triples of ⟨image, scene graph, ground truth⟩ spanning 362 unique safety scenarios.
  • Composition: 37.4% hazardous and 62.6% non-hazardous cases.
  • Domains Covered: The dataset preserves a realistic distribution across five core laboratory subjects: Biology, Chemistry, Cryogenic Liquids, Physics, and General laboratory safety.

Key Insights and Ideas

  • The Perception Bottleneck: Benchmarking revealed that when ground-truth textual scene graphs are provided, VLMs achieve excellent hazard detection accuracy. This proves that the models' "safety logic" is intact; the failure entirely resides in translating raw pixels into structured relationships.
  • Structuring as an Anchor: Forcing the VLM to generate an intermediate textual scene graph acts as a cognitive anchor. It compels the model to systematically audit the visual scene before jumping to a safety conclusion, preventing degenerate behaviors like being overly permissive or collapsing into random guessing.
  • Capacity Matters for Shortcuts: An ablation study showed that smaller models benefit heavily from explicit hazard attributes in text. However, larger models sometimes perform worse when explicit hazard labels are in the text graph, suggesting they rely on shortcut memorization rather than reasoning through object states.

Key Results

The authors evaluated seven open- and closed-source VLMs (including LLaVA, LLaMA, Qwen, Claude, and Gemini families):

  • Visual-Only Degradation: In visual-only settings, performance dropped drastically across all models. For example, LLaVA-next-7B completely failed, achieving an $F_1$ score of 0.
  • SG-Guided Improvement: The proposed scene-graph–guided reasoning consistently improved visual hazard detection. For instance, Qwen3-8B's overall $F_1$ score improved from 0.68 to 0.78, and even the weaker LLaVA model was boosted from 0 to 0.22.
F1 score comparison demonstrating that scene-graph-guided reasoning (SG-G) boosts visual-only performance across models.
  • Domain Difficulty: Cryogenic Liquids and Physics proved to be the most challenging domains for visual hazard detection across almost all models, highlighting a need for domain-specific visual grounding.
Figure 7. Subject-wise F1 scores in the vision-only across different VLMs. Performance varies notably by laboratory domain, with Cryogenic Liquids and Physics more challenging, highlighting domain-dependent difficulty in visual hazard detection. LLaVA is omitted, as it achieves an F1 score of 0.

Limitations and Future Work

  • Parsing Errors: The primary drawback of SG-guided reasoning is an increased parsing error rate. Because the models must output complex, structured JSON for the scene graph, they occasionally fail to format the output correctly, halting the pipeline before the hazard detection stage.
  • Judge Bias: Relying on a VLM-as-judge for dataset filtering introduces selection bias. The authors noted that models like GPT-5.2-Pro were overly conservative, frequently rejecting valid images because they misidentified benign objects (like a standard biohazard bin) as active hazards.
  • Future Directions: The authors suggest moving beyond post-training prompting toward explicit instruction tuning, training VLMs directly on image-to-scene-graph tasks to inherently couple visual perception with structured safety inference.

Summary updated

BibTeX
@misc{chakraborty2026toward,
  author = {Trishna Chakraborty and Udita Ghosh and Aldair Ernesto Gongora and Ruben Glatt and Yue Dong and Jiachen Li and Amit K. Roy-Chowdhury and Chengyu Song},
  title = {{Toward Autonomous Laboratory Safety Monitoring with Vision Language Models: Learning to See Hazards Through Scene Structure}},
  year = {2026},
  eprint = {2602.00414},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2602.00414},
}
Figure