Using Natural Language Explanations to Improve Robustness of In-context Learning

Xuanli He, Yuxiang Wu, Oana-Maria Camburu, Pasquale Minervini, Pontus Stenetorp
11/13/2023
cs.CL

No official code found. Best implementation: xlhex/acl2024_xicl (3 stars, last commit 2024-10-16).

Abstract

Recent studies demonstrated that large language models (LLMs) can excel in many tasks via in-context learning (ICL). However, recent works show that ICL-prompted models tend to produce inaccurate results when presented with adversarial inputs. In this work, we investigate whether augmenting ICL with natural language explanations (NLEs) improves the robustness of LLMs on adversarial datasets covering natural language inference and paraphrasing identification. We prompt LLMs with a small set of human-generated NLEs to produce further NLEs, yielding more accurate results than both a zero-shot-ICL setting and using only human-generated NLEs. Our results on five popular LLMs (GPT3.5-turbo, Llama2, Vicuna, Zephyr, and Mistral) show that our approach yields over 6% improvement over baseline approaches for eight adversarial datasets: HANS, ISCS, NaN, ST, PICD, PISP, ANLI, and PAWS. Furthermore, previous studies have demonstrated that prompt selection strategies significantly enhance ICL on in-distribution test sets. However, our findings reveal that these strategies do not match the efficacy of our approach for robustness evaluations, resulting in an accuracy drop of 8% compared to the proposed approach.

View on arXivView PDF

Code Implementations(1)

xlhex/acl2024_xiclCommunity100%
31Shell, PythonMay 20, 20242 years ago

Cite this paper

@article{he2023using,
  title  = {Using Natural Language Explanations to Improve Robustness of In-context Learning},
  author = {Xuanli He and Yuxiang Wu and Oana-Maria Camburu and Pasquale Minervini and Pontus Stenetorp},
  year   = {2023},
  eprint = {2311.07556},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2311.07556v2}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2311.07556.svg)](https://codeofpaper.com/paper/2311.07556)

Discussion