Dynamic Attention Improves the Robustness of Transformer Large Language Models Against Textual Adversarial AttacksImproving the Robustness of Transformer-based Large Language Models with Dynamic Attention
AI summary
Propose dynamic attention for Transformer architectures to enhance the robustness of large language models themselves against textual adversarial attacks. The method contains two modules, attention correction and dynamic modeling; the former masks or weakens the attention values of selected tokens, and the latter dynamically constructs a candidate token set, requiring no downstream task knowledge and incurring no additional overhead. Experiments show that its effectiveness against common adversarial attacks is up to 33% higher than existing methods, and it can be stacked with other defenses.