Differential Privacy of Cross-Attention with Provable Guarantee

Differential Privacy of Cross-Attention with Provable Guarantee

20 Jul 2024 | Jiuxiang Gu, Yingyu Liang, Zhenmei Shi, Zhao Song, Yufa Zhou
This paper introduces a novel differential privacy (DP) data structure for cross-attention mechanisms in large generative models (LGMs), providing theoretical guarantees for privacy and accuracy. Cross-attention is a critical component in various AI applications, including retrieval-augmented generation (RAG), system prompts, and stable diffusion. However, the sensitive information in key and value matrices of cross-attention can pose privacy risks. To address this, the authors design a DP data structure called DPTREE, which ensures that cross-attention computations are differentially private with a guaranteed error bound. The DPTREE data structure is built using a summation segment tree with truncated Laplace noise, enabling efficient summation queries. It supports initialization, query, and adaptive query operations. The algorithm uses polynomial kernel approximation to transform the cross-attention computation into a weighted distance problem, which is then solved using a weighted softmax query approach. The data structure is robust to adaptive queries and provides both relative and additive error bounds. The main result, Theorem 1.2, shows that the proposed algorithm can make cross-attention DP with a memory complexity of $ \widetilde{O}(n dr) $, initialization time complexity of $ \widetilde{O}(nr) $, and query time complexity of $ \widetilde{O}(\alpha^{-1}r) $. The output is $ (\epsilon, \delta) $-DP with a relative error of $ n^{-1}(\alpha + \epsilon_s) $ and additive error of $ \widetilde{O}(n^{-1}\epsilon^{-1}\alpha^{-1/2}lR^{2s}R_w r) $. The paper also discusses related work in differential privacy, including the use of DP in data structures and attention mechanisms. It highlights the importance of protecting user/system prompts and RAG data in LGMs, as these contain sensitive information. The authors argue that their approach provides a robust solution for cross-attention privacy, with theoretical guarantees that are essential for privacy-preserving AI systems. The work is the first to apply DP to cross-attention in LGMs with provable guarantees, offering a foundation for further research in privacy-preserving large generative models.This paper introduces a novel differential privacy (DP) data structure for cross-attention mechanisms in large generative models (LGMs), providing theoretical guarantees for privacy and accuracy. Cross-attention is a critical component in various AI applications, including retrieval-augmented generation (RAG), system prompts, and stable diffusion. However, the sensitive information in key and value matrices of cross-attention can pose privacy risks. To address this, the authors design a DP data structure called DPTREE, which ensures that cross-attention computations are differentially private with a guaranteed error bound. The DPTREE data structure is built using a summation segment tree with truncated Laplace noise, enabling efficient summation queries. It supports initialization, query, and adaptive query operations. The algorithm uses polynomial kernel approximation to transform the cross-attention computation into a weighted distance problem, which is then solved using a weighted softmax query approach. The data structure is robust to adaptive queries and provides both relative and additive error bounds. The main result, Theorem 1.2, shows that the proposed algorithm can make cross-attention DP with a memory complexity of $ \widetilde{O}(n dr) $, initialization time complexity of $ \widetilde{O}(nr) $, and query time complexity of $ \widetilde{O}(\alpha^{-1}r) $. The output is $ (\epsilon, \delta) $-DP with a relative error of $ n^{-1}(\alpha + \epsilon_s) $ and additive error of $ \widetilde{O}(n^{-1}\epsilon^{-1}\alpha^{-1/2}lR^{2s}R_w r) $. The paper also discusses related work in differential privacy, including the use of DP in data structures and attention mechanisms. It highlights the importance of protecting user/system prompts and RAG data in LGMs, as these contain sensitive information. The authors argue that their approach provides a robust solution for cross-attention privacy, with theoretical guarantees that are essential for privacy-preserving AI systems. The work is the first to apply DP to cross-attention in LGMs with provable guarantees, offering a foundation for further research in privacy-preserving large generative models.
Reach us at info@study.space
[slides and audio] Differential Privacy of Cross-Attention with Provable Guarantee