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

30783

Authors

nan

Abstract

AbstractAs 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.

Keywords

nan

Full Content

Proceedings of the 2022 Conference on Empirical Methods in Natural Language Processing, pages 549 - 561 December 7-11, 2022 ©2022 Association for Computational Linguistics Aligning Recommendation and Conversation via Dual Imitation Jinfeng Zhou1,2, Bo Wang1,2,�, Minlie Huang3, Dongming Zhao4, Kun Huang4, Ruifang He1,2, Yuexian Hou1 1College of Intelligence and Computing, Tianjin University, Tianjin, China 2State Key Laboratory of Communication Content Cognition, People’s Daily Online, Beijing, China 3The CoAI Group, DCST, Institute for Artificial Intelligence, State Key Lab of Intelligent Technology and Systems, 3Beijing National Research Center for Information Science and Technology, Tsinghua University, Beijing 100084, China 4AI Lab, China Mobile Communication Group Tianjin Co., Ltd. {jfzhou, bo_wang}@tju.edu.cn aihuang@tsinghua.edu.cn Abstract Human conversations of recommendation nat- urally involve the shift of interests which can align the recommendation actions and conver- sation process to make accurate recommenda- tions with rich explanations. However, exist- ing conversational recommendation systems (CRS) ignore the advantage of user interest shift in connecting recommendation and con- versation, which leads to an ineffective loose coupling structure of CRS. To address this is- sue, by modeling the recommendation actions as recommendation paths in a knowledge graph (KG), we propose DICR (Dual Imitation for Conversational Recommendation), which de- signs a dual imitation to explicitly align the recommendation paths and user interest shift paths in a recommendation module and a con- versation module, respectively. By exchanging alignment signals, DICR achieves bidirectional promotion between recommendation and con- versation modules and generates high-quality responses with accurate recommendations and coherent explanations. Experiments demon- strate that DICR outperforms the state-of-the- art models on recommendation and conversa- tion performance with automatic, human, and novel explainability metrics. 1 Introduction Conversational recommendation systems (CRS) (Liu et al., 2020; Li et al., 2022) aim to conduct recommendations during conversations with users (Gao et al., 2021). Compared with traditional rec- ommendation systems (Wang et al., 2019; Xian et al., 2019), CRS’s two main advantages are under- standing user’s dynamic interest during the conver- sation and making persuasive response with coher- ent explanations of the recommendation (Jannach et al., 2021). In both advantages, user interest shift plays an essential role. As the dialog in Fig. 1, the successful recommendation of “Iron Man 3” in the final response is achieved by tracking and reason- ing the user interest shift of “The Avengers→Sci- Could you recommend some movies similar to The Avengers? Sure, The Avengers is considered Sci-Fi and some similar movies may include Thor and X-Men. Sounds good! I know that Stan Lee wrote Thor, he is a favorite of mine, but I haven’t seen it. Yes. Stan Lee also starred in Thor. He made a cameo in most Marvel films including Iron Man 3, perhaps you would like it too. Dialog KG … The Avengers Sci-Fi X-Men Thor 1 2 3 4 Stan Lee Iron Man 3 Robert Downey Jr. Marvel Universe starred actors star in written by 1 2 2 3 3 4 Guiding the explanations generation Guiding the accurate recommendations Figure 1: The interest shift process expressed in the con- versation …

Content truncated to 500 words

Labeled Text

AbstractAs 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.

Publication Details

Paper ID:
30783
Year:
2022
Publication:
TIPSTER
Publication Type:
conf
DOI:
nan