A backdoored classifier — a model with a hidden "sleeper" behavior implanted during training — performs perfectly on normal data but reliably misclassifies any input carrying a small attacker-chosen marker, called a trigger. Every published defense in the literature we review operates after the fact and inside the model: it prunes dormant neurons or internal feature maps that seem tied to the trigger, then fine-tunes to repair the damage. This note proposes a different point of attack: select and silence the trigger at the input, using differentiable feature selection — the technique that replaces the on/off decision of keeping each input feature with a continuous "dimmer switch" trained end-to-end by gradient descent.
The core claim is that a defender holding only a suspect model and a sliver of clean data (1–5% of training data) can learn a sparse input-feature gate that neutralizes backdoors without touching the model's weights, and that this is the natural defense regime where existing methods structurally cannot go: feature-based classifiers such as gradient-boosted trees on malware datasets, which have no neurons or convolutional channels to prune, and pretrained checkpoints received from untrusted parties, where the training data needed for sample filtering is gone. The closest existing defenses — Adversarial Feature Map Pruning for Backdoor and Backdoor Mitigation via Invertible Pruning Masks — both search the model's parameter or latent space with heuristic, multi-stage pipelines. None of them formulate trigger discovery and suppression as a single differentiable selection problem over input features, which is what we build.
Core Claim
Backdoor triggers in feature-rich domains are, functionally, a small set of input coordinates whose values the model has learned as a shortcut to the target class. Exploring Backdoor Poisoning Attacks Against Malware Classifiers demonstrates this from the attacker's side: it picks trigger features in tabular malware data (EMBER's 2,351 features, Drebin's 545,000) using post-hoc SHAP attributions plus greedy combinatorial search, and at a 1% poison rate drives a LightGBM model's accuracy on poisoned samples below 3% while clean accuracy stays high. That paper's selection machinery is discrete, static, computationally heavy, and used only to build attacks. We invert it: the defender runs the same search — but differentiably, jointly, and in the opposite direction — to find and remove the trigger.
Concretely, we train two coupled continuous selectors on top of a frozen suspect model $f$ using a small clean set $D_c$. A "seek" selector $z \in [0,1]^d$, implemented as an annealed Concrete/Gumbel-Softmax layer in the style of Concrete Autoencoders: Differentiable Feature Selection and Reconstruction, searches for the smallest set of input features whose value-substitution consistently pushes any input toward a single target class — a differentiable relaxation of trigger reverse-engineering. A "hide" gate $g \in [0,1]^d$ then learns which features to corrupt at inference so that clean predictions survive:
$$ \min_{g}\;\; \mathbb{E}_{(x,y)\sim D_c}\Big[\ell\big(f\big(x\odot g+(1-g)\odot x^{\mathrm{marg}}\big),\,y\big)\Big]\;+\;\lambda\,\mathbb{E}[1-g], $$
where $\ell$ is cross-entropy, $\odot$ is elementwise multiplication, and $x^{\mathrm{marg}}$ replaces a gated feature with a value sampled from its marginal distribution rather than a fixed sentinel. That last detail is borrowed deliberately: Hide&Seek: Learning to Explain in an End-to-End Differentiable Network proved that masking with zeros lets the downstream model exploit the sentinel itself as a shortcut — exactly the failure mode a backdoor would amplify — and that stochastic marginal replacement closes the leak while training 10,000 samples in 5 seconds where a sampling-based selector (INVASE) needed 1 hour 18 minutes. The two selectors are tied: the gate is penalized for corrupting features the seek-selector did not identify as trigger-bearing, and agreement between "features the adversary needs" and "features the defender corrupts" serves as an internal validity check.
For non-differentiable victims such as gradient-boosted trees, we distill $f$ into a small differentiable surrogate with matched clean accuracy, learn the gates on the surrogate, and deploy the gate in front of the original model at the feature-extraction stage. Nothing about the deployed defense requires white-box access to $f$'s internals beyond the feature vector itself.
Research Program
Three components. First, the method itself: the bi-level training loop (inner: seek-selector synthesizes candidate triggers by gradient descent on the frozen model; outer: gate suppresses them under the marginal-replacement objective above), temperature-annealing schedules for both Concrete selectors following Concrete Autoencoders: Differentiable Feature Selection and Reconstruction, and the surrogate-distillation path for tree ensembles. Second, an analysis of the central hazard, anticipated by Anti-Backdoor Coreset Selection via Cumulative Entropy and BackdoorBench: A Comprehensive Benchmark of Backdoor Learning: triggers are low-entropy shortcuts that gradient training latches onto fast. In our design that bias is a feature, not a bug — the seek-selector is supposed to latch onto the trigger — but the gate could still cut clean-predictive features to satisfy the sparsity penalty; we characterize when the two selectors converge to disjoint, correct supports versus when they collapse. Third, the obvious scalability question: Drebin's 545,000 boolean features stress-test whether annealed continuous gates remain stable where Concrete Autoencoders documents that stochastic selectors can pick entirely different subsets across runs on correlated features; we measure selection stability across seeds and report it, because an unstable gate is an unusable defense.
Baselines
The "do nothing" reference is the undefended poisoned model: on CIFAR-10, Reconstructive Neuron Pruning for Backdoor Defense reports pre-defense Attack Success Rate of 96.34%, and on tabular data the attack paper above reports poisoned accuracy below 3% for LightGBM at 1% poisoning — both numbers establish that the attacks land hard without intervention. The strongest existing post-training competitor on vision is Adversarial Feature Map Pruning for Backdoor, which on CIFAR-10 reports average ASR reduced to 2.86% with Robust Accuracy of 87.40% using 5% clean data; Reconstructive Neuron Pruning is the strongest low-data competitor, reporting ASR reduced from 96.34% to 5.03% on CIFAR-10 with under a 2% clean-accuracy drop from just 1% of the training set, though it fails below 1% poisoning and on compact architectures like EfficientNet-B0. Backdoor Mitigation via Invertible Pruning Masks sets the extreme-low-data bar, holding performance down to 2 clean samples per class. On the tabular side no pruning defense applies at all, so the strongest fair competitor there is a defense built by inverting the attack paper's own machinery: rank features by absolute SHAP importance, ablate the top-$k$, and re-evaluate — an attribution-ablation baseline using the exact SHAP strategies (LargeAbsSHAP, greedy combined selection) that Exploring Backdoor Poisoning Attacks Against Malware Classifiers shows an adversary already uses. All baselines run on identical poisoned checkpoints, identical clean-data budgets (1%, 5%, and 2-samples-per-class tiers), and an equal tuning budget of fixed random-search trials over each method's hyperparameters, with compute matched by capping total gradient steps. Beating a baseline means strictly higher Robust Accuracy (the fraction of triggered inputs restored to their true label, as defined by BackdoorBench) at no worse than a 2% clean-accuracy drop. The key ablation isolates the differentiable ingredient: replace the annealed Concrete gate with hard top-$k$ ablation chosen by post-hoc attribution at the same sparsity, and replace marginal replacement with zero-masking; if hard ablation matches the learned gate, the continuous machinery is not earning its complexity.
Why not just…?
Why not just use SHAP or FGSM attribution to find the trigger features? This is the most serious alternative, and on tabular data it is a genuine threat — which is why it is the primary baseline rather than a dismissed one. The evidence against it as a sufficient answer is concrete: the attack paper itself reports that its SHAP-plus-greedy search is computationally demanding over thousands of dimensions, assumes white-box knowledge of the feature space, and needed different trigger sizes per architecture, i.e., the selection is static and model-specific rather than jointly optimized; and Adversarial Feature Map Pruning for Backdoor — writing carefully, Adversarial Feature Map Pruning for Backdoor notes that attribution-style reverse-engineering defenses of the Neural Cleanse family fail against complex or invisible triggers such as WaNet's warping fields. Our experiments settle this directly: if attribution-ablation at matched sparsity matches our gate on EMBER and Contagio, the differentiable machinery is unjustified and we will say so; we expect the difference to appear on distributed, low-magnitude triggers that no single feature ranks highly on.
Why not just fine-tune or fine-prune the model on clean data? Fine-Pruning: Defending Against Backdooring Attacks on Deep Neural Networks prunes the least-active neurons and fine-tunes; Adversarial Feature Map Pruning reports that Fine-Pruning and Neural Cleanse left average ASR as high as 68% on CIFAR-10, and Backdoor Mitigation via Invertible Pruning Masks shows clean fine-tuning is data-hungry and collapses below 2 samples per class. More fundamentally, both require neuron-level access to a network; a LightGBM ensemble over 2,351 features has no neurons to prune, and in that regime input gating is not an alternative to pruning — it is the only handle available.
Why not just filter the poisoned training samples (row-wise) instead of selecting features? Anti-Backdoor Coreset Selection via Cumulative Entropy is strong when you train the model yourself — Defense Effectiveness Rate above 95% on CIFAR-10 and 97% on Tiny-ImageNet — but it needs the training pipeline, discards roughly 45% of the data, and its own authors report it cannot fully neutralize adaptive attacks like Adaptive Blend that raise poisoned-sample entropy. Our threat model is the complementary one: a checkpoint arrives from an untrusted supplier and the training data is gone, the exact scenario motivating Adversarial Feature Map Pruning and Backdoor Mitigation via Invertible Pruning Masks. Where both apply, we will run ABCS anyway as a training-time reference point.
Won't the gradient-based selector just lock onto the trigger shortcut? Yes — and that is the design, for the seek-selector. The real risk is the gate locking on for the wrong reason or cutting clean features; the marginal-replacement mechanism from Hide&Seek is our safeguard, and the zero-masking ablation tests it explicitly, since that paper proved sentinel values create exploitable leakage. If the gate collapses onto clean features under poison rates below 1%, we will report it as a failure boundary, in line with the honest low-rate failures documented for Reconstructive Neuron Pruning.
Proposed Experiments
Phase one runs on the tabular malware benchmarks from the attack paper: EMBER (2,351 features, LightGBM and a neural net), Contagio (135 features), and Drebin (545,000 boolean features). We poison with the paper's clean-label SHAP-designed triggers (LargeSHAP, MinPopulation, Greedy Combined Selection) plus a plain BadNets-style value trigger, then defend with the gate and compare against attribution-ablation and clean fine-tuning, reporting clean accuracy, ASR, and Robust Accuracy. Phase two moves to vision using BackdoorBench and its released codebase SCLBD/BackdoorBench: CIFAR-10, CIFAR-100, GTSRB, and Tiny-ImageNet, across its 8 attacks and 5 architectures, with gates operating on patch-level input tokens. The headline targets are FMP's reported 2.86% average ASR and 87.40% Robust Accuracy on CIFAR-10 at 5% clean data, RNP's 5.03% ASR at 1% clean data, and — deliberately — the regimes where those methods weaken: poisoning below 1% and compact architectures like EfficientNet. Decisive checks close the proposal: first, trigger localization, where in simulation we know the true trigger features and measure the seek-selector's precision and recall against them; second, the leakage ablation (marginal versus zero replacement); third, and most important, an adaptive attack in which the adversary knows the defense and splits the trigger across many low-attribution features or mimics marginal statistics — if the gate survives only non-adaptive attackers, the contribution shrinks to a benchmark finding, and we will report whichever way it falls.
References
- Adversarial Feature Map Pruning for Backdoor
- Backdoor Mitigation via Invertible Pruning Masks
- Exploring Backdoor Poisoning Attacks Against Malware Classifiers
- Concrete Autoencoders: Differentiable Feature Selection and Reconstruction
- Hide&Seek: Learning to Explain in an End-to-End Differentiable Network
- Anti-Backdoor Coreset Selection via Cumulative Entropy
- BackdoorBench: A Comprehensive Benchmark of Backdoor Learning
- Reconstructive Neuron Pruning for Backdoor Defense
- Fine-Pruning: Defending Against Backdooring Attacks on Deep Neural Networks