A backdoored network behaves normally on ordinary inputs but switches to an attacker-chosen output whenever a secret pattern, the trigger, is present. Most repairs work by deleting parts of the network: they prune neurons that stay quiet on clean data, zero out suspicious feature maps, or unlearn and then recover weights. These repairs break down in a specific setting. When the attacker poisons under 1% of the training data, or the network is compact, the trigger and the real task share the same neurons, and cutting one damages the other. We propose to remove directions rather than neurons. At several intermediate layers, we project the network's internal activations onto the smallest subspace that still carries all the information clean data holds about the label. We estimate that subspace from a small clean set using a supervised, kernel-based dimensionality reduction method. The trigger never predicts the true label on clean data, so it should fall outside this subspace and get filtered out as noise, even when it shares neurons with clean features.
The idea borrows from a line of work on "noise-filtering" dimensionality reduction. That work finds that discarding most of the dimensions of a representation often leaves accuracy unchanged or even improves it, because the signal occupies a small subspace and everything else is nuisance variation. The claim here is that, from the point of view of clean-data prediction, a backdoor is exactly this kind of nuisance variation. The right tool to remove it is therefore a projection chosen for label relevance, not one chosen for variance (as in principal component analysis, PCA) and not one chosen for how sensitive the network's output is to each direction.
Core Claim
At an intermediate layer $\ell$, let $h_\ell \in \mathbb{R}^{d_\ell}$ be the spatially pooled channel activations. We seek an orthonormal matrix $B_\ell \in \mathbb{R}^{d_\ell \times r_\ell}$ such that, on clean data, the label $y$ is conditionally independent of $h_\ell$ given $B_\ell^\top h_\ell$. Kernel Dimensionality Reduction for Supervised Learning turns this condition into an optimization problem using covariance operators in a reproducing-kernel Hilbert space, a space of functions in which dependence can be measured through kernel matrices:
$$\min_{B_\ell^\top B_\ell = I} \; \mathrm{Tr}\big[\Sigma_{YY \mid B_\ell^\top H_\ell}\big].$$
Here $\Sigma_{YY \mid B^\top H}$ is the conditional covariance operator of the label given the projected features. It measures how much label information remains unexplained after projection, and it is estimated from centered kernel matrices on the clean set.
The fitted matrix is then inserted into the network as a fixed 1×1 convolution applied at every spatial location:
$$h \leftarrow \mu_\ell + B_\ell B_\ell^\top (h - \mu_\ell),$$
where $\mu_\ell$ is the clean mean. Filling the discarded coordinates with their clean mean rather than zero keeps downstream layers inside their normal operating range. A short fine-tuning on the same clean set follows.
The hypothesis concerns a distinction between three things:
- Data relevance, which is what this projection keeps: the directions along which clean inputs actually differ by label.
- Model sensitivity: the directions to which the network's output responds. The trigger direction is one of them, because the backdoor pathway reacts to it.
- Variance: the directions along which clean activations vary most, which may include nuisance factors the trigger can ride along.
Only data relevance should reliably exclude the trigger.
Relation to Prior Work
Two post-training detectors already use linear dimensionality reduction on activations.
- Spectral Signatures in Backdoor Attacks projects penultimate-layer representations of the training set onto their top singular vector and removes outlying samples.
- Activation Clustering compresses last-layer activations with independent component analysis and splits each class into two clusters with k-means.
Both methods sanitize the dataset. They need the poisoned training set and a retraining run. Both also assume the trigger shows up as dominant variance or as a separable cluster. Our method never sees poisoned data and never ranks samples. It repairs a given model using clean data only, and it selects directions by label relevance, not by variance.
RepGuard is the closest mechanism. It learns a soft mask that splits the hidden activations of a large language model into a benign subspace and a shortcut subspace, trained with a multi-objective loss. We differ in three ways. Our subspace comes from a statistical sufficiency criterion rather than a learned mask with tuned loss weights. We apply it to vision networks at multiple layers. And the defense has essentially one parameter, the rank.
Three pruning methods motivate the proposal by documenting its target failure mode:
-
Fine-Pruning locates backdoors in neurons that are dormant on clean inputs. This supports our premise that triggers use capacity with no clean relevance. - Adversarial Feature Map Pruning zeroes out whole feature maps.
-
Reconstructive Neuron Pruning (RNP) unlearns and then recovers weights to expose backdoor filters. Its authors report that it weakens below 1% poisoning and on EfficientNet-B0, where clean and backdoor functions share parameters.
A direction can separate from clean features even when it is spread across the same neurons, which is why projection might succeed where pruning fails.
Local Intrinsic Dimensionality shows that test-time adversarial examples leave the low-dimensional data manifold. It studies evasion, not backdoors, and only detects attacks rather than repairing the model. We ask the analogous geometric question for triggers.
One paper cuts against us. Exploring Dynamic Properties of Backdoor Training Through Information Bottleneck reports a "Stealth Paradox": BadNets triggers integrate smoothly into representations (dynamics Stealth Score 0.2820 versus 0.5498 for FTrojan). If smooth integration means the trigger rides on directions that are also label-relevant, projection will fail against exactly the most common attack. We treat this as the main risk and test it directly before building the defense.
Research Program
Stage 1: diagnostic. For backdoored models from BackdoorBench, we fit $B_\ell$ at each residual stage from clean data alone. We then measure the fraction of the "trigger displacement" that falls outside the fitted subspace. The trigger displacement is the difference in activations between a triggered image and the same image without the trigger. We compare this fraction against two other subspaces of the same rank: the clean-PCA subspace and the subspace from the expected gradient outer product. The latter is the top eigenvectors of $\mathbb{E}[g g^\top]$, with $g$ the gradient of the clean log-likelihood with respect to $h_\ell$, as in Learning gradients on manifolds. Our prediction is that the gradient-based subspace captures much of the trigger, because the network is sensitive to it. PCA should capture a trigger-dependent amount. The kernel sufficient subspace should capture the least. This stage also answers an open question in the file: whether triggers occupy a low- or high-dimensional region relative to clean data. We will report the local intrinsic dimensionality of the trigger displacements.
Stage 2: the defense. We insert projections at two to four layers. Each rank $r_\ell$ is chosen as the smallest value whose clean validation accuracy, after a brief fine-tune, stays within 1% of the unprojected model. This addresses the rank-selection problem that the kernel reduction paper leaves to cross-validation, using no knowledge of the attack. To handle the $n \times n$ kernel cost and non-convexity noted in that paper, we fit on at most a few thousand clean samples, use random Fourier features where needed, and initialize from sliced inverse regression.
Stage 3: adaptive attacker. We evaluate an attacker who knows the defense. This attacker adds a training penalty that pushes trigger displacements into the clean-label-relevant subspace of a surrogate model.
Baselines
No defense. The undefended backdoored model sets the attack success rate (ASR) and clean accuracy that every method starts from.
Clean fine-tuning alone. Because our method includes a short fine-tune, the most important naive reference is fine-tuning the backdoored model on the same clean set, for the same number of epochs, with the same learning-rate search, and no projection. Beating it means lower ASR at equal clean accuracy. If it matches us, the projection is doing nothing.
Same-rank ablations. Three projections isolate the key ingredient: clean-PCA, gradient outer product, and a random orthonormal subspace. Each uses our per-layer ranks, insertion points, and fine-tune. Our claim requires the kernel sufficient subspace to beat all three on ASR at matched clean accuracy.
Strongest existing repair method. This is Shared Adversarial Unlearning (SAU). It unlearns adversarial examples that fool both the backdoored model and a purified model, and it reports an average ASR of 2.51% on CIFAR-10 with clean accuracy within 1–2% of the undefended model, ahead of i-BAU (15.32%) and NAD (37.2%). Two other methods report comparable averages on CIFAR-10:
- Adversarial Feature Map Pruning: average ASR 2.86%, robust accuracy 87.40%.
- Reconstructive Neuron Pruning: average ASR reduced from 96.34% to 5.03%.
All three are run through BackdoorBench on identical poisoned checkpoints, with the same clean-data budget (1% and 5%) and equal hyperparameter-search compute. Fine-pruning is also included.
We do not expect to beat SAU at the default 5–10% poison rates, and a tie there is acceptable. The claim is won or lost in the regime the file flags as unsolved: poisoning below 1% and compact networks such as EfficientNet-B0. Beating the baselines means lower ASR at no more than a 2% clean-accuracy drop in that regime. No reported result was found on Lacuna for SAU, RNP, or FMP at below-1% poisoning or on EfficientNet-B0, so these numbers will come from our own runs.
Why not just…?
Why not just fine-tune on the clean data? Fine-tuning moves weights only where clean gradients point. A trigger pathway that is dormant on clean data receives little gradient and can survive. Fine-Pruning found that fine-tuning alone was insufficient and needed pruning first. The matched fine-tune-only baseline measures this directly, and if it matches our method we will report that the projection adds nothing.
Why not just project onto clean principal components? This is the most serious threat, because the trigger may simply have near-zero variance on clean data. The "variance-relevance misalignment" noted in On Dimensional Linguistic Properties of the Word Embedding Space implies that high-variance clean directions include label-irrelevant nuisance factors, which a trigger can co-opt. Blended and warping triggers are the likeliest cases. The same-rank PCA ablation settles this. If PCA matches the kernel subspace across attacks, we will adopt the simpler method and reframe the contribution as the directional-versus-neuronal finding.
Why not just use Spectral Signatures or Activation Clustering? Both require the poisoned training set and a retraining run, and both assume the trigger dominates variance or forms a separate cluster. Activation Clustering reports near-100% detection on MNIST, LISA, and Rotten Tomatoes. Spectral Signatures brings backdoor misclassification to within 1% of a clean model on CIFAR-10 at 5% poisoning. Neither addresses the setting where a model arrives already trained. Where training data is available, we will run both as a reference, including below 1% poisoning, where few poisoned samples may not dominate the singular spectrum.
Why not just prune neurons, as in Fine-Pruning or RNP? The RNP authors themselves report weakening at low poisoning rates and on EfficientNet-B0, which is precisely where neurons are shared. The Stage 1 diagnostic will show whether trigger displacements are spread across many neurons yet concentrated in a few directions. That is the geometric fact that would justify projection over pruning.
Proposed Experiments
Datasets, models, and attacks. We use CIFAR-10, GTSRB, and Tiny-ImageNet. Models are ResNet-18, VGG16, and EfficientNet-B0. Attacks from BackdoorBench are BadNets, Blended, WaNet, and InputAware, at poisoning rates of 0.5%, 1%, 5%, and 10%, with clean budgets of 1% and 5%. Metrics are ASR, clean accuracy, and robust accuracy. Robust accuracy is the fraction of triggered inputs that are still given their true label.
First decisive check. Stage 1 must show that the kernel subspace captures a smaller share of trigger displacement than same-rank PCA and gradient subspaces, for BadNets in particular. That result would resolve the Stealth Paradox tension in our favor. If BadNets displacement lies inside the clean-relevant subspace, the defense cannot work against that attack and we will report this as a negative result.
Second decisive check. At 0.5% poisoning on EfficientNet-B0, our projection must achieve lower ASR than RNP, FMP, and SAU with no more than a 2% clean-accuracy drop.
Third check. Under the adaptive attacker, we measure how much clean accuracy the attacker must give up to align the trigger with label-relevant directions. We expect the answer to be bounded but not zero, and we will report it honestly as the method's limit.
References
- Kernel Dimensionality Reduction for Supervised Learning
- Spectral Signatures in Backdoor Attacks
- Detecting Backdoor Attacks on Deep Neural Networks by Activation Clustering
- RepGuard: Adaptive Feature Decoupling for Robust Backdoor Defense in Large Language Models
- Fine-Pruning: Defending Against Backdooring Attacks on Deep Neural Networks
- Adversarial Feature Map Pruning for Backdoor
- Reconstructive Neuron Pruning for Backdoor Defense
- Characterizing Adversarial Subspaces Using Local Intrinsic Dimensionality
- Exploring Dynamic Properties of Backdoor Training Through Information Bottleneck
- Learning gradients on manifolds
- Shared Adversarial Unlearning: Backdoor Mitigation by Unlearning Shared Adversarial Examples
- On Dimensional Linguistic Properties of the Word Embedding Space