Probabilistic Hull Depth for Early Backdoor Filtering

A backdoor attack plants a small number of poisoned training examples. Each one carries a hidden trigger, such as a sticker, a faint watermark, or a warp, and is labeled with a class the attacker chooses. The trained model behaves normally until it sees the trigger. Most defenses that clean the training data face a timing problem. Separating poisoned examples from clean ones in the network's internal features only works once the network has fully learned the trigger. Defenders must therefore train once on dirty data, filter, and train again. Cheaper early-training filters such as Anti-Backdoor Coreset Selection via Cumulative Entropy (ABCS) score each example with a single number, how confident the model has been on it over time. That number cannot tell an easy clean example from a poisoned one, because both are predicted confidently. As a result ABCS throws away roughly 45% of the data.

We propose describing each training example during a short warm-up as a small cloud of feature vectors rather than a single point. The cloud contains the example's features under several data augmentations at several recent training checkpoints. We then score the example by the probability that its cloud lies inside the convex hull of the rest of its labeled class. Computational geometry has worked out how to compute such probabilities for "uncertain points." The bet is that this score separates the two kinds of confident example. Easy clean examples sit deep inside their class. Poisoned examples form a tight but shallow group pulled toward the class edge by a shared trigger direction. Averaging over each cloud should also let this separation appear many epochs earlier than it does for single feature vectors, which would ease the timing problem.

Core Claim

The claim has two parts, each falsifiable on its own. First, depth inside the class's feature region separates poisoned from clean examples among the confidently predicted ones, where entropy cannot. This should let a filter keep far more than ABCS's ~55% of the data at equal attack suppression. Second, depth computed on uncertainty clouds becomes reliable at an earlier warm-up epoch than depth computed on mean feature vectors. If the second part fails, the geometric uncertainty machinery is not needed and the contribution reduces to "use depth, not entropy." We will report that outcome as such.

What the Geometry Supplies

Three papers on uncertain point sets supply the method. Convex Hulls Under Uncertainty computes the probability that a fixed query point lies inside the convex hull of uncertain points. It covers two settings. In the multipoint model, each point appears at one of several discrete locations or is absent. In the existential model, each point exists independently with some probability. The paper gives an exact $O(n \log n)$ radial-sweep algorithm in the plane, and shows that this probability is tied to halfspace (Tukey) depth. A point with halfspace depth $m$ falls outside the hull only if some halfplane through it is empty.

We use exactly that tie. Each class member is treated as an uncertain point. Its locations are its cloud, and with a small probability $p_0$ it is absent. The query score is the membership probability averaged over the query example's own cloud. This turns hull membership into a smooth, noise-averaged depth. The parameter $p_0$ sets the depth scale at which the score saturates. We tune $p_0$ so that the score stays informative at depths comparable to a plausible poison budget, rather than saturating at 1.

The same paper reports that exact membership costs $O(n^d)$ in dimension $d \ge 3$, which is hopeless for 512-dimensional features. We therefore compute exact 2D membership on many planar projections and take a low quantile across projections. This is in the spirit of projection depth. The projection directions are chosen from the data rather than at random: top principal directions of each class, the top singular direction used by spectral signatures, and some random pairs. Random 2D slices of a 512-dimensional space will rarely align with the direction that separates the poisoned group.

To keep per-query cost manageable, class members are first compressed into a small summary set, called a coreset. Range counting coresets for uncertain data gives coresets that preserve threshold containment probabilities for uncertain points. epsilon-Kernel Coresets for Stochastic Points. shows how directional extent of stochastic points can be preserved compactly. One construction choice is constrained by these results. An ε-kernel deliberately retains extreme points, which may be exactly the poisoned ones. So the reference set must be a coreset for containment probability, not a kernel.

We do not use the β-hull from the convex-hulls paper. It must contain a β-fraction of every uncertain point's mass, including the poisoned ones, so it offers no robustness to an outlying group.

Relation to Existing Defenses

Two backdoor papers motivate the proposal, and two others constrain it.

ABCS shows that triggers are fit early and confidently, and that a warm-up phase costing about one training run can filter data. The same paper admits there is no explanation of why entropy separates poisoned from clean examples, retains only ~55% of the data, and does not fully defeat Adaptive Blend (A-Blend), an attack whose poisons are made deliberately high-entropy. We keep ABCS's warm-up schedule and compute budget. We replace its one-dimensional ranking with a geometric score.

Spectral Signatures in Backdoor Attacks and Detecting Backdoor Attacks on Deep Neural Networks by Activation Clustering constrain the design. Spectral signatures projects features onto the top singular direction of the class covariance. Activation clustering splits features into two groups with k-means. Both work on fully trained, deterministic features. Activation clustering's ~58% accuracy on raw MNIST pixels shows that separation needs learned representations. Our early-epoch claim must therefore be tested directly rather than assumed.

COLLIDER: A Robust Training Framework for Backdoor Data filters in a single training pass. It uses gradient centrality, then switches to local intrinsic dimensionality once gradient differences fade. It treats every sample as an exact point, whereas we model each sample's spread explicitly. STRIP: A Defence Against Trojan Attacks on Deep Neural Networks finds that triggered inputs keep low output entropy when blended with other images. That invariance is the output-space version of the tight clouds we expect in feature space. STRIP acts only at test time and leaves the model infected.

Research Program

During a warm-up of $T_0$ epochs, we save the last $W$ checkpoints. For each training example we record penultimate-layer features under $k$ augmentations at each checkpoint, giving a cloud of $kW$ locations. Initial values are $k=4$ and $W=3$. Features are whitened per class.

For each class $c$, we build a containment coreset of roughly 500 uncertain points. For each projection plane $\pi$, we compute the score

$$s_i(\pi) = \frac{1}{kW}\sum_{j=1}^{kW} \Pr\big[\pi(z_{ij}) \in \mathrm{CH}(\pi(P_c))\big],$$

where $z_{ij}$ is the $j$-th location in example $i$'s cloud and $P_c$ is the uncertain coreset of class $c$. The probability is over which location each coreset member takes and whether it is present. It is computed exactly by the radial sweep. The final score $s_i$ is the 10th percentile of $s_i(\pi)$ over about 40 planes.

Examples whose score falls below a threshold are dropped. The threshold is chosen by the same automatic size-selection rule ABCS uses, so the comparison is not tuned in our favor. A fresh model is trained on the rest. The total budget target is warm-up plus scoring within 1.1 times ABCS's selection cost.

As a secondary, exploratory output, we relabel each flagged example to the class with the highest membership probability. We then measure whether this recovers the true source class on BackdoorBench's robust-accuracy metric, which BackdoorBench: A Comprehensive Benchmark of Backdoor Learning identifies as collapsing as the number of classes grows.

Baselines

The naive reference is standard training on the poisoned data with no defense. The second reference is ABCS's own warm-up model with no filtering. Both are run on the same data, model, and seeds, and they define the attack success rate (ASR) to be removed. COLLIDER reports that BadNets on CIFAR-10 reaches 99.98% ASR under vanilla training.

The strongest competitor is ABCS. It already filters during warm-up at roughly the cost of one ordinary training run. It reports a defense effectiveness rate "over 95%" on CIFAR-10 and 97% on Tiny-ImageNet, with ASR "near 1%" across most attacks, while keeping only ~55% of the data (Anti-Backdoor Coreset Selection via Cumulative Entropy). We run it from its described pipeline on identical poisoned splits and architectures, with identical warm-up epochs, and give it the same hyperparameter search budget as our method. To beat it, we must match its ASR within one percentage point while retaining at least 80% of the training data and achieving higher clean accuracy. On A-Blend we must achieve strictly lower ASR. ABCS reports only that it "did not completely nullify" A-Blend; no per-attack number for A-Blend was found on Lacuna, so we will measure ABCS ourselves.

COLLIDER is the strongest single-pass competitor. It reports 4.80% ASR and 80.66% clean accuracy on CIFAR-10 BadNets. We run it within the BackdoorBench setup at matched epochs.

Spectral signatures and activation clustering, run after full training and followed by retraining, serve as a quality ceiling given double compute. Spectral signatures reports clean accuracy of 92–93% and misclassification of backdoored inputs within 1% of a clean model on CIFAR-10. We do not need to beat them on ASR. We need to approach them at half the compute. We will also run both methods on warm-up features at the same epoch we use, which is the fair early comparison.

Three ablations isolate the key ingredient, uncertainty clouds. The first collapses each cloud to its mean and keeps the identical projected-depth pipeline. The second uses clouds but no existential thinning ($p_0 = 0$). The third replaces depth with class-conditional Mahalanobis distance computed on each cloud's mean and variance.

Why not just…?

Why not just combine per-sample feature variance with Mahalanobis distance to the class mean? This is the most serious threat. It captures "tight cloud" and "far from center" in two cheap numbers. It fails exactly when the poisoned group shifts the class covariance itself. At 5% of a class, which is the regime spectral signatures studies, the poisoned group inflates the covariance along its own direction and so shrinks its own Mahalanobis distance. Halfspace depth does not suffer from this masking in the same way. Still, this is an empirical claim. The third ablation above is the direct test. If it matches our separation curve across BadNets, Blended, WaNet, and A-Blend, we will drop the hull machinery and say so.

Why not just run spectral signatures or activation clustering on the warm-up features? Their reported success comes from fully trained models. Activation clustering's failure on raw pixels suggests that weak representations defeat them, but nobody has measured them at intermediate epochs. We run both at every warm-up epoch alongside our score. The decisive comparison is the epoch at which each method first reaches a fixed detection quality.

Why not just lower ABCS's selection threshold to keep more data? ABCS ranks by cumulative entropy. Easy clean examples and poisoned examples are both at the low-entropy end. Keeping more data therefore readmits poisons in roughly the proportion they occupy among confident examples. We will trace ABCS's full curve of retained fraction against ASR. Our method should dominate that curve, and not merely beat ABCS at a single operating point.

Why not just estimate hull membership by Monte Carlo sampling of possible worlds? This is a legitimate alternative. Its weakness is variance in the tails. The examples we must rank are those whose membership probability is very small, and sampling needs many draws to tell 10⁻³ from 10⁻⁵. The exact planar sweep gives deterministic scores at comparable cost. We will report Monte Carlo at matched wall-clock time as an additional ablation. If it ranks examples just as well, the exact algorithm is a convenience rather than a necessity.

Proposed Experiments

All experiments use the BackdoorBench codebase SCLBD/BackdoorBench. It covers BadNets, Blended, WaNet, and the other attacks it implements. A-Blend is added following ABCS's setup. Datasets are CIFAR-10, CIFAR-100, GTSRB, and Tiny ImageNet. Architectures are PreAct-ResNet18 and VGG-19, with poison rates from 0.5% to 10%. Metrics are clean accuracy, ASR, robust accuracy, retained fraction, poison-detection AUROC within the target class, and wall-clock cost. No reported robust-accuracy numbers for competing defenses were found on Lacuna, so all robust-accuracy comparisons will be run by us.

The first decisive check is a separation-versus-epoch curve. We plot detection AUROC at each warm-up epoch for six scores: cloud depth, mean-point depth, Mahalanobis plus variance, cumulative entropy, spectral score, and activation clustering. The early-detection claim holds only if cloud depth reaches AUROC 0.95 at least several epochs before mean-point depth. The second check is the retained-fraction-versus-ASR curve against ABCS, together with the resulting clean accuracy. On CIFAR-100 and Tiny ImageNet, which have smaller classes, discarding easy clean data should hurt most.

The third check is A-Blend. Its high-entropy poisons should evade entropy filtering but not depth, if they still share a trigger direction. The fourth check is an adaptive attacker who adds a loss term pulling poisoned features toward the center of the target class. This attack is designed to defeat depth specifically. We will report how much clean-task cost the attacker pays to evade the filter. A defense that this attack beats cheaply should not be claimed as robust.