arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2605.27375cs.CL
收藏

LCO:基于LLM的约束优化,用于现实任务中更安全的智能体LLM

LCO: LLM-based Constraint Optimization for Safer Agentic LLMs in Real-world Tasks

East China Normal University(东华大学);Beijing Zhongguancun Academy(北京中关村学院);Tsinghua University(清华大学)

Jiayong Wan, Jiawei Chen, Zhaoxia Yin, Liu Shuyuan, Hang Su

AI总结:

提出LCO框架,通过自思考模块和进化采样模块约束LLM行为,在不微调模型的情况下减少上下文奖励黑客行为,实验表明在输出优化和策略优化场景中显著提升安全性。

摘要:

大型语言模型(LLM)越来越多地充当自主智能体,但它们与环境的持续交互可能导致上下文奖励黑客行为(ICRH),即LLM迭代优化其行为以最大化代理目标,无意中产生有害副作用。现有防御方法不足以应对此风险,因为ICRH并非源于对抗性输入,而是模型自身的过度优化。为缓解此问题,我们提出基于LLM的约束优化(LCO),该框架无需模型微调即可有效减少ICRH。LCO包含两个模块:自思考模块,引导LLM在执行前主动思考并整合潜在安全约束;进化采样模块,利用基于LLM的交叉和变异将模型动作约束在安全解空间内,同时保持任务性能。实验结果表明,LCO在输出优化和策略优化场景中均显著缓解了ICRH。特别是在推文参与度优化任务中,LCO在GPT-4上使毒性增长率(TGR)降低了39%;在策略优化基准上,ICRH发生率降低了15.23%,在不牺牲任务性能的情况下提升了安全性。

英文摘要:

Large Language Models (LLMs) are increasingly acting as autonomous agents, but their continuous interaction with the environment can lead to in-context reward hacking (ICRH), a phenomenon where LLMs iteratively optimize their behavior to maximize proxy objectives, inadvertently producing harmful side effects. Existing defense methods are insufficient to address this risk, as ICRH arises not from adversarial inputs but from the model's own over-optimization. To mitigate this issue, we propose \textbf{LLM-based Constraint Optimization (LCO)}, a framework that effectively reduces ICRH without model fine-tuning. LCO consists of two modules: \textit{self-thought module}, which guides the LLM to proactively deliberate and integrate potential safety constraints before execution; and \textit{evolutionary sampling module}, which employs LLM-based crossover and mutation to constrain the model's actions within a safe solution space while maintaining task performance. Experimental results demonstrate that LCO substantially alleviates ICRH in both output-refine and policy-refine scenarios. In particular, on the tweet engagement optimization task, LCO achieves a 39% reduction in the Toxicity Growth Rate (TGR) on GPT-4, while on the policy optimization benchmark, it reduces the ICRH Occurrence Rate by 15.23%, demonstrating safety improvement without sacrificing task performance.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑