AnchorKV: Safety-Aware KV Cache Compression with Refusal Anchor
AnchorKV introduces a soft penalty mechanism to bias KV cache token retention away from harmful prompt directions. It uses a layer-specific key projection space anchor derived from representation engineering to improve safety alignment without sacrificing much utility, offering a drop-in solution that enhances defense against jailbreak attacks.