EMNLP 2022main10 citations

TABS: Efficient Textual Adversarial Attack for Pre-trained NL Code Model Using Semantic Beam Search

YunSeok Choi, Hyojun Kim, Jee-Hyong Lee

Abstract

As pre-trained models have shown successful performance in program language processing as well as natural language processing, adversarial attacks on these models also attract attention.However, previous works on black-box adversarial attacks generated adversarial examples in a very inefficient way with simple greedy search. They also failed to find out better adversarial examples because it was hard to reduce the search space without performance loss.In this paper, we propose TABS, an efficient beam search black-box adversarial attack method. We adopt beam search to find out better adversarial examples, and contextual semantic filtering to effectively reduce the search space. Contextual semantic filtering reduces the number of candidate adversarial words considering the surrounding context and the semantic similarity.Our proposed method shows good performance in terms of attack success rate, the number of queries, and semantic similarity in attacking models for two tasks: NL code search classification and retrieval tasks.

BibTeX
@inproceedings{choi-etal-2022-tabs,
    title = "{TABS}: Efficient Textual Adversarial Attack for Pre-trained {NL} Code Model Using Semantic Beam Search",
    author = "Choi, YunSeok  and
      Kim, Hyojun  and
      Lee, Jee-Hyong",
    editor = "Goldberg, Yoav  and
      Kozareva, Zornitsa  and
      Zhang, Yue",
    booktitle = "Proceedings of the 2022 Conference on Empirical Methods in Natural Language Processing",
    month = dec,
    year = "2022",
    address = "Abu Dhabi, United Arab Emirates",
    publisher = "Association for Computational Linguistics",
    url = "https://aclanthology.org/2022.emnlp-main.369/",
    doi = "10.18653/v1/2022.emnlp-main.369",
    pages = "5490--5498"
}
TABS: Efficient Textual Adversarial Attack for Pre-trained NL Code Model Using Semantic Beam Search · EMNLP 2022