arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2404.08031cs.CVcs.AIcs.LG

Latent Guard:一种面向文本生成图像的安全框架

Latent Guard: a Safety Framework for Text-to-image Generation

Hong Kong University of Science and Technology(香港科技大学);University of Oxford(牛津大学)

Runtao Liu, Ashkan Khakzar, Jindong Gu, Qifeng Chen, Philip Torr, Fabio Pizzati

AI总结:

针对文本生成图像模型易被滥用生成不当内容、现有安全方案存在易绕过或灵活性低的问题,提出Latent Guard框架,通过在文本编码器上学习潜在空间检测有害概念,结合专属数据生成与对比学习,在3个数据集上优于4个基线方法。

摘要:

凭借生成高质量图像的能力,文本生成图像(T2I)模型可能被滥用于生成不当内容。为防范滥用,现有安全措施要么基于文本黑名单(易被绕过),要么依赖有害内容分类(需大量训练数据且灵活性低)。为此,我们提出Latent Guard,一款旨在提升文本生成图像安全防护能力的框架。受基于黑名单的方法启发,Latent Guard在T2I模型的文本编码器之上学习一个潜在空间,可在该空间中检查输入文本嵌入是否包含有害概念。该框架由三部分构成:利用大语言模型构建的任务专属数据生成流水线、特制架构组件,以及可充分利用生成数据的对比学习策略。我们在3个数据集上与4个基线方法对比,验证了方法的有效性。代码与数据将发布于https://latentguard.github.io/。

英文摘要:

With the ability to generate high-quality images, text-to-image (T2I) models can be exploited for creating inappropriate content. To prevent misuse, existing safety measures are either based on text blacklists, which can be easily circumvented, or harmful content classification, requiring large datasets for training and offering low flexibility. Hence, we propose Latent Guard, a framework designed to improve safety measures in text-to-image generation. Inspired by blacklist-based approaches, Latent Guard learns a latent space on top of the T2I model's text encoder, where it is possible to check the presence of harmful concepts in the input text embeddings. Our proposed framework is composed of a data generation pipeline specific to the task using large language models, ad-hoc architectural components, and a contrastive learning strategy to benefit from the generated data. The effectiveness of our method is verified on three datasets and against four baselines. Code and data will be shared at https://latentguard.github.io/.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑