FRAG: Toward Federated Vector Database Management for Collaborative and Secure Retrieval-Augmented Generation

Dongfang Zhao
2024-10-17
Abstract:This paper introduces \textit{Federated Retrieval-Augmented Generation (FRAG)}, a novel database management paradigm tailored for the growing needs of retrieval-augmented generation (RAG) systems, which are increasingly powered by large-language models (LLMs). FRAG enables mutually-distrusted parties to collaboratively perform Approximate $k$-Nearest Neighbor (ANN) searches on encrypted query vectors and encrypted data stored in distributed vector databases, all while ensuring that no party can gain any knowledge about the queries or data of others. Achieving this paradigm presents two key challenges: (i) ensuring strong security guarantees, such as Indistinguishability under Chosen-Plaintext Attack (IND-CPA), under practical assumptions (e.g., we avoid overly optimistic assumptions like non-collusion among parties); and (ii) maintaining performance overheads comparable to traditional, non-federated RAG systems. To address these challenges, FRAG employs a single-key homomorphic encryption protocol that simplifies key management across mutually-distrusted parties. Additionally, FRAG introduces a \textit{multiplicative caching} technique to efficiently encrypt floating-point numbers, significantly improving computational performance in large-scale federated environments. We provide a rigorous security proof using standard cryptographic reductions and demonstrate the practical scalability and efficiency of FRAG through extensive experiments on both benchmark and real-world datasets.
Cryptography and Security,Databases
What problem does this paper attempt to address?
### What problems does this paper attempt to solve? This paper aims to solve the challenges of secure and collaborative Retrieval - Augmented Generation (RAG) systems in distributed and federated environments. Specifically, it focuses on how to enable multiple distrusting parties to securely perform Approximate \(k\)-Nearest Neighbor (ANN) searches while ensuring the privacy of data and queries. #### Main problems: 1. **Privacy protection**: - In a federated environment, multiple organizations or entities (such as hospitals, financial institutions, etc.) hope to share data to improve the performance of machine - learning models, but this data usually contains sensitive information and cannot be directly shared. Therefore, a method is needed to ensure that data and queries are not leaked to other parties during transmission and processing. 2. **Performance efficiency**: - Existing privacy - protection technologies (such as secure multi - party computation and homomorphic encryption) are theoretically effective, but in practical applications, they often have high computational overhead and complex key - management problems, especially in real - time RAG systems. Therefore, a method that can ensure privacy and maintain high - performance efficiency is required. #### Specific objectives: - **ANN search in a federated environment**: Implement a framework that enables multiple distrusting parties to perform ANN searches on encrypted data vectors without exposing their original data and return the closest matching results. - **Security requirements**: Ensure that throughout the process, no party can obtain the data or query information of other parties, except for the final ANN results. In particular, the system must meet the security guarantee of Indistinguishability under Chosen - Plaintext Attack (IND - CPA). - **Performance requirements**: Minimize the computational and communication overheads related to encryption, query processing, and result aggregation, so that the performance of FRAG is comparable to that of centralized, plain - text ANN systems. #### Solutions: To address the above challenges, the paper proposes the Federated Retrieval - Augmented Generation (FRAG) framework, which includes the following key technologies: - **Single - Key Multiparty Homomorphic Encryption (SK - MHE)**: Simplifies key management, allowing all parties to use a single shared key for encryption operations, thereby reducing complexity and improving security. - **Multiplicative Caching (MC)**: Optimizes the performance of homomorphic operations by pre - computing and caching intermediate encrypted values, especially significantly reducing the computational burden in large - scale distributed environments. Through these innovations, FRAG provides a solution for efficient and secure ANN searches in federated environments, which is suitable for various real - world application scenarios, such as collaborative medical research, federated financial analysis, and multi - institutional secure machine learning.