TL;DR
Researchers at Google have adapted the Finite-State Transducer (FST) framework—originally developed for high-performance speech recognition—to power mobile keyboard decoding. By treating finger taps and swipes as "noisy signals" analogous to audio, they achieved significant accuracy gains. A standout feature is "post-correction," which allows the keyboard to retroactively revise previous words based on subsequent context.
The Challenge of Mobile Typing
Mobile typing is a high-stakes engineering problem requiring visual feedback within 20 milliseconds. Users frequently encounter "fat finger" errors, typos, and the inherent ambiguity of gesture (swipe) typing.
Traditional decoders often treat each word as an isolated event; once a user hits the spacebar, the word is "committed." However, language is contextual. A word that seems correct in isolation might be nonsensical given the next word (e.g., typing "food luck" when you meant "good luck"). The authors sought a unified, mathematically principled framework that could handle both tap and gesture input, manage strict memory constraints (5-10 MB for language models), and allow the keyboard to "change its mind" as more context becomes available.
Methods: The Keyboard FST Decoder
The authors implement a Keyboard FST Decoder, drawing directly from the $C \circ L \circ G$ (Context, Lexicon, Grammar) pipeline used in Automated Speech Recognition (ASR):
- Spatial Model ($C$): Instead of phonemes, the system uses "bi-keys." This captures context dependency—how the position of one tap might be influenced by the previous one.
- Lexicon ($L$): A transducer mapping key sequences to words. It includes "literal" paths to allow for Out-of-Vocabulary (OOV) words and handles optional characters like apostrophes.
- Language Model ($G$): Low-order n-gram models (typically ~64K words) provide the probability of word sequences.
- On-the-fly Composition: To save memory, the decoder composes necessary parts of the FST dynamically as the user types, rather than building a massive static graph.
One of the most elegant aspects of this architecture is that tap typing and gesture typing are not treated as different problems—they are simply different ways of traversing the same FST graph.
Key Insights
- The "Literal" Safety Net: To prevent aggressive autocorrect from frustrating users, the authors include a "literal" decoding path. This allows the system to calculate a probabilistic score for what the user actually touched, balancing it against dictionary-based suggestions.
- Continuous Recognition: By treating the keyboard as a continuous recognizer rather than a word-by-word processor, the system solves the "hard commit" problem. The keyboard can use the context of a later word to fix a typo that occurred seconds earlier.
Key Results
The FST approach outperformed the baseline (a time-synchronous token-passing decoder) across all modalities. The addition of post-correction provided the most significant boost, resulting in a ~20% relative reduction in error rates for tapping and a ~23% reduction for gesture typing.
| Decoder | Tapping WER (Word Error Rate) | Gesture WER |
|---|---|---|
| Baseline | 6.31% | 11.90% |
| Proposed FST | 5.78% | 11.51% |
| FST + Post-Correction | 5.07% | 9.20% |
Limitations and Future Work
While effective, the authors acknowledge that "flickering" text (words changing after they are typed) can be startling for users. They suggest limiting post-corrections to a small temporal window and only when confidence is extremely high. Future work includes deeper personalization (e.g., integrating contact names) and further optimizing look-ahead filters to maintain the 20ms latency requirement despite the increased computational complexity of large FSTs.
Summary updated