Evaluation methodology¶
This page explains the steps of a run, the metrics and the limits of the results. Dataset inventory and the Datasets tab in PySAD Space describe the data sources, and Benchmark results links to the interactive result tables.
Steps of a run¶
For each detector and each dataset, the benchmark does these steps once, with seed 0:
It loads the data with
Data.It keeps some of the points, as the list after these steps shows. Then it scales each feature to the range from 0 to 1, with the minimum and the maximum of these points.
It makes the detector with its default parameters and
random_state=0. Some detectors also get the arguments that they require, as the list below shows.It gives each point to
fit_score_partial, which scores the point and then trains the detector on it.It computes the metrics. The first 256 points are the warm-up, and their scores do not count, because the detector has little or no model when it scores them. A stream with fewer than 1,024 points has a warm-up of a quarter of its points.
The parts keep different points, and they use different metrics:
oddsThe first 5,000 points of an ODDS dataset, after a shuffle with
random_state=0. Many ODDS files put all the anomalies at the end, so the order of the file is not a fair stream. The metrics are AUROC and AUPR.driftEvery k-th point of a stream, in time order. k is the smallest step that leaves at most 10,000 points, so the stream keeps all its drifts. The metrics are AUROC and AUPR.
univariate,nabandshinglesAll the points of a NAB series, in time order. The
shinglespart turns each value into a shingle of the last 10 values, and the first 9 shingles repeat the first value. The metrics are the NAB score, and AUROC on the series with anomalies.univariateon UCRAll the points of a UCR series with at most 20,000 points, in time order. The metrics are the solved series, and AUROC after the training part.
Step 2 uses the minimum and the maximum of the data. A live stream does not know them in advance. For a live stream, take them from historical data, or use known physical limits.
These detectors get more arguments in step 3:
HalfSpaceTreesandRSHashget the range from 0 to 1 for each feature.Inqmadgets the number of features.LocalOutlierProbabilityfits on the warm-up points.HTMgets each point with its timestamp, the range from 0 to 1, the probationary period of NAB, and the seed 0. It does not run on the UCR series, which have no timestamps.KNNCADlearns during the probationary period of NAB, as in NAB.RelativeEntropygets the range from 0 to 1.SANDgets a fixed subsequence length of 10, a batch size of 256, andrandom_state=0on both NAB and UCR. It outputs 0 for the first 256 points, fits clusters after the batch completes, scores later points against the last completed batch, and keeps the standard evaluation cutoffs.SeasonalESDandSeasonalHybridESDget the period of the series and a window of 3 periods and one point. The R package of their paper needs more than 2 periods. With an odd window, the detectors give the same anomalies as the R package.
Metrics¶
- AUROC
The probability that a random anomaly gets a higher score than a random normal point. A random detector gets 0.5, and a perfect detector gets 1. Evaluate a detector explains AUROC and AUPR in more detail.
- AUPR
The average precision over all the score thresholds. A random detector gets the fraction of anomalies in the dataset, and a perfect detector gets 1.
- NAB score
NAB marks a window of points around each anomaly, and its score counts each window as one event. The first alert in a window detects it, and an early alert counts more than a late one. A window without an alert is a miss. An alert outside the windows is a false alert, and a false alert soon after a window costs less than others. NAB uses one alert threshold for all the series of a detector, the threshold that gives the highest score. Then it scales the score: a detector without alerts gets 0, and a perfect detector gets 100. The score leaves out the probationary period of each series, which is its first 15% of points, at most 750.
- Solved series
A detector solves a UCR series when its highest score after the training part is at most 100 points from the anomaly. The authors of the archive use this rule.
- Alerts of a calibrator
For each run of the
oddspart, the benchmark gives all the scores to each calibrator. Then it counts the alerts after the warm-up.
NAB has three profiles. The standard profile weights a false alert at 0.11 of a miss. The profile “low false alerts” doubles the weight of a false alert, and the profile “low misses” doubles the weight of a miss.
One threshold for all the series needs scores with the same scale on each series. HTM, KNNCAD and RelativeEntropy give scores from 0 to 1, as the detectors of NAB do. The benchmark gives the scores of the other detectors to ConformalProbabilityCalibrator, whose window holds all the earlier scores of the series. With its default window of 300 scores, many points tie at the highest value.
The benchmark uses the scoring code of NAB. With it, KNNCAD gets NAB scores of 58.0, 43.4 and 64.8, the scores that the scoreboard of NAB lists for its KNN-CAD detector. RelativeEntropy gets higher scores than on the scoreboard, because its histogram follows the paper. HTM gets 64.2, 56.8 and 68.3. The scoreboard lists 64.6, 56.7 and 69.2 for the numentaTM detector of NAB, which uses the same kind of temporal memory, and 70.1, 63.1 and 74.3 for the numenta detector, which uses the backtracking temporal memory of NuPIC.
Result history and audits¶
See Benchmark results history for saved snapshots, the 26 November 2026 audit, and guidance on comparing runs.
What the results do not show¶
Tuned parameters can give very different results. For example,
KitNettrains on its first 1,100 points by default. 7 ODDS datasets have fewer points, so on them, KitNet never ends its training. Choose a detector names the parameters with the largest effect.RSForestscores every point 0.0 until its first window of 512 points is full. On streams with fewer points than 512, such as arrhythmia, glass, ionosphere, lympho, vertebral and wbc, every score after the warm-up is 0.0. Its AUROC is then 0.5 and its AUPR is the fraction of anomalies.The points of the ODDS datasets are independent, so these streams have no drift and no seasonality. The streams with drift show how a detector follows changes over time, but they are only 18 streams. Their thinning also makes the changes faster in points.
The NAB scoreboard has no results for MAD, SAD and the ESD detectors. Their NAB scores depend on the calibration, which NAB does not use. The periods come from the data, because NAB gives no periods.
The UCR results come from the short series only. A longer series can be harder for a detector.
Each detector runs with one seed, and the shingles have one size. Another seed or another shingle size can give other results. A change that draws the same random numbers in another order has the same effect, and on a small dataset it can move the AUROC a lot. For example, pull request 397 made
RobustRandomCutForestcut all its trees in one batch. The model stayed the same, but the cuts of the trees came in another order. Its AUROC on glass with seed 0 went from 0.715 to 0.638, but over seeds 0 to 19 its mean AUROC on glass is 0.675 before the change and 0.686 after it.A run on another platform can give slightly different results for
Inqmad, and forLODAon series with many equal scores.On a series with many equal points,
Inqmadgives these points scores that are equal up to rounding, so the rounding decides their order and the AUROC. For example, onnab/realAWSCloudwatch/ec2_disk_write_bytes_1ef3de.csvwith shingles, 3,217 of the 4,474 scored points, 322 of them anomalies, are copies of the first shingle. A change in rounding moved its AUROC from 0.529 to 0.617, but with the scores rounded to 9 decimals, the AUROC is 0.530 in both cases.Commit 777fcad rounds benchmark scores to 9 significant digits before metrics. This change keeps near-equal scores tied across platforms. With the old 256-point
Inqmadinitial sample, it changed AUROC from 0.5438 to 0.4143 onnab/artificialWithAnomaly/art_increase_spike_density.csv. This series contains only two values. With seed 0 and the 256-point warm-up, 3,776 points count in AUROC. Rounding gave 1,985 points one score, including 197 anomalies. Their raw scores spanned less than 5e-10. Commit 173cfc9 increased the default initial sample to 500 and added a norm floor. The rounded AUROC is now 0.5430.LocalOutlierProbabilitygives probabilities against its initial reference points. Far from these points, most probabilities approach 1. Commit 777fcad introduced rounding to 9 significant digits before metric calculation. This benchmark change keeps equal scores equal across platforms. It also merges probabilities close to 1. Onnab/realAWSCloudwatch/ec2_cpu_utilization_ac20cd.csvwith shingles, 3,588 of the 3,776 scored points round to 1. All 403 anomalies occur among these points. The same raw scores give AUROC 0.774957 before rounding and 0.527868 after rounding. The detector did not change. Commitca9b381ealready includes this rounding rule. The drop from 0.775 to 0.528 reflects the intended benchmark rule, rather than a later detector regression.On a series of integer counts, many points of a window of
IncrementalLOFare copies, so many LOF values are exactly 1 in exact arithmetic. In floating point, they differ in the last bits, and before pull request 544, these differences decided their order. For example, onnab/realTweets/Twitter_volume_GOOG.csv, 13,584 of the 15,586 scored points, 1,145 of them anomalies, have an LOF of 1 within 1e-14. With the rounding to 9 significant digits, these points tie, and the AUROC went from 0.543 to 0.521. The rounding moved the AUROC of 5 other series by 0.005 to 0.019, but the mean AUROC on NAB only from 0.519 to 0.518.Commit 78cb2e4 made
IncrementalLOFandDILOFscores independent of the unit of the values. It replaced the absolute 1e-10 density guard with a guard based on the local distances. Series with many equal points therefore get a different order of duplicate and non-duplicate LOF scores. The seriesnab/realAWSCloudwatch/ec2_disk_write_bytes_1ef3de.csvhas 3,217 copies of the first shingle among its 4,474 scored points. DILOF with shingles moved from 0.5963 to 0.5735 AUROC on this series. Its AUPR moved from 0.1784 to 0.1836. The mean AUROC of DILOF on NAB moved from 0.506 to 0.510 without shingles. The mean with shingles stayed at 0.518, and the standard NAB score rose from 14.93 to 16.97. The lower AUROC on this series reflects the intended unit-independent scores.Commit fe8c658 made the cluster features of
AnyOuthold the sums of each instance minus the first fitted instance. Every distance and variance of the tree depends only on the differences between the instances, so a constant offset leaves the scores the same in exact arithmetic. The last bits of the sums differ, so points with equal or nearly equal scores change their order. Onnab/realAWSCloudwatch/grok_asg_anomaly.csvwithout shingles, 4,365 points count in AUROC after the warm-up, and 465 of them are anomalies. This series repeats a few values, so most points sit at the mean of their cluster. After the change, 3,829 of the 4,365 points, 390 of them anomalies, get a score of at most 1e-8, and 3,174 of them get exactly 0.0. Before the change, 3,071 points, 305 of them anomalies, were at most 1e-8, and the stream had 1,176 unique scores against 412 unique scores after it. The AUROC of AnyOut on this series moved from 0.5293 to 0.4907, and its AUPR from 0.1433 to 0.1279. The shift keeps the sums on the scale of the spread around the first instance, so the density variance stays precise when the values are far from 0. The lower AUROC on this series reflects the intended precision. The mean AUROC of AnyOut on NAB moved from 0.5423 to 0.5417 without shingles and stayed at 0.5622 with shingles. The standard NAB score rose from 57.27 to 58.45.ReferenceWindowModelruns a PyOD model, so its results depend on that model.IForestASDis one example of it.The anomalies also enter the window of a calibrator. On a dataset with many anomalies, fewer normal points pass the threshold, so the false alert rate can be lower than expected. The window of
ConformalProbabilityCalibratorholds 300 scores by default, so its highest value is 299/300, and a threshold of 0.999 never raises an alert. Inalerts.csv, theExpectedcolumn (1 - threshold) applies only to conformal calibrators becauseGaussianTailProbabilityCalibratorevaluates the Gaussian tail at a short-term score average rather than a single score.
KitNet on lympho¶
Commit 87f315b243 removed temporary autoencoders from the feature mapping period.
This follows the training phases in [MDES18] and
KitNET-py.
During feature mapping, KitNet updates only feature correlations and returns zero scores.
The earlier code trained temporary autoencoders during this period and rebuilt them when the number of points doubled.
Those temporary models produced scores before the final feature map existed.
With seed 0 and default parameters, the lympho AUROC fell from 0.8113 to 0.2783. The dataset contains 148 points. The benchmark excludes the first 37 scores as warm-up. KitNet uses 100 points for feature mapping and then starts training its autoencoders. Prequential scoring runs before fitting, so the first 101 scores are zero. All five evaluated anomalies occur at zero-based indices 70, 86, 90, 94 and 98. Each receives a zero score, while later normal points receive positive scores. This explains the AUROC below chance.
The lower AUROC is an intended consequence of removing the temporary models. It does not indicate a reversed anomaly score. The benchmark uses default parameters for every detector and includes scores from unfinished training phases. If a stream is short, choose grace periods that leave enough points for evaluation after training. This changes the evaluation setup, so compare such results separately from the default benchmark.
MedianAbsoluteDeviation on Twitter volume CRM¶
Commit 72b8ef3 changed the denominator from b * MAD + 1e-10 to b * MAD when MAD is positive. This follows the documented score formula. The fallback of 1e-10 remains when MAD is zero.
On nab/realTweets/Twitter_volume_CRM.csv, the published earlier AUROC is 0.5542. A full-stream comparison in one environment gave 0.5534 with the earlier denominator and 0.5396 with the current denominator. The earlier constant changed scores by different amounts as the window MAD changed. This separated some scores that the exact formula and benchmark rounding treat as ties, which changed their contribution to AUROC. The lower score is an intended consequence of the formula correction, not a reason to restore the constant.
The short CI run uses only the first 2,000 points. These points do not contain both classes after warm-up, so their AUROC is undefined.