TransFool: An Adversarial Attack against Neural Machine Translation Models

Sahar Sadrizadeh, Ljiljana Dolamic, Pascal Frossard
2/2/2023
cs.CL

No official code found. Best implementation: sssadrizadeh/TransFool (3 stars, Apache-2.0, last commit 2024-06-26).

Abstract

Deep neural networks have been shown to be vulnerable to small perturbations of their inputs, known as adversarial attacks. In this paper, we investigate the vulnerability of Neural Machine Translation (NMT) models to adversarial attacks and propose a new attack algorithm called TransFool. To fool NMT models, TransFool builds on a multi-term optimization problem and a gradient projection step. By integrating the embedding representation of a language model, we generate fluent adversarial examples in the source language that maintain a high level of semantic similarity with the clean samples. Experimental results demonstrate that, for different translation tasks and NMT architectures, our white-box attack can severely degrade the translation quality while the semantic similarity between the original and the adversarial sentences stays high. Moreover, we show that TransFool is transferable to unknown target models. Finally, based on automatic and human evaluations, TransFool leads to improvement in terms of success rate, semantic similarity, and fluency compared to the existing attacks both in white-box and black-box settings. Thus, TransFool permits us to better characterize the vulnerability of NMT models and outlines the necessity to design strong defense mechanisms and more robust NMT systems for real-life applications.

View on arXivView PDF

Code Implementations(1)

Apache-2.0

TransFool Attack against NMT

30PythonJun 22, 20232 years agoApache-2.0

Similar Papers

Cite this paper

@article{sadrizadeh2023transfool,
  title  = {TransFool: An Adversarial Attack against Neural Machine Translation Models},
  author = {Sahar Sadrizadeh and Ljiljana Dolamic and Pascal Frossard},
  year   = {2023},
  eprint = {2302.00944},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2302.00944v2}
}

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

Discussion