Skip to main content
QUICK REVIEW

[Paper Review] Towards Evaluating the Robustness of Chinese BERT Classifiers

Boxin Wang, Boyuan Pan|arXiv (Cornell University)|Apr 7, 2020
Adversarial Robustness in Machine LearningComputer Science20 references8 citations
TL;DR

This paper proposes AdvChar, a novel character-level adversarial attack method targeting Chinese BERT classifiers by generating minimal perturbations in the embedding space to substitute critical characters. The attack reduces classification accuracy from 91.8% to 0% with fewer than two character changes on average, while human performance remains largely unaffected, revealing severe robustness issues in Chinese BERT models.

ABSTRACT

Recent advances in large-scale language representation models such as BERT have improved the state-of-the-art performances in many NLP tasks. Meanwhile, character-level Chinese NLP models, including BERT for Chinese, have also demonstrated that they can outperform the existing models. In this paper, we show that, however, such BERT-based models are vulnerable under character-level adversarial attacks. We propose a novel Chinese char-level attack method against BERT-based classifiers. Essentially, we generate "small" perturbation on the character level in the embedding space and guide the character substitution procedure. Extensive experiments show that the classification accuracy on a Chinese news dataset drops from 91.8% to 0% by manipulating less than 2 characters on average based on the proposed attack. Human evaluations also confirm that our generated Chinese adversarial examples barely affect human performance on these NLP tasks.

Motivation & Objective

  • To investigate the robustness of Chinese BERT-based classifiers under adversarial attacks, as existing work primarily focuses on English.
  • To address the challenge of generating efficient, scalable adversarial examples in the discrete, high-vocabulary Chinese text domain.
  • To evaluate whether adversarial examples generated in whitebox settings can transfer to blackbox models, simulating real-world attack scenarios.
  • To validate the naturalness and human imperceptibility of generated adversarial examples through human evaluation.

Proposed method

  • AdvChar performs gradient-guided character substitution in the embedding space to minimize perturbation magnitude while maximizing attack success.
  • The method uses a differentiable relaxation of the discrete character substitution process, enabling backpropagation through the embedding layer.
  • It employs a constrained optimization framework with hyperparameters c and κ to control the trade-off between attack success and perturbation size.
  • The attack is applied in both targeted and untargeted settings, generating adversarial examples that exploit statistical cues in BERT’s attention mechanism.
  • Transferability is evaluated by using whitebox-generated adversarial examples to attack blackbox BERT models without access to their parameters.
  • Human evaluation involves native speakers labeling sentences from clean and adversarial datasets to assess perceptual similarity.

Experimental results

Research questions

  • RQ1Can character-level adversarial attacks effectively degrade the performance of Chinese BERT classifiers with minimal perturbations?
  • RQ2How effective is the proposed AdvChar method in achieving high attack success rates while maintaining low perturbation levels in the Chinese language?
  • RQ3To what extent do adversarial examples generated in whitebox settings transfer to blackbox BERT models?
  • RQ4How do human annotators perceive the semantic and syntactic integrity of the generated adversarial examples compared to clean inputs?

Key findings

  • The untargeted attack achieved 100% success rate on both the THUCTC and WeChat datasets, reducing BERT accuracy from 91.8% to 0% with an average of less than two character changes.
  • The targeted attack achieved a 95% success rate on the THUCTC dataset and 100% on the WeChat dataset, demonstrating high precision in misclassifying inputs to specific false labels.
  • Transferability experiments showed that adversarial examples generated in whitebox settings reduced blackbox BERT accuracy from 88.2% to 14.3% on the WeChat dataset.
  • Human evaluation revealed only a 4% drop in performance (from 84% to 80%) on adversarial examples, indicating that the attacks are imperceptible to native speakers.
  • Case studies showed that BERT models rely on specific characters (e.g., 'Yu' for entertainment, 'Qi' for financial products) as statistical cues, making them vulnerable to targeted substitutions.
  • Increasing the hyperparameters c and κ improved attack success but required more character perturbations, confirming the trade-off between effectiveness and stealth.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.