Leveraging RAG for Privacy Violation Detection and Explainability
In today’s digital landscape, users frequently share vast amounts of information, including confidential data, often without full awareness of the associated privacy risks. This scenario highlights the need for automated methods to identify sensitive information and alert users to such risks. Existing algorithmic solutions for detecting sensitive content typically require either human intervention (rule-based approaches) or labeled data (supervised learning), both of which can be costly and limiting. In this paper, we propose a framework based on Retrieval-Augmented Generation (RAG) to classify privacy-sensitive content while providing contextual explanations. We employed the state-of-the-art generative Large Language Model (LLM) GPT-4o, with Information Retrieval models BM25 and FAISS, enhancing both detection accuracy and explainability. Our method utilizes a curated Knowledge Base of scientific literature on privacy and confidentiality to retrieve contextually relevant information, which is then used to guide the classification process and generate explanations. Experimental evaluations on a real-world dataset (Enron Email Dataset) demonstrate that RAG-based approaches significantly outperform the zero-shot baseline, with BM25 showing the highest performance. This tool is designed to serve end-users, by mitigating risks before data sharing, by enabling proactive monitoring of privacy violations.
Authors
- Luigi Di (ORCID: https://orcid.org/0000-0002-7570-637X)
- Marco Viviani (ORCID: https://orcid.org/0000-0002-2274-9050)
- Giovanni Livraga (ORCID: https://orcid.org/0000-0003-2661-8573)
- Stefano Locci (ORCID: https://orcid.org/0009-0006-9725-2045)
Institutions
- Universitat Autònoma de Barcelona (ES)
- University of Milan (IT)
- University of Turin (IT)
- University of Milano-Bicocca (IT)
Publication Details
- Published
- 2025-06-30
- DOI
- https://doi.org/10.1109/ijcnn64981.2025.11228403
- Primary Topic
- Explainable Artificial Intelligence (XAI)
- Type
- article
- Field-Weighted Citation Impact
- 0.00