acceptodds
Under review as a conference paper at ICLR 2027

CleanBase: Detecting Multi-Document Prompt Injection in RAG Databases

Abstract

Retrieval-augmented generation (RAG) systems are vulnerable to prompt injection attacks that insert malicious documents into their knowledge databases. Many existing RAG defenses intervene only after the database has already been contaminated, for example by hardening the language model or filtering retrieved content at query time. These approaches have complementary but distinct limitations: model-level defenses are tied to the serving model, while query-time defenses repeatedly incur security processing during inference; moreover, neither directly removes the underlying contamination from the knowledge database. We therefore explore a complementary perspective: treating the knowledge database itself as a proactive security layer and sanitizing it before retrieval and generation. We introduce CleanBase, a training-free offline sanitizer that exploits cross-document semantic relationships in the knowledge database. CleanBase constructs a -nearest-neighbor graph over documents, prunes weak edges using a data-adaptive threshold, and removes documents participating in tightly connected groups. It requires neither future user queries nor access to the serving language model, and introduces no additional CleanBase computation per query after sanitization. Across six knowledge databases and nine poisoning attacks, CleanBase reduces mean attack success rate from 69.9% to 9.1% at the evaluated operating settings while largely preserving aggregate RAG utility. We further characterize its limitations under low-cardinality and detector-aware diversified attacks. These results demonstrate the promise of database-level sanitization as a complementary defense layer for RAG systems. Our source code is available at https://anonymous.4open.science/r/CleanBase-7762.

Primary area:
alignment, fairness, safety, privacy, and societal considerations
Keywords:
retrieval-augmented generation, prompt injection, RAG security

Reviews

Among:
Shape:
1234this paper, Bottom 9%
Figure 1. Mean review rating of the reviewed papers at ICLR 2027. This paper averages 1.50 over 2 reviews, above 9% of the others.
Reviewer_tf89OpenReview ↗
Rating
1
Confidence
3
Informativeness
2
Presentation
3
Soundness
2
Read review
Paper summary

This paper proposes CleanBase, a training-free, database-level defense against prompt injection attacks in retrieval-augmented generation (RAG) systems. CleanBase constructs a k-nearest-neighbor graph over document embeddings, prunes weak connections, and identifies tightly connected groups of documents using clique detection. Documents belonging to these groups are classified as malicious and removed from the knowledge database before retrieval. The authors evaluate CleanBase across six knowledge databases and nine poisoning attacks, comparing it against existing defenses such as TrustRAG, PromptGuard, and DataSentinel. The results show that CleanBase reduces average attack success rate (ASR) from 69.9% to 9.1% while largely preserving RAG utility. The authors also investigate scalability, different downstream RAG configurations, and adaptive poisoning attacks.

Critical strengths
  • This work explores database-level sanitization as a proactive defense against RAG poisoning. Since malicious documents are removed before retrieval, CleanBase does not introduce additional defense computation during inference.

  • The authors conduct extensive experiments across six knowledge databases and nine poisoning attacks, including scalability analysis and evaluations against detector-aware adaptive attacks.

Critical weaknesses
  • The conceptual novelty over TrustRAG is limited. TrustRAG already identifies compact clusters of adversarial documents in embedding space using a clustering-based approach. CleanBase similarly exploits the semantic proximity of malicious documents, replacing clustering with kNN graph construction and clique detection. Although CleanBase operates offline at the database level, the authors do not sufficiently demonstrate the advantage of graph-based detection over an offline clustering-based approach.

  • The end-to-end evaluation across different LLMs is limited. Although the authors evaluate six datasets and nine attacks, the main end-to-end experiments use only Llama3-8B, while the cross-model evaluation considers only PoisonedRAG-B. Furthermore, benign generation utility is not evaluated across different LLMs, and the reported accuracy may be influenced by the LLM's parametric knowledge. Broader cross-model evaluations and retrieval-dependent benchmarks are needed to establish generalizability.

Questions for authors
  • Can the authors clarify the conceptual novelty of CleanBase over TrustRAG, given that both methods exploit compact groups of adversarial documents in embedding space? How does CleanBase compare against an offline clustering-based detector under the same experimental conditions?

  • How can CleanBase defend against adaptive poisoning attacks that deliberately disperse malicious document embeddings? Section 6.5 shows that detector-aware adaptive PoisonedRAG-W achieves a 96.1% false negative rate, with CleanBase reducing ASR only marginally from 38.7% to 37.3%.

  • Can the authors extend the end-to-end evaluation to multiple LLMs across different attack strategies, rather than evaluating only PoisonedRAG-B in the cross-model experiments? Additionally, can the authors evaluate benign generation utility across different LLMs and distinguish utility preservation from reliance on parametric knowledge?

4 comments

We thank the reviewer for the constructive comments regarding the novelty, adaptive robustness, and cross-model generalizability of CleanBase. We address these three concerns below through additional experimental evidence and further clarifications.

(1) Comparison with Clustering Methods

We acknowledge that both methods exploit semantic relationships among malicious documents. However, TrustRAG performs clustering on a small set of query-retrieved documents, whereas CleanBase performs query-independent database-level sanitization using local kNN graph connectivity and clique detection. We argue that TrustRAG's clustering-based filtering mechanism is not suitable for large-scale database-level sanitization. Specifically, its fixed cluster partitioning struggles to effectively separate malicious documents from large benign corpora, while its subsequent similarity- and ROUGE-based filtering incurs substantial computational overhead when applied to the entire database.

To investigate this, we extended TrustRAG's original first-stage filter to entire databases, retaining its SimCSE encoder, K=2 clustering, cosine-similarity threshold (0.88), ROUGE-L threshold (0.25), and original decision rules.

The following table presents the resulting cluster compositions under PoisonedRAG-B (PB) across different database scales, with 250 malicious documents added to each benign corpus.

Benign DocsCluster 0 (Benign / Malicious)Cluster 1 (Benign / Malicious)Remove Cluster 0 (FPR / FNR)Remove Cluster 1 (FPR / FNR)
1K677 / 124323 / 12667.7% / 50.4%32.3% / 49.6%
10K3,673 / 1326,327 / 11836.7% / 47.2%63.3% / 52.8%
100K36,384 / 12763,616 / 12336.4% / 49.2%63.6% / 50.8%

As the database grows, malicious documents are distributed across large clusters dominated by benign documents. Removing either cluster would discard a substantial portion of benign documents while still missing approximately half of the malicious documents. These are hypothetical whole-cluster removal results rather than TrustRAG's final detection outcomes, as its original filter includes a ROUGE-based fallback.

The full filtering procedure also faces substantial computational overhead when extended to large databases. Even with optimized similarity and ROUGE-L computation, the TrustRAG adaptation exceeds the 600-second limit at 10K documents across all four evaluated attacks. In contrast, CleanBase completes screening in 2.84–3.85 seconds at 10K documents and 5.42–5.60 seconds at 100K documents. These timings exclude embedding computation and are obtained using different hardware configurations.

Overall, these results highlight the limitations of directly extending TrustRAG's query-level clustering mechanism to database-wide sanitization. In contrast, CleanBase identifies local, potentially overlapping groups of malicious documents through graph connectivity and clique detection, without requiring a global partition of the database. Our contribution therefore lies in a scalable, query-independent database-level detection mechanism, rather than merely exploiting semantic similarity among malicious documents.

(2) Further Clarification of Adaptive Attacks

CleanBase relies on cross-document semantic similarity, which adaptive attackers can deliberately weaken. Nevertheless, CleanBase remains effective under the evaluated black-box adaptive setting, reducing ASR from 66.0% to 20.0%. Combining CleanBase with MetaSecAlign further reduces ASR to 13.0%, compared with 44.0% for MetaSecAlign alone.

The white-box adaptive setting represents a stronger threat model, requiring detailed knowledge of the defense mechanism and targeted optimization against it. While such capabilities may not always be available in practical deployments, we intentionally evaluate this challenging setting to characterize the limits of our approach. As reported in Section 6.5, adaptive PoisonedRAG-W achieves an FNR of 96.1%, demonstrating that sufficiently diversified malicious documents can evade detection.

Adaptive settingNo DefenseCleanBaseMetaSecAlignCombined
Black-box66.0%20.0%44.0%13.0%
White-box71.0%71.0%38.0%38.0%

These results clarify that CleanBase provides effective protection when detectable cross-document semantic relationships remain, while its effectiveness is limited against stronger white-box adaptive attacks. We therefore position CleanBase as a complementary offline defense rather than a universal solution to adaptive poisoning.

(3) Cross-Model Generalization

We evaluate CleanBase across six LLMs and seven attack strategies, as shown in the following table. CleanBase reduces the average ASR from 79.9% to 17.5%, demonstrating its effectiveness across different downstream LLMs and attack strategies. The improvement is more limited for PoisonedRAG-W, consistent with the limitations discussed above.

AttackSettingLlama2Llama3MistralQwen2.5Llama4Qwen3
Naive AttackNo Defense99.094.071.076.094.096.0
CleanBase6.01.02.04.02.04.0
Context IgnoringNo Defense94.095.066.066.065.094.0
CleanBase8.04.04.05.04.08.0
Fake CompletionNo Defense81.085.058.065.068.090.0
CleanBase13.04.03.06.04.09.0
Combined AttackNo Defense82.074.051.061.062.080.0
CleanBase5.00.02.03.01.04.0
Mixed AttackNo Defense84.086.059.063.02.089.0
CleanBase17.012.08.010.08.019.0
PoisonedRAG-WNo Defense90.091.092.096.092.096.0
CleanBase81.073.082.079.072.078.0
PoisonedRAG-BNo Defense95.088.093.092.085.094.0
CleanBase20.013.015.016.012.015.0
AverageNo Defense89.387.670.074.166.991.3
CleanBase21.415.316.617.614.719.6

To further assess benign utility and address the concern that utility preservation may result from the LLMs' parametric knowledge, we additionally evaluate 300 SciFact claims and 300 HotpotQA questions across Llama2, Mistral, and Qwen3. We compare original RAG, CleanBase-filtered RAG, and no-retrieval settings using official ground-truth labels and answers. Specifically, we report classification accuracy on SciFact and Exact Match (EM) and token-level F1 on HotpotQA, supplementing the ACC metric used in our original evaluation.

The SciFact classification accuracy results (%) are as follows:

ModelOriginal RAGCleanBaseNo Retrieval
Llama242.342.340.0
Mistral54.754.744.3
Qwen367.067.043.3

The HotpotQA results (EM / F1, %) are as follows:

ModelOriginal RAGCleanBaseNo Retrieval
Llama215.0 / 20.714.3 / 20.37.7 / 9.4
Mistral12.0 / 24.311.3 / 23.83.3 / 9.8
Qwen333.0 / 42.132.7 / 42.016.3 / 23.6

On SciFact, classification accuracy remains unchanged after CleanBase filtering across all three models, although a few individual predictions change. On HotpotQA, original RAG outperforms the no-retrieval setting by 7.3 / 8.7 / 16.7 percentage points in EM, with positive paired 95% confidence intervals. After CleanBase filtering, EM decreases by only 0.7 / 0.7 / 0.3 percentage points, respectively.

These results provide further evidence that CleanBase generalizes across different serving LLMs while largely preserving retrieval-dependent utility, rather than merely relying on the models' parametric knowledge.


We hope that these additional experiments and clarifications address the reviewer's concerns and further demonstrate CleanBase's distinct contributions, practical advantages, and limitations as a database-level defense for RAG systems.

Thank you for the additional experiments.

The offline clustering comparison retains TrustRAG's K=2 setting, which was originally designed for query-level retrieval. Could the authors compare CleanBase against an offline clustering baseline with a cluster count appropriate for database-scale detection?

We thank the reviewer for this suggestion. We agree that directly applying TrustRAG's query-level K=2 clustering to an entire database may not provide a representative offline clustering baseline. To address this concern, we further evaluate recursive K-means, which hierarchically partitions the database into smaller clusters, producing hundreds to hundreds of thousands of clusters depending on the database size. We investigate how both detection performance and computational cost scale as the database grows.

i) Detection Scalability at Matched FPR

We first compare CleanBase and recursive K-means at matched FPR (approximately 2%) across four database sizes, from 1K to 1M benign documents, and four poisoning attacks.

Benign DocsAttackFPR (%)CleanBase FNR (%)Recursive K-means FNR (%)
1KPB2.00000.00.0
1KCI2.00000.00.0
1KMA2.00000.00.0
1KPW2.00000.02.4
10KPB1.98000.02.8
10KCI1.97000.07.2
10KMA2.00000.07.2
10KPW1.94000.06.0
100KPB1.99400.411.2
100KCI1.97500.022.0
100KMA1.99100.024.0
100KPW1.99801.616.4
1MPB1.99985.631.2
1MCI1.99984.830.0
1MMA1.99971.640.8
1MPW1.999834.050.8

CleanBase demonstrates better detection scalability as the database size increases. While both methods achieve comparable performance on smaller databases, recursive K-means exhibits substantially higher FNR at larger scales under the same false-positive budget. At the million-document scale, CleanBase achieves FNRs of 5.6%, 4.8%, 1.6%, and 34.0% under PB, CI, MA, and PW, respectively, compared with 31.2%, 30.0%, 40.8%, and 50.8% for recursive K-means.

ii) Detection Trade-off at Million Scale

We further compare the two methods on the million-document database by requiring FNR ≤ 5% and matching their achieved FNRs. This allows us to examine the false-positive costs of maintaining high malicious-document detection rates.

AttackMatched FNR (%)CleanBase FPR (%)K-means FPR (%)
PB4.02.20682.334
CI4.81.95592.030
MA4.81.83797.755
PW4.88.09183.605

At matched FNR ≤ 5%, recursive K-means requires substantially higher false-positive rates. Across all four attacks, recursive K-means incorrectly removes more than 80% of benign documents, whereas CleanBase maintains FPRs below 9%. These results show that although recursive clustering can operate on million-document databases, maintaining high detection rates comes at a substantial cost in benign-document preservation.

iii) Computational Scalability

We also compare the processing time of CleanBase and recursive K-means across different database sizes.

Benign DocsCleanBase Time (s)Recursive K-means Time (s)
1K2.803.70
10K3.8518.29
100K5.55165.59
1M149.271860.01

CleanBase also demonstrates substantially lower computational overhead at large database scales. In the million-document GPU comparison, recursive K-means requires 1860.01 seconds, compared with only 149.27 seconds for CleanBase, resulting in approximately 12.5 times longer processing time. Recursive K-means also consumes considerably more GPU memory (13.237 GiB versus 5.083 GiB).

Overall, these experiments demonstrate that CleanBase offers better scalability for database-level malicious-document detection, maintaining a more favorable FPR–FNR trade-off as the database grows while incurring substantially lower computational overhead than the evaluated recursive clustering baseline. These advantages persist even when the number of clusters is allowed to scale with the database size rather than being fixed at K=2.


We hope these additional experiments adequately address the reviewer's concern regarding the choice of the offline clustering baseline, and further clarify the advantages of CleanBase for large-scale database protection.

Reviewer_BBNvOpenReview ↗
Rating
2
Confidence
3
Informativeness
2
Presentation
3
Soundness
2
Read review
Paper summary

This paper proposes CleanBase, an offline database-level defense against multi-document prompt-injection attacks in RAG systems. Rather than modifying the serving LLM or filtering retrieved content at query time, CleanBase sanitizes the knowledge database before deployment. The key observation is that multiple malicious documents targeting the same query often exhibit strong semantic relationships. CleanBase constructs a k-nearest-neighbor graph over document embeddings, prunes weak edges using a data-adaptive threshold, and flags documents participating in tightly connected groups. Across six knowledge databases and nine attack configurations, the method substantially reduces average attack success rate while largely preserving downstream RAG utility. The paper also evaluates low-cardinality and detector-aware attacks to characterize the method's coverage boundaries.

Critical strengths
  • The paper studies a useful defense point that is complementary to model-level and retrieval-time approaches. Offline database sanitization moves security processing outside the serving path and directly targets contaminated content.

  • The method is closely aligned with its motivating observation. If related malicious documents form strong cross-document semantic structures, representing the database as a similarity graph and searching for dense groups is a natural approach.

  • The evaluation covers multiple databases, attack types, LLMs, and retrievers, which helps demonstrate that a sanitized database can remain useful under different downstream RAG configurations.

  • The paper explicitly tests the boundary conditions of its own method. In particular, the low-cardinality experiments show that the method becomes much less effective when fewer than three related malicious documents are inserted.

I appreciate the detector-aware attack analysis. The paper does not hide the fact that semantic diversification can substantially weaken the collective signal and appropriately characterizes CleanBase as a complementary rather than complete defense.

Critical weaknesses
  • The effectiveness of CleanBase depends strongly on the presence of repeated semantic structure among malicious documents. This is an attacker-controllable property, and the method provides limited protection when attacks use only one or two documents.

  • The adaptive attack results show that deliberately diversifying malicious documents can largely bypass the detector. In the reported adaptive PoisonedRAG-W setting, the FNR reaches 96.1%, and the reduction in ASR becomes marginal.

  • These results do not necessarily invalidate the method within its intended threat regime, but they make its deployment scope important. I would like the paper to more clearly articulate which realistic attacker models are expected to preserve the cross-document similarity signal and which are not.

  • Because the detector relies on semantic clustering, evaluation on naturally repetitive or templated benign corpora would further strengthen the utility analysis. Such corpora may contain dense benign groups that are structurally similar to the patterns CleanBase is designed to detect.

Questions for authors

I view CleanBase as a potentially useful first-line sanitization layer, but its security effectiveness should be interpreted within a clearly specified threat model rather than as a general prompt-injection defense.

1 comment

We thank the reviewer for the constructive feedback and for recognizing the value of database-level sanitization. Below, we clarify the threat model and provide additional evidence on adaptive attacks and utility preservation.

(1) Threat Model and Adaptive Attacks

CleanBase primarily targets multi-document poisoning attacks in RAG systems, particularly when injected documents exhibit strong cross-document semantic similarity. Under such conditions, CleanBase can effectively identify suspicious document groups by exploiting their dense semantic structures. Such semantic concentration can arise in multi-document poisoning strategies that reuse similar retrieval cues or answer-steering content across injected documents to increase their likelihood of retrieval.

We acknowledge that this structural signal is attacker-controllable, and sophisticated adaptive attackers may evade detection by deliberately diversifying their injected documents.

Notably, under the evaluated black-box adaptive attack, CleanBase reduces ASR from 66.0% to 20.0%. Moreover, combining CleanBase with MetaSecAlign further reduces ASR to 13.0%, compared with 44.0% for MetaSecAlign alone. These results demonstrate that CleanBase remains effective under the evaluated black-box adaptive setting and provides additional security benefits when combined with a model-level defense.

We also examine a stronger white-box adaptive attack to characterize the limits of our approach. Under this setting, CleanBase alone does not effectively reduce ASR. When combined with MetaSecAlign, the ASR reaches 38.0%, identical to MetaSecAlign alone. This shows that the two defense layers remain compatible even under this challenging adaptive setting.

Adaptive settingNo DefenseCleanBaseMetaSecAlignCombined
Black-box66.0%20.0%44.0%13.0%
White-box71.0%71.0%38.0%38.0%

As already stated in our paper, CleanBase serves as a complementary offline defense layer targeting semantically concentrated multi-document poisoning, rather than a universal defense against arbitrary adaptive attacks.

(2) Utility

i) on general benign corpora

Our paper already provides comprehensive downstream utility evaluations across six RAG knowledge databases, covering both standard benchmark queries (Table 10) and false-positive-sensitive queries (Table 11).

On standard queries, CleanBase largely preserves retrieval and generation utility, with average Recall changing only from 53.9% to 53.6% and ACC from 74.7% to 75.1%. For false-positive-sensitive queries, although average Recall decreases from 93.8% to 85.0%, ACC changes only slightly from 83.4% to 82.8%. These results indicate that false-positive removals can affect retrieval quality, while their impact on the measured semantic similarity of generated answers remains relatively limited.

We believe this observation may be partly explained by the inherent semantic redundancy in knowledge databases. Even when some benign documents are mistakenly removed, other relevant documents containing overlapping information may remain available, thereby mitigating the impact on downstream RAG utility.

ii) on naturally repetitive benign corpora

We additionally evaluate CleanBase on BEIR Quora, a real-world duplicate-question retrieval benchmark containing 522,931 naturally occurring questions. Unlike synthetic duplication, Quora contains semantically equivalent questions independently posed by users, making it a suitable testbed for examining whether benign semantic redundancy triggers our graph-based detector.

Under the original CleanBase configuration (k=10, z=2.5), 9,872 benign documents (1.89%) are flagged. Among 944 annotated relevance sets containing at least three relevant in-corpus documents, CleanBase flags all annotated members of 19 sets (2.01%). These results confirm that naturally occurring benign semantic groups can also trigger our detector, highlighting the potential risk of removing semantically related benign content. However, complete marking of an annotated set does not necessarily imply information loss, as the relevance annotations are not exhaustive.

We further evaluate five template-based poisoning attacks, each injecting 500 malicious documents. As shown below, at matched benign-document FPRs (1.85%–1.89%), CleanBase achieves an average FNR of 6.36%.

AttackMatched FPR ↓CleanBase FNR ↓
NA1.851%0.0%
CI1.871%3.8%
FC1.886%2.8%
CA1.864%5.4%
MA1.870%19.8%
Average1.868%6.36%

Together with the downstream utility evaluations in Tables 10 and 11, these additional results provide a more comprehensive assessment of CleanBase's false-positive behavior and its potential impact on benign-content preservation.

Comments on the paper

2 comments

We thank the reviewer for the constructive feedback and for recognizing the strengths of CleanBase, particularly its scalable offline defense design and comprehensive evaluation of failure modes. We address the reviewer's concerns in detail below.

(1) Complementarity Under Adaptive Attacks

We further evaluate CleanBase in combination with MetaSecAlign under both black-box and white-box adaptive poisoning attacks. The results are summarized below.

Adaptive AttackNo DefenseCleanBaseMetaSecAlignCombined
Black-box PB66.0%20.0%44.0%13.0%
White-box PW71.0%71.0%38.0%38.0%

Under the black-box adaptive attack, CleanBase reduces ASR from 66.0% to 20.0%. Combining CleanBase with MetaSecAlign further reduces ASR to 13.0%, compared with 44.0% for MetaSecAlign alone. These results demonstrate that CleanBase provides additional security benefits when combined with a model-level defense.

Under the stronger white-box adaptive attack, CleanBase alone does not effectively reduce ASR, and the combined defense achieves the same ASR as MetaSecAlign alone (38.0%). However, this white-box setting assumes that the attacker has detailed knowledge of the parameters of the embedding model and configuration and can explicitly optimize malicious documents against the detection mechanism. Such access is not necessarily available to attackers who can only inject external documents into a RAG knowledge database. Notably, the combination does not introduce additional security degradation even under this stronger setting.

Regarding benign utility, adding CleanBase to MetaSecAlign introduces little additional degradation in our clean-database evaluations. FiQA reference-answer consistency remains at 47.0%, while SciFact gold-label accuracy changes only from 48.3% to 48.0%.

Overall, these results demonstrate the practical value of CleanBase as an offline database sanitization layer that can provide additional protection alongside model-level defenses against multi-document poisoning attacks.

(2) Hyperparameter Selection and False Positives

As described in Appendix E.3, we select (k=10) and (z=2.5) based on the FPR–FNR trade-off on FiQA under PoisonedRAG-B. We then apply the same hyperparameter settings across other datasets and attack methods without further tuning. The experimental results provide empirical evidence of their generalizability across different datasets and attacks.

To further evaluate the stability of CleanBase, we repeat the detection experiment 30 times on FiQA under PoisonedRAG-B. The results are summarized below.

MetricMean (%)95% CI (%)
FPR0.78[0.7813, 0.7844]
FNR4.40[4.4000, 4.4000]

The results are consistent with those reported in Table 1, with minimal variation across repeated runs, demonstrating the stability of CleanBase under the evaluated setting.

The absolute number of falsely removed benign documents can be directly estimated from the reported FPRs and database sizes. We have already provided the total number of documents for each dataset in the appendix.

(3) Benign Repetition and Semantic Deduplication

We acknowledge that naturally repetitive benign documents may also form dense semantic groups and be mistakenly identified by CleanBase. However, such false-positive removals do not necessarily lead to proportional information loss, as knowledge databases often contain semantically redundant documents. Even when some benign documents are removed, other documents containing overlapping information may remain available.

This is consistent with our utility evaluations in Tables 10 and 11. On standard queries, average Recall changes only from 53.9% to 53.6%, while ACC changes from 74.7% to 75.1%. Even on false-positive-sensitive queries, where Recall decreases from 93.8% to 85.0%, ACC changes only slightly from 83.4% to 82.8%. These results suggest that semantic redundancy may help mitigate the downstream impact of false-positive removals.

To further investigate this issue, we compare CleanBase with a semantic-deduplication baseline at matched benign-document deletion rates (approximately 2% FPR). The end-to-end ASR results are shown below.

DatasetAttackCleanBaseSemantic Deduplication
SciFactCI10.0%94.0%
SciFactMA10.0%94.0%
ArguAnaCI9.0%54.0%
ArguAnaMA9.0%54.0%
FiQACI6.0%90.0%
FiQAMA6.0%88.0%

CleanBase consistently achieves substantially lower ASR than semantic deduplication under the evaluated attacks, even at matched benign-document deletion rates.

We further analyze which benign documents are disproportionately removed. On FiQA, CleanBase flags 40 of 42 exact-duplicate documents, compared with a 1.93% FPR among nonduplicate documents. Similarly, on ArguAna, 34 of 218 exact duplicates are flagged, compared with a 1.64% FPR among nonduplicates.

These findings indicate that repetitive benign content is more likely to be flagged, while our downstream utility results suggest that semantic redundancy in the remaining database may partially mitigate the resulting information loss.

(4) Matched-FPR Comparison and Factual Correctness

To ensure a fair comparison, we conduct additional end-to-end evaluations of CleanBase and PromptGuard at matched FPRs (approximately 2%) on the same knowledge databases. The results are summarized below.

DatasetAttackCleanBase ASRPromptGuard ASR
SciFactCI10.0%11.0%
SciFactMA10.0%11.0%
ArguAnaCI9.0%47.0%
ArguAnaMA9.0%54.0%
FiQACI6.0%81.0%
FiQAMA6.0%84.0%

These results demonstrate that CleanBase achieves substantially better security performance on ArguAna and FiQA even when the number of falsely removed benign documents is controlled.

To further examine the impact of false-positive removals on downstream correctness, we supplement our embedding-based ACC evaluation with official relevance judgments and gold-label accuracy.

MetricNo DefenseCleanBase
SciFact Recall@571.08%70.61%
ArguAna Recall@554.91%53.63%
SciFact Gold Accuracy56.7%56.7%

On 300 official SciFact development questions, the total number of correct answers remains unchanged at 170. A question-level analysis reveals one correct-to-incorrect transition and one incorrect-to-correct transition. Among the four questions experiencing decreased retrieval recall, only one changes from a correct to an incorrect answer.

These findings suggest that retrieval losses do not necessarily translate into proportional degradation in answer correctness, potentially because relevant information remains available in other documents. Nevertheless, individual answer errors can still occur.


We hope our additional experiments and clarifications adequately address the reviewer's concerns and further strengthen the evaluation of CleanBase. We appreciate the reviewer's thoughtful feedback and hope these responses will encourage a more favorable assessment of our work.

From OpenReview, CC BY 4.0. Authors as signed there; shown unedited.

Related papers

Loading the map…

Discussion (0)

Sign in to comment.