RoCoIns: Enhancing Robustness of Large Language Models through Code-Style Instructions
Not on the map. Why?
Abstract (arXiv)
Large Language Models (LLMs) have showcased remarkable capabilities in following human instructions. However, recent studies have raised concerns about the robustness of LLMs when prompted with instructions combining textual adversarial samples. In this paper, drawing inspiration from recent works that LLMs are sensitive to the design of the instructions, we utilize instructions in code style, which are more structural and less ambiguous, to replace typically natural language instructions. Through this conversion, we provide LLMs with more precise instructions and strengthen the robustness of LLMs. Moreover, under few-shot scenarios, we propose a novel method to compose in-context demonstrations using both clean and adversarial samples (textitadversarial context method) to further boost the robustness of the LLMs. Experiments on eight robustness datasets show that our method consistently outperforms prompting LLMs with natural language instructions. For example, with gpt-3.5-turbo, our method achieves an improvement of 5.68% in test set accuracy and a reduction of 5.66 points in Attack Success Rate (ASR).
Key facts. Cited by 2 papers in the map (data through 14 Oct 2026). Builds on 53 of its 84 references that are in the map. First posted on arXiv 26 Feb 2024.
Builds on
53 of 84 references.
References · 53
- 2020Language Models are Few-Shot Learnerscited by 32,419
- 2022Training language models to follow instructions with human feedbackcited by 15,971
- 2019Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformercited by 14,599
- 2021Evaluating Large Language Models Trained on Codecited by 8,320
- 2017Towards Deep Learning Models Resistant to Adversarial Attackscited by 6,415
- 2022PaLM: Scaling Language Modeling with Pathwayscited by 5,326
- 2018GLUE: A Multi-Task Benchmark and Analysis Platform for Natural Language Understandingcited by 4,899
- 2016SQuAD: 100,000+ Questions for Machine Comprehension of Textcited by 4,148
- 2023Universal and Transferable Adversarial Attacks on Aligned Language Modelscited by 3,104
- 2021TruthfulQA: Measuring How Models Mimic Human Falsehoodscited by 2,975
- 2017A Broad-Coverage Challenge Corpus for Sentence Understanding through Inferencecited by 2,682
- 2022BLOOM: A 176B-Parameter Open-Access Multilingual Language Modelcited by 1,984
38 more
- 2021Multitask Prompted Training Enables Zero-Shot Task Generalizationcited by 1,470
- 2023The Rise and Potential of Large Language Model Based Agents: A Surveycited by 1,439
- 2021Calibrate Before Use: Improving Few-Shot Performance of Language Modelscited by 1,392
- 2019Certified Adversarial Robustness via Randomized Smoothingcited by 1,340
- 2020Making Pre-trained Language Models Better Few-shot Learnerscited by 1,256
- 2021Scaling Language Models: Methods, Analysis & Insights from Training Gophercited by 1,202
- 2017BadNets: Identifying Vulnerabilities in the Machine Learning Model Supply Chaincited by 1,106
- 2019Adversarial Examples Are Not Bugs, They Are Featurescited by 953
- 2021An Explanation of In-context Learning as Implicit Bayesian Inferencecited by 938
- 2021CodeT5: Identifier-aware Unified Pre-trained Encoder-Decoder Models for Code Understanding and Generationcited by 906
- 2022CodeGen: An Open Large Language Model for Code with Multi-Turn Program Synthesiscited by 885
- 2022Transformers learn in-context by gradient descentcited by 732
- 2020Pre-trained Models for Natural Language Processing: A Surveycited by 505
- 2018TextBugger: Generating Adversarial Text Against Real-world Applicationscited by 381
- 2018Black-box Generation of Adversarial Text Sequences to Evade Deep Learning Classifierscited by 345
- 2023Orthogonal Subspace Learning for Language Model Continual Learningcited by 312
- 2019FreeLB: Enhanced Adversarial Training for Natural Language Understandingcited by 264
- 2021Surface Form Competition: Why the Highest Probability Answer Isn't Always Rightcited by 263
- 2019SMART: Robust and Efficient Fine-Tuning for Pre-trained Natural Language Models through Principled Regularized Optimizationcited by 254
- 2023A Comprehensive Capability Analysis of GPT-3 and GPT-3.5 Series Modelscited by 246
- 2021Adversarial GLUE: A Multi-Task Benchmark for Robustness Evaluation of Language Modelscited by 232
- 2022Binding Language Models in Symbolic Languagescited by 228
- 2023PromptRobust: Towards Evaluating the Robustness of Large Language Models on Adversarial Promptscited by 226
- 2023Transformers as Algorithms: Generalization and Stability in In-context Learningcited by 222
- 2023On the Robustness of ChatGPT: An Adversarial and Out-of-distribution Perspectivecited by 211
- 2022Why Can GPT Learn In-Context? Language Models Implicitly Perform Gradient Descent as Meta-Optimizerscited by 204
- 2022Leveraging Large Language Models for Multiple Choice Question Answeringcited by 203
- 2015Visualizing and Understanding Neural Models in NLPcited by 200
- 2023InstructUIE: Multi-task Instruction Tuning for Unified Information Extractioncited by 170
- 2021Noisy Channel Language Model Prompting for Few-Shot Text Classificationcited by 165
- 2022Language Models of Code are Few-Shot Commonsense Learnerscited by 160
- 2021Post-hoc Interpretability for Neural NLP: A Surveycited by 156
- 2022Ask Me Anything: A simple strategy for prompting language modelscited by 155
- 2023CodeIE: Large Code Generation Models are Better Few-Shot Information Extractorscited by 68
- 2023How Robust is GPT-3.5 to Predecessors? A Comprehensive Study on Language Understanding Taskscited by 58
- 2020Frequency-Guided Word Substitutions for Detecting Textual Adversarial Examplescited by 54
- 2018Training verified learners with learned verifierscited by 50
- 2020Tasty Burgers, Soggy Fries: Probing Aspect Robustness in Aspect-Based Sentiment Analysiscited by 23
50 most cited of 53 All 53 (JSON)
Built on by
Citing papers per year: 2024: 1; 2025: 1.
2 papers.