Goto

Collaborating Authors

 Sun, Haicheng


Neural Search Space in Gboard Decoder

arXiv.org Artificial Intelligence

Gboard Decoder produces suggestions by looking for paths that best match input touch points on the context aware search space, which is backed by the language Finite State Transducers (FST). The language FST is currently an N-gram language model (LM). However, N-gram LMs, limited in context length, are known to have sparsity problem under device model size constraint. In this paper, we propose \textbf{Neural Search Space} which substitutes the N-gram LM with a Neural Network LM (NN-LM) and dynamically constructs the search space during decoding. Specifically, we integrate the long range context awareness of NN-LM into the search space by converting its outputs given context, into the language FST at runtime. This involves language FST structure redesign, pruning strategy tuning, and data structure optimizations. Online experiments demonstrate improved quality results, reducing Words Modified Ratio by [0.26\%, 1.19\%] on various locales with acceptable latency increases. This work opens new avenues for further improving keyboard decoding quality by enhancing neural LM more directly.


Proofread: Fixes All Errors with One Tap

arXiv.org Artificial Intelligence

The impressive capabilities in Large Language Models (LLMs) provide a powerful approach to reimagine users' typing experience. This paper demonstrates Proofread, a novel Gboard feature powered by a server-side LLM in Gboard, enabling seamless sentence-level and paragraph-level corrections with a single tap. We describe the complete system in this paper, from data generation, metrics design to model tuning and deployment. To obtain models with sufficient quality, we implement a careful data synthetic pipeline tailored to online use cases, design multifaceted metrics, employ a two-stage tuning approach to acquire the dedicated LLM for the feature: the Supervised Fine Tuning (SFT) for foundational quality, followed by the Reinforcement Learning (RL) tuning approach for targeted refinement. Specifically, we find sequential tuning on Rewrite and proofread tasks yields the best quality in SFT stage, and propose global and direct rewards in the RL tuning stage to seek further improvement. Extensive experiments on a human-labeled golden set showed our tuned PaLM2-XS model achieved 85.56\% good ratio. We launched the feature to Pixel 8 devices by serving the model on TPU v5 in Google Cloud, with thousands of daily active users. Serving latency was significantly reduced by quantization, bucket inference, text segmentation, and speculative decoding. Our demo could be seen in \href{https://youtu.be/4ZdcuiwFU7I}{Youtube}.


Applied Federated Learning: Improving Google Keyboard Query Suggestions

arXiv.org Machine Learning

In contrast to traditional server-side training whereuser data is aggregated on centralized servers for training, FL instead trains models on end user devices while aggregating only ephemeral parameter updates on a centralized server.This is particularly advantageous for environments whereprivacy is paramount. The Google Keyboard (Gboard) is a virtual keyboard for mobile devices with over 1 billion installs in 2018. Gboard includes both typing features like text autocorrection, nextword predictionand word completions as well as expression features like emoji, GIFs and Stickers (curated, expressive illustrations andanimations). As both a mobile application and keyboard, Gboard has unique constraints which lends itself well to both on-device inference and training. First, as a keyboard applicationwith access to much of what a user types into their mobile device, Gboard must respect the user's privacy.