Searching Audio Attack Detectors Against the Attacker Who Knows Them

One way to catch adversarial audio is to transcribe a clip twice and compare the results. Adversarial audio is speech carrying a tiny, inaudible perturbation that makes a speech recognizer output an attacker's chosen text. The first transcription uses the original audio. The second uses a version passed through a lossy "guard" transformation, such as a speech codec or a vocal-tract resynthesis. Benign speech survives the round trip with almost the same text. Adversarial perturbations are fragile, so the two transcripts diverge.

Every such detector so far was hand-designed and then, at best, audited against an attacker who knows the defense. Those audits show most designs fail. We propose to search over guard pipelines with a different target: the amount of audio distortion a fully informed attacker must add to evade the detector. The usual target is detection accuracy against naive attacks. Measuring evasion cost for each candidate means running an expensive adaptive attack inside the search loop. The technical core of the proposal is a cheap estimate of that cost that ranks candidates correctly.

The opportunity is concrete. WaveGuard found that against non-adaptive attacks nearly every transformation reached close to 100% AUC (area under the ROC curve, where 1.0 is perfect separation). Under a white-box adaptive attacker, simple quantization collapsed. Linear predictive coding and mel-spectrogram inversion forced attackers to raise distortion by over 25x. The quantity that separates good guards from useless ones is therefore invisible to the metric everyone reports. Nobody has optimized for it, because computing it is expensive.

Core Claim

The adaptive evasion cost of a discrepancy detector can be estimated cheaply enough to drive an architecture search. The estimate uses truncated adaptive attacks on a small utterance subset. To guard against gradient masking (defenses that look robust only because their gradients are uninformative), the truncated attacks always include the gradient workarounds of On Adaptive Attacks to Adversarial Example Defenses. Searching with this estimate over compositions of guard transforms and weight-shared recognizer pathways should find detectors that need more attacker distortion than the best hand-designed guard, at equal or lower latency.

The claim is falsifiable at two points. The cheap estimate might fail to rank detectors the way full-strength attacks do. Or the searched detectors might fall to an attacker held out from the search.

Defining the Objective

Let $C$ be a fixed speech recognizer, $x$ a benign clip, and $t$ the attacker's target text. A detector configuration $d$ applies a guard pathway $g_d$ and flags an input when the character error rate between $C(x)$ and $C(g_d(x))$ exceeds a threshold. That threshold is set so that a fraction $\alpha$ of benign clips are flagged (we use $\alpha = 5\%$).

Following theme T1 of the Tramèr et al. audit, "attack the full defense," the adaptive attacker solves

$$\min_{\delta}\; \ell(C(x+\delta), t) + \lambda\, \ell(C(g_d(x+\delta)), t) + \mu \lVert \delta \rVert,$$

where $\delta$ is the perturbation, $\ell$ is the recognizer's training loss (CTC, the alignment-free sequence loss used by these models), and $\lambda, \mu$ are weights the attacker tunes. The attacker uses BPDA (backward-pass differentiable approximation, which substitutes a smooth stand-in for non-differentiable steps) and EOT (expectation over transformation, which averages gradients over random guard behavior) wherever $g_d$ is non-differentiable or stochastic.

The evasion cost $c(d)$ is the median, over utterances, of the smallest distortion at which this attack produces $t$ on both pathways while staying under the detection threshold. We measure distortion with the same measure WaveGuard reports, so the 25x figure gives a reference. The search maximizes $c(d)$ subject to two constraints: a latency budget on the guard pathway, and unchanged benign transcription on the primary pathway. The primary path is never modified, so benign accuracy cannot degrade.

Research Program

Search space. The space combines the two families of guard that prior work used separately. The first family is input transformations: the five from WaveGuard, the codec sieves of Neural Codec-based Adversarial Sample Detection for Speaker Verification, and the six distortion operators of FraudWhistler. Each comes with its own parameters, such as filter order, bitrate, and number of quantization levels, and transforms can be chained up to depth three.

The second family is alternate recognizer pathways. Here the guard decode is not a separate model, as in MVP-EARS, which runs several independent recognizers and compares phonetic encodings of their transcripts. Instead it is a subnet of one weight-shared network: fewer layers, narrower layers, or an early exit, in the manner of the supernets in TAM-NAS. This lets us test directly whether weight-shared diversity buys any adaptive robustness. We expect it buys little, for three reasons. Tramèr et al. reduced an ensemble-diversity defense to 0% accuracy. TAM-NAS found that subnets inheriting supernet weights behave poorly. And a single gradient path through shared weights is easy for an attacker to follow.

Cheap estimate. The estimate is a short-budget version of $c(d)$: few attack iterations and a few dozen utterances. It treats attack budget the way Rethinking Performance Estimation in Neural Architecture Search treats training epochs, asking for the smallest budget that preserves rankings. Search proceeds by successive halving. Many candidates get tiny attack budgets, and the survivors get more. This borrows the pruning logic of ABanditNAS, which prunes provably poor operations with confidence bounds, and moves it from training cost to attack cost.

The main risk is that a truncated attack rewards gradient masking: a guard that merely confuses gradients looks expensive to evade. Theme T4 of the audit warns that optimization failure often masquerades as robustness. Two rules address this. First, the cheap estimate always uses BPDA and EOT, never plain gradients. Second, any candidate that jumps in rank as attack budget grows is flagged and re-attacked at full strength before it can survive.

Search speed. Search cost is the explicit constraint. We report wall-clock GPU hours for the whole search and for each candidate. The proxy is only useful if it is at least an order of magnitude cheaper per candidate than a full audit. No reported cost for audio adaptive attacks per configuration was found on Lacuna, so we will measure it.

Baselines

Do-nothing reference. The undefended recognizer under the standard targeted attack with no guard path. This anchors every distortion ratio, matching how WaveGuard expresses its 25x result.

Strongest hand-designed competitor. WaveGuard's linear predictive coding and mel-inversion guards, re-run on our recognizer and data with our adaptive attacker. The attacker gets the same iteration budget, restarts, and $\lambda,\mu$ tuning grid used for searched candidates. The reported figure is distortion "over 25x compared to an undefended model" for mel-inversion, with "nearly 100% AUC" against non-adaptive attacks (WaveGuard). Beating it means a searched detector needs a larger median evasion distortion than our re-run of the best WaveGuard guard at the same 5% benign flag rate and no higher guard latency. WaveGuard reports about 0.78s for linear predictive coding.

Temporal Dependency. Characterizing Audio Adversarial Examples Using Temporal Dependency compares a prefix's standalone transcript with its transcript inside the full decode. It reports AUC 0.936 on Common Voice and 0.930 on LibriSpeech. Tramèr et al. raised attack success against it to 100%. We include it as a known-broken reference, to confirm our attacker reproduces that break.

Multi-model diversity. MVP-EARS reports 99.88% detection accuracy with several auxiliary recognizers. No reported adaptive-attack result for it was found on Lacuna. We run it with one off-the-shelf auxiliary model under the joint attack, and also count its memory cost.

Random search. Uniform sampling from the same space, given exactly the same total attack-and-search GPU hours. This is the most dangerous baseline. Beating it is what justifies the cheap estimate plus successive halving.

Ablations. Two ablations isolate the key ingredient. In the first, search ranks candidates by non-adaptive detection AUC instead of estimated evasion cost. In the second, the cheap estimate drops BPDA and EOT. We expect the first to select brittle guards such as quantization and the second to select masking guards. Either outcome would show the objective is what matters.

Why not just…?

Why not just grid-search WaveGuard's five transforms under full adaptive attack? If the space were five transforms with a few settings each, exhaustive full-strength auditing would be affordable and our estimate unnecessary. The case for search rests on compositions of transforms and their continuous parameters, which blow the space past brute force. This alternative is a real threat. We include it as the "single-transform grid" arm. If the best single transform matches the searched composition within noise, we conclude that composition does not help. In that case the contribution narrows to the validated cheap estimate, which still cuts audit cost.

Why not just add more diverse recognizers, or cheap subnets, as in MVP-EARS? Diversity defends well against attacks that transfer between models. An attacker who knows all the models attacks them jointly. Tramèr et al. reduced an ensemble-diversity defense from a claimed 48% to 0%. FraudWhistler, whose multi-distortion detector is the closest audio analogue, dropped from 98.7% to 84% under a worst-case adaptive attacker. Subnet pathways are in our search space precisely so the search can show whether they earn their place against the joint attack, rather than us assuming either answer.

Why not just search with a cheap noise-based or non-adaptive proxy, as RNAS does? Robust Neural Architecture Search replaced adversarial perturbations with uniform noise during search and reported 53.74% FGSM robust accuracy at 0.5 GPU days. But it optimized invariance against a fixed attack, while a detector must stay invariant on benign inputs and diverge on adversarial ones. WaveGuard's data already shows that non-adaptive detection scores saturate near 100% for guards that later collapse. Our first ablation tests this directly.

Why not just adversarially train a learned detector on discrepancy features? Theme T6 of the audit reports that combining heuristic defenses with adversarial training can mask gradients and destabilize training. A trained detector also invites the intermediate-feature attacks of theme T3. We leave this out of scope, and say so, rather than claim superiority.

Proposed Experiments

The primary setting is targeted attacks on a CTC recognizer, using Mozilla Common Voice for search and attack, and LibriSpeech as held-out data. These are the corpora where WaveGuard and Temporal Dependency report results. Google Speech Commands serves as a stress test for one-second clips, where Temporal Dependency is known to degrade. A secondary run on VoxCeleb1 transfers the method to speaker verification. There the discrepancy signal is the change in verification score, and the comparison points are FraudWhistler and the codec detector, the latter reporting 99.32% detection at 0.01 false positive rate under non-adaptive attack.

Metrics are median evasion distortion at a 5% benign flag rate, adaptive attack success rate at a fixed distortion budget, non-adaptive AUC, guard latency, and total search GPU hours.

Three decisive checks settle the claim.

Proxy fidelity. On roughly fifty held-out configurations audited at full strength, we compute the Kendall rank correlation between the cheap estimate and the full evasion cost. For context, EZNAS reports 0.65 for zero-cost proxies on NASBench-201, a different task. We set our own acceptance bar at 0.6, with correct ordering among the top tenth. EZNAS notes that this top-tenth region is where proxies usually fail.

Held-out attacker. The final selected detectors are re-attacked by a protocol never used during search. It changes the loss weighting, uses many restarts with ten times the budget, and adds a decision-based black-box attack, following theme T5. Gains that vanish here count as overfitting to the search attacker.

Comparison with the strongest competitors. The searched detector must beat both re-run WaveGuard and equal-budget random search on evasion distortion without exceeding WaveGuard's latency. Any audio sample where evasion succeeds is checked for audibility, since forcing perturbations into audible static is the practical win.