[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"detail-sidebar-cat-0-en-105":3,"doc-seo-157336-105":59,"doc-detail-157336-en":130},{"code":4,"msg":5,"data":6},0,"success",[7,13,18,23,28,33,38,43,48,51,55],{"id":8,"doc_module":4,"doc_module_name":9,"category_name":10,"show_sort_weight":11,"slug":12},1,"Document","Story & Novel",90,"story-novel",{"id":14,"doc_module":4,"doc_module_name":9,"category_name":15,"show_sort_weight":16,"slug":17},2,"Literature",80,"literature",{"id":19,"doc_module":4,"doc_module_name":9,"category_name":20,"show_sort_weight":21,"slug":22},4,"Exam",70,"exam",{"id":24,"doc_module":4,"doc_module_name":9,"category_name":25,"show_sort_weight":26,"slug":27},5,"Comic",60,"comic",{"id":29,"doc_module":4,"doc_module_name":9,"category_name":30,"show_sort_weight":31,"slug":32},6,"Technology",50,"technology",{"id":34,"doc_module":4,"doc_module_name":9,"category_name":35,"show_sort_weight":36,"slug":37},7,"Healthcare",40,"healthcare",{"id":39,"doc_module":4,"doc_module_name":9,"category_name":40,"show_sort_weight":41,"slug":42},8,"Research & Report",30,"research-report",{"id":44,"doc_module":4,"doc_module_name":9,"category_name":45,"show_sort_weight":46,"slug":47},9,"Religion & Spirituality",20,"religion-spirituality",{"id":46,"doc_module":4,"doc_module_name":9,"category_name":49,"show_sort_weight":46,"slug":50},"World Cup","world-cup",{"id":52,"doc_module":4,"doc_module_name":9,"category_name":53,"show_sort_weight":52,"slug":54},10,"Lifestyle","lifestyle",{"id":56,"doc_module":4,"doc_module_name":9,"category_name":57,"show_sort_weight":24,"slug":58},19,"General","general",{"code":4,"msg":60,"data":61},"ok",{"site_id":62,"language":63,"slug":64,"title":65,"keywords":66,"description":67,"schema_data":68,"social_meta":123,"head_meta":125,"extra_data":127,"updated_unix":129},105,"en","promptguard-soft-prompt-guided-unsafe-content-moderation-for-text-to-image-models-abstract","PromptGuard - Soft Prompt-Guided Unsafe Content Moderation for Text-to-Image Models - Abstract","","Text-to-image (T2I) models are vulnerable to misuse, especially for generating not-safe-for-work (NSFW) content, creating serious ethical and safety risks. The work introduces PromptGuard, a content moderation method inspired by system prompts in large language models, adapted to T2I where no direct behavioral interface exists. PromptGuard optimizes a universal safety soft prompt in the model’s textual embedding space to moderate NSFW inputs while preserving benign image realism. Experiments across three datasets show strong NSFW mitigation with minimal impact on safe output quality, including reported speed and defense improvements.",{"@graph":69,"@context":122},[70,84,105],{"@type":71,"itemListElement":72},"BreadcrumbList",[73,77,79,82],{"item":74,"name":75,"@type":76,"position":8},"https://docshare.wps.com","Home","ListItem",{"item":78,"name":9,"@type":76,"position":14},"https://docshare.wps.com/document/",{"item":80,"name":40,"@type":76,"position":81},"https://docshare.wps.com/document/research-report/",3,{"item":83,"name":65,"@type":76,"position":19},"https://docshare.wps.com/document/promptguard-soft-prompt-guided-unsafe-content-moderation-for-text-to-image-models-abstract/157336/",{"url":83,"name":65,"@type":85,"image":86,"author":91,"headline":65,"publisher":94,"fileFormat":97,"inLanguage":63,"description":67,"dateModified":98,"datePublished":99,"encodingFormat":97,"isAccessibleForFree":100,"interactionStatistic":101},"DigitalDocument",{"url":87,"@type":88,"width":89,"height":90},"https://docshare.wps.com/thumbnails/promptguard-soft-prompt-guided-unsafe-content-moderation-for-text-to-image-models-abstract/157336.png","ImageObject",300,407,{"name":92,"@type":93},"Aurora","Person",{"url":74,"name":95,"@type":96},"DocShare","Organization","application/pdf","2026-10-17","2026-08-29",true,{"@type":102,"interactionType":103,"userInteractionCount":39},"InteractionCounter",{"@type":104},"ViewAction",{"@type":106,"mainEntity":107},"FAQPage",[108,114,118],{"name":109,"@type":110,"acceptedAnswer":111},"What problem does PromptGuard address for text-to-image (T2I) models?","Question",{"text":112,"@type":113},"It addresses the misuse of T2I models to generate NSFW content, aiming to reduce unsafe outputs while keeping benign generation effective.","Answer",{"name":115,"@type":110,"acceptedAnswer":116},"How does PromptGuard work without modifying the T2I model architecture?",{"text":117,"@type":113},"It optimizes a universal safety soft prompt that acts like an implicit system prompt within the T2I model’s textual embedding space, guiding both benign and NSFW prompts away from unsafe regions.",{"name":119,"@type":110,"acceptedAnswer":120},"What evidence is provided that PromptGuard is effective?",{"text":121,"@type":113},"The abstract states extensive experiments on three datasets showing PromptGuard mitigates NSFW generation while preserving high-quality benign outputs, along with reported efficiency and defense-strength improvements.","https://schema.org",{"og:url":83,"og:type":124,"og:title":65,"og:site_name":95,"og:description":67},"article",{"robots":126,"canonical":83},"index,follow",{"doc_id":128,"site_id":62},157336,1787978736,{"code":4,"msg":5,"data":131},{"doc_id":128,"user_id":132,"nickname":92,"user_avatar":133,"doc_module":4,"category_id":39,"category_name":40,"doc_title":65,"doc_description":67,"doc_content":134,"file_id":135,"file_url":136,"file_type":137,"file_size":138,"view_count":39,"is_deleted":4,"is_public":8,"is_downloadable":8,"audit_status":8,"page_count":139,"language":140,"language_code":63,"site_id":62,"html_lang":63,"table_of_contents":141,"faqs":142,"seo_title":143,"seo_description":67,"update_tm":129,"read_time":36,"preview_page_count":14,"preview_urls":144},4810365810221,"https://ap-avatar.wpscdn.com/davatar_155a257f0dc6eb9ab79c44ca47cae57d","PromptGuard: Soft Prompt-Guided Unsafe Content Moderation for  \nText-to-Image Models  \narXiv :2501 .03544v 1 [ cs .CV] 7 Jan 2025  \nLingzhi Yuan 1 , *, Xinfeng Li2 ,5 ,∗ , Chejian Xu3 , Guanhong Tao4 , Xiaojun Jia2 , Yihao Huang2 , Wei Dong2 , Yang Liu2 , XiaoFeng Wang5 , Bo Li 1 ,3  \n1 University of Chicago, 2 Nanyang Technological University, 3 University of Illinois at Urbana–Champaign, 4 The University of Utah, 5 Indiana University Bloomington [lingzhiyxp@gmail.com](lingzhiyxp@gmail.com) , [lxfmakeit@gmail.com](lxfmakeit@gmail.com) , [lbo@illinois.edu](lbo@illinois.edu)  \n[https://prompt-guard.github.io](https://prompt-guard.github.io)  \nAbstract  \nText-to-image (T2I) models have been shown to be vulnerable to misuse, particularly in generating not-safe-for-work (NSFW) content, raising serious ethical concerns. In this work, we present PromptGuard, a novel content moderation technique that draws inspiration from the system prompt mechanism in large language models (LLMs) for safety alignment. Unlike LLMs, T2I models lack a direct interface for enforcing behavioral guidelines. Our key idea is to optimize a safety soft prompt that functions as an implicit system prompt within the T2I model’s textual embedding space. This universal soft prompt (P∗) directly moderates NSFW inputs, enabling safe yet realistic image generation without altering the inference efficiency or requiring proxy models. Extensive experiments across three datasets demonstrate that PromptGuard effectively mitigates NSFW content generation while preserving highquality benign outputs. PromptGuard achieves 7.8 times faster than prior content moderation methods, surpassing eight state-of-the-art defenses with an optimal unsafe ratio down to 5.84%.  \nWarnings: This paper contains NSFW imagery and discussions that some readers may find disturbing, distressing, and/or offensive.  \n1. Introduction  \nText-to-image (T2I) models, such as Stable Diffusion [26], have marked a transformative leap in generative AI, enabling highly realistic and creative images based solely on textual prompts. However, the misuse ofT2I models to generate not-safe-for-work (NSFW) content, such as sexual, violent, political, and disturbing images, has raised significant  \n*co-first authors; Work done during Lingzhi’s internship at the University of Chicago.  \nFigure 1 . Unlike existing moderation frameworks that rely on additional models to check or detoxify NSFW content, PromptGuard presents an efficient, universal soft prompt, P∗ , inspired by the system prompt mechanism in LLMs, to directly moderates NSFW inputs and generate safe yet realistic content.  \nethical concerns [12, 16, 41, 45] . The Internet Watch Foundation reports that thousands of AI-generated child sexual abuse images are shared on the dark web [29] . Besides, misleading political images and racially biased content have been frequently disseminated on social media, which may incite people’s emotions and even influence elections and social stability [32] . To prevent such misuse, there is an urgent demand for T2I service providers to adopt effective defense mechanisms.  \nCurrent safeguards against NSFW content generation can be typically classified into two categories: model alignment and content moderation. Model alignment directly modifies the T2I model, aiming to remove learned NSFW textual concepts [10, 11] or visual representations [22, 34] from the model by fine-tuning or retraining its parameters [5, 18] . While effective, these methods might reduce the model’s capability to generate non-offensive, intended imagery [34, 50] . On the other hand, content moderation often uses proxy models that inspect unsafe textual inputs [20] or visual outputs [27] during generation or employs a prompt modifier [46] that utilizes aligned large lan-  \nguage models (LLMs) to rephrase input prompts for safer image creation. Although these methods avoids the risk of unintended removal of benign concepts as in model alignment, their relia","cbCaid4J8tXfBvbz","https://ap.wps.com/l/cbCaid4J8tXfBvbz","pdf",21891807,16,"English","# Introduction\n## Motivation and misuse risks for T2I models\n## Existing defenses: model alignment vs content moderation\n## PromptGuard overview and key idea\n# Challenges and research questions\n## Enabling safety guidance without model modification\n## Achieving universal moderation across NSFW categories\n# Method direction (soft prompt design)","[{\"question\":\"What problem does PromptGuard address for text-to-image (T2I) models?\",\"answer\":\"It addresses the misuse of T2I models to generate NSFW content, aiming to reduce unsafe outputs while keeping benign generation effective.\"},{\"question\":\"How does PromptGuard work without modifying the T2I model architecture?\",\"answer\":\"It optimizes a universal safety soft prompt that acts like an implicit system prompt within the T2I model’s textual embedding space, guiding both benign and NSFW prompts away from unsafe regions.\"},{\"question\":\"What evidence is provided that PromptGuard is effective?\",\"answer\":\"The abstract states extensive experiments on three datasets showing PromptGuard mitigates NSFW generation while preserving high-quality benign outputs, along with reported efficiency and defense-strength improvements.\"}]","PromptGuard - Soft Prompt-Guided Unsafe Content Moderation for Text-to-Image Models - Abstract | PDF",[145,149],{"page_no":8,"url":146,"width":147,"height":148},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-07/5e519e93e849c156985e768a119dfe49.webp",983,1272,{"page_no":14,"url":150,"width":151,"height":152},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-07/4d19d730778cea73597e9c4498a94fdf.webp",982,1270]