What cybersecurity data science is
Cybersecurity aims to protect the confidentiality, integrity and availability of systems and data (the CIA triad) against threats such as unauthorised access, malware, denial-of-service attacks, phishing and previously unseen (zero-day) exploits. As more of this work depends on analysing large volumes of security data, security a data science, in which machine learning is applied to quantify risk, detect anomalous behaviour and support security decisions, has become its own area of study (Sarker et al., 2020).
Sarker et al. (2020) define the field as a process rather than a fixed set of algorithms: it spans collecting security data, preparing it, building machine learning models from it, and updating those models as new data and attack types appear. A doctoral project in this area should be located within that process, addressing a specific stage, rather than treating "apply a classifier to security data" as a complete contribution.
This matters because a model evaluated once, on one dataset, says little about how it will perform once deployed, when attacker behaviour and network conditions have moved on from the data it was trained on. Framing a project around one named stage of the process, such as how features are engineered from raw traffic, or how a model is updated incrementally as new labelled examples arrive, gives a clearer, more defensible scope than a general claim to have "applied machine learning to cybersecurity".
- 1Security data collection (network traffic, host logs, or both)
- 2Data preparation (cleaning, normalisation, feature extraction)
- 3Machine learning modelling (feature engineering, clustering, classification, rule generation)
- 4Incremental learning and updating (keeping the model current as data and attacks change)
Matching machine learning tasks to security problems
Different security problems suit different kinds of learning task. Supervised learning, using methods such as naive Bayes, decision trees, k-nearest neighbours and support vector machines, is used for classification tasks such as labelling traffic as an attack or benign, and for regression tasks such as estimating risk scores; it requires labelled examples of both normal and attack behaviour (Sarker et al., 2020). Unsupervised learning, such as k-means or hierarchical clustering, groups behaviour without labels and is used to detect anomalies that do not match any known attack signature. Deep learning methods (multilayer perceptrons, convolutional networks, and recurrent or long short-term memory networks) tend to perform better with large volumes of data, but need more computation and are harder to interpret (Sarker et al., 2020; Xin et al., 2018).
Xin et al. (2018) reviewed how these families of methods have been applied across intrusion detection, malware analysis and spam and phishing detection, and noted that no single family dominates across all tasks: the right choice depends on whether labelled data are available, how much data there is, and whether an analyst needs to understand why a decision was made, which matters for triage and for legal or audit requirements.
A related, often conflated distinction is between signature-based and anomaly-based detection, which cuts across the machine learning task types above. Signature-based systems match observed behaviour against known attack patterns and are reliable for attacks that have been seen before, but cannot detect a genuinely new attack. Anomaly-based systems, typically built on the unsupervised or statistical methods described above, flag behaviour that deviates from a learned notion of normal activity, which can catch unknown attacks but tends to raise more false positives. Most current systems, and most recent research, combine the two rather than treating them as rival approaches (Sarker et al., 2020).
| Task type | Example methods | Typical use | Main limitation |
|---|---|---|---|
| Supervised classification | Naive Bayes, decision trees, k-NN, SVM | Labelling traffic or events as attack or benign | Needs representative labelled data for both classes |
| Unsupervised clustering | k-means, hierarchical clustering | Flagging anomalous behaviour with no known signature | Higher false-positive rates; harder to validate without labels |
| Deep learning | MLP, CNN, RNN/LSTM | Large-scale traffic or malware feature data | Needs more data and compute; less interpretable |
Benchmark datasets and their limits
Research in this area is usually evaluated on a small set of benchmark datasets, which makes it important to understand their origin and age. Moustafa and Slay (2015) built UNSW-NB15 from traffic generated in a controlled testbed, including both normal activity and nine attack categories, specifically to address the ageing and unrealistic traffic patterns of older datasets such as KDD’99. Sharafaldin et al. (2018) later built the CIC-IDS2018 dataset using a similar testbed approach with updated attack types and traffic generation profiles, for the same reason: earlier datasets no longer represent current network and attack behaviour.
A dissertation that evaluates a new method only on an older benchmark, without discussing whether that benchmark still represents current attacks, invites a straightforward examiner question. Momand et al. (2023) reviewed recent intrusion detection research and found that studies still mix old and new benchmark datasets inconsistently, which makes it difficult to compare reported results across papers; stating clearly which dataset, which attack categories and which pre-processing steps were used is therefore part of a credible method section.
It is also worth distinguishing a dataset’s size from its realism. A large dataset generated in a single, controlled testbed can still under-represent the diversity of real network traffic, encrypted protocols or the behaviour of a genuinely novel attack family. Where possible, a thesis should state this limitation explicitly rather than let a high reported accuracy on one benchmark stand in for a general claim about detection performance in deployment.
Open methodological problems
Beyond dataset age, Sarker et al. (2020) and Momand et al. (2023) both point to recurring, addressable problems: class imbalance (attack events are far rarer than normal traffic, which biases naive accuracy figures); concept drift (attacker behaviour changes over time, so a model trained once degrades); the volume of alerts a detector generates, which needs correlation and prioritisation to be useful to an analyst; and the difficulty of combining signature-based detection (reliable for known attacks) with anomaly-based detection (needed for unknown ones) without an unmanageable false-positive rate.
Guntoro (2024) reached a similar conclusion in a narrower review of machine learning algorithms for intrusion detection, noting that reported accuracy figures vary widely between studies partly because of inconsistent handling of class imbalance, and recommending that future comparative work report precision, recall and a measure such as the F1 score for the minority (attack) class specifically, not only overall accuracy.
Interpretability is a further open problem, particularly for deep learning models. An analyst deciding whether to act on an alert, or a security team justifying a decision after an incident, needs some account of why a model flagged a given event, not only a score. Xin et al. (2018) noted that this trade-off between the detection power of deep models and the transparency of simpler ones is unresolved, and a thesis that proposes a deep learning detector could usefully address it directly, for example by reporting a feature-attribution method alongside the detector’s predictions and checking whether the attributions make sense to a security analyst.
Worked example (illustrative)
A hypothetical doctoral project addresses class imbalance directly: it trains a gradient-boosted classifier on UNSW-NB15 (Moustafa & Slay, 2015), compares standard training against a version using class-weighted loss and a version using synthetic minority oversampling, and reports precision, recall and F1 for each attack category separately, following the reporting practice Guntoro (2024) recommends. The discussion addresses whether gains on UNSW-NB15 also appear on CIC-IDS2018 (Sharafaldin et al., 2018), as a basic check against overfitting to one benchmark’s particular traffic generation method.
Common mistakes
- Reporting only overall accuracy on an imbalanced security dataset, which can look high even when the minority (attack) class is detected poorly.
- Evaluating a new method on one benchmark dataset only, without checking whether results transfer to another.
- Treating signature-based and anomaly-based detection as mutually exclusive choices rather than complementary techniques.
- Citing a dataset’s popularity as evidence of its continued relevance, rather than checking when it was built and what attack types it represents.
Key takeaways
- Cybersecurity data science is a process, from data collection to incremental model updating, not a single trained classifier (Sarker et al., 2020).
- Supervised, unsupervised and deep learning methods suit different security tasks; no one family dominates across all of them (Sarker et al., 2020; Xin et al., 2018).
- Standard benchmark datasets such as UNSW-NB15 and CIC-IDS2018 were built specifically to address the ageing of earlier datasets (Moustafa & Slay, 2015; Sharafaldin et al., 2018).
- Class imbalance, concept drift and alert volume are recurring, addressable research problems in this field (Sarker et al., 2020; Momand et al., 2023).
- A credible evaluation reports precision, recall and F1 for the attack class specifically, and checks results across more than one benchmark (Guntoro, 2024).
