Detectors for spoofed denial-of-service traffic usually learn from labeled attacks. They score very well on the dataset they were trained on and have no principled way to handle an attack they have never seen. Particle physicists face the same problem when they hunt for a signal they cannot model. They learn what "background only" looks like from nearby control regions, called sidebands, where no signal is expected. They then train a classifier to tell the real data in the signal region apart from synthetic background. Whatever that classifier finds must be something the background cannot explain. We propose to carry this approach, the CATHODE method (Classifying Anomalies THrough Outer Density Estimation), over to network traffic. In the network version, time plays the role that particle mass plays in physics. Traffic in the minutes around a suspect window is the sideband. A density model conditioned on time predicts what legitimate traffic should look like inside the window. A classifier that separates observed flows from those predictions assigns each flow a score that approximates the likelihood ratio between "attack" and "legitimate," and it needs no attack labels to do so.
This matters for spoofing in particular because filtering forged traffic by address risks cutting off the legitimate hosts whose addresses were forged. What an operator needs is a per-flow score with a known false-alarm rate, not a window-level alarm. We also bring over the physics community's discipline about fake signals. Their term for it is "sculpting": a discriminator that manufactures an excess out of background it has mismodeled. Security machine learning papers rarely report this failure mode, and we make it a first-class test.
Core Claim
A weakly supervised discriminator can detect spoofed floods, including low-rate ones, better than outlier detection trained on normal traffic and better than threshold tripwires, and it generalizes across datasets better than supervised classifiers. It works by learning background from time sidebands and then separating data from interpolated background. It can also be made to hold its false-alarm rate on windows with no attack, which supervised detectors cannot guarantee.
The mechanism is simple to state. Let $x$ be a flow's feature vector and $m$ its timestamp. Let $p_b(x \mid m)$ be the density of legitimate traffic and $p_s(x)$ the density of attack traffic. Let $\epsilon$ be the unknown attack fraction inside the signal window. A classifier trained to separate window data from samples of a learned $\hat p_b(x \mid m)$ converges toward
$$ \frac{p_{\text{data}}(x)}{\hat p_b(x)} = (1-\epsilon) + \epsilon \, \frac{p_s(x)}{p_b(x)} \quad \text{when } \hat p_b = p_b, $$
which is monotonic in the signal-to-background likelihood ratio. Ranking flows by this output is therefore optimal ranking even though no attack was ever labeled. The approach fails only where $\hat p_b$ is wrong, and the control-region tests below are designed to catch that.
Relation to Prior Work
The method comes directly from Isolating Unisolated Upsilons with Anomaly Detection in CMS Open Data. That work trained normalizing flows (neural density models) on mass sidebands, interpolated them into the signal region, and trained boosted decision trees on data versus synthetic background, raising a buried dimuon resonance from $1.6\sigma$ to $6.4\sigma$. It checked for sculpting on same-sign muon pairs that should contain no signal. We reuse its pipeline and its control-sample logic. What we change is the resonant variable, from mass to time, and the object being classified, from collision events to network flows. The physics setting benefits from smooth, well-behaved sidebands. Network traffic drifts with the time of day and has bursts, so whether interpolation holds up is the central empirical question here, not a detail.
On the network side, the closest system is Detection and mitigation of DDoS attacks based on multi-dimensional characteristics in SDN. It pairs a three-sigma tripwire on switch port statistics with a supervised wavelet-plus-CNN classifier, and it localizes attackers by physical ingress port rather than by spoofable headers. It motivates our work by showing that tripwires alone are too coarse, and it supplies the ingress-port idea we adopt for filtering. It depends on labeled attacks and a software-defined network (SDN) controller, which we do not need. Rank Correlation for Low-Rate DDoS Attack Detection shows that low-rate pulsing attacks hide below volumetric thresholds and can be separated by partial rank correlation, but only as a window-level alarm computed at $O(n^2T)$ cost. That paper defines the hard regime we target. It also constrains us: our output must be per-flow and cheap to score. Packet-marking and traceback schemes such as Adjusted Probabilistic Packet Marking for IP Traceback and A practical and robust inter-domain marking scheme for IP traceback need routers to cooperate. Our method is passive and runs at the victim, so it complements traceback rather than replacing it.
Research Program
We build flow records by aggregating packets by address, port, and protocol over short intervals. Each record carries features that spoofing tends to distort: the gap between the observed time-to-live (TTL, the hop counter in the packet header) and that source prefix's typical value, inter-packet delay statistics, packet sizes, the mix of TCP flags, the ingress interface, and window-level entropy of source addresses. The conditioning variable is time.
For each candidate window we fit a conditional normalizing flow on the flanking sidebands. We sample synthetic background at the window's timestamps, train a gradient-boosted classifier on data versus samples using k-fold splits so that no flow is scored by a model that saw it, and output per-flow scores. Filtering drops flows above a threshold, set either per ingress port or per prefix, and chosen to meet a target false-positive rate measured on control regions.
Two variants address deployment. The offline variant uses sidebands on both sides of the window; it is faithful to CATHODE and suited to forensics. The online variant uses only past sidebands and has to extrapolate. We expect it to be weaker, and measuring how much weaker is part of the contribution.
The analog of the same-sign control has two parts. One is traffic in the same window to destination prefixes and ports that the attack did not target. The other is attack-free days run through the identical pipeline. Any excess found there is sculpting.
Baselines
The naive reference point is a fixed per-interface packet-rate threshold together with the three-sigma port-statistics tripwire used as Stage 1 in Detection and mitigation of DDoS attacks based on multi-dimensional characteristics in SDN. We calibrate it on the same sidebands so that it gets the same information about normal traffic.
The strongest existing detector is that paper's supervised wavelet-plus-CNN classifier. It reports 99.23% accuracy on InSDN and 99.65% on simulated SDN data. For CIC-DDoS2019 and CIC-IDS2017 it reports only qualitative superiority over CNN-LSTM, and no reported result was found on Lacuna for either dataset alone. We reimplement it with the same features and the same hyperparameter search budget as our classifier stage. We evaluate it in two settings: in-distribution, where it gets labels from the test dataset, and cross-dataset, where it is trained on one corpus and tested on another. We do not expect to beat it in-distribution. Beating it means matching it within a few points of true-positive rate at a fixed per-flow false-positive rate of $10^{-3}$ cross-dataset, and exceeding it on attack classes held out of its training set.
For low-rate attacks, the baseline is partial rank correlation from Rank Correlation for Low-Rate DDoS Attack Detection. It reports attack correlations of 0.8 to 1.0 against a legitimate range of −0.2 to 1.0, but no detection-rate figure. We run it on identical windows and turn its output into window-level detection curves.
The ablation that isolates our key ingredient replaces "classify data against interpolated background" with "fit the same conditional flow on sidebands and flag low-density flows." This is plain outlier detection with the same model and data. If it matches the full method, weak supervision contributes nothing. A second ablation drops the time conditioning, which tests whether modeling drift matters.
Why not just…?
Why not just deploy ingress filtering or source address validation at the edge? Where it is deployed, it works and it is better than any detector. The evidence in the file is that it is not universal. HBIF-AD motivates cross-domain filtering by the failure of edge schemes such as D-SAVI across administrative boundaries, reporting roughly a 10% accuracy gain over them. ASEM likewise notes that uncooperative networks keep forwarding forged traffic. Our method serves a victim who cannot control upstream networks.
Why not just use a TTL-consistency table, flagging packets whose hop count does not match their claimed source? This is a real threat, because the most informative spoofing feature may simply be the TTL gap. We include it both as a stand-alone baseline and as an input feature. We report how much the learned method adds beyond it, especially against attackers who randomize TTL, which we inject deliberately. If the table alone matches the full method on true spoofing, we will say so and reduce the claim to non-TTL attacks and to calibration.
Why not just train a density model on normal traffic and threshold it? This is the outlier-detection ablation above. Outlier scores flag every rare legitimate flow, whereas the data-versus-background classifier flags only what is over-represented in this window compared with the prediction. The signal-injection curves below will show whether that difference matters at low attack fractions.
Why not just train a supervised classifier on more attack types? Supervised training does best on attacks it has seen. The cross-dataset and held-out-class splits measure exactly what labels fail to buy, and we report both regimes honestly.
Proposed Experiments
We use CIC-DDoS2019, CIC-IDS2017, and InSDN, which are day-long captures with timestamped attack windows. We also use the CAIDA 2007 DDoS trace for low-rate floods and MIT Lincoln Laboratory traffic as a benign control. Because several attack classes in these corpora are reflection attacks, where packets reach the victim from real reflector addresses, we restrict the headline spoofing results to classes with genuinely forged sources.
To test whether the method recovers a signal of known size, we inject synthetic spoofed SYN and UDP floods into benign segments at attack fractions from $10^{-1}$ down to $10^{-4}$. The injected floods come in three flavors: fixed TTL, randomized TTL, and low-rate pulsing. We plot detection significance and true-positive rate at a fixed false-positive rate against injected fraction, mirroring the physics sensitivity curves.
Metrics are area under the ROC curve, true-positive rate at per-flow false-positive rates of $10^{-3}$ and $10^{-4}$, collateral damage (the fraction of legitimate flows dropped, broken down by forged-address owner), detection latency, and scoring cost per flow.
Three checks decide the outcome. First, on attack-free days and untargeted control destinations, the false-alarm rate must match the calibrated target. If it does not, the method sculpts and fails. Second, the full method must beat the outlier-detection ablation at attack fractions below 1%. Third, cross-dataset, it must approach the supervised baseline while beating the TTL table on randomized-TTL floods. If the online, past-only variant loses most of the offline gain, the result is a forensic tool rather than an inline filter, and we will report it that way.
References
- Isolating Unisolated Upsilons with Anomaly Detection in CMS Open Data
- Detection and mitigation of DDoS attacks based on multi-dimensional characteristics in SDN
- Rank Correlation for Low-Rate DDoS Attack Detection: An Empirical Evaluation
- Adjusted Probabilistic Packet Marking for IP Traceback
- A practical and robust inter-domain marking scheme for IP traceback
- HBIF-AD: A Hybrid Blockchain-based IP Filtering Method for Autonomous Domains