Google AI recently announced that they have improved the performance of Smart Text Selection by using federated learning to train the neural network model on user interactions responsibly while preserving user privacy. The work is part of Android’s new Private Compute Core secure environment, which enabled Google to improve the model’s selection accuracy by up to 20% on some types of entities.
Smart Text Selection, launched in 2017 as part of Android O, is one of Android’s most frequently used features, helping users select, copy, and use text easily and quickly by predicting the desired word or set of words around a user’s tap, and automatically expanding the selection appropriately. Through this feature, selections are automatically expanded. For selections with defined classification types, e.g., addresses and phone numbers, users are offered an app to open the selection, saving users even more time.
With this new launch, the model no longer uses proxy data for span prediction but is instead trained on-device on real interactions using federated learning. This is a training approach for machine learning models in which a central server coordinates model training that is split among many devices while the raw data used stays on the local device.
A standard federated learning training process works as follows: The server starts by initializing the model. Then, an iterative process begins in which:
- Devices get sampled.
- Selected devices improve the model using their local data.
- Then send back only the improved model, not the data used for training.
The server then averages the updates it received to create the model that is sent out in the next iteration.
For Smart Text Selection, each time a user taps to select text and corrects the model’s suggestion, Android gets precise feedback for what selection span the model should have predicted. In order to preserve user privacy, the selections are temporarily kept on the device, without being visible server-side, and are then used to improve the model by applying federated learning techniques. This technique has the advantage of training the model on the same kind of data that it sees during inference.
Using this new federated approach, Google significantly improved Smart Text Selection models, with the degree depending on the language being used. Typical improvements ranged between 5% and 7% for multi-word selection accuracy, with no drop in single-word performance. The accuracy of correctly selecting addresses (the most complex type of entity supported) increased by between 8% and 20%, again, depending on the language being used. These improvements lead to millions of additional selections being automatically expanded for users every day.
One of the advantages of this federated learning approach is that it enables user privacy because raw data is not exposed to a server. Instead, the server only receives updated model weights. Google says that this approach requires the use of federated learning since it works without collecting user data on the server. It also uses many state-of-the-art privacy approaches, such as Android’s new Private Compute Core, Secure Aggregation and the Secret Sharer method.