Spell correction for Japanese search queries presents unique challenges due to the co-existence of four writing scripts (Latin/romaji, hiragana, katakana, and kanji) and the distinct error patterns each script induces. We present a compact BART-based sequence-to-sequence model (3 encoder + 3 decoder layers) designed for low-latency spell correction of Japanese music search queries. The core contribution lies in a script-aware synthetic misspelling generation pipeline that produces realistic training data by combining keyboard-layout models (QWERTY and flick input), phonetic confusion priors mined from real query logs, voiced/unvoiced consonant alternations, and kana case errors. A key design decision is normalizing mixed-script catalog titles to a single canonical script before misspelling synthesis, which we show is critical for reducing model hallucinations. We train a custom byte-level BPE tokenizer on the target music catalog to handle all four scripts in a unified vocabulary. Experiments on a curated evaluation set show that our model achieves an exact-match accuracy of 41.09% and a character error rate (CER) of 11.62%, outperforming edit-distance baselines and achieving the lowest character error rate among all evaluated systems while maintaining sub-4ms inference latency on a single GPU. We further analyze performance across individual scripts and mixed-script queries, demonstrating the effectiveness of script-aware data augmentation through systematic ablation studies.
Figures & tables
Parameter
Value
Encoder / Decoder layers
3 / 3
Hidden dim / Attention heads
768 / 12
FFN dimension
3072
Vocabulary size
50,000
Dropout / Activation
0.1 / GELU
Beam size (inference)
4
Table 1: Model and training configuration.
System
EM (%)
CER (%)
F1 (%)
PT (%)
Attempt (%)
Latency (ms)
External baselines
SymSpell (romanized)
22.19
25.95
8.69
65.09
84.23
< 1
Lattice Path Edit Distance
20.46
31.65
6.54
59.27
29.46
∼ 500
LLM Zero-Shot (Claude Haiku)
48.27
27.24
42.46
53.45
98.79
∼ 800
Ablation variants (same 6L BART, different training data)
Ours: Random noise only
25.73
17.22
9.61
74.57
72.76
< 4
Table 2: Spell correction performance on the Japanese music query evaluation set (n=1,618). The top section shows external baselines; the bottom section shows ablation variants of our system (same 6L BART architecture, different training data). Attempt% is the fraction of misspelled queries where the model changed its output. Best results among latency-viable systems ( < 100ms) are in bold .
Script
EM (%)
CER (%)
PT (%)
Latin (romaji)
40.68
6.59
86.54
Hiragana
43.64
15.76
88.70
Katakana
46.15
9.30
97.06
Kanji
51.11
12.10
97.37
Mixed
29.34
13.29
69.01
Overall
41.09
11.62
88.36
Table 3: Per-script breakdown for our full pipeline model.
Appendix figures & tables2 assets
Supplementary material from the paper’s appendix.
Appendix
Script
Input
Output
Error
Latin
tatlor swift
taylor swift
QWERTY
Latin
twicefancy
twice fancy
Space
Hira.
あぷる
あっぷる
Gemination
Kata.
フエスティバル
フェスティバル
Small kana
Hira.
よるしか
よるしか
Pass-through
Kata.
ヨルカ
ヨルシカ
Deletion
Appendix
Table 4: Representative spell corrections across scripts.
Prior
Replacement
Prob. (%)
Context
か
が
0.94
り[か>が]と
て
で
0.49
ん[て>で]$
た
だ
0.48
も[た>だ]ち
ほ
ぼ
0.43
ん[ほ>ぼ]$
と
ど
0.41
ˆ[と>ど]ん
こ
ご
0.41
ˆ[こ>ご]め
Appendix
Table 5: Top 10 Japanese hiragana phonetic priors from Q2E logs.
Spell correction is still a challenging problem for many languages, especially low-resource languages (LRLs). While pre-trained language models (PLMs) have been employed for spell correction, there has been no proper comparison across PLMs. We present the first empirical study on the effectiveness of the three types of PLMs for spell correction across multiple languages, including low-resource languages. We show that even relatively small PLMs such as the 270M-parameter Gemma 3 and mBART50, when fine-tuned on a dataset of only 5k sentences, can outperform rule-based spell correctors, highlighting a practical pathway for building effective spell correction systems with limited data. We also present a case study with Sinhala to shed light on the plight of spell correction for LRLs.
Department of Computer Science and Engineering, University of Moratuwa, Katubedda, 10400, Sri Lanka · School of Mathematical and Computational Sciences, Massey University, Auckland, 102904, New Zealand
Chinese query correction (CQC) is important for search and query recommendation on content platforms, but supervised methods rely on large annotated correction pairs that are costly to maintain as query vocabularies evolve. Unsupervised correction with language models is attractive, yet in the short-query setting, unconstrained generation often over-corrects ambiguous inputs toward high-frequency phrases, causing intent drift. We propose GUIDE, a generative unsupervised framework for CQC based on a confuse-then-clarify paradigm. GUIDE encodes phonetically or visually confusable characters with shared-IDs and reconstructs the original query with an encoder--decoder architecture, which constrains correction to plausible confusion neighborhoods while learning from unlabeled query streams. A time-decayed, query-frequency-weighted objective further supports adaptation to rapidly changing query vocabularies. Experiments on QSpell 250K and a large-scale real-world dataset (KwaiSearch) show that GUIDE consistently outperforms strong baselines, while online A/B testing further confirms gains in correction quality and downstream engagement.
Lei Yang, Binbin Huang, Jiwei Tan +4
Kuaishou Technology · School of Data Science, Fudan University
Music search at the scale of Amazon Music presents a unique challenge: queries frequently deviate from indexed metadata due to misspellings, transpositions, and phonetic variations, yet the retrieval system must operate under strict millisecond-level latency constraints. Our existing learning-to-retrieve system, the High Confidence Index (HCI), learns query-entity associations from customer behavior, relying on continual ``exploration'' to choose candidates. Traditional n-gram matching enables this exploration but suffers from poor semantic robustness and high noise, limiting the system's ability to learn from long-tail queries. In this work, we present a robust neural sparse retrieval system designed to maximize exploration efficiency. We adapt a state-of-the-art inference-free sparse retrieval architecture to the music domain, combining it with an effective domain-specific granular subword tokenization strategy. Our approach utilizes short-length token constraints (max 3 chars) to enforce the learning of surface-form robustness over lexical memorization. By pre-computing the neural embeddings and term expansions during the offline indexing phase, online processing is reduced to minimal tokenization and IDF weighting, achieving effectively zero latency overhead for query encoding. Evaluations on a 6M-document production corpus show an aggregate 91.4% recall@10 (vs. 57.7% for trigrams) at comparable throughput. Simulation of the HCI feedback loop demonstrates improved exploration efficiency, with +0.8% higher stabilized recall than production trigrams. Ablation studies indicate that our sparse training methodology drives the performance gains, while domain-specific pretraining provides a cost-effective alternative to large-scale general-purpose pretraining.