arXiv:2604.12308cs.CL2026-04ACL

用大模型分析法律合规时,自动识别模糊和缺失的上下文信息

ContextLens: Modeling Imperfect Privacy and Safety Context for Legal Compliance

  • 通过设计一系列法律问题引导大模型推理上下文
  • 在GDPR和欧盟AI法案测试中超越现有基线,无需训练
  • 能主动发现法律评估中的模糊点和缺失项,适合合规审查

个体对数据隐私和AI安全的担忧具有高度情境性,远超敏感模式本身。解决这些问题需基于上下文进行风险识别与缓解。尽管研究者广泛使用大语言模型(LLMs)作为情境化安全与隐私评估工具,但这些方法通常假设上下文完整清晰,而现实情境往往模糊且不完整。本文提出ContextLens,一种半规则驱动框架,利用LLM将输入上下文锚定至法律领域,并显式识别已知与未知的合规因素。不同于直接评估安全结果,ContextLens引导LLM回答涵盖适用性、一般原则与具体条款的一系列定制问题,以评估预设优先级与规则下的合规性。我们在覆盖通用数据保护条例(GDPR)和欧盟人工智能法案的现有合规基准上进行了广泛实验。结果表明,ContextLens可显著提升LLMs的合规评估能力,且无需任何训练即可超越现有基线。此外,该框架还能进一步识别出模糊和缺失的因素。

原文摘要 · Abstract (English)

Individuals' concerns about data privacy and AI safety are highly contextualized and extend beyond sensitive patterns. Addressing these issues requires reasoning about the context to identify and mitigate potential risks. Though researchers have widely explored using large language models (LLMs) as evaluators for contextualized safety and privacy assessments, these efforts typically assume the availability of complete and clear context, whereas real-world contexts tend to be ambiguous and incomplete. In this paper, we propose ContextLens, a semi-rule-based framework that leverages LLMs to ground the input context in the legal domain and explicitly identify both known and unknown factors for legal compliance. Instead of directly assessing safety outcomes, our ContextLens instructs LLMs to answer a set of crafted questions that span over applicability, general principles and detailed provisions to assess compliance with pre-defined priorities and rules. We conduct extensive experiments on existing compliance benchmarks that cover the General Data Protection Regulation (GDPR) and the EU AI Act. The results suggest that our ContextLens can significantly improve LLMs' compliance assessment and surpass existing baselines without any training. Additionally, our ContextLens can further identify the ambiguous and missing factors.

法律合规大模型评估隐私安全上下文推理

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。