用形式化验证确保大模型智能体不越界,提升医疗等高风险场景安全
VeriGuard: Enhancing LLM Agent Safety via Verified Code Generation
- 分两阶段:离线验证生成可证明安全的行动策略
- 在线监控实时检查每步操作是否符合预设安全规范
- 适合对安全性要求极高的领域如医疗、金融
自主AI智能体在医疗等敏感领域的部署带来安全、隐私和合规风险。这些智能体可能偏离用户目标、违反数据处理政策或遭受对抗攻击。现有系统无法充分解决这一问题。我们提出VeriGuard,一种通过双阶段架构提供大模型智能体形式化安全保证的新框架。第一阶段为离线验证:先明确用户意图以建立精确的安全规范,再合成行为策略,并通过测试与形式化验证确保其符合规范,迭代优化直至正确。第二阶段为在线运行时监控:作为实时监测器,在执行前验证每个提议动作是否符合已验证策略。该设计将耗时的离线验证与轻量在线监控分离,使形式化保证得以实际应用,显著提升大模型智能体的可信度。
原文摘要 · Abstract (English)
The deployment of autonomous AI agents in sensitive domains, such as healthcare, introduces critical risks to safety, security, and privacy. These agents may deviate from user objectives, violate data handling policies, or be compromised by adversarial attacks. Mitigating these dangers necessitates a mechanism to formally guarantee that an agent's actions adhere to predefined safety constraints, a challenge that existing systems do not fully address. We introduce VeriGuard, a novel framework that provides formal safety guarantees for LLM-based agents through a dual-stage architecture designed for robust and verifiable correctness. The initial offline stage involves a comprehensive validation process. It begins by clarifying user intent to establish precise safety specifications. VeriGuard then synthesizes a behavioral policy and subjects it to both testing and formal verification to prove its compliance with these specifications. This iterative process refines the policy until it is deemed correct. Subsequently, the second stage provides online action monitoring, where VeriGuard operates as a runtime monitor to validate each proposed agent action against the pre-verified policy before execution. This separation of the exhaustive offline validation from the lightweight online monitoring allows formal guarantees to be practically applied, providing a robust safeguard that substantially improves the trustworthiness of LLM agents.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。