Privacy-Preserving Transformers: SwiftKey's Differential Privacy Implementation

Abdelrahman Abouelenin, Mohamed Abdelrehim, Raffy Fahim, Amr Hendy, Mohamed Afify
5/8/2025
cs.CLcs.CRcs.LG

No confident code implementation found for this paper. 2 possible matches can be shown below.

Abstract

In this paper we train a transformer using differential privacy (DP) for language modeling in SwiftKey. We run multiple experiments to balance the trade-off between the model size, run-time speed and accuracy. We show that we get small and consistent gains in the next-word-prediction and accuracy with graceful increase in memory and speed compared to the production GRU. This is obtained by scaling down a GPT2 architecture to fit the required size and a two stage training process that builds a seed model on general data and DP finetunes it on typing data. The transformer is integrated using ONNX offering both flexibility and efficiency.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. 2 weaker matches are hidden by default — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{abouelenin2025privacypreserving,
  title  = {Privacy-Preserving Transformers: SwiftKey's Differential Privacy Implementation},
  author = {Abdelrahman Abouelenin and Mohamed Abdelrehim and Raffy Fahim and Amr Hendy and Mohamed Afify},
  year   = {2025},
  eprint = {2505.05648},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2505.05648v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2505.05648.svg)](https://codeofpaper.com/paper/2505.05648)

Discussion