arXiv

Privacy-Aware Decoding: Mitigating Privacy Leakage of Large Language Models in Retrieval-Augmented Generation

Title: Privacy-Aware Decoding: Reducing Privacy Leakage in Retrieval-Augmented Generation for Large Language Models

Abstract:

Retrieval-Augmented Generation (RAG) improves the factual reliability of large language models (LLMs) by grounding their outputs in external knowledge bases. Nevertheless, when the retrieval process incorporates sensitive or confidential data, these RAG systems face vulnerabilities to extraction attacks, potentially resulting in the disclosure of private information within the generated text. To address this, we introduce Privacy-Aware Decoding (PAD), a lightweight defense mechanism applied at inference time. PAD works by dynamically injecting calibrated Gaussian noise into the token logits during the generation process. This approach combines confidence-based screening to target high-risk tokens, efficient sensitivity estimation to reduce superfluous noise, and context-aware noise calibration to maintain a balance between privacy protection and output quality. A rigorous Rényi Differential Privacy (RDP) accountant is employed to monitor cumulative privacy expenditure, thereby providing explicit per-response $(\varepsilon, \delta)$-DP guarantees for outputs involving sensitive data. In contrast to previous methods that necessitate model retraining or filtering of the entire corpus, PAD is model-agnostic and functions solely at the decoding stage with negligible computational cost. Evaluations across three real-world datasets show that PAD significantly curtails the leakage of private information while maintaining response utility, surpassing current defenses based on retrieval adjustments or post-processing. This study represents a crucial advancement in addressing privacy risks within RAG through decoding mechanisms, establishing a foundation for scalable and universal privacy protections in sensitive applications. The code for this work is accessible at: https://github.com/wang2226/PAD.


Source: arXiv Generated at: 2026-06-03 00:00:00 UTC

Related Articles

TechCrunch

The world’s largest privately owned laser just turned on

Xcimer Energy activated the Phoenix laser, the world’s largest privately owned laser, aiming to commercialize fusion pow...

Uber Targets Doubling Its Fleet of Electric Motorcycles in Kenya
Bloomberg

Uber Targets Doubling Its Fleet of Electric Motorcycles in Kenya

Uber plans to double its electric motorcycle fleet in Kenya. This expansion aims to enhance sustainable transport option...

AI Saves Time But Most Companies Waste the Gain, Study Shows
Bloomberg

AI Saves Time But Most Companies Waste the Gain, Study Shows

A study reveals that while AI saves employee time, most companies fail to capitalize on these gains, squandering potenti...

JPMorgan Lifts S&P Target on Earnings 'Supercycle'
Bloomberg

JPMorgan Lifts S&P Target on Earnings 'Supercycle'

JPMorgan raised its S&P 500 target, citing an earnings “supercycle” that reflects heightened confidence in corporate pro...

Europe Sleepwalking Into Economic Ruin, Serb Leader Says
Bloomberg

Europe Sleepwalking Into Economic Ruin, Serb Leader Says

Serbian leader warns Europe is sleepwalking into economic ruin.

Delta Electronics Flags Power Crunch
Bloomberg

Delta Electronics Flags Power Crunch

Delta Electronics warns of a looming power deficit due to surging demand and constrained production, predicting serious ...