Author

Xingcheng Xu

1 paper indexed here

Fetches their full publication history.

Not the right person? Other researchers publish under this name.

Conference Open access 2026

RLShield: Dynamic Jailbreak Detection for LLMs via Reinforced Adaptive Learning

While prompt engineering enhances the capabilities of Large Language Models (LLMs), it also exposes critical safety concerns. Due to the inherent brittleness of their static safety boundaries, LLMs are vulnerable to jailbreak prompts , i.e. adversarial inputs designed to by-pass safeguards and induce the generation of harmful content. Existing detection mechanisms rely on static model components or fixed decision thresholds, limiting their ability to generalize to evolving attack patterns and continual model updates. To bridge this gap, we propose RLShield , a dynamic jailbreak detection framework that employs reinforcement learning for adaptive threshold selection. RLShield incorporates three key innovations: ( i ) a dynamic retrieval and LLM-based rewriting module to simulate diverse adversarial contexts; ( ii ) a cross-layer representation analysis to pinpoint safety-critical parameters; and ( iii ) a Soft Actor-Critic (SAC) based agent that learns to predict optimal, sample-specific detection thresholds. Experimental results demonstrate that RLShield consistently outperforms state-of-the-art base-lines in detection performance while maintaining high computational efficiency. Notably, it improves F1 by up to 7.3%, while achieving an average of 3 × gain in inference efficiency across multiple LLM backbones. Our codes are available at this website.

Zhao Tong, Pengfei Yang, Yimeng Gu et al. · 0 citations