Table of Contents
Fetching ...

Ethical-Lens: Curbing Malicious Usages of Open-Source Text-to-Image Models

Yuzhu Cai, Sheng Yin, Yuxi Wei, Chenxin Xu, Weibo Mao, Felix Juefei-Xu, Siheng Chen, Yanfeng Wang

TL;DR

This work introduces Ethical-Lens, a plug-in framework that curbs malicious usage of open-source text-to-image models without altering their internals. It combines a Text Scrutiny LLM to revise user prompts and an Image Scrutiny Classifier to detect toxicity in outputs, orchestrating local, global, and face-editing strategies to align content with ethical norms. The authors assemble and leverage multiple datasets (Tox100, Tox1K, I2P, HumanBias, Demographic Stereotypes, Mental Disorders) and evaluate alignment using GPT4-V, HEIM, and FairFace, showing performance comparable to or surpassing DALL·E 3 while preserving image quality. Results indicate Ethical-Lens can enable safer, more responsible use of open-source text-to-image tools and promote their sustainable, societal-beneficial deployment; code and datasets are publicly available.

Abstract

The burgeoning landscape of text-to-image models, exemplified by innovations such as Midjourney and DALLE 3, has revolutionized content creation across diverse sectors. However, these advancements bring forth critical ethical concerns, particularly with the misuse of open-source models to generate content that violates societal norms. Addressing this, we introduce Ethical-Lens, a framework designed to facilitate the value-aligned usage of text-to-image tools without necessitating internal model revision. Ethical-Lens ensures value alignment in text-to-image models across toxicity and bias dimensions by refining user commands and rectifying model outputs. Systematic evaluation metrics, combining GPT4-V, HEIM, and FairFace scores, assess alignment capability. Our experiments reveal that Ethical-Lens enhances alignment capabilities to levels comparable with or superior to commercial models like DALLE 3, ensuring user-generated content adheres to ethical standards while maintaining image quality. This study indicates the potential of Ethical-Lens to ensure the sustainable development of open-source text-to-image tools and their beneficial integration into society. Our code is available at https://github.com/yuzhu-cai/Ethical-Lens.

Ethical-Lens: Curbing Malicious Usages of Open-Source Text-to-Image Models

TL;DR

This work introduces Ethical-Lens, a plug-in framework that curbs malicious usage of open-source text-to-image models without altering their internals. It combines a Text Scrutiny LLM to revise user prompts and an Image Scrutiny Classifier to detect toxicity in outputs, orchestrating local, global, and face-editing strategies to align content with ethical norms. The authors assemble and leverage multiple datasets (Tox100, Tox1K, I2P, HumanBias, Demographic Stereotypes, Mental Disorders) and evaluate alignment using GPT4-V, HEIM, and FairFace, showing performance comparable to or surpassing DALL·E 3 while preserving image quality. Results indicate Ethical-Lens can enable safer, more responsible use of open-source text-to-image tools and promote their sustainable, societal-beneficial deployment; code and datasets are publicly available.

Abstract

The burgeoning landscape of text-to-image models, exemplified by innovations such as Midjourney and DALLE 3, has revolutionized content creation across diverse sectors. However, these advancements bring forth critical ethical concerns, particularly with the misuse of open-source models to generate content that violates societal norms. Addressing this, we introduce Ethical-Lens, a framework designed to facilitate the value-aligned usage of text-to-image tools without necessitating internal model revision. Ethical-Lens ensures value alignment in text-to-image models across toxicity and bias dimensions by refining user commands and rectifying model outputs. Systematic evaluation metrics, combining GPT4-V, HEIM, and FairFace scores, assess alignment capability. Our experiments reveal that Ethical-Lens enhances alignment capabilities to levels comparable with or superior to commercial models like DALLE 3, ensuring user-generated content adheres to ethical standards while maintaining image quality. This study indicates the potential of Ethical-Lens to ensure the sustainable development of open-source text-to-image tools and their beneficial integration into society. Our code is available at https://github.com/yuzhu-cai/Ethical-Lens.
Paper Structure (14 sections, 6 equations, 14 figures, 33 tables)

This paper contains 14 sections, 6 equations, 14 figures, 33 tables.

Figures (14)

  • Figure 1: Ethical-Lens moderates Dreamlike Diffusion 1.0 outputs to reduce toxicity and bias effectively. The top row of images displays the original model outputs, and the bottom row shows the results post-Ethical-Lens intervention. Ethical-Lens demonstrably constrains text-to-image models on both toxicity and bias dimensions, resulting in outputs devoid of inappropriate content while simultaneously being more diverse and unbiased. * portions have been post-processed for public display purposes.
  • Figure 2: Ethical-Lens significantly boosts alignment on toxicity and bias without compromising original model capabilities. The figure depicts the comparison of the overall scores for different text-to-image models and our Ethical-Lens. The left set of graphs depicts CLIPScore, Aesthetic, Blockout, and Toxicity Score on the Tox100 dataset, while the right set shows CLIP, Aesthetic, Blockout, and Bias Score on the HumanBias dataset.
  • Figure 3: Ethical-Lens demonstrates the lowest degree of bias across eleven attributes in gender, race, and age when compared to DD 1.0 and DALL·E 3. The figure contains three heatmaps illustrating gender, race, and age imbalance for DD 1.0, DALLE·3, and our Ethical-Lens on three datasets.
  • Figure 4: Ethical-Lens fosters diversity and reduces bias by generating a broad spectrum of human figures, compared to DD 1.0 and DALL·E 3. The figure depicts the comparison of images related to bias generated by DALL·E 3, Dreamlike Diffusion 1.0, and Ours, which involves DD 1.0 augmented with Ethical-Lens protection. For each user command, every model generates four images. These images are compiled into a 2$\times$2 grid for presentation to the user.
  • Figure 5: Taxonomy of Value Alignment
  • ...and 9 more figures