[2104.01782] BBAEG: Towards BERT-based Biomedical Adversarial Example Generation for Text Classification

Significance

Doctors might think that they have heard of the anti-psychotic drug 'clozapinum' somewhere

Keypoints

  • Propose an adversarial example generating algorithm for biomedical text data
  • Demonstrate the effectiveness and naturalness of the generated adversarial example by experiments and human evaluation

Review

Background

Unlike the image data used for computer vision tasks, generating adversarial examples is quite challenging for text data. This difficulty comes from discrete nature of the input space, and the requirement that the generated adversarial example is semantically coherent with the original text. Early studies relying on generating text-level manipulation often resulted in unnatural, or grammatically incorrect examples. Some of the more recent works based on word-embeddings, such as TextFooler (TF) or BAE, tend to create more plausible examples that fit the overall context. However, further challenges arise when it comes to a more domain-specific adversarial example generation. For example, generating adversarial example for biomedical text data requires considering multi-word phrases (e.g. colorectal adenoma), variation of representing same medical entities (e.g. Type I Diabetes / Type One Diabetes), or spelling variations. The authors propose BBAEG (Biomedical BERT-based Adversarial Example Generation) to realize adversarial example generation for the biomedical domain text data.

For a more formal definition of the adversarial example, let data-label pair $(D,Y) = [(D_{1},y_{1}),…,(D_{n},y_{n})]$ and a classifying model $M:D\rightarrow Y$. Our goal is to generate an adversarial example $D_{adv}$ such that $M(D_{adv}) \neq y$. Also, the $D_{adv}$ should be semantically similar to the original text $D$ at a certain level $Sim(D, D_{adv}) \geq \alpha$, where $\alpha$ is the threshold, and be grammatically correct.

Keypoints

Propose an adversarial example generating algorithm for biomedical text data

The BBAEG algorithm consists of following steps:

  1. Tag biomedical entities and prepare two classes NE (named entities) and non-NE (non-named entities).
  2. Rank importance of the words for perturbation
  3. Choose perturbation scheme
  4. Generate adversarial example
Tag biomedical entities

Biomedical named entities are extracted by applying sciSpacy with en-ner-bc5cdr-md to the text data sample $D{i}$. Entities are linked with Entity Linkers (DrugBank, MESH), and synonyms are obtained with DrugBank and pyMeshSim. Here, multi-word named entities are included. The words that were not included in the NE set are put in the non-NE set.

Rank importance of the words

Importance of each word token $I_{i}$ is estimated by deleting the corresponding word and computing the decrement in probability of predicting the correct label. The adversarial generation is performed to the text based on this rank of importance.

Choose perturbation scheme

Perturbation scheme is selected by a ordered sieve-based approach.

Sieve 1 Named entity tokens are replaced by synonyms using Ontology linking, while non-named entity tokens are replaced using BERT-MLM.

Sieve 2 Spelling noise, including random character rotation and symbol insertion, is introduced.

Sieve 3 Replace the numeric entity by expanding the numeric digit.

Generate adversarial example

The final adversarial example is obtained by selecting one of the three sieve-generated adversary, which is most similar to the original text. The full process of BBAEG is demonstrated below. 210406-1 The BBAEG algorithm

Demonstrate the effectiveness and naturalness of the generated adversarial example by experiments and human evaluation

The effectiveness of BBAEG is demonstrated by the performance drop after adversarial attack, and perturbation ratio (\%) on two biomedical datasets (ADE, Twitter ADE). Six classification models including Hierarchical Attention Model, BERT, RoBERTa, BioBERT, Clinical-BERT, SciBERT, were employed to serve as as $M$. Baseline adversarial generation methods for comparison with BBAEG included the TF, and the BAE. 210406-2 Effectiveness of the BBAEG

For self-comparison, ablation of each sieves for choosing the perturbation scheme was evaluated. 210406-3 Ablation of perturbation scheme options

Human evaluation was performed regarding the naturalness and accuracy of generated adversarial instances. 210406-4 Human evaluation of BBAEG

Some of the handpicked examples generated by BBAEG are also presented in the paper. 210406-5 Adversarial examples generated with BBAEG

Related

Share

Comment

#image-generation #multi-modal #language-model #retrieval-augmentation #robotics #forecasting #psychiatry #instruction-tuning #diffusion-model #notice #graph-neural-network #responsible-ai #privacy-preserving #scaling #mixture-of-experts #generative-adversarial-network #speech-model #contrastive-learning #self-supervised #image-representation #image-processing #object-detection #pseudo-labeling #scene-text-detection #neural-architecture-search #data-sampling #long-tail #graph-representation #zero-shot #metric-learning #federated-learning #weight-matrix #low-rank #vision-transformer #computer-vision #normalizing-flow #invertible-neural-network #super-resolution #image-manipulation #thread-summarization #natural-language-processing #domain-adaptation #knowledge-distillation #scene-text #model-compression #semantic-segmentation #instance-segmentation #video-understanding #code-generation #graph-generation #image-translation #data-augmentation #model-pruning #signal-processing #text-generation #text-classification #music-representation #transfer-learning #link-prediction #counterfactual-learning #medical-imaging #acceleration #transformer #style-transfer #novel-view-synthesis #point-cloud #spiking-neural-network #optimization #multi-layer-perceptron #adversarial-training #visual-search #image-retrieval #negative-sampling #action-localization #weakly-supervised #data-compression #hypergraph #adversarial-attack #submodularity #active-learning #deblurring #object-tracking #pyramid-structure #loss-function #gradient-descent #generalization #bug-fix #orthogonality #explainability #saliency-mapping #information-theory #question-answering #knowledge-graph #robustness #limited-data #recommender-system #anomaly-detection #gaussian-discriminant-analysis #molecular-graph #video-processing