Enhance Robustness of Language Models Against Variation Attack through Graph Integration
Zi Xiong, Lizhi Qing, Yangyang Kang, Jiawei Liu, Hongsong Li, Changlong Sun, Xiaozhong Liu, Wei Lu
TL;DR
This work tackles adversarial robustness of Chinese PLMs to character-variation attacks by introducing CHANGE, which integrates a Chinese Character Variation Graph into transformer models. The approach combines CVGI, which reconstructs attacked inputs using attacking paths and a 2D attention mechanism, with Variation Graph Instructed Pre-training across ATP, AMP, and ACP tasks to strengthen path recognition and restoration. Empirical results on TNews, AFQMC, and Message show that CHANGE improves robustness under attacks with only negligible loss on clean data, outperforming several strong baselines. The findings demonstrate the practical potential of graph-guided, multi-task pre-training to bolster robustness in real-world Chinese NLP applications, with opportunities to extend to other languages and attack types.
Abstract
The widespread use of pre-trained language models (PLMs) in natural language processing (NLP) has greatly improved performance outcomes. However, these models' vulnerability to adversarial attacks (e.g., camouflaged hints from drug dealers), particularly in the Chinese language with its rich character diversity/variation and complex structures, hatches vital apprehension. In this study, we propose a novel method, CHinese vAriatioN Graph Enhancement (CHANGE), to increase the robustness of PLMs against character variation attacks in Chinese content. CHANGE presents a novel approach for incorporating a Chinese character variation graph into the PLMs. Through designing different supplementary tasks utilizing the graph structure, CHANGE essentially enhances PLMs' interpretation of adversarially manipulated text. Experiments conducted in a multitude of NLP tasks show that CHANGE outperforms current language models in combating against adversarial attacks and serves as a valuable contribution to robust language model research. These findings contribute to the groundwork on robust language models and highlight the substantial potential of graph-guided pre-training strategies for real-world applications.
