Preprint
Article

This version is not peer-reviewed.

Do HTTP Features Carry the Signal? Shortcut Learning and Label Errors inWeb Attack Detection on CIC-IDS2017 and CSIC 2010

Submitted:

07 October 2026

Posted:

13 October 2026

You are already at the latest version

Abstract
Intrusion detection studies often report very high scores on the CIC-IDS2017 benchmark and credit new feature sets with the gain. We reassess a representative design, a deep neural network over 21 flow statistics and 10 HTTP aware features taken from the SentinelSphere platform, under a protocol that controls for known pitfalls, and we retest the features on the CSIC 2010 dataset, which contains real HTTP requests. On the flow based CIC-IDS2017 data the ten HTTP features are identically zero, because flow records contain none of the request fields they read, and the 64 by 64 network as described reaches only 6\% recall at the conventional threshold, finding none of the 21 SQL injection flows. Tree ensembles do exceed a 94\% F1 score, but a depth three tree on a single flow metadata feature, the backward initial TCP window size, already reaches an area under the curve of 0.985, so much of the apparent skill is a dataset artefact. The corrected labels of the same traffic show that only 104 of 2,056 web attack flows are successful attacks, and catching those is harder. On real requests the ten features reach an F1 of about 0.91 once the body is included and decoded, a plain character ngram model reaches 0.97, and an ablation traces the signal to a generic path entropy feature rather than to the attack pattern flags.
Keywords: 
;  ;  ;  ;  ;  ;  

1. Introduction

Machine learning for web attack detection is a crowded field, and one of its most common proving grounds is the CIC-IDS2017 dataset [1]. Very high scores on a fixed benchmark can arise from issues unrelated to the stated contribution, among them duplicated records, label errors, operating points chosen after the fact and features that act as shortcuts [2] because they correlate with how a capture was produced rather than with the attack. Audits of CIC-IDS2017 have documented duplicated flows and labelling mistakes [3,4], and methodological work has catalogued the pitfalls that inflate apparent performance [5] and called for pragmatic evaluation [6].
This study examines a concrete design from the SentinelSphere platform [7,8,9], a deep neural network over 21 standard flow statistics and 10 HTTP aware features, among them a request complexity score, a path entropy estimate and binary flags for SQL injection and cross site scripting patterns, reported to reach a 94% F1 score with a large reduction in false positives on CIC-IDS2017. It asks whether the HTTP features contribute on the flow benchmark, whether the reported score is reproducible from the described model, and how well the features work on data that genuinely contains HTTP requests. A companion study applied the same kind of scrutiny to the speedup reported for the Rust rewrite of the threat scorer of the platform [10].

2. Method

The study uses the web attack capture of CIC-IDS2017 in its flow export form, with 170,366 flow records of which 2,180 are web attacks, the corrected release of the same traffic by Engelen et al. [3], which separates successful attacks from unsuccessful attempts, and the CSIC 2010 HTTP dataset [11], which contains labelled normal and anomalous requests with their bodies. The network is reimplemented as described, two hidden layers of 64 units, dropout of 0.2, L2 regularisation of 0.001, the Adam optimiser at a learning rate of 0.001 and a decision threshold of 0.4, and the ten HTTP features from the published extractor. As reference points, a random forest, histogram gradient boosting and logistic regression are used. Every configuration runs on five stratified splits with fixed seeds, and per class detection uses five fold out of fold prediction with Wilson intervals [12]. The study tests the effect of three shortcut candidates, the forward and backward initial TCP window sizes and the flow byte rate, ranks features by their individual area under the curve, and on CSIC 2010 compares the ten features with 24 handcrafted request features and a character ngram model, with a drop one ablation of the ten features.

3. Results

On the flow export the ten HTTP features are zero for every record, so adding them leaves the detector unchanged, with an F1 of 0.123 with the features present as zeros and 0.112 without them. Table 1 reports the reassessment. The network as described labels almost everything benign at the conventional threshold, with a recall of 6%, and reaches an F1 of only 0.36 at its stated threshold of 0.4, while inverse frequency weighting raises recall to 97% but collapses precision to 0.23. In out of fold scoring it detects none of the 21 SQL injection flows and fewer than half of the brute force and cross site scripting flows (Figure 1). A high score is reachable only with a different model, a random forest on all features reaching 0.988 and gradient boosting 0.996.
Much of the apparent skill is a dataset artefact. The backward initial TCP window size alone has an area under the curve of about 0.94, and a depth three decision tree on that single feature reaches 0.985, with an F1 of 0.83. Removing the three shortcut candidates lowers the random forest F1 from 0.988 to 0.948, the signature of shortcut learning [2]. The corrected labels change the target as well, since only 104 of 2,056 web attack flows are successful attacks. When attempts are counted as attacks a random forest reaches an F1 of 0.992 and the network 0.985, but when the detector must find only the 104 successful attacks the F1 falls to 0.940 and 0.909 with the attempts counted as benign, and to 0.927 and 0.873 with the attempts removed, so a single score on the original labels conflates an easy task with a harder one. A random forest on the 21 flow features trained on the original labels flags all 73 successful brute force and all 18 successful cross site scripting flows of the corrected release but only 1 of 1,947 brute force and cross site scripting attempts, so it keys on the flow signature of a completed attack.
On CSIC 2010 the ten features reach an F1 of 0.586 on the request line alone and 0.908 only once the body is included and decoded, while 24 handcrafted features reach 0.948 and a character ngram model 0.967 with the lowest false positive rate (Figure 2). Removing the path entropy feature costs about 0.15 in F1, whereas removing any of the attack pattern flags changes F1 by less than 0.003, and up to five of the ten features, depending on the input, are constant on this dataset because it carries no response code, no response size and a single user agent.

4. Discussion and Conclusions

The HTTP features cannot contribute on the flow export because the data they need is absent, the described network does not reach the reported score at a standard operating point, a high score rests partly on shortcut features, most benchmark attacks are attempts, and on genuine requests a generic entropy feature and a plain ngram model do the work. None of this says that web attack detection underperforms. It says that evaluation practice matters [5,6]. For SentinelSphere the constructive consequences are concrete, the HTTP features should be evaluated on request logs, detection scores on CIC-IDS2017 should be reported against the corrected labels with the successful attack task shown separately, and a check that no single flow metadata feature carries the result should accompany any headline number.

Supplementary Materials

The following supporting information can be downloaded at the website of this paper posted on Preprints.org.

Funding

This work was supported by the European Union’s Horizon Europe programme under Grant Agreement No. 101119681 (ResilMesh). Views and opinions expressed are those of the authors only and do not necessarily reflect those of the European Union or the granting authority. Neither the European Union nor the granting authority can be held responsible for them.

Data Availability Statement

The analysis code, the repaired feature extractor and the aggregated results are provided as supplementary material with this preprint. CIC-IDS2017, its corrected release and CSIC 2010 are available from their authors and are not redistributed.

Conflicts of Interest

The authors declare no conflicts of interest.

References

  1. Sharafaldin, I.; Lashkari, A.H.; Ghorbani, A.A. Toward generating a new intrusion detection dataset and intrusion traffic characterization. In Proceedings of the 4th International Conference on Information Systems Security and Privacy (ICISSP 2018), 2018; SciTePress; pp. 108–116. [Google Scholar] [CrossRef]
  2. Geirhos, R.; Jacobsen, J.H.; Michaelis, C.; Zemel, R.; Brendel, W.; Bethge, M.; Wichmann, F.A. Shortcut learning in deep neural networks. Nat. Mach. Intell. 2020, 2(11), 665–673. [Google Scholar] [CrossRef]
  3. Engelen, G.; Rimmer, V.; Joosen, W. Troubleshooting an intrusion detection dataset, the CICIDS2017 case study. In 2021 IEEE Security and Privacy Workshops (SPW); IEEE, 2021; pp. 7–12. [Google Scholar] [CrossRef]
  4. Lanvin, M.; Gimenez, P.F.; Han, Y.; Majorczyk, F.; Mé, L.; Totel, E. Errors in the CICIDS2017 dataset and the significant differences in detection performances it makes. In Risks and Security of Internet and Systems, CRiSIS 2022, Lecture Notes in Computer Science; Springer, 2023; pp. 18–33. [Google Scholar] [CrossRef]
  5. Arp, D.; Quiring, E.; Pendlebury, F.; Warnecke, A.; Pierazzi, F.; Wressnegger, C.; Cavallaro, L.; Rieck, K. Pitfalls in machine learning for computer security. Commun. ACM 2024, 67(11), 104–112. [Google Scholar] [CrossRef]
  6. Apruzzese, G.; Laskov, P.; Schneider, J. SoK, pragmatic assessment of machine learning for network intrusion detection. In 2023 IEEE 8th European Symposium on Security and Privacy (EuroS&P); IEEE, 2023; pp. 592–614. [Google Scholar] [CrossRef]
  7. Tantaroudas, N.D.; Karachalios, I.; McCracken, A.J. SentinelSphere, an AI driven cybersecurity platform integrating real time threat detection with security awareness education. Open Res. Eur. 2026a, 6, 58. [Google Scholar] [CrossRef]
  8. Tantaroudas, N.D.; Karachalios, I.; McCracken, A. SentinelSphere, AI driven cybersecurity platform combining threat detection with security awareness. Proc. 21st Int. Conf. Cyber Warf. Secur. (ICCWS 2026) 2026b, 21(1), 476–485. [Google Scholar] [CrossRef]
  9. Tantaroudas, N.D.; Karachalios, I.; McCracken, A.J. SentinelSphere, integrating AI powered real time threat detection with cybersecurity awareness training. arXiv 2026c. [Google Scholar] [CrossRef]
  10. Tantaroudas, N.D.; Karachalios, I.; McCracken, A.J. Where does a Rust speedup come from? Language and algorithm effects in sliding window threat scorer. arXiv 2026d. [Google Scholar] [CrossRef]
  11. Giménez, C.T.; Villegas, A.P.; Marañón, G.Á. HTTP data set CSIC 2010; Information Security Institute of the Spanish National Research Council (CSIC), 2010. [Google Scholar]
  12. Wilson, E.B. Probable inference, the law of succession, and statistical inference. J. Am. Stat. Assoc. 1927, 22(158), 209–212. [Google Scholar] [CrossRef]
Figure 1. Out of fold per class detection of the described network on the 21 flow features, with Wilson 95% intervals. None of the 21 SQL injection flows is detected.
Figure 1. Out of fold per class detection of the described network on the 21 flow features, with Wilson 95% intervals. None of the 21 SQL injection flows is detected.
Preprints 237012 g001
Figure 2. F1 on CSIC 2010 for the ten features under different inputs, for 24 handcrafted features and for a character ngram baseline, with 95% intervals.
Figure 2. F1 on CSIC 2010 for the ten features under different inputs, for 24 handcrafted features and for a character ngram baseline, with 95% intervals.
Preprints 237012 g002
Table 1. Reassessment on the CIC-IDS2017 flow benchmark at threshold 0.5, mean over five seeded splits.
Table 1. Reassessment on the CIC-IDS2017 flow benchmark at threshold 0.5, mean over five seeded splits.
Configuration F1 Precision Recall False positive rate
Described network, 21 flow features 0.112 0.927 0.060 0.0001
Described network, with class weighting 0.368 0.230 0.966 0.0448
Described network, all 78 features 0.890 0.823 0.970 0.0027
Random forest, 21 flow features 0.920 0.954 0.888 0.0006
Random forest, all 78 features 0.988 0.998 0.979 0.0000
Gradient boosting, all features 0.996 0.997 0.995 0.0000
Random forest, all features minus 3 shortcuts 0.948 0.993 0.907 0.0001
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.
Copyright: This open access article is published under a Creative Commons CC BY 4.0 license, which permit the free download, distribution, and reuse, provided that the author and preprint are cited in any reuse.