mlsanityData to 14 Oct 2026

Context Reasoner: Incentivizing Reasoning Capability for Contextualized Privacy and Safety Compliance via Reinforcement Learning

arXiv 2505.14585 ↗First posted 20 May 2025cs.CLcited by 8

On the map: LLM reasoning → Reasoning for agents, planning and code

Abstract (arXiv)

While Large Language Models (LLMs) exhibit remarkable capabilities, they also introduce significant safety and privacy risks. Current mitigation strategies often fail to preserve contextual reasoning capabilities in risky scenarios. Instead, they rely heavily on sensitive pattern matching to protect LLMs, which limits the scope. Furthermore, they overlook established safety and privacy standards, leading to systemic risks for legal compliance. To address these gaps, we formulate safety and privacy issues into contextualized compliance problems following the Contextual Integrity (CI) theory. Under the CI framework, we align our model with three critical regulatory standards: GDPR, EU AI Act, and HIPAA. Specifically, we employ reinforcement learning (RL) with a rule-based reward to incentivize contextual reasoning capabilities while enhancing compliance with safety and privacy norms. Through extensive experiments, we demonstrate that our method not only significantly enhances legal compliance (achieving a +8.58% accuracy improvement in safety/privacy benchmarks) but also further improves general reasoning capability. For OpenThinker-7B, a strong reasoning model that significantly outperforms its base model Qwen2.5-7B-Instruct across diverse subjects, our method enhances its general reasoning capabilities, with +2.05% and +8.98% accuracy improvement on the MMLU and LegalBench benchmark, respectively.

Key facts. Cited by 8 papers in the map (data through 14 Oct 2026). Placed in Reasoning for agents, planning and code, one of 17 directions in LLM reasoning. Builds on 36 of its 43 references that are in the map. First posted on arXiv 20 May 2025.

Builds on

36 of 43 references.

References · 36

  1. 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,399
  2. 2022Training language models to follow instructions with human feedbackcited by 15,971
  3. 2017Proximal Policy Optimization Algorithmscited by 15,215
  4. 2023LLaMA: Open and Efficient Foundation Language Modelscited by 14,132
  5. 2020Measuring Massive Multitask Language Understandingcited by 7,963
  6. 2023Universal and Transferable Adversarial Attacks on Aligned Language Modelscited by 3,104
  7. 2021TruthfulQA: Measuring How Models Mimic Human Falsehoodscited by 2,975
  8. 2015Trust Region Policy Optimizationcited by 2,580
  9. 2016Membership Inference Attacks against Machine Learning Modelscited by 2,281
  10. 2023A Survey on Large Language Model based Autonomous Agentscited by 2,242
  11. 2020Extracting Training Data from Large Language Modelscited by 2,189
  12. 2015High-Dimensional Continuous Control Using Generalized Advantage Estimationcited by 2,026
24 more
  1. 2023The Rise and Potential of Large Language Model Based Agents: A Surveycited by 1,439
  2. 2023Jailbreaking Black Box Large Language Models in Twenty Queriescited by 1,420
  3. 2023Math-Shepherd: Verify and Reinforce LLMs Step-by-step without Human Annotationscited by 928
  4. 2021Membership Inference Attacks From First Principlescited by 878
  5. 2018The Secret Sharer: Evaluating and Testing Unintended Memorization in Neural Networkscited by 864
  6. 2023Prompt Injection attack against LLM-integrated Applicationscited by 605
  7. 2023Multi-step Jailbreaking Privacy Attacks on ChatGPTcited by 333
  8. 2017Certified Defenses for Data Poisoning Attackscited by 303
  9. 2020Data Poisoning Attacks Against Federated Learning Systemscited by 275
  10. 2024Personal LLM Agents: Insights and Survey about the Capability, Efficiency and Securitycited by 260
  11. 2023Can LLMs Keep a Secret? Testing Privacy Implications of Language Models via Contextual Integrity Theorycited by 230
  12. 2023How to DP-fy ML: A Practical Guide to Machine Learning with Differential Privacycited by 153
  13. 2024Agent Smith: A Single Image Can Jailbreak One Million Multimodal LLM Agents Exponentially Fastcited by 153
  14. 2020Just How Toxic is Data Poisoning? A Unified Benchmark for Backdoor and Data Poisoning Attackscited by 116
  15. 2024Efficient Adversarial Training in LLMs with Continuous Attackscited by 113
  16. 2023Reinforcement Learning with Human Feedback: Learning Dynamic Choices via Pessimismcited by 69
  17. 2025Can Indirect Prompt Injection Attacks Be Detected and Removed?cited by 52
  18. 2022Privately Fine-Tuning Large Language Models with Differential Privacycited by 39
  19. 2024GoldCoin: Grounding Large Language Models in Privacy Laws via Contextual Integrity Theorycited by 37
  20. 2024Operationalizing Contextual Integrity in Privacy-Conscious Assistantscited by 37
  21. 2024CI-Bench: Benchmarking Contextual Integrity of AI Assistants on Synthetic Datacited by 37
  22. 2024Privacy Checklist: Privacy Violation Detection Grounding on Contextual Integrity Theorycited by 18
  23. 2025Segmenting Text and Learning Their Rewards for Improved RLHF in Language Modelcited by 12
  24. 2024Alignment Studio: Aligning Large Language Models to Particular Contextual Regulationscited by 10

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2025: 3; 2026: 5.

8 papers.

Similar, not cited

Close in wording, no citation either way

  1. 2025Contextual Integrity in LLMs via Reasoning and Reinforcement Learning
  2. 2025PrivaCI-Bench: Evaluating Privacy with Contextual Integrity and Legal Compliance
  3. 20251-2-3 Check: Enhancing Contextual Privacy in LLM via Multi-Agent Reasoning
  4. 2026Safer Policy Compliance with Dynamic Epistemic Fallback
  5. 2025AlphaAlign: Incentivizing Safety Alignment with Extremely Simplified Reinforcement Learning
  6. 2025Position Paper: Rethinking Privacy in RL for Sequential Decision-making in the Age of LLMs
  7. 2026Contextualized Privacy Defense for LLM Agents
  8. 2026PrivAct: Internalizing Contextual Privacy Preservation via Multi-Agent Preference Training