Certifying Speech Recognizers Against Sparse, Inaudible Edits

Speech recognizers can be fooled by audio changes that people cannot hear. Almost every such attack spreads a faint signal across the whole recording, and almost every defense tries to wash that signal out. Both sides have ignored a different and cheaper attack: rewrite only a few short stretches of audio, and hide each rewrite under loud sound that a listener's ear already ignores. We propose to formalize this sparse, inaudible threat and to build a speech recognizer with a provable guarantee against it. The recognizer transcribes many random subsets of short audio frames and takes a vote. Its frame-sampling rule is shaped by a model of human hearing, so that it keeps phonetically important quiet frames and samples less often the loud frames where an inaudible payload can hide.

This matters for two reasons. Existing audio defenses either break once the attacker knows how they work, or they badly hurt accuracy on normal speech. Randomized smoothing on Whisper, which adds Gaussian noise at inference, raises clean word error rate from 3.4% to nearly 10% (There is more than one kind of robustness: Fooling Whisper with adversarial examples). AMR compression raises clean word error rate on DeepSpeech from 0.369 to 0.488 and was only ever tested against attackers who ignore the codec (ADAGIO). A guarantee that holds against any attacker within a stated budget avoids the endless cycle of defenses being broken by adaptive attacks, which are attacks that know the defense and optimize against it. The open question is whether such a guarantee can be bought in audio without the heavy clean-accuracy penalty it carries in vision.

Core Claim

Randomized ablation certifies image classifiers against attackers who change a few pixels arbitrarily (Robustness Certificates for Sparse Adversarial Attacks by Randomized Ablation). "Randomized ablation" means keeping a random subset of input coordinates, replacing the rest with a null symbol, and voting over many such subsets. The certificate follows because, if few coordinates are attacked, most random subsets never see them. The method requires uniform sampling, since weights computed from the input could be steered by the attacker. It pays for this with a 2.3% clean-accuracy drop on MNIST and poor results on dense, low-resolution CIFAR-10.

Our central observation is that a psychoacoustic threat model lets the defender use weights computed from the input and still keep a certificate. Such a threat model requires every edit to stay below the ear's masking threshold, the frequency-dependent level beneath which a quiet sound is hidden by a louder one. The argument runs as follows. An edit below the masking threshold can change the energy in any hearing band only by a bounded ratio. A sampling rule built from coarse band energies therefore shifts by a bounded amount, and only on the edited frames. The certificate absorbs this shift as an extra slack term.

Concretely, let $S$ be the random set of retained frames and $A$ the set of at most $\rho$ attacked frames. Let $q_x$ and $q_{x'}$ be the sampling distributions induced by the clean input $x$ and the attacked input $x'$. The vote for any transcript $c$ can then move by at most

$$ \Delta(\rho) \;=\; \max_{|A|\le\rho} \Pr_{S\sim q_x}\!\left[S\cap A\neq\emptyset\right] \;+\; \mathrm{TV}\!\left(q_x, q_{x'}\right). $$

Here TV is total variation distance, and it is bounded by the maximum energy ratio that a masked edit allows. The prediction is certified whenever the vote margin between the top two transcripts exceeds $2\Delta(\rho)$.

The first term rewards sampling rarely from the loud frames where hidden payloads fit. Information for transcription, however, also lives in lower-energy consonants. Whether these two pressures can be separated well enough to beat uniform ablation is the empirical question at the center of the proposal.

Research Program

Define the threat model. We first define a frame-sparse psychoacoustic threat model. The attacker may rewrite up to $\rho$ non-overlapping 20 ms frames. Each rewrite's power spectrum must stay below the global masking threshold of the clean signal, computed on the Bark critical-band scale as in Imperceptible, Robust, and Targeted Adversarial Examples for Automatic Speech Recognition. Frames rather than individual waveform samples are the natural unit, for three reasons. A single-sample edit is an audible click. Spectrogram frames overlap, so we account for each edited window touching two analysis frames. Speech is itself organized into phoneme-length units: Phonemic Adversarial Attack against Audio Recognition in Real World found phoneme-aligned noise both faster to craft and more effective than utterance-wide perturbations, reaching 87% versus 49% success.

Build the strongest attack in this threat model. We carry over the decoupled mask-times-perturbation Frank-Wolfe optimizer of SAIF, which searches over $k$-sparse masks without projection steps, from pixels to frames. The perturbation step is constrained by the masking curve, using the frequency equalization of Beyond Lp Clipping rather than uniform clipping. This attack is our main stress test and a contribution in its own right. No paper in the file reports a sparse attack on speech recognition, and the dense-only evaluations of WaveGuard and of the bio-inspired front-ends leave open whether a few masked frames survive those defenses.

Build the defense. The defense is frame-level randomized ablation. The base recognizer is fine-tuned to transcribe audio in which all but $k$ frames are replaced by a learned null embedding. The sampling weights come from quantized Bark-band energies, and the certificate uses the slack term above. Long utterances cannot be certified by exact-match voting over full transcripts, so we certify fixed-length chunks. Each chunk carries the full attack budget $\rho$, since a worst-case attacker concentrates there. We report the fraction of chunks certified, and also the ordinary word error rate of the voted recognizer.

Analyze the trade-off. We map clean word error rate against certified $\rho$ as $k$ and the sampling rule vary. We also measure how much of the attack surface actually sits in loud frames. That measurement tests whether high masking capacity and high phonetic content co-occur. If they do, the trade-off cannot be improved by where the defender samples.

Baselines

Undefended reference point. Whisper-base, a LibriSpeech-trained Conformer, and DeepSpeech are run without any defense. These give the clean error rates the defense must approach. For Whisper-base, the file reports a clean word error rate of 3.4% and over 80% under dense PGD at 40 dB signal-to-noise ratio (Fooling Whisper).

Gaussian randomized smoothing. This is the strongest existing competitor with a certification flavor. The reported numbers are clean word error rate rising from 3.4% to nearly 10%, with attacked error falling from 90% to about 35% (Fooling Whisper). We rerun it on the same Whisper-base checkpoint. Its noise level and ours are chosen by the same grid search on a held-out split under an equal inference budget, meaning the same number of forward passes per utterance. Beating it means lower clean word error rate at matched empirical robustness to our sparse attack, plus a nonzero certified radius, which Gaussian smoothing cannot provide against $\ell_0$ edits.

AMR and MP3 compression. These follow ADAGIO, which reports clean word error rate of 0.369 rising to 0.488 and targeted success falling from 92.45% to 0% against a non-adaptive attacker. We evaluate them adaptively, using a differentiable codec surrogate plus the sparse attack. We also evaluate them with and without the same fine-tuning our recognizer receives.

Detection and robust front-ends. We include WaveGuard's LPC and Mel-inversion detectors (WaveGuard) and the DoGSpec front-end (Revisiting Acoustic Features for Robust ASR). The latter reports that a targeted attack needs 8.6 dB signal-to-noise ratio against DoGSpec versus 21.3 dB against log-Mel, and a clean GammSpec error of 2.29% versus 2.53%, all under non-adaptive attacks. Each defense is attacked adaptively, by differentiating through the filterbank or detector.

Uniform frame ablation. This is the key ablation: a direct port of Randomized Ablation to frames, with the same $k$, the same fine-tuning, and the same compute. It isolates the psychoacoustic sampling rule. Our method must certify larger $\rho$ at equal clean word error rate, or reach lower clean word error rate at equal $\rho$.

No reported result was found on Lacuna for sparse attacks on speech recognition or for ablation-certified speech recognition, so all certified numbers will be new.

Why not just…?

Why not just compress the audio with MP3 or AMR? Codecs already discard what the ear ignores. But the only reported evidence is non-adaptive, and even there clean error rises by about a third (ADAGIO). WaveGuard's adaptive tests show that simple transforms such as quantization fall to attackers who optimize through them (WaveGuard). Our adaptive codec baseline settles whether codecs hold up against sparse edits. A codec also offers no guarantee.

Why not just use Gaussian randomized smoothing? Its geometry suits dense, small perturbations, not a few arbitrary frames. Levine and Feizi report 16-pixel median certificates on ImageNet with ablation against 1 pixel for prior certificates. On Whisper, Gaussian smoothing already triples clean error. We run it head to head. If it matched us on empirical sparse robustness at lower clean cost, our certificate would be the only remaining advantage, and we would say so.

Why not just port uniform randomized ablation? This is the real threat. If phonetic content and masking capacity occupy the same frames, stratified sampling buys nothing and the TV slack term makes it strictly worse. The uniform-ablation baseline measures exactly this. If uniform ablation wins, the contribution narrows to the threat model, the sparse attack, and the first audio certificate, and we would report it that way.

Why not just detect outlier frames? Unconstrained sparse edits produce loud, detectable bursts. Our threat model's edits sit below the masking threshold by construction, so energy-based outlier detection should not fire. We include an energy and spectral-flux detector as a baseline, attacked adaptively, to check this.

Proposed Experiments and Decisive Checks

We evaluate on LibriSpeech test-clean and test-other and on the Mozilla Common Voice test split, with Whisper-base, a Conformer trained on LibriSpeech 960h, and DeepSpeech. We report clean word error rate, certified chunk fraction as a function of $\rho$, and word error rate and targeted success rate under the adaptive sparse attack. We plot full accuracy-versus-$\rho$ curves.

Every attack is run with the sanity checks of On Evaluating Adversarial Robustness. An unbounded $\rho$ must reach full error, iterative attacks must beat single-step ones, and error must rise monotonically with budget. Empirical robustness must also never fall below the certified bound. Inaudibility is checked with a listening study modeled on Qin et al.'s same-or-different protocol.

Three checks decide the project. First, the sparse masked attack must fool at least one existing audio defense that resists dense attacks; otherwise the threat model is uninteresting. Second, the measured energy ratio under masked edits must be small enough that the TV slack term does not erase the certificate at realistic $\rho$. Third, psychoacoustic sampling must beat uniform frame ablation on the clean-error-versus-certified-$\rho$ curve for Whisper-base while staying well below the roughly 10% clean error of Gaussian smoothing.