RoChBert: Towards Robust BERT Fine-tuning for Chinese

Zihan Zhang, Jinfeng Li, Ning Shi, Bo Yuan, Xiangyu Liu +4 more
10/28/2022
cs.CL

Official code: zzh-z/RoChBERT (9 stars, Python, last commit 2026-07-28).

Abstract

Despite of the superb performance on a wide range of tasks, pre-trained language models (e.g., BERT) have been proved vulnerable to adversarial texts. In this paper, we present RoChBERT, a framework to build more Robust BERT-based models by utilizing a more comprehensive adversarial graph to fuse Chinese phonetic and glyph features into pre-trained representations during fine-tuning.

Show full abstract

Inspired by curriculum learning, we further propose to augment the training dataset with adversarial texts in combination with intermediate samples. Extensive experiments demonstrate that RoChBERT outperforms previous methods in significant ways: (i) robust -- RoChBERT greatly improves the model robustness without sacrificing accuracy on benign texts. Specifically, the defense lowers the success rates of unlimited and limited attacks by 59.43% and 39.33% respectively, while remaining accuracy of 93.30%; (ii) flexible -- RoChBERT can easily extend to various language models to solve different downstream tasks with excellent performance; and (iii) efficient -- RoChBERT can be directly applied to the fine-tuning stage without pre-training language model from scratch, and the proposed data augmentation method is also low-cost.

View on arXivView PDF

Code Implementations(1)

zzh-z/RoChBERTOfficial100%
93PythonOct 19, 20224 months agoNOASSERTION

Similar Papers

Cite this paper

@article{zhang2022rochbert,
  title  = {RoChBert: Towards Robust BERT Fine-tuning for Chinese},
  author = {Zihan Zhang and Jinfeng Li and Ning Shi and Bo Yuan and Xiangyu Liu and Rong Zhang and Hui Xue and Donghong Sun and Chao Zhang},
  year   = {2022},
  eprint = {2210.15944},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2210.15944}
}

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

Discussion