在先进扩散模型与大规模网络爬取数据集的推动下,文本到图像模型近期在生成逼真且语义连贯的图像方面取得了显著进展。但这些数据集通常包含不当或有偏见的内容,引发了人们对输入恶意文本提示时会生成有害输出的担忧。我们提出了安全文本嵌入引导(Safe Text embedding Guidance,STG),这是一种免训练方法,通过在采样过程中引导文本嵌入来提升扩散模型的安全性。STG 基于对预期最终去噪图像评估的安全函数调整文本嵌入,无需额外训练即可让模型生成更安全的输出。理论上,我们证明 STG 使底层模型分布与安全约束对齐,从而在最小化影响生成质量的同时实现更安全的输出。在裸露、暴力、艺术家风格移除等多种安全场景下的实验表明,STG 在移除不安全内容、保留输入提示核心语义意图方面,效果始终优于基于训练和免训练的基线方法。我们的代码可在 https://github.com/aailab-kaist/STG 获取。
英文摘要:
Text-to-image models have recently made significant advances in generating realistic and semantically coherent images, driven by advanced diffusion models and large-scale web-crawled datasets. However, these datasets often contain inappropriate or biased content, raising concerns about the generation of harmful outputs when provided with malicious text prompts. We propose Safe Text embedding Guidance (STG), a training-free approach to improve the safety of diffusion models by guiding the text embeddings during sampling. STG adjusts the text embeddings based on a safety function evaluated on the expected final denoised image, allowing the model to generate safer outputs without additional training. Theoretically, we show that STG aligns the underlying model distribution with safety constraints, thereby achieving safer outputs while minimally affecting generation quality. Experiments on various safety scenarios, including nudity, violence, and artist-style removal, show that STG consistently outperforms both training-based and training-free baselines in removing unsafe content while preserving the core semantic intent of input prompts. Our code is available at https://github.com/aailab-kaist/STG.
LD-Scene: LLM-Guided Diffusion for Controllable Generation of Adversarial Safety-Critical Driving Scenarios
The Hong Kong University of Science and Technology (Guangzhou)(香港科技大学(广州));School of Computer Science and Engineering, Sun Yat-sen University(中山大学计算机科学与工程学院)
Beyond Token-Level Guidance: Inference-Time Alignment of Specialized LLMs via Cross-Family Representation Steering
College of Computing and Data Science, Nanyang Technological University(南洋理工大学计算与数据科学学院);College of Cryptology and Cyber Science, Nankai University(南开大学密码与网络科学学院)
Safety-Regulated Transfer Reinforcement Learning with Adaptive Teacher Guidance
State Key Laboratory of Advanced Design and Manufacturing Technology for Vehicle, College of Mechanical and Vehicle Engineering, Hunan University(湖南大学机械与运载工程学院,先进设计与制造技术国家重点实验室);Key Laboratory of Intelligent Air-Ground Cooperative Control for Universities in Chongqing, School of Automation, Chongqing University of Posts and Telecommunications(重庆邮电大学自动化学院,重庆市高校智能空地协同控制重点实验室);School of Traffic and Transportation Engineering, Central South University(中南大学交通运输工程学院)
Transferable Reinforcement Learning via Probabilistic Latent Embeddings and Dynamic Policy Adaptation for Sim-to-Real Deployment
Lyles School of Civil and Construction Engineering, Purdue University, West Lafayette, USA(普渡大学土木与建设工程学院);Elmore Family School of Electrical and Computer Engineering, Purdue University, West Lafayette, USA(普渡大学埃尔莫尔家庭电气与计算机工程学院)
Towards Explainable, Safe Autonomous Driving with Language Embeddings for Novelty Identification and Active Learning: Framework and Experimental Analysis with Real-World Data Sets
University of California San Diego(加利福尼亚大学圣迭戈分校);Laboratory for Intelligent and Safe Automobiles(智能与安全汽车实验室)
Jailbreaking LLMs' Safeguard with Universal Magic Words for Text Embedding Models
Dept. of Comp. Sci. and Tech., Inst. for AI, Tsinghua-Bosch Joint ML Center, THBI Lab, BNRist Center, Tsinghua University, Beijing, 100084, China(计算机科学与技术系、人工智能研究所、清华-博世联合机器学习中心、THBI实验室、BNRist中心、清华大学、北京);Department of Mathematical Sciences, Tsinghua University(数学科学系、清华大学);BIMSA, Beijing, China(BIMSA、北京、中国)
Embedding Poisoning: Bypassing Safety Alignment via Embedding Semantic Shift
University of Electronic Science and Technology of China(电子科技大学);Huazhong University of Science and Technology(华中科技大学);The University of Queensland(昆士兰大学)
I Can't Believe It's Not Robust: Catastrophic Collapse of Safety Classifiers under Embedding Drift
Independent(独立研究者);Meta AI;AWS Generative AI Innovation Center, Amazon Web Services(AWS生成式AI创新中心,亚马逊网络服务);Northeastern University, Seattle, WA, USA(东北大学,西雅图,华盛顿州,美国);Stanford University(斯坦福大学)
Embedding Safety into RL: A New Take on Trust Region Methods
Max Planck Institute for Human Cognitive and Brain Sciences(马克斯·普朗克人类认知与脑科学研究所);Center for Scalable Data Analytics and Artificial Intelligence(可扩展数据分析与人工智能中心)
Reflex-Guard: A Low-Latency Guardrail for LLM Prompt Safety Using Dense Semantic Embeddings
Graduate School of Informatics, Osaka Metropolitan University(大阪公立大学情报学研究科);BRAC University(BRAC大学);Bangladesh University of Engineering and Technology (BUET)(孟加拉工程技术大学);New Mexico State University(新墨西哥州立大学)