CIG-MIA: Membership inference attacks on RAG systems using contextual information gainCIG-MIA: Context-Induced Information Gain Membership Inference Attacks against Retrieval-Augmented Generation
Translation in progress — untranslated text is omitted.
The paper proposes CIG-MIA, a membership inference attack based on context information gain, to determine whether a document belongs to a RAG system's knowledge base, covering both gray-box and text-only black-box access settings. The idea is that explicit injection of the candidate document affects members and non-members differently: when the document is already obtainable via retrieval, injection adds little extra support; when the document is not in the library, injection introduces new evidence and the likelihood gain is larger. In the gray-box setting, this gain is computed directly from token-level likelihoods; in the black-box setting, a lightweight surrogate estimator combining semantic similarity and exact match features estimates the same gain from generated text.
- RAG injects an external knowledge base into the generation context, and an attacker may use this to determine whether a candidate document is in the library. Existing prompt, similarity, mask recovery, and query perturbation signals are susceptible to prompt defenses, semantically similar documents, and parametric knowledge.
- CIG-MIA constructs probe question-answer pairs from the candidate document and compares the answer likelihood difference between a normal RAG query and explicit injection of that document. Gray-box directly uses token log-probabilities; black-box uses semantic similarity and exact match, estimates the same gain via a local surrogate, then aggregates into a document-level score.
- Compared DCMI, RAG-MIA, S2MIA, IA, MBA on NQ, MS-MARCO, and HealthCareMagic. The authors report gray-box AUC around 0.99 and black-box around 0.93 on NQ; open-source models mostly achieve gray-box AUC of 0.98–0.99. The signal remains separable across retrievers, top-k, paraphrasing, and sampling.
- The authors note that black-box estimation has approximation error and depends on whether the probe can retrieve the member document; future work could address defenses and weaker calibration. Experiments cover gray-box and black-box for four open-source generators, and text-only black-box for two API models; default top-k=3, greedy decoding.