Skip to main content
QUICK REVIEW

[Paper Review] TextHide: Tackling Data Privacy in Language Understanding Tasks

Yangsibo Huang, Zhao Song|arXiv (Cornell University)|Oct 12, 2020
Privacy-Preserving Technologies in DataComputer Science62 references6 citations
TL;DR

TextHide is a privacy-preserving framework for natural language understanding tasks that encrypts text representations using one-time secret keys and MixUp-style data augmentation, enabling effective defense against gradient and representation inversion attacks with only a 1.9% average accuracy drop on GLUE benchmarks, while relying on a computationally hard problem for security guarantees.

ABSTRACT

An unsolved challenge in distributed or federated learning is to effectively mitigate privacy risks without slowing down training or reducing accuracy. In this paper, we propose TextHide aiming at addressing this challenge for natural language understanding tasks. It requires all participants to add a simple encryption step to prevent an eavesdropping attacker from recovering private text data. Such an encryption step is efficient and only affects the task performance slightly. In addition, TextHide fits well with the popular framework of fine-tuning pre-trained language models (e.g., BERT) for any sentence or sentence-pair task. We evaluate TextHide on the GLUE benchmark, and our experiments show that TextHide can effectively defend attacks on shared gradients or representations and the averaged accuracy reduction is only $1.9\%$. We also present an analysis of the security of TextHide using a conjecture about the computational intractability of a mathematical problem. Our code is available at https://github.com/Hazelsuko07/TextHide

Motivation & Objective

  • To address the challenge of protecting private text data in federated or distributed learning settings without sacrificing model accuracy or training speed.
  • To develop a practical, efficient, and secure method for protecting both explicit and semantic information in text representations during model training.
  • To extend the principles of InstaHide—originally designed for computer vision—to natural language processing, overcoming the unique challenges posed by discrete text tokens.
  • To ensure that eavesdropping attackers cannot recover original training data from shared gradients or representations, even with access to all communication.
  • To provide a cryptographically secure solution grounded in computational hardness assumptions, avoiding the performance penalties of homomorphic encryption or differential privacy.

Proposed method

  • TextHide encrypts input text by applying a one-time secret key to transform hidden representations from pre-trained language models (e.g., BERT) before sharing.
  • It uses a MixUp-style data augmentation technique, combining multiple text representations with random coefficients to obscure original inputs.
  • Each participant applies a random, per-example mask to the hidden representations, ensuring that no single representation reveals the original input.
  • The method is compatible with standard fine-tuning pipelines for sentence and sentence-pair tasks, requiring minimal changes to existing training workflows.
  • Security is based on the computational intractability of a variant of the k-vector subset sum problem, conjectured to require exponential time to solve.
  • The encryption is applied at the representation level, not the raw text, allowing it to integrate seamlessly into existing NLP training frameworks.

Experimental results

Research questions

  • RQ1Can a lightweight encryption mechanism be designed to protect text representations in federated NLP training without significantly degrading model performance?
  • RQ2To what extent can TextHide defend against gradient inversion and representation reconstruction attacks in realistic threat models?
  • RQ3How does the security of TextHide hold up against sophisticated attackers who can query gradients or representations?
  • RQ4Can the security of TextHide be formally grounded in a computational hardness assumption rather than statistical or heuristic guarantees?
  • RQ5Is it feasible to adapt image-based privacy techniques like InstaHide to the discrete, sequential nature of natural language data?

Key findings

  • TextHide reduces average accuracy by only 1.9% across the GLUE benchmark, demonstrating minimal performance cost despite strong privacy protection.
  • The method effectively mitigates both explicit and semantic leakage: attackers cannot reconstruct original sentences from query representations, even with advanced reverse-engineering techniques.
  • Security analysis shows that breaking TextHide requires solving a computationally hard problem (a variant of k-vector subset sum), which is conjectured to take exponential time under the Exponential Time Hypothesis.
  • Even sophisticated attackers using representation similarity search (RSS) perform no better than random guessing when querying TextHide-protected representations.
  • TextHide outperforms baseline methods in reducing both explicit leakage (measured by cosine similarity) and semantic leakage (measured by SBERT and label similarity).
  • The framework is compatible with standard fine-tuning of pre-trained language models like BERT, enabling deployment in real-world NLP pipelines with minimal modification.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.