Analysis of methods for constraining undesirable image generation in diffusion models


Analysis of methods for constraining undesirable image generation in diffusion models

Bubenkov I.I. (ISP RAS, Moscow, Russia; MSU, Moscow, Russia)
Bykov O.I. (ISP RAS, Moscow, Russia)
Matiushin D.A. (ISP RAS, Moscow, Russia; MIPT, Dolgoprudny, Moscow Region, Russia)

Abstract

Modern diffusion models are prone to generating unsafe content due to characteristics of the training data collected from open internet sources. Ensuring safe generation is a challenging task, as existing protection mechanisms vary in effectiveness and often lead to degradation of image quality. In addition, there is a lack of unified approaches for systematic evaluation that account for diverse unsafe scenarios, possible circumvention strategies, and the trade-off between safety and generation quality. In this work, we propose a benchmark for evaluating methods that prevent unsafe image generation in diffusion models. We perform a systematic comparison of protection methods applied at different stages of the generation pipeline, including prompt filtering, in-generation modification, and post-processing. The results show that no single method achieves optimal performance across all metrics for Stable Diffusion 1.5 and Stable Diffusion 2.1. The results highlight the inherent trade-off between safety and generation quality and can be used in the design and evaluation of robust real-world image generation systems.

Keywords

diffusion models; image generation; image safety; model evaluation; benchmark.

Edition

Proceedings of the Institute for System Programming, vol. 38, issue 6, part 2, 2026, pp. 163-186

ISSN 2220-6426 (Online), ISSN 2079-8156 (Print).

DOI: 10.15514/ISPRAS-2026-38(6)-31

For citation

Bubenkov I.I., Bykov O.I., Matiushin D.A. Analysis of methods for constraining undesirable image generation in diffusion models. Proceedings of the Institute for System Programming, vol. 38, issue 6, part 2, 2026, pp. 163-186 DOI: 10.15514/ISPRAS-2026-38(6)-31.

Full text of the paper in pdf (in Russian) Back to the contents of the volume