Camouflaged C hinese Spam Content Detection with Semi-supervised Generative Active Learning (2020)

Abstract: We propose a Semi-supervIsed GeNerative Active Learning (SIGNAL) model to address the imbalance, efficiency, and text camouflage problems of Chinese text spam detection task. A “self-diversity” criterion is proposed for measuring the “worthiness” of a candidate for annotation. A semi-supervised variational autoencoder with masked attention learning approach and a character variation graph-enhanced augmentation procedure are proposed for data augmentation. The preliminary experiment demonstrates the proposed SIGNAL model is not only sensitive to spam sample selection, but also can improve the performance of a series of conventional active learning models for Chinese spam detection task. To the best of our knowledge, this is the first work to integrate active learning and semi-supervised generative learning for text spam detection.

## introduction the recent successes of learning-based models all share the same prerequisite: a decent labeled training dataset is available for a given task @xcite . however, the annotating process can be "a tedious, laborious, and time consuming task for humans" @xcite . to achieve high task performance with low labeling cost, (pool-based) active learning @xcite algorithms are proposed to select the most representative and informative sample to be labeled by human oracles @xcite . although effective in general, in chinese text spam detection context, the following reasons make the active learning a challenging task: imbalance: in reality, the ratio of spam samples to normal ones is very imbalanced. for instance, in north america, "much less than 1% of sms messages were spam" @xcite . as a result, the active learning model should be more sensitive to spam samples. the general active learning methods, e.g., @xcite @xcite , can hardly address this problem. efficiency: when competing with anti-spam models, spammers are constantly creating new forms for spam texts @xcite . the amount of unlabeled samples is huge and keeps increasing. classical diversity-based approach @xcite , which iteratively compares each unlabeled sample with each labeled sample to select the most "diverse" ones for annotating, will perform poorly as its computational complexity is o(n 2 ). an efficient-oriented active learning algorithm is needed. camouflage foot_0 : chinese character has glyph and phonetic variations @xcite , e.g., "账 (account)" and "帐(curtain)" have the similar structure and pronunciation. spammers can take advantage of this characteristic to escape from the detection algorithms @xcite . it is important to propose a novel active learning model that can predict the new chinese character variation patterns not appearing in the labeled dataset. to address these challenges, we propose a novel solution, semi-supervised generative active learning (signal) model to naturally integrate active learning and semi-supervised generative learning into a unified framework. signal is inspired by a simple yet powerful observation in computer vision domain @xcite : the patches generated from the same image share the same label, and are naturally expected to have similar predictions by the classifier. hence, the diversity of predictions of patches can successfully measure the "power" of a candidate image in elevating the performance of the current classifier. similarly, in this study, a set of semantically similar texts for each candidate sample is automatically generated through data augmentation. we hypothesize that: the diversity of predictions of augmented texts is a useful indicator to predict the boost ability of a candidate text sample for the performance of the classifier. we define this strategy as a "self-diversity" based active learning strategy. algorithmically, unsupervised generative models, such as variational autoencoder @xcite , only learn to generate similar texts without considering the labeling information. therefore, we utilize a semi-supervised variational autoencoder (s-vae) @xcite to automatically generate semantically similar texts for each candidate sample, while trying to keep the label-consistency. to enable s-vae to gain the ability of perceiving the sensitive positions of the candidate sample, we enrich the human annotation feedback. the annotator is required to provide not only a label for the candidate but also a rationale (critical terms in the candidate) @xcite for the chosen spam label. based on the human-annotated rationales, we introduce a pseudo-mask distribution p m to guide the attention learning in s-vae. a character variation graphenhanced augmentation procedure is then applied to integrate the chinese character variation knowledge and simulate the glyph and phonetic variation mutations in further data augmentation. compared with conventional active learning, signal offers three advantages: (1) signal is more sensitive to seek the spam samples 2 . (2) sig-nal does not need to compare with the labeled samples, which reduces its computational complexity to o(n ). (3) signal considers the heterogeneous variation knowledge of chinese characters for spam detection. the major contributions of this paper can be summarized as follows: ## signal model figure 1 depicts the proposed signal framework foot_1 . it starts with a small set of labeled samples, a large set of unlabeled samples, and an initial classifier trained on the labeled samples. the goal of signal is to seek "salient" samples from the pool of unlabeled samples for annotation. then the classifier can be continuously improved by incrementally enlarging the training set with newly annotated samples. the pseudocode of signal is described as algorithm 1. self-diversity based active learning. as aforementioned, in signal, we develop a "self-diversity" criterion for active candidate selection. s-vae with masked attention learning. as shown in figure 1 , we utilize s-vae with masked attention learning to generate similar texts at the semantic level. in this study, with annotated rationales r (a set of critical terms), a pseudo-mask distribution p m is generated for each candidate sample. for i th term t i of the candidate sample, the pseudo-mask probability p r i can be calculated as: the loss function of s-vae with masked attention learning is defined as: ## preliminary experiment dataset and experiment setting. a chinese sms dataset foot_2 was used for the experiment. there were 48,896 testing samples, including 23,891 spam samples and 25,005 normal samples. the size of the active learning sample set was 48884, including 23,891 spam samples and 24,993 normal samples. 200 samples were randomly selected as the initial labeled set. the remaining samples were used as an unlabeled sample pool. for each iteration, 100 samples were selected by different active learning models. the iterative active learning process repeated 10 times. for evaluation, a singlelayer cnn classifier was trained on the labeled samples. uncertainty (lewis and gale, 1994), margin @xcite , and entropy (li and guo, 2013) were chosen as baseline models. similar baseline-settings can be found in @xcite @xcite . in signal model, for s-vae training 4 , we chose "bigru+ attention + mlp" as encoder structure, a "single-layer gru" as decoder structure, and a "single-layer cnn+mlp" as classifier. for each candidate sample, 10 augmented texts is generated for "self-diversity" calculation. ## conclusion in this paper, we propose a signal model for chinese text spam detection. signal integrates active learning and semi-supervised generative learning into a unified framework. as an exploration study for this newly proposed problem, the preliminary results have revealed the potential of signal to address the critical problems in the proposed task. for instance, figure 2 (a ) proves that signal can be more sensitive to spam samples (imbalance challenge); case study (figure 3 ) shows the generation capacity of signal to simulate the phonetic or glyph variation mutations (camouflage challenge); comparing to classical diversity-based approach, we integrate self-diversity based active learning and generative learning which can greatly reduce the computational complexity (o (n ) → o (n ), efficiency challenge). in the future, we plan to enable the glyph and phonetic variation detection by integrating the variation graph representation learning, which may im-prove signal's performance.