[Paper Review] Decepticons: Corrupted Transformers Breach Privacy in Federated Learning for Language Models
This paper introduces Decepticons, a novel privacy attack in federated learning that exploits corrupted Transformer models to extract private user text from gradient updates. By manipulating the model's embedding layers and leveraging statistical recovery techniques, the attack reconstructs high-fidelity text sequences—including full tokens and positional embeddings—even under batch aggregation, long sequences, and noise, demonstrating severe privacy risks in untrusted server scenarios.
A central tenet of Federated learning (FL), which trains models without centralizing user data, is privacy. However, previous work has shown that the gradient updates used in FL can leak user information. While the most industrial uses of FL are for text applications (e.g. keystroke prediction), nearly all attacks on FL privacy have focused on simple image classifiers. We propose a novel attack that reveals private user text by deploying malicious parameter vectors, and which succeeds even with mini-batches, multiple users, and long sequences. Unlike previous attacks on FL, the attack exploits characteristics of both the Transformer architecture and the token embedding, separately extracting tokens and positional embeddings to retrieve high-fidelity text. This work suggests that FL on text, which has historically been resistant to privacy attacks, is far more vulnerable than previously thought.
Motivation & Objective
- To expose the vulnerability of federated learning in NLP applications where untrusted servers can compromise user privacy.
- To investigate whether gradient updates from Transformer-based language models leak private text information under realistic threat models.
- To develop a method that recovers both token identities and their absolute positions from model gradients, even in the presence of aggregation and noise.
- To evaluate the feasibility of such attacks on small and large models, including those 10% the size of BERT.
- To challenge the assumption that model aggregation or small model size inherently protects privacy in FL for NLP.
Proposed method
- Deploy malicious parameter vectors in the server model to corrupt the client-side model updates during federated training.
- Exploit the structure of the Transformer’s embedding layer by initializing the first linear layer with a shared Gaussian vector to encode input embeddings into gradient entries.
- Use ReLU activation to map embedding vectors to discrete gradient entries, enabling token-level signal extraction.
- Apply sparse signal recovery (e.g., orthogonal matching pursuit via K-SVD) to denoise and reconstruct the cumulative sum of embeddings across gradient bins.
- Separately extract token embeddings and positional embeddings by analyzing gradient patterns and binning strategies.
- Use statistical assignment and thresholding (e.g., 1.5 standard deviations) to identify likely token matches and their positions.
Experimental results
Research questions
- RQ1Can a malicious server in federated learning recover private user text from gradient updates in Transformer-based language models?
- RQ2To what extent does batch aggregation or model size affect the success of gradient inversion attacks in NLP FL?
- RQ3Can both token identities and their absolute positions be recovered with high fidelity using only gradient updates?
- RQ4How robust is the attack to defenses such as gradient clipping and Laplacian noise?
- RQ5Is the threat model of a malicious server realistic and impactful for real-world federated NLP deployments?
Key findings
- The Decepticon attack successfully recovers full text sequences with high fidelity, including both token identities and their absolute positions, even for sequences up to several thousand tokens long.
- The attack remains effective under batch aggregation involving over 100 users, demonstrating scalability beyond single-user or small-batch settings.
- Reconstruction is feasible even on small models (10% the size of BERT), indicating that model size alone does not ensure privacy protection.
- The attack maintains high success rates even with gradient clipping and Laplacian noise, showing resilience to common defenses.
- The total number of leaked tokens peaks at around 4,096 for a 3-layer Transformer and 36,864 for GPT-2, depending on batch size and sequence length, indicating significant data leakage potential.
- The method achieves exact token and position recovery on a substantial fraction of inputs, with success rates degrading predictably only at high noise levels.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.