CRAICLOct 25, 2024

RobustKV: Defending Large Language Models against Jailbreak Attacks via KV Eviction

arXiv:2410.19937v127 citationsh-index: 11ICLR
Originality Highly original
AI Analysis

This addresses security vulnerabilities in LLMs for users and developers, offering a novel defense mechanism against adaptive jailbreak attacks.

The paper tackles the problem of jailbreak attacks on large language models by introducing RobustKV, a defense that selectively removes low-importance tokens from key-value caches to prevent malicious responses, achieving effective countermeasures against state-of-the-art attacks while maintaining general performance on benign queries.

Jailbreak attacks circumvent LLMs' built-in safeguards by concealing harmful queries within jailbreak prompts. While existing defenses primarily focus on mitigating the effects of jailbreak prompts, they often prove inadequate as jailbreak prompts can take arbitrary, adaptive forms. This paper presents RobustKV, a novel defense that adopts a fundamentally different approach by selectively removing critical tokens of harmful queries from key-value (KV) caches. Intuitively, for a jailbreak prompt to be effective, its tokens must achieve sufficient `importance' (as measured by attention scores), which inevitably lowers the importance of tokens in the concealed harmful query. Thus, by strategically evicting the KVs of the lowest-ranked tokens, RobustKV diminishes the presence of the harmful query in the KV cache, thus preventing the LLM from generating malicious responses. Extensive evaluation using benchmark datasets and models demonstrates that RobustKV effectively counters state-of-the-art jailbreak attacks while maintaining the LLM's general performance on benign queries. Moreover, RobustKV creates an intriguing evasiveness dilemma for adversaries, forcing them to balance between evading RobustKV and bypassing the LLM's built-in safeguards. This trade-off contributes to RobustKV's robustness against adaptive attacks. (warning: this paper contains potentially harmful content generated by LLMs.)

Foundations

The foundational work for this paper's niche, ranked by how specifically the neighbourhood builds on it — not by global fame.

Your Notes