Skip to content

RoCoIns: Enhancing large language model robustness through code-style instructionsRoCoIns: Enhancing Robustness of Large Language Models through Code-Style Instructions

arXiv· arXiv:2402.16431· LREC 2024· Yuansen Zhang, Xiao Wang, Zhiheng Xi, Han Xia, Tao Gui, Qi Zhang, Xuanjing Huang·Indexed by this site · 23 days ago· Originally publishedDefenses
AI summary

RoCoIns replaces natural language instructions with more structured, less ambiguous code-style instructions to enhance the robustness of large language models to textual adversarial examples; in few-shot settings, it also proposes an adversarial context method that mixes clean and adversarial examples to construct demonstrations. On 8 robustness datasets, the method outperformed natural language instructions, improving test set accuracy by 5.68% and reducing attack success rate (ASR) by 5.66 percentage points on gpt-3.5-turbo.

Read originalLREC 2024