# On-device Learning

Published articles for On-device Learning.

This is one page of public article previews, not the complete archive. Follow Next page to continue. Summaries are not the original full articles.

## Advances in private training for production on-device language models

DevFeed: [Advances in private training for production on-device language models](<https://devfeed.tech/articles/advances-in-private-training-for-production-on-device-language-models-28546.md>)

Original publisher: [Read original article](<http://blog.research.google/2024/02/advances-in-private-training-for.html>)

Author: Google AI (noreply@blogger.com)

Published: 2024-02-21T20:15:00Z

Content type: article

Language: en

Sources: [Google Research](<https://devfeed.tech/sources/google-research.md>)

Topics: [Language models](<https://devfeed.tech/topics/language-models.md>), [Federated Learning](<https://devfeed.tech/topics/federated-learning.md>), [Google](<https://devfeed.tech/topics/google.md>), [Mobile](<https://devfeed.tech/topics/mobile.md>)

Tags: [differential-privacy](<https://devfeed.tech/tags/differential-privacy.md>), [federated-learning](<https://devfeed.tech/tags/federated-learning.md>), [gboard](<https://devfeed.tech/tags/gboard.md>), [google](<https://devfeed.tech/tags/google.md>), [language-models](<https://devfeed.tech/tags/language-models.md>), [on-device](<https://devfeed.tech/tags/on-device.md>), [on-device-learning](<https://devfeed.tech/tags/on-device-learning.md>), [phones](<https://devfeed.tech/tags/phones.md>), [privacy](<https://devfeed.tech/tags/privacy.md>), [production](<https://devfeed.tech/tags/production.md>), [research](<https://devfeed.tech/tags/research.md>), [responsible-ai](<https://devfeed.tech/tags/responsible-ai.md>), [training](<https://devfeed.tech/tags/training.md>)

### AI overview

This Google Research article describes advances in privately training Gboard's on-device language models. It explains how federated learning keeps training data on users' devices while differential privacy provides formal privacy guarantees. The article reports that all Gboard next-word-prediction neural language models use federated learning with formal differential privacy guarantees, across more than 30 models, 7 or more languages, and 15 or more countries.

### Source excerpt

Posted by Zheng Xu, Research Scientist, and Yanxiang Zhang, Software Engineer, Google Language models (LMs) trained to predict the next word given input text are the key technology for many applications [1, 2]. In Gboard, LMs are used to improve users' typing experience by supporting features like next word prediction (NWP), Smart Compose, smart completion and suggestion, slide to type, and proofread. Deploying models on users' devices rather than enterprise servers has advantages like lower latency and better privacy for model usage. While training on-device models directly from user data effectively improves the utility performance for applications such as NWP and smart text selection, protecting the privacy of user data for model training is important. Gboard features powered by on-device language models. In this blog we discuss how years of research advances now power the private training of Gboard LMs, since the proof-of-concept development of federated learning (FL) in 2017 and formal differential privacy (DP) guarantees in 2022. FL enables mobile phones to collaboratively learn a model while keeping all the training data on device, and DP provides a quantifiable measure of data anonymization. Formally, DP is often characterized by (ε, δ) with smaller values representing stronger guarantees. Machine learning (ML) models are considered to have reasonable DP guarantees for ε=10 and strong DP guarantees for ε=1 when δ is small. As of today, all NWP neural network LMs in Gboard are trained with FL with formal DP guarantees, and all future launches of Gboard LMs trained on user data require DP. These 30+ Gboard on-device LMs are launched in 7+ languages and 15+ countries, and satisfy (ɛ, δ)-DP guarantees of small δ of 10-10 and ɛ between 0.994 and 13.69. To the best of our knowledge, this is the largest known deployment of user-level DP in production at Google or anywhere, and the first time a strong DP guarantee of ɛ < 1 is announced for models trained directly on

## MobileDiffusion: Rapid text-to-image generation on-device

DevFeed: [MobileDiffusion: Rapid text-to-image generation on-device](<https://devfeed.tech/articles/mobilediffusion-rapid-text-to-image-generation-on-device-28544.md>)

Original publisher: [Read original article](<http://blog.research.google/2024/01/mobilediffusion-rapid-text-to-image.html>)

Author: Google AI (noreply@blogger.com)

Published: 2024-01-31T21:59:00Z

Content type: article

Language: en

Sources: [Google Research](<https://devfeed.tech/sources/google-research.md>)

Topics: [Machine learning](<https://devfeed.tech/topics/machine-learning.md>), [Mobile](<https://devfeed.tech/topics/mobile.md>), [text-to-image](<https://devfeed.tech/topics/text-to-image.md>), [Inference](<https://devfeed.tech/topics/inference.md>), [model-deployment](<https://devfeed.tech/topics/model-deployment.md>), [Optimization](<https://devfeed.tech/topics/optimization.md>), [Android](<https://devfeed.tech/topics/android.md>), [iOS](<https://devfeed.tech/topics/ios.md>), [MediaPipe](<https://devfeed.tech/topics/mediapipe.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [computer-vision](<https://devfeed.tech/tags/computer-vision.md>), [deployment](<https://devfeed.tech/tags/deployment.md>), [diffusion](<https://devfeed.tech/tags/diffusion.md>), [generation](<https://devfeed.tech/tags/generation.md>), [image](<https://devfeed.tech/tags/image.md>), [inference](<https://devfeed.tech/tags/inference.md>), [ios](<https://devfeed.tech/tags/ios.md>), [machine-learning](<https://devfeed.tech/tags/machine-learning.md>), [mediapipe](<https://devfeed.tech/tags/mediapipe.md>), [mobile](<https://devfeed.tech/tags/mobile.md>), [on-device](<https://devfeed.tech/tags/on-device.md>), [on-device-learning](<https://devfeed.tech/tags/on-device-learning.md>), [optimization](<https://devfeed.tech/tags/optimization.md>), [text-to-image](<https://devfeed.tech/tags/text-to-image.md>)

### AI overview

Google researchers introduce MobileDiffusion, a latent diffusion model designed for on-device text-to-image generation. Using DiffusionGAN for one-step sampling, it was tested on premium iOS and Android devices and generated 512x512 images in about half a second with a 520-million-parameter model.

### Source excerpt

Posted by Yang Zhao, Senior Software Engineer, and Tingbo Hou, Senior Staff Software Engineer, Core ML Text-to-image diffusion models have shown exceptional capabilities in generating high-quality images from text prompts. However, leading models feature billions of parameters and are consequently expensive to run, requiring powerful desktops or servers (e.g., Stable Diffusion, DALL-E, and Imagen). While recent advancements in inference solutions on Android via MediaPipe and iOS via Core ML have been made in the past year, rapid (sub-second) text-to-image generation on mobile devices has remained out of reach. To that end, in "MobileDiffusion: Subsecond Text-to-Image Generation on Mobile Devices", we introduce a novel approach with the potential for rapid text-to-image generation on-device. MobileDiffusion is an efficient latent diffusion model specifically designed for mobile devices. We also adopt DiffusionGAN to achieve one-step sampling during inference, which fine-tunes a pre-trained diffusion model while leveraging a GAN to model the denoising step. We have tested MobileDiffusion on iOS and Android premium devices, and it can run in half a second to generate a 512x512 high-quality image. Its comparably small model size of just 520M parameters makes it uniquely suited for mobile deployment. Rapid text-to-image generation on-device. Background The relative inefficiency of text-to-image diffusion models arises from two primary challenges. First, the inherent design of diffusion models requires iterative denoising to generate images, necessitating multiple evaluations of the model. Second, the complexity of the network architecture in text-to-image diffusion models involves a substantial number of parameters, regularly reaching into the billions and resulting in computationally expensive evaluations. As a result, despite the potential benefits of deploying generative models on mobile devices, such as enhancing user experience and addressing emerging privacy concer