A keyword spotter on a phone or smart speaker hears far more sounds it was never trained on than sounds it was. Most current systems summarize a whole clip as one vector and accept it if that vector lands close enough to a known keyword. That summary discards the order of events inside the clip, and many false alarms come from exactly that loss. A non-target word such as "dog" shares its opening with "down" but not its ending. A noise burst can have roughly the right spectral content in roughly the wrong order. We propose a different rejection rule. Read each clip with two recurrent networks, one running forward in time and one running backward, train both to point at the same learned class anchor for genuine keywords, and reject a clip when the two readings disagree about which keyword they heard.
The core bet is that the two directions summarize different evidence. A forward network's final state is dominated by how a sound ends, and a backward network's by how it begins. For a real keyword, beginning and end both point to the same word. For a confusable unknown that matches a keyword at only one end, or for a sound with the right parts in the wrong order, they should not. The direction-disagreement signal costs no extra parameters beyond a bidirectional encoder, needs no examples of unknown sounds at training time, and yields a testable prediction. It should help most where temporal order defines class identity (spoken words) and little where it does not (static acoustic scenes).
Core Claim
On open-set keyword spotting, a convolutional front-end followed by a bidirectional recurrent network can be trained so that its forward and backward summaries each land near a shared per-class anchor. Scoring a clip by anchor similarity minus forward–backward disagreement then rejects unknown words better than scoring the fused embedding alone. It also beats disagreement between two same-direction models, which is the ensemble explanation a skeptic would offer. What would be new is using the directional split of a bidirectional model as an open-set signal. In every bidirectional audio or sequence classifier in our file, the two directions are simply concatenated or pooled into one closed-set prediction. This holds for the CNN-BLSTM of Raw Speech Waveform Based Classification of Patients with ALS, Parkinson's Disease and Healthy Controls Using CNN-BLSTM, the Bi-GRU backbone of R-CRNN, and the bidirectional text encoder of Recurrent Convolutional Neural Networks for Text Classification.
Relation to Prior Work
Three open-set keyword spotting methods motivate and supply the geometry. Metric Learning for Keyword Spotting replaces moving class centroids with learnable fixed anchors, one weight vector $W_k$ per keyword. It trains with an angular margin so that non-targets are pushed away without being herded into one "unknown" cluster. Multi-class AUC Optimization for Robust Small-footprint Keyword Spotting swaps cross-entropy for a pairwise ranking loss that forces unseen words to score lower than any target. Few-Shot Open-Set Learning for On-Device Customization of KeyWord Spotting Systems shows that distance to class means on a frozen encoder beats heavier statistical rejection models. We reuse the fixed-anchor angular objective as our training loss. All three score a single utterance-level vector, and our proposal changes exactly that.
Two papers constrain the design. Deep Learning Based Open Set Acoustic Scene Classification found that training with an explicit catch-all unknown class hurt known-class accuracy and did not improve rejection. We therefore train only on known keywords. The same paper supplies the strongest scene-level baseline, a class-conditioned autoencoder scored by reconstruction error. Modernizing Open-Set Speech Language Identification is a direct warning against assuming recurrence helps. Its convolutional-recurrent model with attention lost to a purely convolutional time-delay network in open-set accuracy (79.1% vs. 83.3%). The authors attributed the gap to a poorly matched front-end. We take this seriously in two ways. We hold the convolutional front-end fixed and strong across all variants. We also require our method to beat purely convolutional baselines, not only weaker recurrent ones.
The bidirectional literature supplies the intuition that past and future context together resolve states defined by transitions. Evaluating the Influence of Temporal Context on Automatic Mouse Sleep Staging shows this for ambiguous REM epochs, and R-CRNN for event boundaries, where removing the Bi-GRU doubled event error rate from 0.09 to 0.18. None of these works asks whether the two directions agree.
Research Program
The encoder is a sequential feature extractor, meaning a small convolutional stack over log-mel frames that learns local patterns and shortens the sequence. It feeds a single-layer bidirectional GRU, a recurrent network with gated memory. We deliberately use light temporal downsampling (stride 2 rather than aggressive pooling), because the file notes that hard pooling erases fine temporal boundaries, and those boundaries carry our signal. Let $f(x)$ and $b(x)$ be the unit-normalized final states of the forward and backward passes after a shared linear projection.
Training uses the fixed-anchor angular loss three times, applied to $f$, to $b$, and to their normalized sum, all against the same anchors $W_k$. It adds a light agreement term $1-\cos(f,b)$ on known-class clips only. At test time the open-set score is
$$s(x) = \max_k \cos\big(\tfrac{f+b}{\|f+b\|}, W_k\big) \;-\; \lambda\,\big(1-\cos(f(x), b(x))\big),$$
where $\lambda \ge 0$ weighs disagreement and is chosen on a validation split of known words plus a disjoint set of validation unknowns. A clip is rejected when $s(x)$ falls below a threshold.
We also study a direction-specific variant that compares the two directions' predicted class, not just their vectors. A clip whose forward and backward nearest anchors differ is rejected outright. This tests whether a cheap discrete rule captures most of the gain.
The analysis half of the program builds diagnostic unknowns designed to separate order information from content. Time-reversed keywords have identical long-term spectra and reversed order. Segment-shuffled keywords cut each clip into three pieces and permute them. Splices join the first half of one keyword to the second half of another. We also evaluate natural confusable unknowns from the Speech Commands auxiliary words that share an onset or ending with a target. Our hypothesis predicts a specific pattern. Static-embedding methods should accept many reversed and spliced clips. Direction disagreement should reject them. The gain on natural unknowns should concentrate on words sharing one end with a target.
Baselines
The naive reference is the same convolutional-recurrent encoder trained with cross-entropy and scored by maximum softmax probability. Metric Learning for Keyword Spotting reports that this style of scoring reaches only 52.11% non-target accuracy on Google Speech Commands v0.01 at a 1:1 target-to-unknown ratio. Our reimplementation should land near that figure, which sanity-checks the protocol. Matching it earns nothing.
The strongest existing method on the question we care about is the multi-class AUC ranking loss on the res15 residual network from Multi-class AUC Optimization for Robust Small-footprint Keyword Spotting. It reports 92.97% total accuracy on Speech Commands v1 with 10 held-out unseen words, against 89.96% for cross-entropy. It is the strongest competitor because it already attacks open-set rejection directly in the loss and is purely convolutional, which addresses the time-delay network warning. The paired strong baseline on v0.01 is the fixed-anchor angular method (AP-FC) from Metric Learning for Keyword Spotting. At the 1:1 ratio it reports 83.82% total accuracy, 73.37% non-target accuracy and 94.26% target accuracy.
We will rerun both under their published protocols with our data splits, and quote the published numbers only as reproduction targets. Every model gets the same augmentation, the same number of epochs, and a matched parameter count within 10%. Every model also gets the same random-search budget of 30 configurations. Thresholds for all methods are selected on the same validation unknowns. Beating these baselines means exceeding the AUC method's total accuracy on v1 and AP-FC's non-target accuracy on v0.01 at equal or better target accuracy. It also means a higher area under the ROC curve (AUROC) and lower false acceptance at fixed 95% target recall, with gains larger than the standard deviation across five seeds.
The ablation that isolates the key ingredient is the identical bidirectional encoder and anchor loss, scored with the fused-embedding similarity alone ($\lambda=0$). If disagreement adds nothing over this, the claim fails, whatever the headline numbers. A second ablation tests whether direction matters or just having two views. It trains two forward-only GRUs with different seeds on the same front-end and scores their disagreement in exactly the same way.
For the scene-level control on TAU Urban Acoustic Scenes 2019 Open Set, the baseline is the adapted class-conditioned autoencoder from Deep Learning Based Open Set Acoustic Scene Classification, reported at 85.5% AUROC and 66% open-set accuracy.
Why not just…?
Why not just use a static-embedding method with a better loss, like AUC ranking or angular anchors? These are our strongest baselines, and they may well win on natural unknowns. What they cannot see by construction is order. Our reversed and spliced diagnostic sets test this directly, and the file contains no reported result for static methods on order-violating unknowns. If static methods also reject reversed keywords well, the order argument is wrong and we will say so. If they fail there but match us on natural unknowns, the honest conclusion is that order violations are rare in real non-target speech.
Why not just ensemble two ordinary models and use their disagreement? This is the most serious threat. Disagreement between independently trained models is a known uncertainty signal and needs no directional story. The two-forward-model ablation settles it. Our claim survives only if forward–backward disagreement beats same-direction disagreement at matched parameters. The margin should be concentrated on unknowns that share a beginning or ending with a target. A uniform gain would point to plain ensembling instead.
Why not just use a causal model's prediction surprise, such as next-frame prediction error from a forward-only network? This preserves streaming, which bidirectional models give up, and it also reads order. We include it as a baseline, trained with a next-frame prediction head on the same front-end and scored by mean prediction error. Its weakness, in our view, is that it flags any acoustically unusual clip, including known words in unusual noise, rather than class-level inconsistency. We will check this by measuring false rejections of known keywords under added background noise from the Speech Commands noise files. If surprise matches us at equal false rejection, the bidirectional cost is unjustified.
Why not just use a purely convolutional time-delay network, which already beat a recurrent model for open-set language identification? The evidence from Modernizing Open-Set Speech Language Identification is real, so the res15 AUC baseline is purely convolutional. If it wins across the board, recurrence is not earning its keep on this task.
Proposed Experiments
The primary experiments run on Google Speech Commands v1 using the 10-held-out-unseen-words protocol of the AUC paper, and on v0.01 at the 1:1 ratio used for AP-FC. We report total, target and non-target accuracy, AUROC, false acceptance at 95% target recall, and detection error tradeoff curves over five seeds. We add a few-shot check following Few-Shot Open-Set Learning for On-Device Customization of KeyWord Spotting Systems. The encoder is frozen, class means from 10 shots per new keyword replace anchors, and target accuracy is reported at 5% false acceptance against its reported 76%. The disagreement term needs no training in this regime, which makes it a clean test.
The decisive checks are three. First, the $\lambda=0$ ablation must lose to the full score. Second, forward–backward disagreement must beat same-direction disagreement, with the gap largest on splices and on onset- or ending-sharing unknowns. Third, the scene-level control on TAU Open Set should show little or no benefit over the 85.5% AUROC autoencoder, since scene identity is not defined by order. A large gain there would mean the signal is generic model uncertainty rather than temporal consistency, which would undercut the mechanism even if headline numbers look good.
References
- Raw Speech Waveform Based Classification of Patients with ALS, Parkinson’s Disease and Healthy Controls Using CNN-BLSTM
- R-CRNN: Region-based Convolutional Recurrent Neural Network for Audio Event Detection
- Recurrent Convolutional Neural Networks for Text Classification
- Metric Learning for Keyword Spotting
- Multi-class AUC Optimization for Robust Small-footprint Keyword Spotting with Limited Training Data
- Few-Shot Open-Set Learning for On-Device Customization of KeyWord Spotting Systems
- Deep Learning Based Open Set Acoustic Scene Classification
- Modernizing Open-Set Speech Language Identification
- Evaluating the Influence of Temporal Context on Automatic Mouse Sleep Staging through the Application of Human Models