Overall, the results show that LLMs can produce competitive defense policies without fine-tuning but require manually engineered prompts, and their higher variance and slower response times could render them unsuitable for some real-world scenarios.
Pretrained programming language models (PLMs) have shown strong performance in software engineering tasks, but remain vulnerable to adversarial attacks. Traditional methods rely on narrow, static perturbation strategies, leading to poor diversity and a combinatorial explosion of the search space when multiple operations are applied. To address these limitations, we propose CodeRL-IA, an adversarial attack method that integrates reinforcement learning and importance analysis to dynamically optimize semantics-preserving perturbation strategies, achieving high attack effectiveness while maintaining code quality. Extensive experiments on code summarization, code translation, and defect detection tasks demonstrate that CodeRL-IA outperforms the baselines, with average attack success rates of 9.8% and 14.87% higher than those of the baseline methods, while keeping comparable code quality.
Lulu Wang, Xiaoyi Wang, Xiaoning Du et al.· IEEE Transactions on Reliabi...· 0 citations
GPT-Red, an automated red-teaming agent that is trained to discover novel prompt injection attacks against frontier LLMs, is introduced, a scalable self-play algorithm where the model is tasked with attacking a diverse population of simultaneously-trained defender agents.
Eric Wallace, Christopher A. Choquette-Choo, Nikhil Kandpal et al.· 1 citation
RLShield is a dynamic jailbreak detection framework that employs reinforcement learning for adaptive threshold selection and incorporates three key innovations: a dynamic retrieval and LLM-based rewriting module to simulate diverse adversarial contexts; a cross-layer representation analysis to pinpoint safety-critical parameters; and a Soft Actor-Critic based agent that learns to predict optimal, sample-specific detection thresholds.
Zhao Tong, Pengfei Yang, Yimeng Gu et al.· Annual Meeting of the Associ...· 0 citations
Empirical evaluations reveal a fundamental brittleness in existing defenses: with a single trainable 7B planner, Trident reduces blue agent defensive performance by an average of 522% compared to static red agent baselines while autonomously discovering emergent behaviors such as decoy avoidance and adaptive state prioritization that static heuristics entirely fail to uncover.
Ryozo Masukawa, Ian Bryant, Armita Kazeminajafabadi et al.· 0 citations
This work introduces Trace, a multi-turn defense with trajectory-aware structured reasoning that balances usability and safety, and trains Llama-3.1-8B-Instruct with SFT and GRPO under a multi-component reward that jointly optimizes helpfulness on benign prompts and robustness against jailbreak attempts.