Language models do worse on dialectal and informal text than on standard text. The common explanation is spelling. Dialect writers spell the same word many ways, subword tokenizers break those variants into meaningless fragments, and the model never connects them to words it knows. That explanation rests almost entirely on correlation. Dialectal text differs from standard text in spelling, and also in vocabulary, morphology, syntax, and topic. A model's errors on it could come from any of these. Microbiome research has a name for this trap, the "passenger problem": a feature that co-occurs with an outcome may be a bystander rather than its cause, and only intervention can tell the two apart (Integrating biological knowledge for mechanistic inference in the host-associated microbiome). We propose to apply that discipline to dialect NLP. The method is to change only the spelling of real dialect text while holding the words fixed, and then measure how much of the dialect performance gap closes.
The core claim is testable. We expect orthographic variation to be a driver for only part of the dialect gap, and that part should be sharply larger for variants produced by systematic sound changes than for random typos of the same size. If the claim holds, the field's main robustness tool, random character noise during training, targets the wrong distribution. If it fails, spelling is a passenger, and normalization effort should go elsewhere. Either way, we gain an interventional estimate where the field currently has only correlations. A second stage uses activation patching inside the network to find where the spelling damage happens. Activation patching means copying a layer's internal activations from one input's run into another input's run and seeing whether the output changes.
What exists and what is missing
Three lines of work motivate the gap. Semantics or spelling? swaps one character in English Wikitext-2 words. For words that are a single token, the representations collapse: Spearman correlation between original and perturbed embeddings falls to between 0.2 and 0.5. Adding 100 words of context barely helps. The perturbations, however, are random, and the study measures embeddings rather than task decisions. CODACT shows that dialectal Arabic spelling variants follow sound-change rules. On Egyptian text, an edit distance biased by those rules cuts cluster entropy from 0.47 to 0.19 and raises precision from 29% to 68%. This is a resource for structured variation, but it never asks whether the variation hurts models. Add Noise, Tasks, or Layers? finds that random character noise during training helps Norwegian dialect intent detection. That result is the strongest evidence that spelling matters, but it is still observational with respect to cause: noise could help through general regularization rather than through spelling invariance.
The method comes from Causal Mediation Analysis for Interpreting Large Language Models. It treats a model as a causal graph, swaps activations between a baseline run and a counterfactual run, and splits a total effect into direct and indirect parts. It has been applied only to English gender, agreement and arithmetic prompts. Dialect Representation Learning with Neural Dialect-to-Standard Normalization supplies word-aligned dialect and standard transcriptions for Finnish (SKN) and Norwegian (NDC), which make controlled rewrites possible. That paper studies only learned speaker embeddings and does not intervene on them.
The closest prior work is therefore Matthews et al. Our proposal differs in three ways. It applies real, rule-governed dialect spellings to real dialect task data. It separates spelling from vocabulary through a factorial design. It localizes the effect causally rather than measuring embedding drift.
Research Program
The design follows the validation hierarchy of the microbiome literature: a necessity test, a sufficiency test, then mechanism. A whole-sample swap is not enough, just as fecal transplant identifies no single causal strain (Gut Microbiota Dysbiosis in Preeclampsia). The interventions must change one factor at a time.
Spelling-only edits. First, we build lexicons of spelling-only variants. For Norwegian we use the NDC word alignments. For Egyptian and Levantine Arabic we use the CODACT clusters on COMMENTDA. For Banglish we cluster Romanized spellings in BanTH with the same biased-edit-distance procedure. Each dialect-to-standard word pair is labeled as one of two kinds. A spelling variant is the same word, differing by a sound-change rule or a phonetic spelling. A lexical substitution is a different word. Automatic labels come from the rule set and are checked by annotators on a stratified sample.
Necessity test. We rewrite dialect test inputs so that only the spelling variants are mapped to canonical forms. Lexical substitutions, morphology and word order stay in dialect.
Sufficiency test. We go the other way. Standard-language inputs receive dialect spellings drawn from the same variant lexicon, again without any lexical change.
Ablation of structure. Each structured edit gets a matched random edit. The matched edit has the same character edit distance and produces the same number of extra subword tokens. This isolates whether rule-governed structure matters beyond edit size and token fragmentation.
Effect decomposition. Let $P_{dial}$ be task performance on original dialect inputs, $P_{orth}$ the performance after the spelling-only canonicalization, and $P_{std}$ the performance on fully standardized inputs where they exist. We report the orthographic share of the gap:
$$\rho = \frac{P_{orth} - P_{dial}}{P_{std} - P_{dial}}$$
Here $\rho$ near 1 means spelling drives the gap, and $\rho$ near 0 means it is a passenger.
Mechanism. For a variant/canonical pair, we patch activations from the canonical run into the variant run. Patching is done at the target word's token positions, one layer at a time, and separately for attention and MLP sublayers. We record how much of the output difference each patch recovers, which is the indirect effect in Rocchetti and Ferrara's sense.
This patching speaks directly to Gap 3 in the literature. Suppose most of the recovery comes from patching only the input embedding and the first layers. Then the damage happens at tokenization, consistent with Matthews et al. Suppose instead it comes from later attention layers that should pull meaning in from context. Then the failure is in routing information across fragments.
Baselines
The naive reference point is the unmodified model on unmodified dialect input, which defines $P_{dial}$. Every intervention is measured against it with the same checkpoint, prompt and decoding.
The strongest existing method on Norwegian is MaiNLP's system (Add Noise, Tasks, or Layers?). Its assembled models report 97.6% intent accuracy and 85.6% slot F1 on the dialectal data. Its mDeBERTa trained with 20% random character noise reports 97.5% intent accuracy. We will retrain the noise variant with their recipe and tuning budget. We then evaluate it on our structured-variant and matched-random test sets. "Beating it" here does not mean higher accuracy, because this is an analysis project. It means showing a measurable robustness gap on structured variants, at matched edit size, that the noise-trained model fails to close. Conversely, if noise training closes structured and random gaps equally, our structure hypothesis is refuted for Norwegian.
For Banglish, the fine-tuned TB-mBERT in BanTH reports a binary macro-F1 of 77.36. We rerun it as the model under intervention. For Arabic, the CODACT clusters themselves are the normalization baseline, with 68% Egyptian and 64% Levantine cluster precision. Any downstream estimate will be reported alongside how sensitive it is to cluster errors.
The observational baseline is a regression of per-example errors on fragmentation rate and the share of out-of-vocabulary words. That regression is the correlational estimate that our interventional estimate must either confirm or overturn.
The key ablation is the matched random-edit condition described in the research program.
Why not just…?
Why not just regress errors on how badly the tokenizer fragments the input? This is cheap, and we run it. But fragmentation is entangled with dialect vocabulary: heavily fragmented sentences are also the most lexically dialectal. A regression cannot separate the two. That is exactly the cross-sectional confound behind the microbiome passenger problem, as with the serotonin-transporter dysbiosis study's inability to fix the direction of cause (Serotonin Transporter Deficiency). If the regression slope and the interventional estimate of $\rho$ agree across all three languages, the simpler method was adequate, and we will say so.
Why not just normalize everything with CODA or CODACT before the model and report the gain? This is the most serious threat, because our necessity test is a restricted version of it. Full normalization, however, also rewrites lexical items whenever a cluster merges different words, and CODACT's 68% precision shows this happens. Its gain therefore mixes spelling with vocabulary. Our spelling-only restriction, the reverse sufficiency test, and the matched random control are what turn "normalization helps" into "spelling causes X% of the gap." If full and restricted normalization give the same gain, the decomposition adds little, and the mechanistic stage carries the contribution.
Why not just train with random noise and move on? MaiNLP shows it helps. Matthews et al. and CODACT suggest real variation is structured and fragments single-token words in specific ways. The matched-edit comparison on the noise-trained model directly tests whether random noise covers structured variation.
Why not just add context or few-shot examples? Matthews et al. report that 100 words of context barely restore corrupted embeddings. AL-QASIDA finds that five in-context examples help, yet most models stay below 50% on its dialect-fidelity metric, which measures whether the output is actually in the requested dialect. We include a few-shot condition on the Arabic and Banglish tasks to check whether prompting shrinks the orthographic share $\rho$ specifically.
Decisive Experiments
The first test is the factorial evaluation on the Norwegian dialect slot-and-intent data, with spelling edits from the NDC lexicon. It crosses spelling (dialect or canonical) with edit type (structured or matched random), using mDeBERTa, the MaiNLP noise-trained model, and one decoder model. The result is decisive if structured edits cost more than matched random edits on the noise-trained model, with a bootstrap confidence interval excluding zero. It also yields $\rho$ for each model.
The second test replicates the design on BanTH (macro-F1) and on Arabic using EDRAC passages canonicalized with CODACT clusters. EDRAC is scored with CAMeLBERTScore-F1, a dialect-aware similarity metric, because standard string-match metrics penalize transcriber spelling choices (EDRAC). The point is to check whether $\rho$ is stable across scripts and tasks.
The third test is layer-wise activation patching on 500 variant/canonical pairs per language. Its prediction is falsifiable: if the damage happens at tokenization, embedding-level patches should recover most of the effect for single-token words and little for words already split into several tokens. That pattern mirrors the Matthews asymmetry, and if it fails to appear, our account of the mechanism is wrong.
References
- Integrating biological knowledge for mechanistic inference in the host-associated microbiome
- Semantics or spelling? Probing contextual word embeddings with orthographic noise
- CODACT: Towards Identifying Orthographic Variants in Dialectal Arabic
- Add Noise, Tasks, or Layers? MaiNLP at the VarDial 2025 Shared Task on Norwegian Dialectal Slot and Intent Detection
- Causal Mediation Analysis for Interpreting Large Language Models
- Dialect Representation Learning with Neural Dialect-to-Standard Normalization
- Gut Microbiota Dysbiosis in Preeclampsia: Mechanisms, Biomarkers, and Probiotic‐Based Interventions
- BanTH: A Multi-label Hate Speech Detection Dataset for Transliterated Bangla
- Serotonin Transporter Deficiency is Associated with Dysbiosis and Changes in Metabolic Function of the Mouse Intestinal Microbiome
- AL-QASIDA: Analyzing LLM Quality and Accuracy Systematically in Dialectal Arabic
- EDRAC: Benchmarking Arabic Dialect Reading Comprehension