Skip to main content
QUICK REVIEW

[Paper Review] Spam filtering on forums: A synthetic oversampling based approach for imbalanced data classification

Pratik Ratadiya, Rahul Moorthy|arXiv (Cornell University)|Sep 10, 2019
Spam and Phishing DetectionComputer Science1 references12 citations
TL;DR

This paper proposes a synthetic oversampling approach using SMOTE to address class imbalance in forum spam filtering, significantly improving classification performance. By generating synthetic minority-class samples, the method enhances model recall and F1 scores across multiple algorithms, with up to 10% improvement over baseline models trained on imbalanced data.

ABSTRACT

Forums play an important role in providing a platform for community interaction. The introduction of irrelevant content or spam by individuals for commercial and social gains tends to degrade the professional experience presented to the forum users. Automated moderation of the relevancy of posted content is desired. Machine learning is used for text classification and finds applications in spam email detection, fraudulent transaction detection etc. The balance of classes in training data is essential in the case of classification algorithms to make the learning efficient and accurate. However, in the case of forums, the spam content is sparse compared to the relevant content giving rise to a bias towards the latter while training. A model trained on such biased data will fail to classify a spam sample. An approach based on Synthetic Minority Over-sampling Technique(SMOTE) is presented in this paper to tackle imbalanced training data. It involves synthetically creating new minority class samples from the existing ones until balance in data is achieved. The enhanced data is then passed through various classifiers for which the performance is recorded. The results were analyzed on the data of forums of Spoken Tutorial, IIT Bombay over standard performance metrics and revealed that models trained after Synthetic Minority oversampling outperform the ones trained on imbalanced data by substantial margins. An empirical comparison of the results obtained by both SMOTE and without SMOTE for various supervised classification algorithms have been presented in this paper. Synthetic oversampling proves to be a critical technique for achieving uniform class distribution which in turn yields commendable results in text classification. The presented approach can be further extended to content categorization on educational websites thus helping to improve the overall digital learning experience.

Motivation & Objective

  • To address the challenge of class imbalance in forum spam detection, where spam instances are vastly outnumbered by non-spam content.
  • To improve the performance of supervised classification algorithms on imbalanced text data by balancing minority (spam) and majority (non-spam) classes.
  • To evaluate the effectiveness of synthetic oversampling via SMOTE in enhancing precision, recall, and F1 score for spam filtering in educational forums.
  • To demonstrate that SMOTE-based data augmentation leads to more robust and accurate spam classification compared to training on raw imbalanced datasets.

Proposed method

  • Preprocessing steps include stripping HTML tags, removing special characters and stop words, and filtering tokens with fewer than 3 characters.
  • Text data is vectorized using TF-IDF, which computes term frequency-inverse document frequency weights to represent textual features.
  • SMOTE is applied to the training set to generate synthetic spam samples, balancing the minority (spam) and majority (non-spam) classes.
  • The oversampled dataset is then used to train multiple supervised classifiers: Multinomial Naive Bayes, Logistic Regression, Linear SVC, and Decision Tree.
  • Performance is evaluated using precision, recall, F1 score, and accuracy, with a focus on metrics sensitive to minority class detection.
  • The SMOTE-oversampled data is compared against the original imbalanced dataset across all algorithms to assess performance gains.

Experimental results

Research questions

  • RQ1Does synthetic oversampling using SMOTE significantly improve the detection of spam in imbalanced forum datasets?
  • RQ2How does SMOTE-based data balancing affect the precision, recall, and F1 score of various text classification algorithms in spam filtering?
  • RQ3Can SMOTE mitigate the bias toward the majority class in spam detection models trained on real-world forum data?
  • RQ4Which classification algorithm benefits the most from SMOTE in terms of F1 score improvement on imbalanced forum text data?

Key findings

  • After applying SMOTE, the F1 score for Multinomial Naive Bayes increased from 0.71 to 0.82, representing a 10% improvement over the baseline model.
  • For Logistic Regression, the F1 score improved from 0.0 to 0.40 when SMOTE was applied, indicating a significant gain in minority class detection.
  • The Linear SVC model saw its F1 score rise from 0.0 to 0.60 with SMOTE, demonstrating a strong positive impact on recall and precision.
  • The Decision Tree model showed a modest F1 score improvement from 0.20 to 0.18, though it remained the weakest performer, indicating limited benefit from SMOTE in this case.
  • The overall accuracy remained high (0.96 with SMOTE), but the real gain was in recall and F1, which are more meaningful for imbalanced spam detection.
  • The study confirms that SMOTE effectively reduces bias toward the majority class and enhances the model's ability to detect rare spam instances.

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.