Attention Zeroizing: Auditing Obfuscated Biometric Models Through Their Explanation Interfaces

When a biometric vendor ships a face anti-spoofing model — the gatekeeper that decides whether a camera is looking at a live face or a printed photo — the vendor often obfuscates the shipped weights to protect proprietary logic, while still exposing attention maps: heat-map readouts showing which image patches the model "looked at" when it made its liveness decision. These readouts are increasingly demanded by auditors and regulators as explanations. This proposal argues that this combination is a trap with a precise historical precedent. In cryptographic multilinear maps, every candidate scheme had to publish a zero-testing parameter — a single interface the scheme could not function without — and cryptanalysis showed again and again that this one necessary public output leaks enough linear structure to recover the scheme's secrets entirely. We propose to test whether attention readouts play exactly the same role for obfuscated neural classifiers: a functionality-required public interface whose linear algebra collapses the obfuscation.

The concrete instrument is an audit we call attention zeroizing. Given only query access to a shipped model's attention maps, we solve a linear system that recovers the model's hidden key–query geometry, and then use that recovered geometry to extract any implanted backdoor trigger — for example, a pattern printed on a photo that forces a "live" verdict, which is precisely a presentation attack made permanent. The method imports the attack templates of multilinear-map cryptanalysis, where adversaries convert collections of structured outputs into eigenvalue and least-squares problems that expose secret matrices in polynomial time.

Core Claim

The claim has three parts. First, attention readouts are informationally complete for the hidden bilinear geometry of an attention layer: they determine the matrix $M = W_Q W_K^{\top}$ (the product of the query and key projection matrices that the obfuscation hides) via exact linear equations, so an attacker never needs the weights. Second, a backdoor implanted in the model leaves a low-rank signature in this recovered geometry — a signature that survives even when the backdoor is engineered to leave no per-sample attention anomaly. Third, and most useful, the same recovery run by a defender becomes an audit: it certifies whether an obfuscated, unopenable biometric model contains a hidden trigger, something no weight-inspection method can do once weights are locked.

The mechanism is elementary. Let $a_{ij}(X)$ be the attention weight that token $i$ (with embedding $x_i$) assigns to token $j$ on input $X$. The softmax normalizer depends only on the row index $i$, so it cancels when we difference across columns within one row:

$$\log a_{ij}(X) - \log a_{ij'}(X) \;=\; x_i^{\top}\, M\, (x_j - x_{j'}), \qquad M = W_Q W_K^{\top}.$$

Each exposed attention row is thus an exact set of linear constraints on the entries of $M$ — no approximation about softmax saturation is needed, only the readout itself. With enough chosen probe inputs, the system becomes over-determined and $M$ is recoverable up to a well-characterized gauge by least squares or eigenvalue methods, directly in the spirit of the determinant and generalized-eigenvalue attacks that totally broke the CLT15 multilinear map in Cryptanalysis of the New CLT Multilinear Map over the Integers. The multilinear-map literature supplies the methodological template here, not the object: Lee et al.'s original zeroizing attack in Cryptanalysis of the Multilinear Map over the Integers showed that collecting outputs at algebraically special ("zero") points and solving linear systems recovers secrets the scheme's designers believed hidden, and we transplant that move from graded encodings to attention.

The threat model is grounded in the neural-obfuscation literature. Injecting Undetectable Backdoors in Obfuscated Neural Networks and Language Models proved that if a network is distributed in a cryptographically obfuscated format, it can host backdoors that are provably undetectable and non-replicable (their Theorem 12) — but their construction is explicitly theoretical: obfuscating circuits at deep-learning scale is computationally intractable, and it does not address Vision Transformers, attention routing, or continuous biometric inputs. Our work occupies the empirically real region below that cryptographic ceiling: today's deployments use heuristic weight obfuscation, and we ask whether the attention interface undoes it. There is also a theory-level reason this boundary matters: On Low-End Obfuscation and Learning established an equivalence between information-theoretic obfuscation and the impossibility of exact learning with hints. A readout-based audit is exactly an exact-learning-with-hints procedure, so its success is itself a certificate that the deployed obfuscation sits below the obfuscation-learnability threshold.

The application regime is presentation attack detection (PAD), where the stakes are physical and the models are increasingly attention-based. ViTransPAD: Video Transformer using convolution and self-attention for Face Presentation Attack Detection built the strongest transformer PAD system in our scope with multi-scale self-attention, and Adversarial Attacks on Both Face Recognition and Face Anti-spoofing Models already showed this gatekeeper is adversarially soft: their joint attack reached a 29.1% joint success rate against a paired recognition-plus-anti-spoofing system on Oulu-NPU (versus 0.9% for the prior best BPFA), and 94.4% success against an anti-spoofing defense alone. A backdoor extracted from or implanted in such a model is a presentation attack that persists forever and defeats feature-space countermeasures by construction.

Research Program

The program builds four things in sequence. The first is the identifiability theory: characterize exactly when $M$ is recoverable from readouts — dependence on head count, key/query rank, sequence length, and probe budget — and prove the gauge ambiguity (the well-known invariance of attention to $M$'s orbit under token-space transformations) does not mask the trigger signature. The second is the recovery pipeline: a probe-design algorithm that chooses inputs maximizing the conditioning of the linear system, followed by the solve. The third is trigger extraction: we hypothesize that an attention-aligned backdoor of the kind produced by Attention-Imperceptible Backdoor Attacks on Vision Transformers — which plants $\ell_\infty \le 4/255$ perturbations inside patches the model naturally attends to, achieving a 99.97% attack success rate with only a 0.26% clean-accuracy drop on DeiT-Base over ImageNet — leaves a near-rank-one steering component in the recovered $M$ whose principal direction identifies the trigger patches and pixels. The point of using their attack as our test object is that it is the hardest case: it was built specifically to leave no per-sample attention residual (an attention PSNR of 20.68, nearly double competing methods), so any detector that works on it cannot be working by anomaly statistics. The fourth deliverable is the audit tool and the countermeasure frontier: a sweep over which readouts (which layers, how much added noise or quantization) still permit recovery. This sweep is the neural analog of the sobering result in An algorithm for NTRU problems and cryptanalysis of the GGH multilinear map without a low-level encoding of zero, where removing the "leaky" low-level zero encodings did not save the scheme because top-level outputs alone sufficed for full secret recovery.

Baselines

The do-nothing reference point is the status quo deployment: the obfuscated model is accepted with no audit beyond its accuracy on a held-out benchmark, which is exactly the setting in which an AIBA-style backdoor passes unnoticed (its 0.26% clean-accuracy drop on ImageNet is invisible to accuracy-based acceptance testing). Any audit with nontrivial detection power beats this vacuous reference, so the real comparison is against inspection methods.

The naive inspection baseline is per-sample attention-anomaly defense: BDVT, which masks high-attention regions, and PatchProcess, which drops or shuffles patches, both as evaluated inside the AIBA paper. We will re-run both on our backdoored PAD models with the same data, compute, and tuning budget. These are the natural first-line competitors because they use the same interface we do (attention maps) and require no weight access; the AIBA paper already showed they are bypassed (99.97% attack success maintained, attention PSNR 20.68), and the reported reason is structural — masking naturally high-attention regions degrades clean accuracy more than it hurts the backdoor. Beating this baseline means detecting the backdoor (AUROC above 0.9 on backdoored versus clean models) and recovering the trigger at pixel IoU at least 0.5, where BDVT-style inspection fails.

The strongest existing method for the recovery goal is weight-based trigger synthesis: gradient-saliency and pruning-based purification, in the tradition that An Effective and Resilient Backdoor Attack Framework against Deep Neural Networks and Vision Transformers was explicitly built to survive (its triggers are designed to withstand weight pruning). We run it in two configurations with identical data and compute: with full weight access (its best case, an upper bound we do not expect to beat) and under the realistic obfuscated-weight setting, where the audit's readout access is also restricted to match. Beating it means achieving comparable trigger recovery under weight obfuscation while the weight-based method fails. The key ablation isolates our ingredient: an audit that receives the same number of readout queries but replaces the linear-system solve with random subspace projection — if recovery collapses, the zeroizing structure, not query volume, is doing the work.

Why not just…?

Why not just inspect the attention maps for anomalies? This is the BDVT/PatchProcess baseline above, and the evidence says it falls short for a structural reason: AIBA places triggers in regions the model already attends to, so the per-sample statistics are clean by design. Our decisive experiment runs both defenses on the same backdoored PAD models; if anomaly inspection matches our recovery, the zeroizing machinery is unnecessary and we would report that honestly — but the 99.97% attack success and 20.68 attention PSNR reported for AIBA make that unlikely.

Why not just withhold the attention readouts entirely? This is a real threat to the proposal, and we treat it as such: if a vendor exposes nothing, there is no side channel and our attack fails. But two things temper it. Auditability and certification pressure make total silence unrealistic for biometric gatekeepers, and the multilinear-map precedent warns that partial restriction may not help: Jeong et al. showed that removing the low-level zero encodings from the GGH map still left full recovery from top-level outputs alone. Our readout-restriction sweep is precisely the experiment that settles whether top-level rollout alone — the minimal interface an auditor would accept — still leaks the geometry.

Why not just use real indistinguishability obfuscation? The Insidious Pipeline paper proves this would provably defeat even our audit, since the readout interface itself would be obfuscated. But the same paper concedes that iO at neural-network scale is computationally intractable, and nothing deployable is near it; moreover, by the learnability-obfuscation equivalence of On Low-End Obfuscation and Learning, our audit succeeding is the measurement of that gap — it tells regulators exactly how far below the iO threshold a shipped model sits. The audit does not compete with iO; it calibrates the distance to it, and Backdoor defense, learnability and obfuscation tells us this boundary is where any automated backdoor defense must live.

Why not just fine-tune or adversarially train the PAD model before deployment? Patch-Fool found that Vision Transformers remain more vulnerable than CNNs even after adversarial training when the attacker concentrates perturbation on a single influential patch — DeiT-S fell to 6.25% robust accuracy versus 24.00% for ResNet-50 on a 2,500-image ImageNet subset in Patch-Fool: Are Vision Transformers Always Robust Against Adversarial Perturbations? — and pruning-based cleanup is already countered by design in the resilient-backdoor literature. Fine-tuning also presupposes you know there is a backdoor; our audit is the thing that tells you. We will still run adversarial training and fine-tuning as additional baselines on the backdoored models to quantify how much residual trigger they leave.

Proposed Experiments

Experiment one establishes identifiability on synthetic attention layers of controlled rank and head count, verifying exact recovery of $M$ and measuring query complexity, plus robustness to realistic readout degradation (Gaussian noise, quantization, temperature-induced saturation). Experiment two moves to real models: we replicate the AIBA backdoor protocol first on DeiT-Base over ImageNet (anchoring against the reported 99.97% attack success rate, 0.26% clean drop, and $\ell_\infty \le 4/255$ budget), then implant the same attention-aligned "always-live" backdoors into PAD models — the ViTransPAD architecture on Oulu-NPU, whose reported ACER of 1.19% versus 7.25% for a standard ViT makes it the strongest specialist transformer target, and frozen CLIP ViT-B/32 linear probes across the four-dataset MCIO suite (MSU-MFSD, CASIA-FASD, Idiap Replay-Attack, Oulu-NPU), following the protocol of Foundation Models for Face Presentation Attack Detection: A Unified Linear-Probing Benchmark, which reports 31.6% mean cross-dataset ACER for that model and 1.6% intra-dataset ACER for InternViT-6B. Metrics throughout: backdoor-presence AUROC, trigger IoU, and the fraction of the original attack success rate recovered by re-implementing the extracted trigger (beating the baselines means AUROC above 0.9 and at least 90% of original attack success from the extracted trigger alone, under weight obfuscation). Experiment three runs the countermeasure frontier sweep. The decisive checks are two-sided: the claim dies if random-subspace projection on the same readouts performs as well as the zeroizing solve, or if a modest, audit-compatible readout degradation blocks recovery — in which case the honest conclusion is that attention interfaces are more like a safe zero-test parameter than multilinear maps ever had, which would itself be the first quantitative answer to a question inherited from a decade of cryptanalysis.