HTTP Anomaly Detection Using Character-Level 3-Gram TF-IDF and Hybrid TF-IDF–Hashing Representations: A Comparative Study of Machine Learning Models


  •  Mohinpasha Shaik    
  •  Siva Ganesh Varma Paidi    
  •  Mohammad Hassanzadeh    

Abstract

Web applications are frequent targets of cyberattacks such as SQL injection, cross-site scripting, and command injection, creating a need for accurate and computationally efficient anomaly detection systems. While recent approaches increasingly rely on deep learning and transformer-based architectures, these methods often require substantial computational resources and deployment complexity. This study presents a comparative evaluation of character-level feature representations and machine learning models for HTTP anomaly detection. Two feature encoding strategies, namely character-level 3-gram TF-IDF and hybrid TF-IDF–hashing representations, are investigated using Random Forest, LightGBM, multilayer perceptron (MLP), and fusion-based classifiers on the CSIC 2010 benchmark dataset. All models are trained and evaluated under consistent experimental settings to enable a fair comparison of feature representations and classification approaches. Experimental results show that the hybrid TF-IDF–hashing representation combined with LightGBM achieves the best performance, attaining 99.60% accuracy, precision, recall, and F1-score, outperforming all other evaluated models. Furthermore, comparisons with recently reported deep learning and transformer-based approaches indicate that lightweight machine learning methods can achieve competitive or superior performance while maintaining lower computational complexity and deployment overhead. The findings provide practical insights into the trade-offs between feature representations and classification models for HTTP anomaly detection.



This work is licensed under a Creative Commons Attribution 4.0 License.
  • ISSN(Print): 1913-8989
  • ISSN(Online): 1913-8997
  • Started: 2008
  • Frequency: semiannual

Journal Metrics

WJCI (2022): 0.636

Impact Factor 2022 (by WJCI):  0.419

h-index (January 2024): 43

i10-index (January 2024): 193

h5-index (January 2024): N/A

h5-median(January 2024): N/A

( The data was calculated based on Google Scholar Citations. Click Here to Learn More. )

Contact