Understanding and Mitigating Toxicity in Image-Text Pretraining Datasets: A Case Study on LLaVA

TL;DR

Filtered LLaVA dataset using Toxic-BERT and LlavaGuard, removing 7,531 toxic image-text pairs.

cs.CV 🟡 Intermediate 2025-05-10 7 views
Karthik Reddy Kanjula Surya Guthikonda Nahid Alam Shayekh Bin Islam
multimodal dataset toxicity filtering machine learning computer vision

Key Findings

Methodology

The study employs Toxic-BERT and LlavaGuard models for toxicity detection and filtering in the LLaVA dataset. Toxic-BERT focuses on text toxicity identification, while LlavaGuard is used for image toxicity classification. By combining the results of both, 7,531 toxic image-text pairs were successfully removed, creating a toxicity-mitigated dataset.

Key Results

  • Toxic-BERT identified 892 toxic image captions with over 80% confidence.
  • LlavaGuard and Command R+ identified 7,111 toxic images.
  • A total of 7,531 toxic image-text pairs were removed, resulting in a toxicity-mitigated dataset.

Significance

This study highlights the importance of identifying and filtering toxic content in multimodal model training. By removing toxic data, the fairness and responsibility of models can be improved, reducing ethical risks in practical applications.

Technical Contribution

The study proposes a multimodal toxicity detection method combining Toxic-BERT and LlavaGuard, providing a systematic toxicity identification and filtering process, serving as a reference for future multimodal dataset development.

Novelty

This is the first systematic analysis of toxicity content in the LLaVA dataset, proposing effective filtering strategies, filling a gap in multimodal dataset toxicity analysis.

Limitations

  • The method may not identify all types of toxic content, especially those requiring complex contextual understanding.
  • The model may be less sensitive to novel or unseen toxic content.

Future Work

Future work could include user evaluation processes to verify dataset accuracy and implementing safety in instruction tuning and alignment techniques.

AI Executive Summary

Multimodal models play a crucial role in AI, but their training datasets often contain toxic content, affecting model fairness and safety. This study targets the LLaVA dataset, employing Toxic-BERT and LlavaGuard models to systematically identify and remove toxic image-text pairs, creating a toxicity-mitigated dataset.

By combining the text analysis capabilities of Toxic-BERT and the image classification abilities of LlavaGuard, researchers successfully removed 7,531 toxic image-text pairs. This not only enhances dataset safety but also provides significant support for the responsible development of multimodal models.

The open dataset from this study offers a safer research foundation for academia and industry, promoting responsible development of multimodal models. Future research will continue to explore more refined toxicity detection methods and safety alignment techniques.

Deep Analysis

Background

Multimodal models, combining visual and language capabilities, have made significant advances in AI. However, the large-scale datasets they rely on often contain toxic content, such as hate speech and violent images, posing threats to model fairness and safety. The LLaVA dataset, as an important multimodal training dataset, has not been systematically analyzed for toxic content.

Core Problem

Toxic content in multimodal datasets can lead to inappropriate model outputs and even ethical issues. Such content is often difficult to automatically identify, especially in large-scale datasets, making manual filtering nearly impossible.

Innovation

This study is the first to systematically analyze the toxicity content in the LLaVA dataset and propose a multimodal toxicity detection method combining Toxic-BERT and LlavaGuard. This method effectively identifies and removes toxic content from the dataset.

Methodology

  • �� Use Toxic-BERT model to detect text toxicity and identify harmful language.
  • �� Utilize LlavaGuard model for image toxicity classification to ensure comprehensive coverage.
  • �� Combine results to remove 7,531 toxic image-text pairs, creating a toxicity-mitigated dataset.

Experiments

The experiment used the LLaVA dataset, containing 558,000 image-text pairs. Based on the detection results of Toxic-BERT and LlavaGuard, researchers removed 7,531 toxic image-text pairs, verifying the method's effectiveness.

Results

By combining the detection of Toxic-BERT and LlavaGuard, 7,531 toxic image-text pairs were successfully identified and removed, significantly enhancing dataset safety and fairness.

Applications

The toxicity-mitigated dataset can be used to train safer multimodal models, suitable for applications requiring high safety and responsibility, such as autonomous driving and medical image analysis.

Limitations & Outlook

Although the method is effective, it may still miss some toxic content in complex contexts. Additionally, the model's ability to recognize novel toxic content needs improvement.

Plain Language Accessible to non-experts

Imagine you're cooking in a kitchen, and the ingredients are your dataset. You need to ensure all ingredients are fresh and non-toxic to make a delicious dish. Toxic-BERT and LlavaGuard are like your assistants, helping you pick out those ingredients that are not fresh or harmful. By removing these bad ingredients, you can make a healthier, tastier dish. This process is like a thorough cleaning of your dataset, ensuring that the model training is not affected by toxic content.

ELI14 Explained like you're 14

Imagine you're playing a game where your character needs to collect various items to level up. But some items are toxic and can weaken your character. Toxic-BERT and LlavaGuard are like detectives in the game, helping you find and remove these toxic items. This way, your character can level up faster and become stronger! It's like giving your game world a big clean-up, so you can play more safely and happily!

Glossary

Toxic-BERT

A model used for detecting text toxicity, capable of identifying harmful language.

Used to identify toxic text in the LLaVA dataset.

LlavaGuard

A model used for image toxicity classification, ensuring the safety of visual content.

Used to detect toxic images in the LLaVA dataset.

LLaVA Dataset

A multimodal training dataset containing a large number of image-text pairs.

The target dataset for toxicity content analysis and filtering in the study.

Multimodal Model

An AI model combining visual and language capabilities.

The type of model used in the study, relying on image-text datasets.

Toxic Content

Harmful content that may lead to inappropriate results or ethical issues.

The dataset content that needs to be identified and removed in the study.

Open Questions Unanswered questions from this research

  • 1 How to improve model recognition of novel toxic content?
  • 2 How to ensure the effectiveness of toxicity recognition in multilingual datasets?

Applications

Immediate Applications

Multimodal Model Training

Use the toxicity-mitigated dataset to train safer multimodal models, reducing ethical risks.

Long-term Vision

Autonomous Driving

Apply to autonomous driving systems to ensure the safety of visual and language recognition.

Abstract

Pretraining datasets are foundational to the development of multimodal models, yet they often have inherent biases and toxic content from the web-scale corpora they are sourced from. In this paper, we investigate the prevalence of toxicity in LLaVA image-text pretraining dataset, examining how harmful content manifests in different modalities. We present a comprehensive analysis of common toxicity categories and propose targeted mitigation strategies, resulting in the creation of a refined toxicity-mitigated dataset. This dataset removes 7,531 of toxic image-text pairs in the LLaVA pre-training dataset. We offer guidelines for implementing robust toxicity detection pipelines. Our findings underscore the need to actively identify and filter toxic content - such as hate speech, explicit imagery, and targeted harassment - to build more responsible and equitable multimodal systems. The toxicity-mitigated dataset is open source and is available for further research.

cs.CV