Blog articleResearch writingComputer science

Adversarial attacks on machine-learning intrusion detection: why defences fail and what is still open

Small, deliberate changes to inputs can make machine-learning models fail, and intrusion detection adds constraints and data problems of its own. This article explains the main attack types, why many defences have failed under adaptive testing, and which open problems could become a doctoral topic.

What you will learn

  • Define adversarial examples, poisoning and evasion attacks
  • Explain why intrusion detection constrains attacks differently from image classification
  • Recognise why defences based on hidden gradients give a false sense of security
  • Identify open problems in adversarial robustness for intrusion detection
  • Narrow an adversarial machine-learning topic into a feasible research question

What you will unlearn

  • Adversarial attacks only affect image classifiers.They have been shown against malware detectors, network-traffic classifiers and text models.
  • Hiding a model's gradients defends it.Gradient masking defeats standard attacks but not attacks adapted to the defence.
  • A defence that stops known attacks is robust.Robustness must be tested against attackers who know about the defence.

Skills you will practise

  • Threat modelling
  • Adversarial evaluation
  • Dataset appraisal
  • Topic narrowing
  • Security research design

What adversarial attacks are

An adversarial attack is a deliberate attempt to make a machine-learning model fail. The best-known form is the adversarial example: an input changed slightly, often imperceptibly to a person, so that a trained classifier gives a wrong answer with high confidence (Wang et al., 2019). This is often compared to an optical illusion for machines, as shown by a logo that a classifier recognised correctly until a small pattern of pixels was altered (Figure 1), and a logo misread as a car once a small car image was overlaid on it (Figure 2). Such perturbations can survive being printed and scanned, which shows that the problem is not confined to digital files (Ozdag, 2018).

A logo image before and after a small adversarial perturbation
Figure 1. Sample of an adversarial attack: small changes to an image cause misclassification.
A logo with a small car image overlaid, leading to a wrong prediction
Figure 2. Sample of an adversarial attack: an overlaid object changes the predicted class.

Attacks are usually grouped by when they act. Poisoning attacks corrupt the training data so that the model learns the wrong thing; evasion attacks leave the model alone and craft inputs at test time. The NIST taxonomy now adds privacy attacks and, for generative AI, prompt injection and misuse, and classifies each attack by the attacker's goals, knowledge and capabilities (Vassilev et al., 2025).

Why intrusion detection is a special case

It is sometimes suggested that adversarial attacks mostly work on images and not on other data. That is not correct. Attacks have been demonstrated against malware detectors, including automated poisoning of their training data (Chen, Xue et al., 2018), and against classifiers of network traffic (Iglesias et al., 2019). What differs is the constraint on the attacker. An image can be changed pixel by pixel; a malicious network flow must still be valid traffic and still achieve its purpose, so many changes that fool a model on paper are impossible in practice. Studies that ignore this constraint can overstate how vulnerable a detector is, and studies that test only unconstrained attacks can overstate how robust a defence is.

Intrusion detection also brings problems that predate adversarial machine learning. Network traffic is highly variable, errors are costly and attack classes change, so a model that performs well in the laboratory may fail in operation (Sommer & Paxson, 2010). Many benchmark datasets are old or synthetic, and their properties limit what results can claim (Ring et al., 2019). A review of security papers found common pitfalls such as sampling bias, data snooping and evaluation only in laboratory settings (Arp et al., 2022). Any study of adversarial robustness in intrusion detection inherits these problems.

Why defences keep failing

Defences fall into a few families: training on adversarial examples, detecting and rejecting suspicious inputs, transforming inputs before classification, and certifying that no small change can alter the output (Wang et al., 2019; Ozdag, 2018).

Detecting adversarial inputs has been described as difficult because there were "no available models for optimising this problem". The real difficulty is the opposite: attackers can usually formulate their task as an optimisation problem and adapt it to whatever defence is deployed. Many proposed defences were evaluated only against attacks that did not know about them.

One influential analysis examined defences accepted at a leading machine-learning conference and found that seven of nine relied on obfuscated gradients, that is, on hiding or distorting the information an attacker would use to compute an adversarial example; adaptive attacks then circumvented six completely and one partially (Athalye et al., 2018). A related article on this site once suggested that removing or hiding gradients was a defence. It is not: it makes standard attacks fail while leaving the model just as vulnerable to attacks designed around the defence. Defences based on changing the decision boundary, such as fuzzy classification boundaries for network classifiers (Iglesias et al., 2019), need the same adaptive testing.

Poisoning has also moved from theory to practice. Carlini et al. (2024) showed that poisoning datasets collected from the web at very large scale is practical and cheap, which matters for any detector trained on data the defender does not fully control.

What is still open: questions a PhD could address

Table 1. Open problems in adversarial attacks on intrusion detection.
Open problemWhy it mattersA possible doctoral question
Realistic threat models for network trafficUnconstrained attacks misstate riskHow robust are flow-based detectors to attacks that preserve protocol validity and malicious function?
Adaptive evaluation of defencesNon-adaptive tests overstate robustness (Athalye et al., 2018)Which proposed IDS defences survive attacks designed against them?
Poisoning of training pipelinesDefenders rarely control all training data (Carlini et al., 2024)How can poisoning of shared threat-intelligence feeds be detected?
Dataset realismOld or synthetic datasets limit claims (Ring et al., 2019)Do robustness results on benchmark datasets transfer to operational traffic?
Shared vocabulary and reportingStudies use incompatible terms and settings (Vassilev et al., 2025)What minimum reporting standard would make robustness results comparable?

Illustrative example. A candidate interested in "adversarial attacks on IDS" narrows the topic to one model family, one realistic attacker (who can alter timing and padding but must keep traffic valid), one modern dataset and one defence. The research question becomes whether the defence still helps against an attacker who knows about it. The scope is small enough for a thesis and the answer would be useful whichever way it comes out. Before committing, the candidate checks that the dataset documents how it was generated, for example a dataset built from profiled user behaviour in a controlled testbed (Sharafaldin et al., 2018).

How to evaluate robustness in a thesis

Whatever the topic, examiners will judge an adversarial study mainly by its evaluation. Three principles cover most of what they look for. First, state the threat model before any experiment: what the attacker wants, what they know about the model and data, and what they can change (Vassilev et al., 2025). Second, test each defence against an attack designed for it, not only against standard attacks, and report what happens when the attacker is given more time or knowledge (Athalye et al., 2018). Third, measure what matters in operation: for intrusion detection that includes false-positive rates and performance on traffic the model has not seen, not only accuracy on a held-out split of the same dataset (Sommer & Paxson, 2010; Arp et al., 2022).

Table 2. What to report in an adversarial robustness study.
ReportWhy examiners want it
Threat model (goal, knowledge, capability)Defines what "robust" means in the study
Constraints on feasible perturbationsShows attacks are possible against real traffic
Attacks used, including adaptive onesAvoids a false sense of security
Datasets, their age and how they were generatedLets readers judge transfer to practice
Clean and adversarial performance, with false-positive ratesShows the cost of robustness
Code, settings and random seedsAllows others to reproduce and attack the defence

Common mistakes in adversarial IDS research

  • Testing a defence only against attacks that do not know it is there.
  • Applying image-style perturbations to network features without checking that the traffic is still valid.
  • Relying on a single outdated benchmark dataset and claiming operational relevance.
  • Reporting accuracy without the false-positive rate, which dominates the cost of an IDS.
  • Treating gradient masking or obscurity as robustness.

Related pages: an annotated literature review of six 2019 studies on adversarial attacks, digital twin intrusion detection for SCADA, fixing flaws in a cybersecurity PhD methodology and an example manuscript on deep learning for intrusion detection.

Key takeaways

Your next step

Want to apply this to your own study?

  1. 1Tell us your topic, data and deadline
  2. 2A subject mentor reviews your work with you
  3. 3You get a plan and a quote
PhD topic selection

References

  1. Arp, D., Quiring, E., Pendlebury, F., Warnecke, A., Pierazzi, F., Wressnegger, C., Cavallaro, L., & Rieck, K. (2022). Dos and don'ts of machine learning in computer security. In Proceedings of the 31st USENIX Security Symposium (pp. 3971–3988). USENIX Association. https://www.usenix.org/conference/usenixsecurity22/presentation/arp
  2. Athalye, A., Carlini, N., & Wagner, D. (2018). Obfuscated gradients give a false sense of security: Circumventing defenses to adversarial examples. In Proceedings of the 35th International Conference on Machine Learning (Proceedings of Machine Learning Research, Vol. 80, pp. 274–283). PMLR. https://proceedings.mlr.press/v80/athalye18a.html
  3. Carlini, N., Jagielski, M., Choquette-Choo, C. A., Paleka, D., Pearce, W., Anderson, H. S., Terzis, A., Thomas, K., & Tramèr, F. (2024). Poisoning web-scale training datasets is practical. In 2024 IEEE Symposium on Security and Privacy (pp. 407–425). IEEE. https://doi.org/10.1109/SP54263.2024.00179
  4. Chen, S., Xue, M., Fan, L., Hao, S., Xu, L., Zhu, H., & Li, B. (2018). Automated poisoning attacks and defenses in malware detection systems: An adversarial machine learning approach. Computers & Security, 73, 326–344. https://doi.org/10.1016/j.cose.2017.11.007
  5. Iglesias, F., Milosevic, J., & Zseby, T. (2019). Fuzzy classification boundaries against adversarial network attacks. Fuzzy Sets and Systems, 368, 20–35. https://doi.org/10.1016/j.fss.2018.11.004
  6. Ozdag, M. (2018). Adversarial attacks and defenses against deep neural networks: A survey. Procedia Computer Science, 140, 152–161. https://doi.org/10.1016/j.procs.2018.10.315
  7. Ring, M., Wunderlich, S., Scheuring, D., Landes, D., & Hotho, A. (2019). A survey of network-based intrusion detection data sets. Computers & Security, 86, 147–167. https://doi.org/10.1016/j.cose.2019.06.005
  8. Sharafaldin, I., Lashkari, A. H., & Ghorbani, A. A. (2018). 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) (pp. 108–116). SciTePress. https://doi.org/10.5220/0006639801080116
  9. Sommer, R., & Paxson, V. (2010). Outside the closed world: On using machine learning for network intrusion detection. In 2010 IEEE Symposium on Security and Privacy (pp. 305–316). IEEE. https://www.icsi.berkeley.edu/icsi/publication_details?n=2818
  10. Vassilev, A., Oprea, A., Hamin, M., Fordyce, A., Anderson, H., & Davies, X. (2025). Adversarial machine learning: A taxonomy and terminology of attacks and mitigations (NIST AI 100-2e2025). National Institute of Standards and Technology. https://doi.org/10.6028/NIST.AI.100-2e2025
  11. Wang, X., Li, J., Kuang, X., Tan, Y., & Li, J. (2019). The security of machine learning in an adversarial setting: A survey. Journal of Parallel and Distributed Computing, 130, 12–23. https://doi.org/10.1016/j.jpdc.2019.03.003

How to cite this article

Choose your referencing style, then copy. Check your university's or journal's guide for local variations.

PhD Research Lab Academy. (2019, October 16). Adversarial attacks on machine-learning intrusion detection: why defences fail and what is still open. PhD Research Lab. https://www.phdassistance.com/blog/recent-challenges-in-artificial-intelligence-adversarial-attacks/

PhD Research Lab Academy. “Adversarial Attacks on Machine-learning Intrusion Detection: Why Defences Fail and What Is Still Open.” PhD Research Lab, 16 Oct. 2019, www.phdassistance.com/blog/recent-challenges-in-artificial-intelligence-adversarial-attacks. Accessed [access date].

PhD Research Lab Academy (2019) Adversarial attacks on machine-learning intrusion detection: why defences fail and what is still open. PhD Research Lab. Available at: https://www.phdassistance.com/blog/recent-challenges-in-artificial-intelligence-adversarial-attacks/ (Accessed: [access date]).

PhD Research Lab Academy. “Adversarial Attacks on Machine-learning Intrusion Detection: Why Defences Fail and What Is Still Open.” PhD Research Lab. October 16, 2019. https://www.phdassistance.com/blog/recent-challenges-in-artificial-intelligence-adversarial-attacks.

PhD Research Lab Academy, ‘Adversarial Attacks on Machine-learning Intrusion Detection: Why Defences Fail and What Is Still Open’ (PhD Research Lab, 16 October 2019) <https://www.phdassistance.com/blog/recent-challenges-in-artificial-intelligence-adversarial-attacks> accessed [access date].

PhD Research Lab Academy. Adversarial attacks on machine-learning intrusion detection: why defences fail and what is still open [Internet]. PhD Research Lab; 2019 Oct 16 [cited [access date]]. Available from: https://www.phdassistance.com/blog/recent-challenges-in-artificial-intelligence-adversarial-attacks/

PhD Research Lab Academy, “Adversarial attacks on machine-learning intrusion detection: why defences fail and what is still open,” PhD Research Lab, Oct. 16, 2019. [Online]. Available: https://www.phdassistance.com/blog/recent-challenges-in-artificial-intelligence-adversarial-attacks. [Accessed: [access date]].

@online{recent_challenges_in_artificial_intelligence_adversarial_attacks_2019,
  author = {{PhD Research Lab Academy}},
  title = {{Adversarial attacks on machine-learning intrusion detection: why defences fail and what is still open}},
  organization = {PhD Research Lab},
  date = {2019-10-16},
  url = {https://www.phdassistance.com/blog/recent-challenges-in-artificial-intelligence-adversarial-attacks},
  urldate = {[access date]}
}

This article is for learning. Use it to understand the method and cite the original sources above in your own work; do not copy or submit it as your own.

Adversarial attacks on machine-learning intrusion detectionNeed help applying it to your study?
PhD topic selection