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

安全博弈:通过约束优化实现黑盒大语言模型的推理时对齐

Safety Game: Inference-Time Alignment of Black-Box LLMs via Constrained Optimization

University of Southampton(南安普顿大学)

Tuan Nguyen, Long Tran-Thanh

AI总结:

提出一种无需重新训练或访问模型内部结构的黑盒安全对齐框架,通过将安全与帮助性的权衡建模为二人零和博弈,并在推理时使用线性规划求解均衡策略,实现了黑盒LLM的安全对齐。

摘要:

确保大语言模型(LLM)遵守安全要求是AI部署中的核心挑战。现有的对齐方法主要在训练期间进行,例如通过微调或基于人类反馈的强化学习,但这些方法成本高昂且不灵活,每当出现新需求时都需要重新训练。最近针对推理时对齐的努力缓解了其中一些限制,但仍然假设可以访问模型内部结构,这在实际中不可行,也不适用于无法访问模型的第三方利益相关者。在这项工作中,我们提出了一种与模型无关的黑盒安全对齐框架,无需重新训练或访问底层LLM架构。作为概念验证,我们解决了在生成安全但无信息的回答与有用但潜在风险的回答之间进行权衡的问题。我们将这一困境建模为一个二人零和博弈,其极小极大均衡捕捉了安全性与帮助性之间的最优平衡。LLM智能体通过推理时使用线性规划求解器计算均衡策略来操作这一框架。我们的结果证明了黑盒安全对齐的可行性,为包括小型组织和资源受限环境中的实体在内的利益相关者提供了一种可扩展且可访问的途径,以在快速演变的LLM生态系统中强制执行安全。

英文摘要:

Ensuring that large language models (LLMs) comply with safety requirements is a central challenge in AI deployment. Existing alignment approaches primarily operate during training, such as through fine-tuning or reinforcement learning from human feedback, but these methods are costly and inflexible, requiring retraining whenever new requirements arise. Recent efforts toward inference-time alignment mitigate some of these limitations but still assume access to model internals, which is impractical, and not suitable for third party stakeholders who do not have access to the models. In this work, we propose a model-independent, black-box framework for safety alignment that does not require retraining or access to the underlying LLM architecture. As a proof of concept, we address the problem of trading off between generating safe but uninformative answers versus helpful yet potentially risky ones. We formulate this dilemma as a two-player zero-sum game whose minimax equilibrium captures the optimal balance between safety and helpfulness. LLM agents operationalize this framework by leveraging a linear programming solver at inference time to compute equilibrium strategies. Our results demonstrate the feasibility of black-box safety alignment, offering a scalable and accessible pathway for stakeholders, including smaller organizations and entities in resource-constrained settings, to enforce safety across rapidly evolving LLM ecosystems.

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

↑