HarmonyGuard: Naar Veiligheid en Nuttigheid in Web Agents via Adaptieve Beleidsverbetering en Dual-Doel Optimalisatie
HarmonyGuard: Toward Safety and Utility in Web Agents via Adaptive Policy Enhancement and Dual-Objective Optimization
August 6, 2025
Auteurs: Yurun Chen, Xavier Hu, Yuhan Liu, Keting Yin, Juncheng Li, Zhuosheng Zhang, Shengyu Zhang
cs.AI
Samenvatting
Grote taalmodelen stellen agents in staat om autonoom taken uit te voeren in open webomgevingen. Echter, naarmate verborgen bedreigingen op het web evolueren, worden webagents geconfronteerd met de uitdaging om taakprestaties te balanceren met opkomende risico's tijdens langdurige operaties. Hoewel deze uitdaging cruciaal is, blijft het huidige onderzoek beperkt tot enkelvoudige doeloptimalisatie of scenario's met één beurt, en ontbreekt het aan de mogelijkheid voor gezamenlijke optimalisatie van zowel veiligheid als nut in webomgevingen. Om deze kloof te overbruggen, stellen we HarmonyGuard voor, een multi-agent samenwerkingsframework dat gebruikmaakt van beleidsverbetering en doeloptimalisatie om zowel nut als veiligheid gezamenlijk te verbeteren. HarmonyGuard beschikt over een multi-agent architectuur die wordt gekenmerkt door twee fundamentele capaciteiten: (1) Adaptieve Beleidsverbetering: We introduceren de Policy Agent binnen HarmonyGuard, die automatisch gestructureerde beveiligingsbeleidsregels extraheert en onderhoudt uit ongestructureerde externe documenten, terwijl het beleid continu wordt bijgewerkt in reactie op evoluerende bedreigingen. (2) Duale Doeloptimalisatie: Gebaseerd op de dubbele doelstellingen van veiligheid en nut, voert de Utility Agent die is geïntegreerd in HarmonyGuard Markoviaanse real-time redenering uit om de doelstellingen te evalueren en maakt gebruik van metacognitieve capaciteiten voor hun optimalisatie. Uitgebreide evaluaties op meerdere benchmarks tonen aan dat HarmonyGuard de naleving van beleid met tot 38% verbetert en de taakvoltooiing met tot 20% ten opzichte van bestaande baselines, terwijl het een naleving van beleid van meer dan 90% behaalt voor alle taken. Ons project is hier beschikbaar: https://github.com/YurunChen/HarmonyGuard.
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.