TL;DR
AdaDPSyn is a novel algorithm that enables Large Language Models (LLMs) to perform In-Context Learning (ICL) using private data without risking information leaks. By adaptively adjusting noise levels based on how much LLMs "agree" on predicted tokens, it achieves high accuracy—often nearly matching non-private baselines—while maintaining rigorous formal Differential Privacy (DP) guarantees.
What Problem Does This Paper Address?
In-Context Learning (ICL) is the mechanism that allows LLMs to learn new tasks simply by observing a few examples in a prompt. However, if those examples contain sensitive information (such as medical records or financial data), the LLM might accidentally memorize and leak that data to users.
To mitigate this risk, researchers employ Differential Privacy (DP), a mathematical framework that adds statistical "noise" to data to ensure no individual's information can be identified. The current state-of-the-art approach generates synthetic examples using DP and uses those in the prompt instead of the real data.
The primary challenge with previous methods is their "one-size-fits-all" approach to noise. They add the same amount of noise regardless of whether the LLM is certain or confused about a prediction. This "data-independent" noise often destroys the utility of the prompt, leading to a massive drop in accuracy compared to non-private models.
Methods
To solve this, the authors introduce AdaDPSyn (Adaptive Differentially Private Synthesis). Its core innovation is the Precision-Focused Iterative Radius Reduction technique, which dynamically minimizes the amount of additive noise required.
Here is how the pipeline works:
- Sample and Aggregate: The private dataset is split into many small subsets. An LLM processes each subset and predicts the probability distribution of the next token for a synthetic example.
- The Consensus Hypothesis: The authors observed that for many tasks, different subsets of data lead the LLM to a similar "consensus" on the next token. Geometrically, these prediction vectors cluster together tightly.
- Iterative Radius Reduction: Instead of adding noise based on the worst-case scenario (the entire probability space), AdaDPSyn starts with a large aggregation radius ($R$) and iteratively shrinks it towards a target radius ($r$).
- Adaptive Noise: At each step, the algorithm checks if a sufficient number of LLM predictions still fall within this shrinking radius. Because the amount of noise required by DP is proportional to this radius, a smaller radius means significantly less noise and much higher precision.
- Synthetic Generation: This process repeats token-by-token until a full, privacy-protected synthetic demonstration is created and fed into the LLM for the final query.
Datasets
The researchers evaluated AdaDPSyn on five standard benchmarks covering two types of tasks:
- Text Classification: AGNews (4-way news classification), DBPedia (14-way topic classification), and TREC (6-way question type classification).
- Information Extraction (Slot-filling): MIT-G (extracting movie genres) and MIT-D (extracting movie directors).
They utilized Llama-2-7b as the primary model for generation and evaluation, with additional tests confirming generalizability on GPT-3.5 Turbo and GPT-4o mini.
Key Insights
- Data-Adaptivity is Crucial: Privacy doesn't have to be a blunt instrument. By measuring the local sensitivity based on actual data clustering, the algorithm can add far less noise than global sensitivity would dictate.
- Consensus as a Privacy Shield: When an LLM reaches a high consensus on a token across different data subsets, it indicates that the prediction is driven by general patterns rather than a specific individual's private details. AdaDPSyn exploits this to conserve its privacy budget.
- Geometric Refinement: Using a minimal enclosing ball strategy allows the algorithm to ignore outliers and focus on the high-density cluster of predictions, preserving the most useful information.
Key Results
AdaDPSyn consistently outperformed the previous data-independent baseline across all privacy levels ($\epsilon$):
- Near-Baseline Accuracy: On the AGNews task with a strict privacy budget ($\epsilon = 1$), AdaDPSyn reached 65.42% accuracy, nearly matching the non-private baseline of 65.92%. The previous DP method only managed 60.74%.
- Information Extraction Gains: On the MIT-G task ($\epsilon = 1$), AdaDPSyn achieved 37.59% accuracy, a significant jump over the baseline's 31.15%.
- Robustness to Attacks: In Membership Inference Attacks (MIA)—attempts to guess if a specific record was in the training set—AdaDPSyn reduced the attacker's success rate to near-random guessing (AUC ~0.5), proving its empirical privacy strength.
- Efficiency: Despite the iterative refinement steps, the time cost to generate a private sample was nearly identical to the baseline (e.g., ~173 seconds for AGNews).
Limitations and Future Work
- Theoretical Utility Bounds: While privacy is formally guaranteed, it remains difficult to find a closed-form mathematical expression to predict exactly how accurate the model will be for a given task prior to execution.
- Hyperparameter Tuning: The algorithm introduces new hyperparameters (like the target radius $r$ and the coverage threshold $\mu$) that may require tuning for different datasets.
- Scaling: Future work could explore how this adaptive approach scales with even larger models and more complex, long-form text generation tasks.
Summary updated