LlavaGuard: An Open VLM-based Framework for Safeguarding Vision Datasets and Models

Lukas Helff, Felix Friedrich, Manuel Brack, Kristian Kersting, Patrick Schramowski
6/7/2024
cs.CVcs.AIcs.LG

No official code found. Best implementation: ml-research/LlavaGuard (71 stars, Apache-2.0, last commit 2025-09-30).

Abstract

This paper introduces LlavaGuard, a suite of VLM-based vision safeguards that address the critical need for reliable guardrails in the era of large-scale data and models. To this end, we establish a novel open framework, describing a customizable safety taxonomy, data preprocessing, augmentation, and training setup. For teaching a VLM safeguard on safety, we further create a multimodal safety dataset with high-quality human expert annotations, where each image is labeled with a safety rating, category, and rationale. We also employ advanced augmentations to support context-specific assessments. The resulting LlavaGuard models, ranging from 0.5B to 7B, serve as a versatile tool for evaluating the safety compliance of visual content against flexible policies. In comprehensive experiments, LlavaGuard outperforms both state-of-the-art safeguards and VLMs in accuracy and in flexibly handling different policies. Additionally, we demonstrate LlavaGuard's performance in two real-world applications: large-scale dataset annotation and moderation of text-to-image models. We make our entire framework, including the dataset, model weights, and training code.

View on arXivView PDF

Code Implementations(1)

Apache-2.0
714Shell, PythonApr 15, 20241 years agoApache-2.0

Similar Papers

Cite this paper

@article{helff2024llavaguard,
  title  = {LlavaGuard: An Open VLM-based Framework for Safeguarding Vision Datasets and Models},
  author = {Lukas Helff and Felix Friedrich and Manuel Brack and Kristian Kersting and Patrick Schramowski},
  year   = {2024},
  eprint = {2406.05113},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2406.05113v3},
  journal = {ICML 2024 2024}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2406.05113.svg)](https://codeofpaper.com/paper/2406.05113)

Discussion