CoolFace
Datasetpublic

andyc03/latent-policy-guard-40k

Latent Policy Guard — Training Set (40k) This is the training distribution for Latent Policy Guard (LPG) — a guardrail model that performs semantic latent deliberation over dynamic safety policies. Each record pairs an indexed policy list and a content snippet with teacher-grounded reasoning over the user's intent and the risk of policy violation, terminating in a compact verdict anchored to violated policy indices. 📄 Paper: LPG: Balancing Efficiency and Policy Reasoning in… See the full description on the dataset page: https://huggingface.co/datasets/andyc03/latent-policy-guard-40k.

sourceHugging Faceotherupdated 4mo agoView on Hugging Face
3likes43downloads
Dataset Card

Latent Policy Guard — Training Set (40k)

This is the training distribution for Latent Policy Guard (LPG) — a guardrail model that performs semantic latent deliberation over dynamic safety policies. Each record pairs an indexed policy list and a content snippet with teacher-grounded reasoning over the user's intent and the risk of policy violation, terminating in a compact verdict anchored to violated policy indices.

  • —📄 Paper: LPG: Balancing Efficiency and Policy Reasoning in Latent Policy Guardrails — arXiv:2605.17329
  • —💻 Code / usage: https://github.com/SaFo-Lab/LatentPolicyGuard
  • —🧮 Records: 40,041  |  Balance: 18,188 safe (45.4%) / 21,853 unsafe (54.6%)

Intended use

This dataset is the training set for the LPG guardrail model. It is meant to be consumed by the training pipeline in the Latent Policy Guard repository:

bash
# in the LPG repo
cd training
hf download andyc03/latent-policy-guard-40k train_data_lpg_40k.jsonl \
    --repo-type dataset --local-dir data

MODEL_PATH=Qwen/Qwen3-4B \
DATA_PATH=data/train_data_lpg_40k.jsonl \
NUM_GPUS=4 \
bash scripts/train.sh

See the repository README for the full training and evaluation instructions.

Schema

Each line is one JSON object:

json
{
  "annotation_input":    "**Safety policies (indexed from 0):**\n0: ...\n1: ...\n**Content to evaluate:**\n<content>",
  "generated_reasoning": "<Intent>...</Intent>\n\n<Risk>...</Risk>\n\n<Output>unsafe, policy 0</Output>",
  "teacher_summaries":   {"intent_summary": "<IntentSummary>...</IntentSummary>", "risk_summary": "<RiskSummary>...</RiskSummary>"}
}

The verdict in <Output> is safe or unsafe, policy N1, N2, ..., where indices refer to the per-record annotation_input policy list.

Composition

SourceOriginRecordsSafe / Unsafe
DynaBenchmontehoover/DynaBench (policy-grounded)13,5005,726 / 7,774
GuardSet-XAI-Secure/PolyGuard (policy-grounded, structured by subdomain)7,4913,796 / 3,695
BeaverTailsPKU-Alignment/BeaverTails8,6004,300 / 4,300
Aegis v2nvidia/Aegis-AI-Content-Safety-Dataset-2.05,0002,500 / 2,500
SaladBenchOpenSafetyLab/Salad-Data (attack-enhanced split)3,0000 / 3,000
Toxic-Chatlmsys/toxic-chat (toxicchat0124)2,0001,616 / 384
XSTest v2natolambert/xstest-v2-copy (over-refusal hard negatives)450250 / 200
Total40,04118,188 / 21,853

The policy-grounded portion (DynaBench + GuardSet-X = 20,991) supplies canonical user–policy–conversation triples. The general-guardrail portion (19,050) draws from five public safety datasets, normalized into the same indexed-policy schema with per-example randomized policy lists. Multi-violation records: 3,374 (8.4%); mean 0.66 violations/record.

How it was built

Two-stage curation: (1) deterministic source→schema templating that pins each record's safe/unsafe label and violated-policy indices to the source dataset's own ground truth; (2) a content-aware teacher LLM (qwen3-32b) that rewrites the <Intent>/<Risk>/<Output> reasoning conditioned on that ground truth. On the policy-grounded portion the verdict and cited indices match source ground truth exactly; on the general portion the teacher rewrite preserves the source verdict in ~99% of records, with minor policy-citation drift on borderline items. Curation principles: taxonomy normalization, per-example policy-list synthesis, and teacher-grounded reasoning generation.

Source datasets & attribution

This dataset is derived from, and redistributes reformatted records from, the following sources. Please cite the originals and comply with each source's license:

  • —DynaBench — https://huggingface.co/datasets/montehoover/DynaBench
  • —GuardSet-X — https://huggingface.co/datasets/AI-Secure/PolyGuard
  • —BeaverTails — https://huggingface.co/datasets/PKU-Alignment/BeaverTails &nbsp;(CC-BY-NC-4.0)
  • —Aegis AI Content Safety v2 — https://huggingface.co/datasets/nvidia/Aegis-AI-Content-Safety-Dataset-2.0 &nbsp;(CC-BY-4.0)
  • —SALAD-Bench / Salad-Data — https://huggingface.co/datasets/OpenSafetyLab/Salad-Data
  • —Toxic-Chat — https://huggingface.co/datasets/lmsys/toxic-chat &nbsp;(CC-BY-NC-4.0)
  • —XSTest v2 — https://huggingface.co/datasets/natolambert/xstest-v2-copy &nbsp;(Röttger et al.)

Licensing

Released as a derived collection under `license: other`. The dataset inherits the licenses of its constituent sources, including non-commercial (CC-BY-NC-4.0) components (BeaverTails, Toxic-Chat). Treat the combined dataset as research / non-commercial use only, and consult each source's original license before any redistribution or commercial use. The LPG code itself is MIT-licensed (see the GitHub repository).

Citation

bibtex
@misc{li2026lpgbalancingefficiencypolicy,
      title={LPG: Balancing Efficiency and Policy Reasoning in Latent Policy Guardrails},
      author={Nanxi Li and Zhengyue Zhao and Chaowei Xiao},
      year={2026},
      eprint={2605.17329},
      archivePrefix={arXiv},
      primaryClass={cs.CR},
      url={https://arxiv.org/abs/2605.17329},
}
andyc03/latent-policy-guard-40k · CoolFace