← Lab /Security & privacy

RAG often harms malware explanation quality

Retrieval-Augmented Generation degrades the quality of malware behavior explanations

Security & privacy arXiv 4 May 2026 Measurement Prototype evidence

Published as “Evaluating Retrieval-Augmented Generation for Explainable Malware Analysis”

Why it matters

Security teams should avoid adding retrieval-based context to LLM explanations when structured malware reports already provide sufficient evidence, to reduce the risk of misleading or noisy outputs.

Summary

RAG often harms malware explanation quality, with the best-performing model (DeepSeek-R1) achieving a BERTScore of 0.8617 without retrieval, while retrieval with the all-MiniLM-L6-v2 retriever degrades scores. The study evaluated 1,702 real-world VirusTotal reports across several LLMs and found that added context can introduce distracting or weakly related information. Evidence is based on BERTScore comparisons to a GPT-5.1 baseline; the paper does not report any large-scale user study.

What they found 3

  1. RAG frequently degrades explanation quality by adding distracting or weakly related context.

    “Across multiple LLMs, we find that RAG frequently degrades explanation quality by introducing distracting or weakly related context and adding narrative noise or generic write-ups.”

  2. The highest explanation quality is achieved without RAG (DeepSeek-R1 scores 0.8617).

    “the highest score is achieved by DeepSeek-R1 without RAG (0.8617), indicating that retrieval does not effectively improve explanation quality.”

  3. The all-MiniLM-L6-v2 retriever degrades performance for both models, especially GPT-OSS-20B.

    “As shown in Table 1, the all-MiniLM-L6-v2 retriever degrades performance for both models, particularly GPT-OSS-20B.”

Caveats 3

  • Using the text-embedding-3-large retriever slightly improves GPT-OSS-20B’s score, though it does not benefit DeepSeek-R1.
  • We do not compare directly with MalGPT, as it represents a different paradigm based on a trained multi-modal architecture rather than external retrieval.
  • When this evidence is already sufficient, additional retrieved text can dilute salient signals, increase cognitive load, and distract the model.

What’s new here 3

  • First empirical evaluation of retrieval-augmented generation specifically for malware explanation using structured VirusTotal reports.
  • Demonstrates that RAG can degrade explanation quality rather than improve it in this domain.
  • Provides concrete design recommendations and a context-sufficiency predictor idea for secure pipelines.