Provable Differentially Private Computation of the Cross-Attention Mechanism
Abstract
Cross-attention has emerged as a cornerstone module in modern artificial intelligence, underpinning critical applications such as retrieval-augmented generation (RAG), system prompting, and guided stable diffusion. However, this is a rising concern about securing the privacy of cross-attention, as the underlying key and value matrices frequently encode sensitive data or private user information. In this work, we introduce a novel data structure designed to enforce differential privacy (DP) for cross-attention mechanisms, accompanied by provable theoretical guarantees. Specifically, letting n denote the input sequence length, d the feature dimension, R the maximum magnitude of query and key matrices, Rw the maximum magnitude of the value matrix, and r, s, εs the parameters for polynomial kernel methods, our proposed structure achieves O(ndr2) space and initialization complexity, with a query time of O(d r2) per token. Moreover, we demonstrate that our mechanism satisfies (ε, δ)-DP, incurring an additive error of O((1-εs)-1 n-1 ε-1 R2s Rw r2) and a relative error of 2εs/(1-εs) with respect to the ground truth. Crucially, our framework maintains robustness against adaptive queries, ensuring security even in adversarial settings. To the best of our knowledge, this constitutes the first approach providing provable differential privacy for cross-attention, establishing a foundation for future privacy-preserving algorithms in large generative models (LGMs).
Turn this paper into a full lesson
ArcXiv compiles a staged curriculum from this paper: 8-12 lessons across beginner → advanced, synthesised section guides, visuals, flashcards, a quiz, exercises, and on-demand deep dives per section. Grounded in the abstract, never invented.