On-Device Emoji Classifier Trained with GPT-based Data Augmentation for a Mobile Keyboard
Hossam Amer, Joe Osborne, Michael Zaki, Mohamed Afify
TL;DR
This work tackles on-device emoji prediction under memory and latency constraints for SwiftKey by deploying a quantized MobileBert classifier. It addresses severe class imbalance with GPT-based data augmentation that generates keyword-emoji mappings and synthetic sentences labeled with each emoji, merged with human data. A user-favorites reranking mechanism blends model likelihood with personalization signals to tailor predictions per user. Live deployment shows improved CTR and engagement, particularly for rare emojis, while maintaining a small footprint and low latency, enabling practical on-device deployment. The approach opens avenues for multilingual extension and richer media support on mobile keyboards.
Abstract
Emojis improve communication quality among smart-phone users that use mobile keyboards to exchange text. To predict emojis for users based on input text, we should consider the on-device low memory and time constraints, ensure that the on-device emoji classifier covers a wide range of emoji classes even though the emoji dataset is typically imbalanced, and adapt the emoji classifier output to user favorites. This paper proposes an on-device emoji classifier based on MobileBert with reasonable memory and latency requirements for SwiftKey. To account for the data imbalance, we utilize the widely used GPT to generate one or more tags for each emoji class. For each emoji and corresponding tags, we merge the original set with GPT-generated sentences and label them with this emoji without human intervention to alleviate the data imbalance. At inference time, we interpolate the emoji output with the user history for emojis for better emoji classifications. Results show that the proposed on-device emoji classifier deployed for SwiftKey increases the accuracy performance of emoji prediction particularly on rare emojis and emoji engagement.
