mlsanityData to 14 Oct 2026

RoCoIns: Enhancing Robustness of Large Language Models through Code-Style Instructions

arXiv 2402.16431 ↗First posted 26 Feb 2024cs.CLcited by 2

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

  1. 2020Language Models are Few-Shot Learnerscited by 32,419
  2. 2022Training language models to follow instructions with human feedbackcited by 15,971
  3. 2019Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformercited by 14,599
  4. 2021Evaluating Large Language Models Trained on Codecited by 8,320
  5. 2017Towards Deep Learning Models Resistant to Adversarial Attackscited by 6,415
  6. 2022PaLM: Scaling Language Modeling with Pathwayscited by 5,326
  7. 2018GLUE: A Multi-Task Benchmark and Analysis Platform for Natural Language Understandingcited by 4,899
  8. 2016SQuAD: 100,000+ Questions for Machine Comprehension of Textcited by 4,148
  9. 2023Universal and Transferable Adversarial Attacks on Aligned Language Modelscited by 3,104
  10. 2021TruthfulQA: Measuring How Models Mimic Human Falsehoodscited by 2,975
  11. 2017A Broad-Coverage Challenge Corpus for Sentence Understanding through Inferencecited by 2,682
  12. 2022BLOOM: A 176B-Parameter Open-Access Multilingual Language Modelcited by 1,984
38 more
  1. 2021Multitask Prompted Training Enables Zero-Shot Task Generalizationcited by 1,470
  2. 2023The Rise and Potential of Large Language Model Based Agents: A Surveycited by 1,439
  3. 2021Calibrate Before Use: Improving Few-Shot Performance of Language Modelscited by 1,392
  4. 2019Certified Adversarial Robustness via Randomized Smoothingcited by 1,340
  5. 2020Making Pre-trained Language Models Better Few-shot Learnerscited by 1,256
  6. 2021Scaling Language Models: Methods, Analysis & Insights from Training Gophercited by 1,202
  7. 2017BadNets: Identifying Vulnerabilities in the Machine Learning Model Supply Chaincited by 1,106
  8. 2019Adversarial Examples Are Not Bugs, They Are Featurescited by 953
  9. 2021An Explanation of In-context Learning as Implicit Bayesian Inferencecited by 938
  10. 2021CodeT5: Identifier-aware Unified Pre-trained Encoder-Decoder Models for Code Understanding and Generationcited by 906
  11. 2022CodeGen: An Open Large Language Model for Code with Multi-Turn Program Synthesiscited by 885
  12. 2022Transformers learn in-context by gradient descentcited by 732
  13. 2020Pre-trained Models for Natural Language Processing: A Surveycited by 505
  14. 2018TextBugger: Generating Adversarial Text Against Real-world Applicationscited by 381
  15. 2018Black-box Generation of Adversarial Text Sequences to Evade Deep Learning Classifierscited by 345
  16. 2023Orthogonal Subspace Learning for Language Model Continual Learningcited by 312
  17. 2019FreeLB: Enhanced Adversarial Training for Natural Language Understandingcited by 264
  18. 2021Surface Form Competition: Why the Highest Probability Answer Isn't Always Rightcited by 263
  19. 2019SMART: Robust and Efficient Fine-Tuning for Pre-trained Natural Language Models through Principled Regularized Optimizationcited by 254
  20. 2023A Comprehensive Capability Analysis of GPT-3 and GPT-3.5 Series Modelscited by 246
  21. 2021Adversarial GLUE: A Multi-Task Benchmark for Robustness Evaluation of Language Modelscited by 232
  22. 2022Binding Language Models in Symbolic Languagescited by 228
  23. 2023PromptRobust: Towards Evaluating the Robustness of Large Language Models on Adversarial Promptscited by 226
  24. 2023Transformers as Algorithms: Generalization and Stability in In-context Learningcited by 222
  25. 2023On the Robustness of ChatGPT: An Adversarial and Out-of-distribution Perspectivecited by 211
  26. 2022Why Can GPT Learn In-Context? Language Models Implicitly Perform Gradient Descent as Meta-Optimizerscited by 204
  27. 2022Leveraging Large Language Models for Multiple Choice Question Answeringcited by 203
  28. 2015Visualizing and Understanding Neural Models in NLPcited by 200
  29. 2023InstructUIE: Multi-task Instruction Tuning for Unified Information Extractioncited by 170
  30. 2021Noisy Channel Language Model Prompting for Few-Shot Text Classificationcited by 165
  31. 2022Language Models of Code are Few-Shot Commonsense Learnerscited by 160
  32. 2021Post-hoc Interpretability for Neural NLP: A Surveycited by 156
  33. 2022Ask Me Anything: A simple strategy for prompting language modelscited by 155
  34. 2023CodeIE: Large Code Generation Models are Better Few-Shot Information Extractorscited by 68
  35. 2023How Robust is GPT-3.5 to Predecessors? A Comprehensive Study on Language Understanding Taskscited by 58
  36. 2020Frequency-Guided Word Substitutions for Detecting Textual Adversarial Examplescited by 54
  37. 2018Training verified learners with learned verifierscited by 50
  38. 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

Cited by year

Citing papers per year: 2024: 1; 2025: 1.

2 papers.