arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2605.24883cs.AIcs.CRcs.SE
收藏

反转盾牌:从策略规范中系统生成安全测试

Inverting the Shield: Systematically Generating Safety Tests from Policy Specifications

Shenzhen Campus of Sun Yat-sen University(中山大学深圳校区);National University of Singapore(新加坡国立大学);Independent Researcher(独立研究者)

Xiaoyue Lu, Xianglin Yang, Haijun Liu, Jiahao Liu, Kuntai Cai, Yan Xiao, Jin Song Dong

AI总结:

提出POLARIS框架,通过将非结构化自然语言策略编译为一阶逻辑表示并构建语义策略图,实现覆盖驱动的可重复安全测试,相比基线方法提高了策略覆盖率和攻击成功次数。

摘要:

大型语言模型(LLMs)的广泛集成需要严格且系统的安全评估。现有范式要么依赖构建的基准从预定义角度评估安全性,要么采用动态红队探测潜在漏洞。虽然有效,但这些方法面临挑战,因为它们严重依赖专家领域知识,提供的系统保证有限,且容易快速过时。为解决这些限制,我们引入了一个新颖框架POLARIS,将基于规范的软件测试的严谨性引入AI安全。POLARIS首先将非结构化自然语言策略编译为一阶逻辑(FOL)表示,建立高层规则与具体测试用例之间的可追溯链接。这种形式化使得能够构建语义策略图,其中复杂的策略违规场景被编码为可遍历路径。通过系统地探索该图,POLARIS发现组合违规模式,然后将其实例化为可执行的自然语言测试查询,实现覆盖驱动且可重复的安全测试。实验表明,与已建立的基线相比,POLARIS实现了更高的策略覆盖率和攻击成功次数。关键是,通过连接形式化方法和AI安全,POLARIS提供了一种有原则的自动化方法,确保LLMs遵守安全关键策略,并具有可验证的可追溯性。我们在https://github.com/huac-lxy/POLARIS发布代码。

英文摘要:

The widespread integration of Large Language Models (LLMs) necessitates rigorous and systematic safety evaluation. Existing paradigms either rely on constructed benchmarks to assess safety from predefined perspectives, or employ dynamic red-teaming to probe potential vulnerabilities. While effective, these approaches face challenges, as they depend heavily on expert domain knowledge, offer limited systematic guarantees, and are vulnerable to rapid obsolescence. To address these limitations, we introduce a novel framework POLARIS that brings the rigor of specification-based software testing to AI safety. POLARIS first compiles unstructured natural-language policies into First-Order Logic (FOL) representations, establishing a traceable link between high-level rules and concrete test cases. This formalization enables the construction of a Semantic Policy Graph, where complex policy violation scenarios are encoded as traversable paths. By systematically exploring this graph, POLARIS uncovers compositional violation patterns, which are then instantiated into executable natural-language test queries, enabling coverage-driven and reproducible safety testing. Experiments demonstrate that POLARIS achieves higher policy coverage and attack success counts compared to established baselines. Crucially, by bridging formal methods and AI safety, POLARIS provides a principled, automated approach to ensuring LLMs adhere to safety-critical policies with verifiable traceability. We release our code at https://github.com/huac-lxy/POLARIS.

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

↑