arXiv:2508.04010cs.CLcs.AI2025-08被引 11

让网页智能体在安全与效率间自动平衡,提升长期任务可靠性。

HarmonyGuard: Toward Safety and Utility in Web Agents via Adaptive Policy Enhancement and Dual-Objective Optimization

  • 引入自适应策略增强,动态更新安全规则应对网络威胁
  • 双目标优化使任务完成率提升20%,策略合规率达90%以上
  • 适合需要长期自主操作的智能体系统开发者使用

大型语言模型使智能体能在开放网络环境中自主执行任务。然而,随着网络隐性威胁的演变,智能体在长序列操作中面临任务性能与新兴风险之间的平衡挑战。现有研究多局限于单目标优化或单轮场景,缺乏在网页环境中协同优化安全与效用的能力。为此,我们提出HarmonyGuard,一个基于策略增强与双目标优化的多智能体协作框架,通过两大核心能力联合提升安全性和效用:(1) 自适应策略增强:引入策略智能体,从非结构化外部文档中自动提取并维护结构化安全策略,并随威胁演化持续更新;(2) 双目标优化:基于安全与效用双重目标,效用智能体执行马尔可夫式实时推理,评估并利用元认知能力进行优化。在多个基准上的大量实验表明,HarmonyGuard相较现有基线在策略合规性上最高提升38%,任务完成率最高提升20%,且所有任务中策略合规率均超过90%。项目地址:https://github.com/YurunChen/HarmonyGuard。

原文摘要 · Abstract (English)

Large language models enable agents to autonomously perform tasks in open web environments. However, as hidden threats within the web evolve, web agents face the challenge of balancing task performance with emerging risks during long-sequence operations. Although this challenge is critical, current research remains limited to single-objective optimization or single-turn scenarios, lacking the capability for collaborative optimization of both safety and utility in web environments. To address this gap, we propose HarmonyGuard, a multi-agent collaborative framework that leverages policy enhancement and objective optimization to jointly improve both utility and safety. HarmonyGuard features a multi-agent architecture characterized by two fundamental capabilities: (1) Adaptive Policy Enhancement: We introduce the Policy Agent within HarmonyGuard, which automatically extracts and maintains structured security policies from unstructured external documents, while continuously updating policies in response to evolving threats. (2) Dual-Objective Optimization: Based on the dual objectives of safety and utility, the Utility Agent integrated within HarmonyGuard performs the Markovian real-time reasoning to evaluate the objectives and utilizes metacognitive capabilities for their optimization. Extensive evaluations on multiple benchmarks show that HarmonyGuard improves policy compliance by up to 38% and task completion by up to 20% over existing baselines, while achieving over 90% policy compliance across all tasks. Our project is available here: https://github.com/YurunChen/HarmonyGuard.

智能体安全双目标优化自适应策略

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