potentialpaper

Turning Shields into Swords: Leveraging Safety Policies for LLM Safety Testing

Xiaoyue Lu, XIANGLIN YANG, Haijun Liu, Kuntai Cai, Meiyi An, Jun Yuan, Yan XIAO, Jin Song Dong

ICLR 2026 submission

Edit this page

Or clone it with git

The page gets its repository with its first edit, so start in the web editor.

Or let your agent set it up

It checks and sets up everything: signing in, git, the clone, credentials and an SSH key.

Abstract. The widespread integration of Large Language Models (LLMs) necessitates robust safety evaluation. However, current paradigms like manual red-teaming and static benchmarks are expensive, non-systematic, and fail to provide verifiable coverage of safety policies. To address these limitations, we introduce a novel framework that brings the rigor of specification-based software testing to AI safety. Our approach systematically generates harmful test cases by first compiling natural-language safety policies into a formal, first-order logic expression. This formal structure is used to construct a semantic graph where violation scenarios manifest as traversable subgraphs. By employing graph sampling, we systematically discover a diverse range of policy violations. These abstract scenarios are then instantiated into concrete, natural language queries using a generator LLM, a process that is automatic and flexibly adaptive to new domains. We demonstrate through experiments that our framework achieves higher policy coverage and generates more effective and interpretable test cases compared to established red-teaming baselines. By bridging formal methods and AI safety, our work provides a principled, scalable, and automated approach to ensuring LLMs adhere to safety-critical policies.

Are you an author? Claim this paper to see who's reading it, with views and other statistics, and to write about it here.

Claim this paper
How does this paper connect to your work? Write how you built on it, compared with it or reproduced it, or add a summary, a critique or errata.
Or make it interactive:
Start writing

add · history

No versions are recorded yet: its preprint, the venues it went to and what they decided, the camera-ready. Missing a version?

We don't know of a submission of this paper to a venue with open reviews. Missing a submission?

Loading the discussion…