BudgetLeak: Membership Inference Attacks on RAG Systems via the Generation Budget Side Channel

TL;DR

BudgetLeak exploits generation budget side channel for membership inference in RAG systems, achieving 98.2% accuracy.

cs.CR 🔴 Advanced 2025-11-15 19 views
Hao Li Jiajun He Guangshuo Wang Dengguo Feng Zheng Li Min Zhang
privacy leakage generation budget RAG systems membership inference ML security

Key Findings

Methodology

The paper introduces BudgetLeak, a membership inference attack method that manipulates the generation budget to analyze RAG system response behaviors. This method uses sequence modeling and clustering techniques to analyze response quality changes under different budgets. Extensive experiments across four datasets, three LLM generators, and two retrievers demonstrate BudgetLeak's effectiveness.

Key Results

  • On the HealthCareMagic-100k dataset, using LLaMA as the generator and MiniLM as the retriever, BudgetLeak achieves 0.982 accuracy, compared to a maximum of 0.761 by baselines.
  • BudgetLeak consistently outperforms baseline methods across various RAG configurations, demonstrating high attack performance.
  • Experiments also analyze factors affecting attack performance and validate BudgetLeak's robustness under various defense mechanisms.

Significance

This study reveals an overlooked data risk in RAG systems: membership information leakage via the generation budget side channel. BudgetLeak not only provides a new perspective on privacy attacks in academia but also poses new challenges for the security of RAG systems in industry, emphasizing the need for new defense mechanisms.

Technical Contribution

BudgetLeak is the first to use the generation budget as a side channel for membership inference, proposing an attack strategy combining sequence modeling and clustering analysis. Unlike existing methods, BudgetLeak operates in a black-box environment without accessing internal model information, providing a more practical attack approach.

Novelty

BudgetLeak is the first study to exploit the generation budget side channel for membership inference in RAG systems. Unlike previous methods that rely mainly on output similarity, BudgetLeak reveals behavioral differences between member and non-member queries through budget variations.

Limitations

  • In some cases, changes in the generation budget may not significantly distinguish members from non-members, especially with smaller datasets or lower sample diversity.
  • The method's attack effectiveness may decrease when facing complex defense mechanisms.

Future Work

Future research can explore more complex defense mechanisms to counter BudgetLeak attacks. Additionally, it can investigate how to reduce membership information leakage via the generation budget without affecting generation quality.

AI Executive Summary

RAG systems enhance large language models by integrating external knowledge, but they also introduce privacy leakage risks. Existing membership inference attacks perform poorly in RAG systems due to black-box constraints and lack of strong membership signals. This paper proposes a novel attack method called BudgetLeak, which manipulates the generation budget to analyze behavioral differences between member and non-member queries. Experimental results show that BudgetLeak outperforms existing baseline methods across multiple datasets and configurations, achieving up to 98.2% accuracy. This research reveals an overlooked data risk in RAG systems, emphasizing the need for new defense mechanisms.

Deep Analysis

Background

RAG systems enhance generative content quality and relevance by dynamically incorporating external knowledge. However, as reliance on sensitive data increases, so do privacy leakage risks. Existing membership inference methods perform poorly in RAG systems due to black-box constraints and lack of strong membership signals.

Core Problem

RAG systems' reliance on external databases, particularly those containing sensitive information, introduces significant privacy and security risks. How to reliably infer membership information without accessing internal model information is an important and challenging problem.

Innovation

BudgetLeak manipulates the generation budget to reveal behavioral differences in response quality between member and non-member queries. This method combines sequence modeling and clustering analysis to effectively perform membership inference in a black-box environment.

Methodology

  • �� Utilize the generation budget side channel to analyze response quality changes under different budgets.

  • �� Use sequence modeling or clustering analysis to identify behavioral patterns of members and non-members.

  • �� Conduct experiments across multiple datasets and configurations for validation.

Experiments

Experiments are conducted on four benchmark datasets, combining two retrievers and three LLMs. Metrics used include similarity, ROUGE, BLEU, etc., to evaluate response quality. Ablation studies are also conducted to analyze the impact of each component on attack performance.

Results

BudgetLeak achieves 0.982 accuracy on the HealthCareMagic-100k dataset using LLaMA as the generator and MiniLM as the retriever, significantly outperforming baseline methods. Experiments also analyze factors affecting attack performance and validate its robustness under various defense mechanisms.

Applications

BudgetLeak can be used to assess privacy risks in RAG systems, helping to develop more secure generative models. Ensuring the security of sensitive data is particularly important in fields like healthcare and finance.

Limitations & Outlook

In some cases, changes in the generation budget may not significantly distinguish members from non-members. Future research can explore more complex defense mechanisms to counter BudgetLeak attacks.

Plain Language Accessible to non-experts

Imagine you're in a kitchen, and the RAG system is like a chef who needs to take ingredients (information) from the fridge (knowledge base) to cook a dish (generate content). BudgetLeak is like an assistant observing the chef's behavior, inferring what ingredients are in the fridge (membership information) by watching how the chef uses them. If the chef makes tastier dishes when ingredients are plentiful, the assistant can judge which ingredients were originally in the fridge based on the quality changes of the dishes.

ELI14 Explained like you're 14

Imagine you're playing a game with a big treasure chest (knowledge base) full of items (information). The RAG system is like a game character who needs to take items from the chest to complete tasks. BudgetLeak is like a smart player observing how the character uses items in different situations, inferring which items were originally in the chest. For example, when the character performs better with more items, the player can judge which items were originally in the chest based on the character's performance changes.

Glossary

RAG System (Retrieval-Augmented Generation)

A system that combines retrieval and generation by dynamically incorporating external knowledge to enhance content quality and relevance.

Used in the paper to enhance large language model generation capabilities.

Generation Budget

Controls the maximum number of tokens allowed in a generated response, affecting the level of detail in generated content.

Used as a side channel for membership inference in the paper.

Membership Inference Attack

A technique to assess privacy risks by analyzing a model's prediction behavior to determine if a sample was in the training set.

Used to assess privacy risks in RAG systems in the paper.

Sequence Modeling

A method for analyzing time series data to capture temporal dependencies and patterns.

Used in the paper to analyze response quality changes under generation budgets.

Clustering Analysis

A method for grouping data based on similarity, dividing it into different groups.

Used for unsupervised membership inference in the paper.

Open Questions Unanswered questions from this research

  • 1 How to reduce membership information leakage via the generation budget without affecting generation quality?
  • 2 How effective are existing defense mechanisms against complex attacks?
  • 3 How to improve attack robustness in more complex RAG configurations?

Applications

Immediate Applications

Privacy Risk Assessment

Helps developers assess privacy risks in RAG systems to ensure sensitive data security.

Security Enhancement

Develops more complex defense mechanisms for RAG systems to counter membership inference attacks.

Long-term Vision

Privacy Protection Technology

Develops new privacy protection technologies to ensure the security of generative models using sensitive data.

Abstract

Retrieval-Augmented Generation (RAG) enhances large language models by integrating external knowledge, but reliance on proprietary or sensitive corpora poses various data risks, including privacy leakage and unauthorized data usage. Membership inference attacks (MIAs) are a common technique to assess such risks, yet existing approaches underperform in RAG due to black-box constraints and the absence of strong membership signals. In this paper, we identify a previously unexplored side channel in RAG systems: the generation budget, which controls the maximum number of tokens allowed in a generated response. Varying this budget reveals observable behavioral patterns between member and non-member queries, as members gain quality more rapidly with larger budgets. Building on this insight, we propose BudgetLeak, a novel membership inference attack that probes responses under different budgets and analyzes metric evolution via sequence modeling or clustering. Extensive experiments across four datasets, three LLM generators, and two retrievers demonstrate that BudgetLeak consistently outperforms existing baselines, while maintaining high efficiency and practical viability. Our findings reveal a previously overlooked data risk in RAG systems and highlight the need for new defenses.

cs.CR