arXiv Computation and Language
Oct 28

DYNASHIELD: A Black-Box Moving Target Defense for LLMs via Dynamic Decoding Customization

The paper introduces DYNASHIELD, a black-box moving target defense for large language models that dynamically customizes decoding hyperparameters and system prompts during inference. It first identifies decoding configurations that lower the probability of successful jailbreak attacks, then samples from a weighted pool of these configurations to add controlled variability to the model’s behavior. Experiments on seven open-source LLMs and four state-of-the-art jailbreak attacks show that DYNASHIELD significantly reduces attack success rates while preserving response quality and adding minimal inference overhead.

By Xiaoqun Liu, Weiming Qi, Qiben Yan