Gradient Co-occurrence Analysis for Detecting Unsafe Prompts in Large Language Models
College of Intelligence and Computing, Tianjin University(天津大学智能与计算学部);IT Innovation and Research Center, Huawei Technologies(华为技术有限公司IT创新研究中心);Artificial Intelligence Academy, Beijing University of Posts and Telecommunications(北京邮电大学人工智能学院)
Unsafe prompts pose significant safety risks to large language models (LLMs). Existing methods for detecting unsafe prompts rely on data-driven fine-tuning to train guardrail models, necessitating significant data and computational resources. In contrast, recent few-shot gradient-based methods emerge, requiring only few safe and unsafe reference prompts. A gradient-based approach identifies unsafe prompts by analyzing consistent patterns of the gradients of safety-critical parameters in LLMs. Although effective, its restriction to directional similarity (cosine similarity) introduces ``directional bias'', limiting its capability to identify unsafe prompts. To overcome this limitation, we introduce GradCoo, a novel gradient co-occurrence analysis method that expands the scope of safety-critical parameter identification to include unsigned gradient similarity, thereby reducing the impact of ``directional bias'' and enhancing the accuracy of unsafe prompt detection. Comprehensive experiments on the widely-used benchmark datasets ToxicChat and XStest demonstrate that our proposed method can achieve state-of-the-art (SOTA) performance compared to existing methods. Moreover, we confirm the generalizability of GradCoo in detecting unsafe prompts across a range of LLM base models with various sizes and origins.
NCL-UoR at SemEval-2025 Task 3: Detecting Multilingual Hallucination and Related Observable Overgeneration Text Spans with Modified RefChecker and Modified SeflCheckGPT
School of Computing, Newcastle University(新萨勒姆大学计算机学院);Department of Computer Science, University of Reading(阅读大学计算机科学系);Previously at School of Computing, Newcastle University(新萨勒姆大学计算机学院)
SafeDialBench: A Fine-Grained Safety Evaluation Benchmark for Large Language Models in Multi-Turn Dialogues with Diverse Jailbreak Attacks
National Key Laboratory for Novel Software Technology, Nanjing University(南京大学新型软件技术国家重点实验室);University of Liverpool(利物浦大学);City University of Hong Kong(香港城市大学);School of Intelligence Science and Technology, Nanjing University(南京大学智能科学与技术学院);China Mobile Research Institute(中国移动研究院);China Mobile (Suzhou) Software Technology Co., Ltd(中国移动苏州软件技术有限公司)
University of California, Irvine(加利福尼亚大学欧文分校);University of Southern California(南加州大学);Carnegie Mellon University(卡内基梅隆大学);Stevens Institute of Technology(史蒂文斯理工学院);TensorOpera Inc.(TensorOpera公司)
本文提出复合 AI 系统 TorchOpera,通过向量数据库、规则包装器及不安全内容检测调整机制,在保证响应效率的同时提升 LLM 提示与响应的安全、可靠和实用性。