一种基于隐状态空间激活的免训练安全检测方法
A Training-Free Security Detection Method Based on Hidden State Space Activation
摘要
Abstract
Large Language Models(LLMs)are transforming the paradigm of human-computer interaction,but these systems are also facing increasingly serious and evolving threats from jailbreak attacks.Existing defense solutions pre-dominantly rely on computationally expensive security-oriented fine-tuning strategies or external interception mecha-nisms with limited generalization capability,making it difficult to thoroughly and systematically characterize the intrin-sic geometric evolution patterns within the model's internal hidden state space.To address these limitations,this study proposes a novel,training-free security detection method based on Hidden State Space Activation(TSSA).First,TSSA demonstrates that security and risk queries follow a highly separable statistical distribution pattern in the model's deep activation manifold,providing a theoretical foundation for constructing an intrinsic security defense mechanism.Sec-ond,through a key-segment-aware adaptive selection strategy,the most discriminative neural layer for security seman-tics is precisely identified.Furthermore,a security direction vector calibration algorithm is developed,utilizing a Maha-lanobis distance-based metric to eliminate feature-space anisotropy,thereby extracting the optimal discriminative direc-tion.Finally,an adaptive threshold calibration strategy is introduced to dynamically establish the decision boundary by quantitatively measuring the query conflict intensity,achieving robust and precise detection of deep semantic spoofing attacks.Experimental results on mainstream models such as DeepSeek-R1 and Qwen2.5 demonstrate that TSSA substan-tially enhances the defense success rate and cross-model generalization ability without introducing significant inference latency,providing a new perspective for understanding the internal security boundary of large models and enabling the development of a lightweight,real-time defense framework.关键词
大型语言模型/越狱攻击/隐状态空间激活/马哈拉诺比斯距离/免训练检测Key words
large language models/jailbreaking attack/hidden state space activation/Mahalanobis distance/training-free detection分类
信息技术与安全科学引用本文复制引用
龚鑫荣,林宇轩,施一帆,朱建清,陈婧,曾焕强..一种基于隐状态空间激活的免训练安全检测方法[J].信号处理,2026,42(8):1289-1301,13.基金项目
国家重点研发计划(2026YFE0202200) (2026YFE0202200)
国家自然科学基金(62506136,62306122) (62506136,62306122)
厦门市自然科学基金项目(3502Z202571034) (3502Z202571034)
福建省自然科学基金项目(2025J01180,2023J02022) (2025J01180,2023J02022)
福建省揭榜挂帅项目(2024HZ022007) (2024HZ022007)
厦门市揭榜挂帅项目(3502Z20251011) (3502Z20251011)
泉州市引进高层次人才团队项目(2023CT001) National Key Research and Development Program of China(2026YFE0202200) (2023CT001)
The National Natural Science Foundation of China(62506136,62306122) (62506136,62306122)
Natural Science Foundation of Xiamen(3502Z202571034) (3502Z202571034)
Natural Science Foundation of Fujian Province(2025J01180,2023J02022) (2025J01180,2023J02022)
Open List and Leader Appointment Project of Fujian Province(2024HZ022007) (2024HZ022007)
The Key Science and Technology Project of Xiamen City(3502Z20251011) (3502Z20251011)
High-level Talent Team Project of Quanzhou City(2023CT001) (2023CT001)