Soft-Threshold Likelihood Ratio Tests for Dialect Identification on Short Speech

Closely related dialects, such as Iraqi and Jordanian Arabic, sound mostly alike. Most of the sounds in an utterance are pronounced the same way in both, and the evidence that separates them sits in a few sounds realized differently: a particular consonant, a vowel quality, a length contrast. Current systems summarize a whole utterance into one vector and classify it. On long recordings this works well. On a few seconds of speech, the few informative sounds are swamped by the shared ones and by speaker and microphone differences. This note proposes a different decision rule. We first label each stretch of speech with a sound unit. For every dialect we then ask whether the observed per-unit pronunciations are explained by "the shared pronunciation plus this dialect's sparse set of shifts, plus a small bounded amount of slack for speaker and coarticulation (the blurring of neighboring sounds in fluent speech)". Small deviations are absorbed by the slack and contribute nothing. Large deviations count in full. Formally this is a generalized likelihood ratio test (GLRT): a test that compares hypotheses after replacing unknown nuisance quantities with their best-fitting values under each hypothesis. Here the nuisance is a bounded per-unit offset, and fitting it reduces to a soft-thresholding operation with a closed form.

The bet is that this structure fits the "95% shared, 5% different" character of dialect overlap described in The 2015 NIST Language Recognition Evaluation: The Shared View of I2R, Fantastic4 and SingaMS, which reports that shared phonetic content dominates utterance-level representations. We expect the payoff exactly where current systems are weakest: utterances under five seconds, dialects with few training examples, and calibrated confidence. Long-utterance accuracy is not the target.

Core Claim

Represent an utterance by per-unit averages $\bar{x}_u$ of frozen pretrained encoder features, where $u$ indexes discrete sound units and $n_u$ counts the frames assigned to unit $u$. Each unit has a shared base mean $\mu_u$, pooled across all dialects. Each dialect $d$ has a learned shift $\delta_{d,u}$, encouraged to be sparse across units. The observation model is $\bar{x}_u \sim \mathcal{N}(\mu_u + \delta_{d,u} + \theta_u,\ \sigma_u^2 / n_u)$, where $\theta_u$ is an unknown offset bounded by $\|\theta_u\|_\infty \le \epsilon_u$ that stands in for speaker idiosyncrasy and coarticulation. Maximizing the likelihood over $\theta_u$ gives the per-dialect score

$$S_d(x) = -\sum_u \frac{n_u}{2\sigma_u^2}\,\big\| g_{\epsilon_u}(\bar{x}_u - \mu_u - \delta_{d,u}) \big\|^2 ,$$

where $g_\epsilon$ shrinks each coordinate toward zero by $\epsilon$ and sets it to zero if it is smaller than $\epsilon$. The closed form comes from the per-coordinate structure of the $\ell_\infty$ ball. The decision is $\arg\max_d S_d$. The evidence for dialect $d$ over the shared-only hypothesis is $\Lambda_d = S_d - S_{\text{base}}$, where $S_{\text{base}}$ is the score with all $\delta_{d,u}=0$. That evidence is calibrated against an empirically estimated null rather than a chi-squared approximation.

The mechanism is taken from Generalized Likelihood Ratio Test for Adversarially Robust Hypothesis Testing. That paper derives this soft-threshold classifier for Gaussian classes under bounded adversarial perturbation and shows that it matches minimax robustness under worst-case attacks while beating it under weaker perturbations. It works only on synthetic Gaussians. We reinterpret the bounded perturbation as benign, structured nuisance in real speech, and we make $\epsilon_u$ unit-specific and learned. What would be new is the claim that on short, overlapping-dialect speech this thresholded generative score beats discriminative heads on the same features. The claim is specific about the conditions: short utterances, tail dialects, and calibration error.

Relation to Prior Work

Three lines of work motivate the design. Dialect recognition using a phone-GMM-supervector-based SVM kernel aligned speech to phones and compared phone-specific realizations. It cut equal error rate (EER) from 15.3% for a global acoustic model to 4.9% on four Arabic dialects. That is the strongest evidence in the file that conditioning on sound units isolates dialect evidence. Our model is a modern descendant: neural features replace perceptual linear prediction features, a likelihood test replaces the SVM kernel, and there is an explicit tolerance for small deviations. The same paper's fMLLR baseline (a per-utterance linear feature transform fitted by maximum likelihood) reaches 11.0% EER. It is already a GLRT over a channel transform, so profiling out a global speaker or channel shift is not new. Our contribution is the bounded per-unit slack.

Target-Aware Lattice Rescoring for Dialect Recognition rescored a phone lattice with dialect-specific models to reward diagnostic paths. It depends on a phone recognizer and models sequences of phones. We model pronunciation of individual units, which avoids recognizer errors propagating downstream.

Corpus-based pronunciation variation rule analysis for singapore English observes that models confuse universal coarticulation with accent shifts. The slack $\epsilon_u$ is meant to absorb exactly that confusion, and this observation is our motivation for making it unit-specific.

Two works constrain the design. Unsupervised Representation Learning of Speech for Dialect Identification separates segment-level phonetic latents from sequence-level speaker and channel latents. It reaches 67.98% on MGB-3, below the fusion systems, which suggests that disentanglement alone is not the bottleneck. Discriminative training and channel compensation for acoustic language recognition removes a low-rank channel subspace. We reuse that eigenchannel idea as an optional global nuisance term, profiled analytically by least squares, so that the bounded per-unit slack is tested on top of a known technique rather than in place of it.

A Neural Network-Prepended GLRT Framework for Signal Detection Under Nonlinear Distortions uses a network to discard samples before a classical GLRT. Our soft threshold does a similar job inside the test, without a separate learned filter. Asymptotics of Sequential Composite Hypothesis Testing under Probabilistic Constraints supplies the idea for a secondary experiment: a sequential version that stops listening once $\Lambda_d$ crosses a threshold.

The closest work combining dialects and likelihood testing does something else. Automatic estimation of dialect mixing ratio for dialect speech recognition estimates Kansai versus standard-Japanese mixing from recognized words, using dictionary counts or a topic model. A Likelihood Ratio Test of Genetic Relationship among Languages applies a likelihood ratio test to lexical wordlists. Neither works on acoustic realizations of sound units.

Research Program

We use frozen Whisper encoder features, the same backbone as A Parameter-Efficient Learning Approach to Arabic Dialect Identification with Pre-Trained General-Purpose Speech Model, and frozen XLSR for NIST LRE 2017. Frames are assigned to units by k-means on encoder features, with a few hundred to a thousand units; this needs no transcription. A variant uses a phone recognizer, following Collins et al.

Each unit gets a PCA-reduced subspace. We estimate the base means $\mu_u$ and variances $\sigma_u^2$ on pooled training data. The dialect shifts $\delta_{d,u}$ and slacks $\epsilon_u$ are fitted by maximizing the profiled likelihood of the correct label minus competitors, with a group-sparsity penalty that keeps each dialect's shifts on few units. Because the base is shared, a tail dialect such as Jordanian only has to estimate its sparse deviations rather than a full class model. This is the mechanism by which we expect gains on dialects with few examples.

Calibration uses an empirical null. We take the distribution of $\Lambda_d$ on held-out utterances not of dialect $d$, matched by duration bucket, and convert scores to posteriors or to a calibrated "insufficient evidence" decision. This step is needed because bounded parameters and non-Gaussian features break the standard asymptotic theory. The analysis then checks whether the units that survive thresholding for each dialect correspond to sounds phoneticians associate with that dialect, for example realizations of /q/ across Arabic varieties. This is a falsifiable interpretability check, not decoration.

Baselines

The naive reference is a frozen-feature mean-pooling baseline: average all encoder frames and train logistic regression. It shows what the backbone gives for free.

The strongest existing method is full Whisper encoder fine-tuning as in A Parameter-Efficient Learning Approach to Arabic Dialect Identification with Pre-Trained General-Purpose Speech Model. That paper reports 95.01% test accuracy on ADI-17 utterances longer than 20 seconds, and 93.15% with Adapters-256. No reported result was found on Lacuna for its accuracy on ADI-17 utterances under 5 seconds, which is our target condition, so we rerun it on the same splits and report all duration buckets. For overall ADI-17 accuracy, the strongest number in the file is 86.29% for the CNN plus Transformer fusion in Transformer-based Arabic Dialect Identification. Its standalone Transformer reaches 82.54%, with Jordanian accuracy at 68.5%. On MGB-3 the reference numbers are 81.36% accuracy and 11.03% EER for the acoustic-plus-text fusion, and 73.39% for the acoustic-only CNN, from Convolutional Neural Network and Language Embeddings for End-to-End Dialect Recognition. On low-resource NIST LRE 2017, Improving Spoken Language Identification with Map-Mix reports weighted F1 0.658 and expected calibration error (ECE) 0.067, against 0.601 and 0.158 for plain XLSR.

The most dangerous baseline is our own construction: attentive pooling plus a linear head on the same frozen features. It learns which frames to weight, and is temperature-scaled for calibration. A second strong construction is a "neural Collins" system: the same per-unit means $\bar{x}_u$ concatenated and classified by logistic regression.

Two ablations isolate the key ingredient. Setting $\epsilon_u = 0$ turns our score into a per-unit Gaussian linear discriminant. Fixing a single global $\epsilon$ tests whether unit-specific slack matters. A further variant adds the eigenchannel global nuisance to every system.

For fairness, all frozen-feature systems use the same encoder layer, the same units, the same training data, and the same hyperparameter search budget, counted in trials. The method beats the field if, on ADI-17 utterances under 5 seconds, it exceeds the attentive-pooling and neural-Collins baselines on accuracy and on macro-averaged accuracy over the five smallest dialects. It must also improve ECE after both are temperature-scaled, with bootstrap confidence intervals over utterances that exclude zero. It is not required to beat full fine-tuning on long utterances. If it beats fine-tuning on short utterances while using a frozen encoder, that is a strong result.

Why not just…?

Why not just fine-tune Whisper with adapters? This is the strongest competitor in absolute terms. On long utterances we expect it to win. The file notes that the adapter paper itself reports degradation on short segments, but gives no number, so this proposal measures it directly per duration bucket. We also run the GLRT head on features from the fine-tuned encoder. If fine-tuning alone matches the stacked system on short-utterance tail-dialect accuracy, the thresholded test adds nothing beyond better features, and we would report that.

Why not just use attention pooling, which already learns to ignore uninformative frames? This is the real threat, and the reason it is built as a baseline rather than dismissed. Attention reweights frames, but it has no shared generative base, so a tail dialect must learn its whole decision boundary from few examples, and its scores carry no null distribution. If attention pooling with temperature scaling matches our method on short utterances, tail dialects, and ECE, then the soft-threshold structure is not earning its place, and we would conclude so.

Why not just disentangle speaker and channel with an FHVAE and classify the phonetic latent? On MGB-3 the FHVAE phonetic latent reaches 67.98%, below the 73.39% acoustic CNN reported in the related paper. That suggests removing sequence-level nuisance is not sufficient. Our ablations also separate global nuisance, through the eigenchannel term, from per-unit bounded slack, so the experiment shows which one carries the gain.

Why not just add ASR transcripts? Text fusion raises MGB-3 accuracy from 73.39% to 81.36%, but it depends on recognizer quality for non-standard dialects. Our method needs no transcripts. We report it as acoustic-only and also fuse it with text where available, so the comparison with the 81.36% fusion system is like for like.

Why not just apply Map-Mix augmentation? Map-Mix improves calibration on LRE 2017. We run it on top of the attentive-pooling baseline with the same XLSR features as a calibration competitor, and compare ECE directly against 0.067.

Proposed Experiments

The main experiment is ADI-17 with its official short, medium, and long duration splits. We report overall accuracy, per-dialect accuracy (with Jordanian and other tail dialects singled out), ECE, and accuracy as a function of the amount of audio heard. The idea is confirmed if the gap over attentive pooling and neural Collins is largest for short utterances and tail dialects and shrinks toward zero for utterances over 20 seconds. That pattern follows from the model: with more frames, $n_u$ grows and the slack matters less relative to the shifts. The idea is refuted if the gap is flat across durations or appears only on head dialects.

The $\epsilon$ ablation is the decisive check on mechanism. If setting $\epsilon_u = 0$ recovers most of the gain, the benefit comes from unit conditioning and shared-base pooling, not from the composite test, and the paper would be honestly reframed as a neural Collins result.

MGB-3 tests robustness to the shift from broadcast training data to YouTube test data. We report accuracy and EER against the 73.39% acoustic-only and 81.36% fusion references. NIST LRE 2017, in its 5-hour-per-dialect setup, tests calibration against Map-Mix's 0.067 ECE and whether the thresholded test transfers beyond Arabic.

A sequential variant updates $\Lambda_d$ as frames arrive and stops when the null-calibrated threshold is crossed. It is evaluated by expected stopping time at a fixed error rate, against confidence-thresholded attentive pooling.

Finally, the surviving-unit analysis checks whether the learned sparse shifts land on linguistically plausible sounds. If they instead track channel-like units such as silence or noise, that would show the slack is absorbing the wrong variation.