Research in progress · checkpoint results pending

RAI-Gate

Safety post-training and regression evaluation for language models

A safety-training and evaluation pipeline exploring LoRA-based SFT/DPO against untrusted instructions and release gates for harmful content, over-refusal, and bias.

SFT/DPOSafety evaluationJailbreaksIn progress
AN INTERACTIVE WAY INTO THE RESEARCH

Explore this study.

Choose a stage to see the research question, methodology, and evidence. Each stage draws from the project notes below.

01 / QUESTION

What are we trying to understand?

Can post-training improve prompt-injection resistance while preserving useful behavior and fairness?

Click another stage to explore • Read the full study below ↓
Research diagram for RAI-Gate showing LoRA SFT and DPO safety post-training with JailbreakBench, XSTest, and BBQ release gates
System overview for RAI-Gate safety post-training and regression evaluation (research in progress; checkpoint results pending) — open full resolution ↗.

Research question

Can post-training improve prompt-injection resistance while preserving useful behavior and fairness?

Approach

  • Developing SFT/DPO experiments on Qwen2.5-1.5B with PyTorch, Hugging Face TRL, and PEFT/LoRA.
  • Using Microsoft BIPIA prompts for instruction-in-untrusted-content scenarios.
  • Designed comparisons with spotlighting, sandwich prompting, and instruction hierarchy.
  • Implemented a regression-evaluation pipeline using JailbreakBench, XSTest, and BBQ, with paired statistical tests and human-audit design.

Findings & status

  • The safety release-evaluation pipeline and CI tests have been implemented.
  • Full checkpoint comparisons and efficacy results are pending.

This is active research; no completed post-training safety gains are claimed.

Benchmarks & safety release-gate architecture

Safety post-training often trades off against helpfulness through excessive refusals or demographic bias regressions. RAI-Gate treats model release as a multi-dimensional regression gate combining four established evaluation dimensions: indirect prompt-injection resistance (Microsoft BIPIA), jailbreak robustness (JailbreakBench), exaggerated refusal on benign look-alike prompts (XSTest), and social-bias auditing (BBQ), paired with statistical hypothesis testing and LoRA SFT/DPO comparisons against prompt-level mitigations such as spotlighting and instruction hierarchy.

Technical Q&A

Why evaluate XSTest and BBQ alongside JailbreakBench and BIPIA? ▾

Measuring only attack refusal can reward checkpoints that refuse benign requests or amplify demographic stereotypes. Pairing JailbreakBench and BIPIA with XSTest (over-refusal) and BBQ (bias) enforces balanced release gating before a post-trained checkpoint is promoted.

How does post-training defense complement runtime security? ▾

Post-training methods (SFT/DPO and instruction hierarchy) strengthen model-internal adherence to privilege levels, whereas runtime guards such as AgentSentry enforce external execution boundaries at the tool interface.

References