Skip to main content
QUICK REVIEW

[Paper Review] Differentially Private Decoding in Large Language Models

Jimit Majmudar, Christophe Dupuy|arXiv (Cornell University)|May 26, 2022
Privacy-Preserving Technologies in DataComputer Science13 citations
TL;DR

This paper proposes a differentially private decoding mechanism for large language models (LLMs) that applies noise directly to the model's output probability distributions at inference time, without retraining. The method achieves a privacy-utility trade-off, with utility degrading only moderately at strong privacy guarantees (e.g., ε ≤ 65), enabling practical deployment of private LLMs in production settings.

ABSTRACT

Recent large-scale natural language processing (NLP) systems use a pre-trained Large Language Model (LLM) on massive and diverse corpora as a headstart. In practice, the pre-trained model is adapted to a wide array of tasks via fine-tuning on task-specific datasets. LLMs, while effective, have been shown to memorize instances of training data thereby potentially revealing private information processed during pre-training. The potential leakage might further propagate to the downstream tasks for which LLMs are fine-tuned. On the other hand, privacy-preserving algorithms usually involve retraining from scratch, which is prohibitively expensive for LLMs. In this work, we propose a simple, easy to interpret, and computationally lightweight perturbation mechanism to be applied to an already trained model at the decoding stage. Our perturbation mechanism is model-agnostic and can be used in conjunction with any LLM. We provide theoretical analysis showing that the proposed mechanism is differentially private, and experimental results showing a privacy-utility trade-off.

Motivation & Objective

  • To address the risk of memorization in pre-trained LLMs that may leak private training data.
  • To provide a practical privacy solution for already-trained LLMs without costly retraining.
  • To design a computationally efficient, post-processing perturbation mechanism applicable at inference time.
  • To theoretically and empirically validate the method's differential privacy guarantees and utility trade-offs.
  • To enable privacy-preserving deployment of LLMs in commercial applications handling sensitive data.

Proposed method

  • A perturbation mechanism is applied to the softmax output distribution of a pre-trained LLM during decoding, adding noise to the probability distribution.
  • The noise is drawn from a Laplace distribution with scale λ, where λ controls the privacy-utility trade-off.
  • The method uses the post-processing property of differential privacy, ensuring that the privacy guarantee is preserved even after downstream fine-tuning.
  • Theoretical analysis proves that the mechanism satisfies ε-differential privacy, with ε bounded by λ·T/|V|, where T is the average number of masked tokens and |V| is the vocabulary size.
  • The approach is model-agnostic and can be applied to any LLM without modifying its architecture or weights.
  • Perplexity is used as a utility metric to evaluate performance degradation across different privacy levels (ε).

Experimental results

Research questions

  • RQ1Can a lightweight, post-processing perturbation mechanism provide strong differential privacy guarantees for already-trained LLMs?
  • RQ2What is the trade-off between privacy (ε) and model utility (perplexity) in this decoding-time perturbation approach?
  • RQ3How does the method perform across varying privacy budgets (λ) and model configurations?
  • RQ4Can the method preserve privacy without requiring retraining or architectural changes to the LLM?
  • RQ5Does the perturbation mechanism remain effective when the LLM is fine-tuned for downstream tasks?

Key findings

  • The method achieves ε ≤ 65 in experiments, corresponding to a reasonable privacy guarantee with minimal utility loss.
  • For ε ≤ 60 (λ ≤ 0.7), perplexity increases by more than 40% compared to the non-private model, indicating significant performance degradation.
  • At ε ≤ 50 (λ ≤ 0.2), perplexity exceeds 20, representing a 350% relative increase, rendering the model unusable.
  • For ε ≥ 65, performance degradation becomes negligible, suggesting that strong privacy can be achieved with minimal impact on utility.
  • The privacy loss ε depends linearly on the number of predicted tokens T and inversely on vocabulary size |V|, highlighting the importance of support size reduction for tighter privacy bounds.
  • The method is effective even when the LLM is fine-tuned downstream, due to the post-processing property of differential privacy.

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.