TL;DR
Subtle context poisoning attacks—where reference texts like laws or regulations are maliciously altered in a prompt—can easily trick LLMs into making incorrect compliance decisions. To combat this, the authors introduce Dynamic Epistemic Fallback (DEF), an inference-time defense protocol that uses simple, one-sentence cognitive nudges to trigger "epistemic vigilance" in LLMs. By prompting models to verify the logical consistency and domain norms of the input text, DEF enables them to detect tampered policies, refuse compliance with malicious instructions, and successfully fall back on their internal memorized knowledge.
What Problem Does This Paper Address?
When humans encounter information that directly contradicts their established beliefs or domain knowledge, a suite of cognitive defense mechanisms known as epistemic vigilance kicks in. We automatically question the reliability of the source or the truthfulness of the text.
Large Language Models (LLMs), however, lack this natural skepticism. Because they are heavily optimized to follow instructions and rely on provided context, they suffer from a major vulnerability: context poisoning. In high-stakes automated tasks like legal data privacy compliance, a malicious user can subtly alter a reference text within a prompt—for instance, changing a strict obligation ("shall maintain a record") into an optional permission ("may optionally maintain a record").
Because standard LLMs prioritize contextual information over their own pre-trained memory, they blindly follow these perturbed rules. This leads to false compliance assessments and severe security blind spots. The authors address this gap by engineering a way to make LLMs dynamically question their inputs and fall back on their internal knowledge when a text looks tampered with.
Methods
The authors introduce Dynamic Epistemic Fallback (DEF), a lightweight defense mechanism applied entirely at inference time. Instead of requiring expensive fine-tuning, DEF automatically appends a single-sentence textual cue to policy-related prompts to nudge the model into a state of skepticism.
The protocol defines three escalating levels of vigilance cues:
- General Consistency Cue (DEF 1): Nudges the model to perform a high-level logical check on whether the provided policy fits together consistently.
- Norm Alignment Cue (DEF 2): Directs the model to evaluate if the text lines up with how rules in that specific domain are typically described.
- Memory Prioritization Cue (DEF 3): Explicitly instructs the model to flag wording or consistency mismatches against its own memory and rely on its parametric knowledge if a conflict occurs.
To evaluate DEF, the authors established the Policy Perturbation Framework (PPF). PPF systematically alters legal texts using two compliance-based semantic attacks:
- Authorization Weakening: Relaxing data protection constraints around consent, court orders, and approvals.
- Deontic Norm Weakening: Softening explicit legal obligations or prohibitions into optional actions (e.g., changing "shall" to "may optionally").
Datasets
The framework was evaluated using descriptive, real-world situational compliance scenarios drawn from two datasets:
- GDPRHUB: For testing compliance against the General Data Protection Regulation (GDPR).
- GOLDCOIN: For testing compliance against the Health Insurance Portability and Accountability Act (HIPAA).
The authors filtered these datasets based on policy metadata to match the specific legal sections they systematically perturbed (Articles 5–11 and 31–34 for GDPR; Sections 502, 508, and 512 for HIPAA), resulting in a final evaluation set of 307 instances for GDPR and 272 instances for HIPAA.
Key Insights and Ideas
- Exploiting the Parametric vs. Contextual Conflict: Rather than treating an LLM's tendency to experience knowledge conflicts as a flaw, DEF turns it into a feature. By forcing the model to compare the prompt context against its internal "beliefs" (parametric memory), the model can safely reject poisoned inputs.
- Open Reasoning Models Make Better Skeptics: Models that output their raw, unsummarized reasoning trajectories (like DeepSeek-R1 and Qwen3-30B-Think) are significantly more capable of triggering epistemic vigilance than production models that hide or summarize their Chain-of-Thought (CoT) traces (like GPT-5-Mini). Hiding reasoning steps appears to inadvertently suppress the model's capacity to flag internal logical conflicts.
- Zero-Shot Performance Recovery: Context poisoning attacks typically degrade an LLM's downstream task accuracy. Strikingly, the authors found that triggering epistemic vigilance allows models to ignore the poisoned prompt text and successfully complete the compliance task using their internal memory, effectively recovering lost accuracy without retraining.
Key Results
- Massive Vigilance Gains: Without DEF, frontier LLMs exhibited near-zero epistemic vigilance, blindly following the poisoned text. Introducing DEF provided substantial absolute gains across the board: up to +18.3 points in detection and +22.6 points in refusal for HIPAA, and +22.6 points in detection and +18.9 points in refusal for GDPR.
- DeepSeek-R1 Flawless Detection: When facing Deontic Norm attacks on GDPR text, DeepSeek-R1 paired with the strongest cue (DEF 3) achieved a 100% detection rate and an 83% refusal rate.
- Downstream Accuracy Recovery: As shown in Figure 4, the application of stronger DEF cues creates an arc-like recovery pattern for downstream compliance accuracy. DeepSeek-R1 demonstrated a dramatic 16.2-point accuracy recovery for GDPR, even outperforming its unattacked baseline performance in certain settings.
- Negligible False Positives: When evaluated against perfectly correct, unperturbed policies, the addition of DEF cues caused no statistically significant degradation in standard compliance performance (inducing a minor false positive rate increase of only 0.4 to 2.5 points).
Limitations and Future Work
- Strict Reliance on Rigid, Globally Known Knowledge: DEF operates on the critical assumption that the LLM has already perfectly memorized a singular, correct version of the reference text during its pre-training phase. While this holds true for massive public legal frameworks like GDPR and HIPAA, DEF may fail for highly specific, rapidly changing, or proprietary internal corporate policies where no pre-existing parametric memory exists.
- Vulnerability to Ultra-Subtle Alterations: If a semantic perturbation is exceptionally minor (e.g., changing a word from singular to plural without shifting the legal mandate), the DEF cues might not trigger. However, the authors note that such weak attacks are also less likely to cause severe compliance failures.
- Domain Generalization: The empirical validation in this paper was strictly limited to data privacy laws. The authors point out that exploring how DEF scales to other high-stakes text artifacts, such as medical guidelines or criminal codes, remains an open avenue for future research.
Summary updated