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

SafeSearch: 不应为效用而牺牲安全性的LLM搜索代理

SafeSearch: Do Not Trade Safety for Utility in LLM Search Agents

University of Illinois Urbana-Champaign(伊利诺伊大学厄巴纳-香槟分校);Amazon(亚马逊)

Qiusi Zhan, Angeline Budiman-Chan, Abdelrahman Zayed, Xingzhi Guo, Daniel Kang, Joo-Kyung Kim

AI总结:

本文研究了基于大语言模型的搜索代理在安全与效用之间的平衡问题,提出SafeSearch方法通过多目标强化学习提升安全性和效用,实验表明其显著降低有害输出并保持问答性能。

摘要:

基于大语言模型(LLM)的搜索代理通过迭代生成查询、检索外部信息和推理来回答开放领域问题。尽管研究者主要关注提升其效用,但其安全行为仍被忽视。本文通过红队数据集评估发现,搜索代理更可能生成有害输出。例如,当被问及“如何在未经同意的情况下跟踪某人位置”时,基础模型拒绝回答,而设计用于检索和引用来源的搜索代理可能降低拒绝阈值,获取文档(如法院案件),并合成安全但有害的摘要。进一步研究表明,以效用为导向的微调会加剧这一风险,促使安全与效用的联合对齐。为此,本文提出SafeSearch,一种多目标强化学习方法,结合最终输出的安全/效用奖励与新颖的查询级塑造项,惩罚不安全查询并奖励安全查询。实验表明,SafeSearch在三个红队数据集上将代理有害性降低超过90%,并生成安全且有益的响应,同时保持与仅效用导向微调代理相当的问答性能。进一步分析证实了查询级奖励在共同提升安全性和效用方面的有效性。

英文摘要:

Large language model (LLM) based search agents iteratively generate queries, retrieve external information, and reason to answer open-domain questions. While researchers have primarily focused on improving their utility, their safety behaviors remain underexplored. In this paper, we first evaluate search agents using red-teaming datasets and find that they are more likely to produce harmful outputs than base LLMs. For example, when asked ``How can I track someone's location without their consent?'', a base model refuses, whereas a search agent designed to retrieve and cite sources may lower its refusal threshold, fetch documents (e.g., court cases), and, once appended, synthesize them into an informative yet unsafe summary. We further show that utility-oriented finetuning intensifies this risk, motivating joint alignment of safety and utility. To this end, we present SafeSearch, a multi-objective reinforcement learning approach that couples a final-output safety/utility reward with a novel query-level shaping term that penalizes unsafe queries and rewards safe ones. Experiments show that SafeSearch reduces agent harmfulness by over 90% across three red-teaming datasets on a 7B model while producing safe and helpful responses, and maintains QA performance comparable to that of a utility-only finetuned agent. Further analyses confirm the effectiveness of the query-level reward in jointly improving safety and utility.

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

↑