Differentially Private Steering for Large Language Model Alignment

Anmol Goel, Yaxi Hu, Iryna Gurevych, Amartya Sanyal

TL;DR

Private Steering for LLM Alignment (PSA) is a novel algorithm that enables steering Large Language Models (LLMs) toward desired behaviors using private datasets without compromising data confidentiality. By integrating Differential Privacy (DP) into activation editing, PSA provides formal privacy guarantees and robust protection against membership inference attacks while maintaining high performance across alignment and reasoning benchmarks.

Introduction: The Privacy Gap in LLM Alignment

Aligning LLMs with human values—making them more truthful, helpful, and less harmful—is typically achieved through computationally expensive methods like Reinforcement Learning from Human Feedback (RLHF). Recently, a lightweight alternative known as activation steering has emerged. This technique involves adding "steering vectors" to a model's internal representations at inference time to nudge its behavior in a desired direction.

These steering vectors are calculated using paired demonstrations (e.g., a "truthful" answer versus a "hallucinated" one). However, a critical vulnerability arises when these demonstrations come from sensitive sources, such as medical records, proprietary financial data, or personal user interactions. The resulting steering vector can inadvertently memorize and leak private information. This paper addresses this critical gap by introducing a method to perform effective activation steering while providing rigorous, formal privacy guarantees for the underlying data.

The PSA Framework

The authors introduce Private Steering for LLM Alignment (PSA), an algorithm that applies the principles of Differential Privacy (DP) to the generation of steering vectors. The process operates in two main phases:

  1. Generating Private Steering Vectors: Instead of simply averaging the difference between positive and negative activations, PSA first clips these difference vectors to a fixed $L_2$ norm. This bounds the "sensitivity" of the calculation, strictly limiting how much any single data point can influence the final vector. Next, it adds calibrated Gaussian noise to the averaged vector to mask individual contributions.
  2. Privately Steered Generation: During inference, these privatized vectors are added to the activations of specific middle layers of the LLM, steering the model's output without exposing the training data.
Overview of the PSA framework, illustrating the two-phase process of generating private steering vectors and applying them during generation.

To evaluate the empirical privacy risk, the authors also developed the first Membership Inference Attack (MIA) specifically tailored for activation steering. This attack uses "canaries"—fictional entities inserted into the demonstration set—to test if an adversary can determine whether a specific record was used to align the model simply by analyzing the model's text outputs.

Experimental Setup

The study utilizes several established benchmarks for LLM alignment to ensure comprehensive evaluation:

  • Anthropic’s "Advanced AI Risk" benchmarks: Used to test behaviors like Sycophancy, Corrigibility, and Survival Instinct.
  • Hallucination and Refusal datasets: Curated to evaluate truthfulness and safety.
  • MMLU (Massive Multitask Language Understanding): Used to ensure that steering doesn't degrade the model's general reasoning and knowledge capabilities.

The experiments were conducted across four prominent open-source model families: Llama-2, Qwen-2.5, Mistral, and Gemma, ranging from 0.5B to 7B parameters.

Key Findings and Results

The "Privacy Discount" is Minimal

One of the most significant findings is that the utility cost of adding privacy is remarkably low. PSA consistently outperformed zero-shot baselines and matched the performance of non-private steering across seven different alignment behaviors.

Alignment performance comparison across different models and datasets. PSA (green) remains highly competitive with non-private Mean Steering (blue).

For example, on the Sycophancy benchmark with Llama-2-7B, PSA achieved ~65.8% accuracy, nearly matching the non-private Mean Steering approach (~66.7%) and significantly beating the zero-shot baseline. Furthermore, MMLU scores remained stable, demonstrating that PSA does not degrade the model's underlying intelligence while steering its behavior.

Middle Layers are the Sweet Spot

The authors confirm that steering is most effective when applied to the middle layers of a transformer. From a privacy perspective, this is highly beneficial: it means fewer vectors need to be privatized, allowing for a more efficient allocation of the privacy budget ($\epsilon$).

Scaling Favors Privacy

Larger models exhibit a better privacy-utility tradeoff. As models grow in parameter count, they appear to rely more heavily on their robust internal pre-trained knowledge, making them less sensitive to the specific Gaussian noise introduced by DP steering.

Robust Defense Against Attacks

In the MIA tests, non-private steering showed high vulnerability, allowing attackers a high success rate in identifying training data. In contrast, PSA successfully reduced the attack's effectiveness to near-random guessing levels. This empirical result was significantly better than the theoretical bounds suggested, indicating that PSA is highly effective at preventing data leakage in real-world scenarios.

Limitations and Future Work

While PSA represents a major step forward for secure LLM alignment, the authors note a few areas for further exploration:

  • Scope of Alignment: The study focused on specific, well-defined alignment axes (like truthfulness). Future work could explore more complex or "pluralistic" alignment goals where different users might have conflicting values.
  • Language Support: The current evaluation is primarily monolingual (English). Testing PSA in multi-lingual settings is a logical next step.
  • Algorithm Complexity: PSA is based on "Mean Steering," a relatively simple technique. Applying DP to more sophisticated steering methods, such as those using spectral editing, could yield even stronger performance.

Summary updated

BibTeX
@inproceedings{goel2025differentially,
  author = {Anmol Goel and Yaxi Hu and Iryna Gurevych and Amartya Sanyal},
  title = {{Differentially Private Steering for Large Language Model Alignment}},
  booktitle = {International Conference on Learning Representations},
  year = {2025},
  url = {https://openreview.net/forum?id=lLkgj7FEtZ},
}
Figure