mlsanityData to 7 Oct 2026

When Vision Fails: Text Attacks Against ViT and OCR

arXiv 2306.07033 ↗First posted 12 Jun 2023cs.CR cs.LGcited by 5

Not on the map. Why?

Abstract (arXiv)

Text-based machine learning models are vulnerable to an emerging class of Unicode-based adversarial examples capable of tricking a model into misreading text with potentially disastrous effects. The primary existing defense against these attacks is to preprocess potentially malicious text inputs using optical character recognition (OCR). In theory, OCR models will ignore any malicious Unicode characters and will extract the visually correct input to be fed to the model. In this work, we show that these visual defenses fail to prevent this type of attack. We use a genetic algorithm to generate visual adversarial examples (i.e., OCR outputs) in a black-box setting, demonstrating a highly effective novel attack that substantially reduces the accuracy of OCR and other visual models. Specifically, we use the Unicode functionality of combining characters (e.g., ~n which combines the characters n and ~) to manipulate text inputs so that small visual perturbations appear when the text is displayed. We demonstrate the effectiveness of these attacks in the real world by creating adversarial examples against production models published by Meta, Microsoft, IBM, and Google. We additionally conduct a user study to establish that the model-fooling adversarial examples do not affect human comprehension of the text, showing that language models are uniquely vulnerable to this type of text attack.

Key facts. Cited by 5 papers in the map (data through 7 Oct 2026). Builds on 25 of its 46 references that are in the map. First posted on arXiv 12 Jun 2023.

Builds on

25 of 46 references.

References · 25

  1. 2017Attention Is All You Needcited by 59,932
  2. 2014Explaining and Harnessing Adversarial Examplescited by 7,287
  3. 2013Intriguing properties of neural networkscited by 5,114
  4. 2016SQuAD: 100,000+ Questions for Machine Comprehension of Textcited by 4,115
  5. 2018A Call for Clarity in Reporting BLEU Scorescited by 1,790
  6. 2019fairseq: A Fast, Extensible Toolkit for Sequence Modelingcited by 1,486
  7. 2018Neural Network Acceptability Judgmentscited by 952
  8. 2017Evasion Attacks against Machine Learning at Test Timecited by 686
  9. 2018Generating Natural Language Adversarial Examplescited by 422
  10. 2018TextBugger: Generating Adversarial Text Against Real-world Applicationscited by 376
  11. 2018Black-box Generation of Adversarial Text Sequences to Evade Deep Learning Classifierscited by 341
  12. 2017Synthetic and Natural Noise Both Break Neural Machine Translationcited by 304
13 more
  1. 2021TrOCR: Transformer-based Optical Character Recognition with Pre-trained Modelscited by 278
  2. 2021CANINE: Pre-training an Efficient Tokenization-Free Encoder for Language Representationcited by 229
  3. 2018Scaling Neural Machine Translationcited by 204
  4. 2020Sponge Examples: Energy-Latency Attacks on Neural Networkscited by 108
  5. 2017Deceiving Google's Perspective API Built for Detecting Toxic Commentscited by 99
  6. 2018On the Impact of Various Types of Noise on Neural Machine Translationcited by 76
  7. 2021Bad Characters: Imperceptible NLP Attackscited by 69
  8. 2020Fundamental Tradeoffs between Invariance and Sensitivity to Adversarial Perturbationscited by 55
  9. 2021Robust Open-Vocabulary Translation from Visual Text Representationscited by 47
  10. 2017Synthesizing Robust Adversarial Examplescited by 39
  11. 2019Towards Robust Toxic Content Classificationcited by 22
  12. 2021Fall of Giants: How popular text-based MLaaS fall against a simple evasion attackcited by 12
  13. 2020FAWA: Fast Adversarial Watermark Attack on Optical Character Recognition (OCR) Systemscited by 7

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2023: 2; 2024: 1; 2025: 0; 2026: 2.

5 papers.