Skip to content

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

arXiv· arXiv:2311.17400· NDSS 2024· Lujia Shen, Yuwen Pu, Shouling Ji, Changjiang Li, Xuhong Zhang, Chunpeng Ge, Ting Wang·Indexed by this site · 25 days ago· Originally publishedDefenses
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.

Read originalNDSS 2024