Table of Contents
Fetching ...

LLM Access Shield: Domain-Specific LLM Framework for Privacy Policy Compliance

Yu Wang, Cailing Cai, Zhihua Xiao, Peifung E. Lam

TL;DR

This work introduces LLM Access Shield, a domain-specific framework that enforces privacy policy compliance during LLM interactions by combining a domain-specific DLMS for privacy risk detection with a Sensitive Data Anonymizer that applies Format-Preserving Encryption to protect sensitive tokens. It deploys both supervised fine-tuning (SFT) and reinforcement fine-tuning (RFT) with an analyze-then-decide paradigm, including curriculum learning to improve multi-level policy compliance across safety, category, and entity extraction tasks. The framework supports real-time policy adaptation via prompting to handle non-taxonomy policies and demonstrates that FPE preserves semantic utility while ensuring format integrity for downstream processing. Empirical results show strong performance in privacy-risk detection and policy compliance, improved generalization through prompting, and practical utility preservation, making it suitable for high-assurance domains like finance, healthcare, and law. Challenges remain in optimizing reward designs to balance false positives/negatives in entity-level tasks and extending response-filtering mechanisms for secure LLM outputs.

Abstract

Large language models (LLMs) are increasingly applied in fields such as finance, education, and governance due to their ability to generate human-like text and adapt to specialized tasks. However, their widespread adoption raises critical concerns about data privacy and security, including the risk of sensitive data exposure. In this paper, we propose a security framework to enforce policy compliance and mitigate risks in LLM interactions. Our approach introduces three key innovations: (i) LLM-based policy enforcement: a customizable mechanism that enhances domain-specific detection of sensitive data. (ii) Dynamic policy customization: real-time policy adaptation and enforcement during user-LLM interactions to ensure compliance with evolving security requirements. (iii) Sensitive data anonymization: a format-preserving encryption technique that protects sensitive information while maintaining contextual integrity. Experimental results demonstrate that our framework effectively mitigates security risks while preserving the functional accuracy of LLM-driven tasks.

LLM Access Shield: Domain-Specific LLM Framework for Privacy Policy Compliance

TL;DR

This work introduces LLM Access Shield, a domain-specific framework that enforces privacy policy compliance during LLM interactions by combining a domain-specific DLMS for privacy risk detection with a Sensitive Data Anonymizer that applies Format-Preserving Encryption to protect sensitive tokens. It deploys both supervised fine-tuning (SFT) and reinforcement fine-tuning (RFT) with an analyze-then-decide paradigm, including curriculum learning to improve multi-level policy compliance across safety, category, and entity extraction tasks. The framework supports real-time policy adaptation via prompting to handle non-taxonomy policies and demonstrates that FPE preserves semantic utility while ensuring format integrity for downstream processing. Empirical results show strong performance in privacy-risk detection and policy compliance, improved generalization through prompting, and practical utility preservation, making it suitable for high-assurance domains like finance, healthcare, and law. Challenges remain in optimizing reward designs to balance false positives/negatives in entity-level tasks and extending response-filtering mechanisms for secure LLM outputs.

Abstract

Large language models (LLMs) are increasingly applied in fields such as finance, education, and governance due to their ability to generate human-like text and adapt to specialized tasks. However, their widespread adoption raises critical concerns about data privacy and security, including the risk of sensitive data exposure. In this paper, we propose a security framework to enforce policy compliance and mitigate risks in LLM interactions. Our approach introduces three key innovations: (i) LLM-based policy enforcement: a customizable mechanism that enhances domain-specific detection of sensitive data. (ii) Dynamic policy customization: real-time policy adaptation and enforcement during user-LLM interactions to ensure compliance with evolving security requirements. (iii) Sensitive data anonymization: a format-preserving encryption technique that protects sensitive information while maintaining contextual integrity. Experimental results demonstrate that our framework effectively mitigates security risks while preserving the functional accuracy of LLM-driven tasks.

Paper Structure

This paper contains 40 sections, 5 equations, 3 figures, 11 tables.

Figures (3)

  • Figure 1: LLM Access Shield: System Infrastructure.
  • Figure 2: Simplified Workflow of LLM Access Shield.
  • Figure A.1: Sample LLM responses to unencrypted and FPE-encrypted prompts. The text "(its FPE Ciphertext: ...)" shown in the LLM responses on the right is included for demonstration purposes only and would not be visible to the end user.