# Enhancing Detection of Arabic Social Spam Using Data Augmentation and Machine Learning
## 2 Background and Related Work  
### Data Augmentation  
Data augmentation is a technique to increase the diversity and quality of data without directly collecting more data. The first application of data augmentation was in computer vision [11]. Because the image is made up of individual pixels, it can be easily modified by adding noise, cropping, padding, or flipping it without losing any of the original information. Although the idea of augmenting a dataset with perturbed replicas of its samples has been shown to be very successful in other domains (image classification [12; 13; 14] and sound classification [15]), it has been underexplored in Natural Language Processing (NLP) field. This challenge is still present today, but many scientists and researchers are attempting to solve it to achieve a variety of objectives, such as balancing imbalanced dataset classes, generating more data for low-data domains, or protecting against adversarial examples. While flipping and rotating image techniques produce new, valid images with similar semantic information, they cannot be used for text, since they would affect syntax and grammar and even change the meaning of the original sentence. Furthermore, while noise injection is commonly used to enhance audio signal data [16, 17, 18], it is not directly suitable for text since word and character tokens are categorical. Researchers are focusing on introducing text augmentation to address text data imbalance problems and improve the generalization of the model [19]. Data augmentation is a strategy to create more training data by modifying existing training data, either by making minor changes to the original instances or by using the existing data as a template [8]. Text data augmentation can be classified into two approaches: Feature space and data space [20]. In the data space, augmentation refers to the transformation of raw data into readable textual data. The data space in [20] was categorized into four categories: Character Level, word Level, phrase sentence Level, and document Level. In this paper, word-level data space techniques are described for manipulating parts of training examples to generate new samples, such as:  
1. Noise Induction: Randomly insert, delete, swap, and substitute words. 2. Synonym Replacement: The paraphrasing transformation of text instances by replacing certain words with synonyms (WordNet) is the popular form of data augmentation. 3. Embedding Replacement: Comparable to synonym replacement, embedding replacement strategies look for words that fit well into the textual context and do not change the text's basic substance. To achieve this, close words from similar contexts are translated into a latent representation space [20]. Word embeddings can be static (word vectors), pre-trained classic word embeddings such as self-trained W2V, Glove, and Google-News W2V, to perform similarity searches. On the contrary, the other type applies contextual data augmentation, such as BERT, which replaces words with words predicted from a bidirectional language model according to the context of the original word. In text augmentation tasks, sentences are organized and words are always closely connected. That is why a minor change in a sentence could cause the meaning to be flipped. For example, if we use the random swap in the sentence \"I like an apple.\" to \"an apple like I \", the meaning is entirely different. Therefore, when augmenting the sentence, the data augmentation methods must follow the grammar of the language and keep the original meaning. For this purpose, we decide to use the word embedding replacement technique to augment the data [20]. It should be mentioned that, despite the progress in Arabic spam detection, which will be explained in the next Section 2.2, data augmentation was not applied as part of these works. According to the literature, a limited number of recent Arabic research works have been conducted using data augmentation on other topics, such as  
* Sentiment analysis, [PERSON] et al.