Reasoning Robustness of LLMs to Adversarial Typographical Errors

Esther Gan, Yiran Zhao, Liying Cheng, Yancan Mao, Anirudh Goyal +3 more
11/8/2024
cs.CLcs.AI

No confident code implementation found for this paper.

Abstract

Large Language Models (LLMs) have demonstrated impressive capabilities in reasoning using Chain-of-Thought (CoT) prompting. However, CoT can be biased by users' instruction.

Show full abstract

In this work, we study the reasoning robustness of LLMs to typographical errors, which can naturally occur in users' queries. We design an Adversarial Typo Attack ($\texttt{ATA}$) algorithm that iteratively samples typos for words that are important to the query and selects the edit that is most likely to succeed in attacking. It shows that LLMs are sensitive to minimal adversarial typographical changes. Notably, with 1 character edit, Mistral-7B-Instruct's accuracy drops from 43.7% to 38.6% on GSM8K, while with 8 character edits the performance further drops to 19.2%. To extend our evaluation to larger and closed-source LLMs, we develop the $\texttt{R$^2$ATA}$ benchmark, which assesses models' $\underline{R}$easoning $\underline{R}$obustness to $\underline{\texttt{ATA}}$. It includes adversarial typographical questions derived from three widely used reasoning datasets-GSM8K, BBH, and MMLU-by applying $\texttt{ATA}$ to open-source LLMs. $\texttt{R$^2$ATA}$ demonstrates remarkable transferability and causes notable performance drops across multiple super large and closed-source LLMs.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{gan2024reasoning,
  title  = {Reasoning Robustness of LLMs to Adversarial Typographical Errors},
  author = {Esther Gan and Yiran Zhao and Liying Cheng and Yancan Mao and Anirudh Goyal and Kenji Kawaguchi and Min-Yen Kan and Michael Shieh},
  year   = {2024},
  eprint = {2411.05345},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2411.05345v1}
}

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/2411.05345.svg)](https://codeofpaper.com/paper/2411.05345)

Discussion