Academic Journal of Computing & Information Science, 2026, 9(9); doi: 10.25236/AJCIS.2026.090907.
Honghao Wang, Zihan Ma, Xinyuan Li
Beijing University of Posts and Telecommunications, Beijing, China
The value of structural and textual features in HTTP request classification can change across corpora. We evaluate a pipeline that combines 40 numerical descriptors with separate target and body term frequency–inverse document frequency (TF-IDF) vectors. Each text channel retains original and bounded-decoded content, and the fitted pipeline supports command-line and browser interfaces. On a corpus of 26,646 retained CSIC 2010 and local synthetic requests, random forest was selected by validation recall and achieved test recall of 0.8283 and F1 of 0.8681. In five-seed validation ablations, removing numerical or text features lowered mean F1 by 13.81 or 4.53 percentage points, respectively. Matched joined-word and character-3-gram hybrids achieved test F1 of 0.8838 and 0.9486, respectively, exceeding the F1 of the original word encoding. Additional decoding rounds provided no observed benefit to the original hybrid. On the API Traffic Research Dataset Framework (ATRDF), numerical-only F1 was comparable to full-hybrid F1 in the evaluated validation split. Retraining on ATRDF yielded test F1 of up to 0.9851, whereas the CSIC-mixture random forest falsely flagged 99.17% of normal ATRDF test requests. Cross-subset and query re-encoding checks identify further limits to transfer and normalization. These results document how component benefits depend on the corpus and distinguish performance after retraining from direct model transfer. Source code is available at https://github.com/honghaow607-stack/http-request-anomaly-detection.
HTTP Anomaly Detection, Hybrid Features, TF-IDF, Ablation Study, Domain Shift
Honghao Wang, Zihan Ma, Xinyuan Li. HTTP Request Anomaly Detection with Hybrid Numerical and Text Features. Academic Journal of Computing & Information Science (2026), Vol. 9, Issue 9: 47-57. https://doi.org/10.25236/AJCIS.2026.090907.
[1] C. Torrano Giménez, A. Pérez Villegas and G. Álvarez Marañón, “HTTP dataset CSIC 2010,” dataset documentation, last updated January 20, 2012. Archived author document: https://petescully.co.uk/wp-content/uploads/2018/04/http_dataset_csic_2010.pdf. Accessed October 27, 2026.
[2] E.-J. Song, S.-C. Hong and A.-R. Kang, “An implementation of TF-IDF feature extraction and machine learning based web attack detection system,” Journal of the Korea Society of Computer and Information, vol.31, no.1, pp.109–120, 2026. doi: 10.9708/jksci.2026.31.01.109.
[3] M. Shaik, S. G. V. Paidi and M. Hassanzadeh, “HTTP anomaly detection using character-level 3-gram TF-IDF and hybrid TF-IDF–hashing representations: A comparative study of machine learning models,” Computer and Information Science, vol.19, no.2, pp.124–143, 2026. doi: 10.5539/cis.v19n2p124.
[4] L. Demetrio, A. Valenza, G. Costa and G. Lagorio, “WAF-A-MoLE: Evading web application firewalls through adversarial machine learning,” in Proceedings of the 35th Annual ACM Symposium on Applied Computing, 2020, pp.1745–1752. doi: 10.1145/3341105.3373962.
[5] G. Salton and C. Buckley, “Term-weighting approaches in automatic text retrieval,” Information Processing & Management, vol.24, no.5, pp.513–523, 1988. doi: 10.1016/0306-4573(88)90021-0.
[6] L. Breiman, “Random forests,” Machine Learning, vol.45, no.1, pp.5–32, 2001. doi: 10.1023/A:1010933404324.
[7] T. Chen and C. Guestrin, “XGBoost: A scalable tree boosting system,” in Proceedings of the 22nd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, 2016, pp.785–794. doi: 10.1145/2939672.2939785.
[8] F. Pedregosa, G. Varoquaux, A. Gramfort, et al., “Scikit-learn: Machine learning in Python,” Journal of Machine Learning Research, vol.12, no.85, pp.2825–2830, 2011. https://www.jmlr.org/papers/v12/pedregosa11a.html.
[9] Python Software Foundation, “urllib.parse—Parse URLs into components,” Python 3.13 documentation. https://docs.python.org/3.13/library/urllib.parse.html. Accessed October 27, 2026.
[10] S. Lavian and Ariel University, Ariel Cyber Innovation Center (ACIC), “The API Traffic Research Dataset Framework (ATRDF),” dataset, 2023. https://github.com/ArielCyber/Cisco_Ariel_Uni_API_security_challenge. Accessed October 31, 2026.