Detectors for rare failures, such as a defect on one part in ten thousand or a valve fault in a long sensor stream, are usually trained only on normal data. One common design reconstructs each input as the normal version the model expects, then flags large differences between input and reconstruction. These detectors fail in two characteristic ways. First, nobody knows where to set the alarm threshold, because there are no real anomalies to tune on. Second, when practitioners add fake anomalies to sharpen the detector, the detector learns to spot the fakes rather than real faults. This proposal argues that both failures come from ignoring the same object: the extreme upper tail of the detector's scores on normal data. The idea is to measure that tail with extreme value theory, the branch of statistics that models the far tail of a distribution from its largest observations. The measured tail is then used twice. At training time, it decides how severe each synthetic anomaly should be, so fakes sit just beyond the normal tail rather than far outside it. At deployment, it sets a threshold that targets a stated false-alarm rate, such as one in ten thousand, even when only a few hundred normal examples are available for calibration.
In two sentences: train the detector on fake anomalies whose severity is chosen so that they land just past the extreme tail of normal-data scores, as estimated by a fitted Generalized Pareto Distribution. Then set the alarm threshold from that same fitted tail, instead of guessing or using an empirical quantile that cannot resolve rare false-alarm rates. The extreme-event-underestimation literature supplies the lens. Models trained on average-case losses pull extreme inputs toward the mean. That pull is what makes reconstruction residuals grow on true anomalies, and it is also what hides moderately unusual inputs. Controlling where synthetic anomalies sit relative to the tail controls which side of that effect the detector learns.
Core Claim
The proposal makes two connected claims, which are separable and will be tested separately.
The first is about thresholds. Fitting a Generalized Pareto Distribution (GPD) to the largest held-out normal scores of a reconstruction-based detector gives a threshold whose realized false-alarm rate tracks the target rate. This should hold at targets ($q = 10^{-3}$ to $10^{-4}$) where the empirical quantile of a few hundred normal samples is undefined or wildly unstable. Writing $u$ for an initial high threshold on held-out normal scores, $n$ for the number of held-out scores, $N_u$ for how many exceed $u$, and $\hat\sigma,\hat\xi$ for the fitted GPD scale and shape, the alarm threshold for target false-alarm probability $q$ is
$$z_q = u + \frac{\hat\sigma}{\hat\xi}\left[\left(\frac{q\,n}{N_u}\right)^{-\hat\xi} - 1\right],$$
which is the peaks-over-threshold formula of Anomaly Detection in Streams with Extreme Value Theory.
The second claim is about training. A synthetic anomaly is most useful when its residual under a frozen, normal-only reconstruction model falls in the band between $z_q$ and $z_{q/100}$. That means it is rarer than any normal example the detector will tolerate, but not grossly separable. The prediction is that a detector trained on such "tail-matched" anomalies generalizes to unseen real anomaly types better than one trained on the gross texture corruptions in current practice. The mechanism is that the classifier is forced to learn the boundary of the normal tail rather than the signature of the corruption.
Relation to Prior Work
Three lines of work motivate the proposal.
DRÆM pairs a reconstruction network with a second network that compares input and reconstruction pixel by pixel. It trains both on images corrupted by Perlin-noise masks filled with external textures, and it reports 98.0 image-level AUROC and 68.4 pixel-level average precision on MVTec AD. It shows that synthetic anomalies can be powerful. However, it controls severity only through heuristic randomization and sets no principled operating point.
CORE reconstructs tabular queries from retrieved normal examples and reports an average AUROC of 0.8488 across 34 datasets. It explicitly rejects synthetic anomalies, arguing that they fail to copy the correlation structure of real outliers and push classifiers to overfit to artifacts. CORE directly contradicts DRÆM, and this proposal takes a position between them. Synthetic anomalies are useful only when placed correctly relative to the normal tail, and their realism matters less than their placement. If CORE is right that structure mismatch dominates regardless of placement, our tabular experiments will show it.
The MVTec AD paper names the thresholding problem directly. It also documents how a plain autoencoder can reach 0.86 AUROC on the Cable category while localizing almost nothing (0.05 per-region overlap). That result motivates comparing operating-point metrics rather than only ranking metrics.
Two lines of work supply the method. SPOT, from Anomaly Detection in Streams with Extreme Value Theory, fits a GPD to threshold excesses to obtain distribution-free alarm levels on univariate streams, reaching 86% true positive rate at under 4% false positive rate on network SYN floods. We reuse its estimator but apply it to the scalar output of a learned high-dimensional detector, which sidesteps SPOT's univariate, independent-observation restriction. DeepGPD and the extreme-value loss in Nowcasting of Extreme Precipitation Using Deep Generative Models show that GPD-based modeling captures tails better than plain regression (DeepGPD 0.5688 NLL versus 0.6332 for CNN regression). Both use the GPD to fit targets, whereas we use it to place training examples and set thresholds.
Finally, EVEREST adds training-only GPD and evidential heads to a compact Transformer for solar flares and the SKAB valve benchmark. It is the closest work that brings extreme value theory into rare-event detection. However, it is supervised on real labels and involves no reconstruction or synthesis, so it serves as a supervised reference point rather than a direct competitor.
Research Program
The system has three stages.
Stage one: reconstruction model and tail fit. A reconstruction model is trained only on normal data. It is a DRÆM-style U-Net for images, a temporal autoencoder for multivariate sensor windows, and CORE's in-context reconstructor for tables. We then freeze it and compute residual scores on a held-out normal split. A GPD is fitted to those scores above the 95th percentile. The shape estimate $\hat\xi$ is reported for every dataset, because the extrapolation is unreliable when the tail is bounded ($\hat\xi < 0$ with small samples). This is a known constraint from the treatment-effect extreme value literature (Extreme Continuous Treatment Effects).
Stage two: tail-matched synthesis. We keep each domain's existing corruption family:
- Perlin-masked textures for images.
- Localized drift, spike, and stuck-sensor injections for time series.
- Feature-correlation-breaking perturbations for tables.
Each family is given a continuous severity knob, such as blend opacity or perturbation magnitude. For each training sample, we search over severity by bisection until the frozen model's residual lands in the target band $[z_q, z_{q/100}]$, and we keep a small fraction of unconstrained easy anomalies for stability. The discriminative network is then trained on this mixture, as in DRÆM. Because the band is defined under the frozen reconstruction model, the severity target does not chase the discriminator as it learns. This avoids a collapse in which ever-weaker corruptions become label noise.
Stage three: deployment threshold. The trained discriminator's scores on a second held-out normal split are refitted with a GPD, and the alarm is set at $z_q$ for the target false-alarm rate.
The analysis asks two questions. First, does the realized false-alarm rate on unseen normal data match $q$? Second, at that fixed rate, how many real anomalies are caught, with real anomalies drawn from defect types never used to design the synthetic family?
Baselines
The naive reference point is a plain convolutional (or temporal) autoencoder trained on normals with an $L_2$ residual score. Its threshold is set at the maximum held-out normal score, which is what a practitioner without anomalies would do. It is trained on the same normal splits, and it shows how much is gained by anything more careful.
The strongest existing method on images is DRÆM as published, reported at 98.0 image AUROC and 68.4 pixel AP on MVTec AD (DRÆM). We will rerun it from its released recipe on our exact splits, with the same architecture, training steps, and seeds, so that the only differences are severity selection and thresholding. For tabular data, the strongest method is CORE (average AUROC 0.8488 over its 34 datasets, CORE), run on the same subset and splits. On SKAB, the reported figure is EVEREST's 98.16% F1 (EVEREST). Because EVEREST uses real labels, it bounds what normal-only methods can reach rather than serving as a like-for-like competitor.
Beating DRÆM means two things. On MVTec AD, recall at a fixed pixel-level false-alarm rate of $10^{-3}$ must be higher, with realized false-alarm rate no worse. On held-out defect types, pixel AP must be no lower than the rerun DRÆM. A gain only in AUROC would not count, because AUROC does not reflect the operating point.
Three ablations isolate the ingredients. The first is DRÆM with our GPD threshold but its original random severity, which isolates the threshold contribution. The second is tail-matched synthesis with the band set by empirical quantiles instead of the GPD, which isolates whether extreme value extrapolation matters at training time. The third is tail-matched synthesis with a uniform severity distribution over the same range, which isolates placement from simple range expansion. Every variant gets the same hyperparameter search budget of a fixed number of trials, tuned only on synthetic validation anomalies, never on real ones.
Why not just…?
Why not just use the empirical quantile, or a conformal threshold, on held-out normal scores? This is the right choice whenever enough normal data exists. With $n$ held-out samples, the empirical quantile cannot resolve false-alarm rates below roughly $1/n$. An MVTec category has a few hundred normal images, so image-level targets of $10^{-3}$ are out of reach without extrapolation. The treatment-effect work reports that naive nonparametric tail estimates become badly biased and flat when tail data are sparse (Extreme Continuous Treatment Effects). Pixel-level scores, by contrast, number in the millions, so there the empirical quantile is a genuine threat. We will report both regimes, and if the GPD gives no benefit at the pixel level, we will say the gain is confined to the low-sample image and window level.
Why not just widen DRÆM's severity randomization, or mine hard synthetic negatives? Wider randomization covers the tail band by accident, and hard-example mining driven by the discriminator risks collapsing to near-normal fakes. The uniform-severity ablation is designed to test the first alternative directly. If it matches tail-matching, the contribution reduces to "use a broader range," and we will report that.
Why not just skip synthesis, as CORE argues, and put an extreme value threshold on a plain reconstruction score? This is the most serious alternative, because CORE's evidence against synthetic anomalies on tables is direct. The comparison of CORE plus our GPD threshold against CORE-backbone tail-matched synthesis on the same tabular datasets settles it. A loss on tables would mean the claim holds only where synthetic corruptions are structurally plausible, which is the case for images and sensor faults.
Why not just train a supervised, tail-aware classifier on the few real anomalies, as EVEREST does? When labeled anomalies of every type exist, this likely wins, and EVEREST's SKAB number shows how high that ceiling is. The proposal targets the regime where new anomaly types appear after deployment. We test that regime by holding out entire anomaly types, where a supervised model has nothing to fit.
Proposed Experiments
Benchmarks.
- MVTec AD, with 15 categories, pixel-precise masks, and DAGM as a secondary image set.
- SKAB for multivariate sensor faults.
- The in-domain and out-of-domain tabular datasets from the CORE benchmark.
Splits. On each benchmark, normal training data are split into a training set and two calibration sets. Anomaly types are partitioned so that some are never seen in any form. Test sets are additionally subsampled to anomaly prevalences of 1% and 0.1% to reproduce the rare-event regime.
Metrics. We report AUROC and pixel AP for continuity with prior numbers, but the primary metrics are at the operating point:
- Realized false-alarm rate against target $q \in \{10^{-2}, 10^{-3}, 10^{-4}\}$.
- Recall at that threshold.
- Precision at low prevalence.
Decisive checks. The first check concerns calibration. Under the GPD threshold, realized false-alarm rates should stay within a factor of two of target down to $10^{-3}$ at the image and window level, while the max-normal and empirical-quantile thresholds miss by an order of magnitude or cannot be computed at all. The second check concerns training. At a fixed $10^{-3}$ false-alarm rate, tail-matched synthesis should raise recall on held-out anomaly types over both rerun DRÆM and the uniform-severity ablation, consistently across seeds. If the first check passes but the second fails, the result is still a useful finding about operating points. If neither passes, extreme value tails of learned scores do not help in this regime, and the proposal is wrong.
References
- Anomaly Detection in Streams with Extreme Value Theory
- DRÆM - A discriminatively trained reconstruction embedding for surface anomaly detection
- CORE: In-Context Reconstruction for Unified Tabular Anomaly Detection
- MVTec AD - A Comprehensive Real-World Dataset for Unsupervised Anomaly Detection
- DeepGPD: A Deep Learning Approach for Modeling Geospatio-Temporal Extreme Events
- Nowcasting of Extreme Precipitation Using Deep Generative Models
- EVEREST: A Transformer for Probabilistic Rare-Event Anomaly Detection with Evidential and Tail-Aware Uncertainty
- Extreme Continuous Treatment Effects: Measures, Estimation and Inference