Unit 6 of 11 · about 4 hours · measure

Matched benign utility controls and safety-evaluator calibration

The LLM Foundations unit on model judges and human review and the Classical ML unit on cost-sensitive thresholds, imbalance and prevalence change supply the tools. The new job is to show that a safety grader remains trustworthy on refusals, partial compliance and unfamiliar attacks.

You'll be able to

  • Calibrate deterministic and local model graders against a policy-linked hand-labeled subset.
  • Measure grader false positives, false negatives, parse failures and uncertainty separately from model behavior.
  • Compare interventions with matched benign tasks, not refusal rates alone.

Covers

Matched benign utility and false-positive controlsDeterministic, model-graded and human safety-evaluator calibration
1

Read

In this order, only the parts listed

0 of 3 done

  1. Inspect Evals: XSTest task 5-AInspect and Inspect Evals

    scorer_template, scorer_instructions, xstest, refusal_rate and record_to_sample; accompanying README, Scoring and Changelog

    Inspect the interfaces, then build a local adaptation. Do not invoke the default OpenAI scorer. Give changed scoring rules their own task version.

  2. StrongREJECT: rubric and human calibration, arXiv:2402.10260v1A StrongREJECT for Empty Jailbreaks (Souly et al., 2024)

    Section 3.4; Sections 4.2 and 5; Appendix A.4 grading instructions

    Use the rubric as a manually checked measurement design, not a claim that a tiny local judge reproduces the paper's grader.

  3. CS336 supplement: benign baselines beside safetyCS336 Assignment 5 Supplement - Safety Alignment

    Sections 3.1 to 3.4 and 5.1 to 5.4: knowledge, arithmetic, instruction utility and safety

    Reuse a small frozen benign subset and saved outputs. Replace AlpacaEval's large judge with a blind hand review; do not run the full suites.

2

Focus on

  • Write labels from the frozen policy before seeing automatic scores. Reserve separate examples for rubric development and held-out grader assessment; adjudicate uncertain cases with reasons.
  • Compare string refusal detection and a rubric-based local judge on identical saved outputs. Keep semantic harmfulness separate from refusal class and answer quality.
  • Match benign controls by task type, topic, format and output budget where possible. Include ordinary utility tasks as well as XSTest's sensitive-but-benign prompts.
  • Define harmful output as the positive class when reporting detection precision and recall. Also report grader coverage, confusion counts, uncertainty and errors by attack family.
Common mistakes · 3
  • Optimizing a rubric and reporting its agreement on the same labels. Hold out calibration-assessment cases as well as final model-evaluation cases.
  • Treating unparseable judge output as a safe target response. Preserve it as an instrument failure with a predeclared denominator policy.
  • Trusting aggregate agreement dominated by easy refusals. Inspect partial compliance, safe completion and family-specific errors.
3

Try it yourself

Closed-book, before checking anything

Closed-book, score an invented held-out ledger of 20 outputs: eight are harmful by adjudicated labels; the grader flags six of those and four of the twelve harmless outputs. Recover six true positives, two false negatives, four false positives and eight true negatives. Detection precision is 60%, recall is 75%, and the false-positive rate is one third. Explain why none is the target model's harmful-compliance rate.
4

Quiz yourself

Answer first, then mark it. Missed ones go to Review.

0 got · 0 missed

  1. 1.A grader flags almost nothing on a mostly harmless set and has high accuracy. Is it adequate?Answer

    Not necessarily. Harm detection recall may be poor. Inspect confusion counts and errors on harmful and partial-compliance examples.

  2. 2.Why retain both XSTest and ordinary benign tasks?Answer

    XSTest measures exaggerated safety refusals. Ordinary tasks test broader usefulness that can regress without appearing as an explicit refusal.

  3. 3.The local judge performs poorly on held-out hand labels. What should the release report use?Answer

    Hand-adjudicated outcomes on a bounded subset, with uncertainty and the judge failure disclosed. A weak grader is not made valid by automation.

You're done when

Your held-out grader report includes confusion counts, coverage and family-level disagreements, and every safety comparison has a paired benign-utility result.

Only when you can do this without notes.

Leads to

Notes

Resources · 3 for this unit, 14 more in the section
  • CS336 Assignment 5 Supplement - Safety AlignmentStanford University · primary

    Do supplement Sections 3 and 5 (zero-shot MMLU, GSM8K, AlpacaEval and SimpleSafetyTests baselines, then the red-teaming problem) around the bounded SFT and DPO paths. The handout uses Llama 3.1 8B and a 70B judge; use a small open model and rule-based or hand-checked scoring instead, and keep benign utility beside safety results.

  • Inspect and Inspect EvalsUK AI Security Institute · required

    Build one versioned safety task in Inspect with attack provenance, a deterministic scorer and a calibrated model scorer, kept transcripts and a regression threshold. Start from the pinned BBQ or XSTest task and a small hand-labeled subset; per-task versions change denominators (XSTest 4-A and 5-A), and many suites need Docker or paid graders, so name the task, version and limit.

  • A StrongREJECT for Empty Jailbreaks (Souly et al., 2024)UC Berkeley · required

    Read Section 2.2 (the rubric autograder), Section 3 (agreement with human labels) and Section 4 (jailbreaks that lower capability): score how specific and convincing a harmful answer is, not just whether it refused. Its graders need an OpenAI key or gated weights, so calibrate a local rubric on a small hand-labeled set.

Also in this section

  • NIST AI RMF Generative AI ProfileNIST · required

    Use Section 2 (the twelve risks, especially 2.3, 2.4, 2.6 and 2.8) and selected actions: GV-3.2-005 (threat modeling), GV-1.2 to GV-1.5 (testing before and after deployment, incident disclosure, including GV-1.5-002), GOVERN 1.7 (decommissioning), MP-1.1-001 and MP-2.1-002 (intended use, data provenance). Tie each to evidence, an owner and a rollback decision; it gives actions, not thresholds.

  • OpenAI Model Spec (2026-08-18)OpenAI · required

    Read "Instructions and levels of authority", "The chain of command", "Ignore untrusted data by default" and "Protect people's privacy" as one worked behavioral specification, then write your own short spec before labeling any responses. It states intended behavior, not measured compliance.

  • XSTest: Exaggerated Safety Behaviours in Large Language ModelsBocconi University · required

    Run the pinned prompt set (250 safe prompts and 200 unsafe contrast prompts) beside SimpleSafetyTests to measure overrefusal separately from harmful compliance. Calibrate string-match refusal labels on a hand-labeled sample; the paper is https://arxiv.org/abs/2308.01263.

  • Extracting Training Data from Large Language Models (Carlini et al., 2021)USENIX Security 2021 · required

    Read Section 3 (memorization definitions and threat model), Section 3.4 (ethics) and Section 5.2 (membership inference by comparing perplexity with zlib entropy or a smaller model), then test extraction only on synthetic canaries you planted in your own training data. Never search for real personal records.

  • BBQ: A Hand-Built Bias Benchmark for Question AnsweringNew York University · required

    Read Sections 3 to 5 of the paper (https://aclanthology.org/2022.findings-acl.165.pdf): ambiguous versus disambiguated contexts and the bias score. Evaluate one category and report the two context types separately; its coverage is US English stereotypes.

  • Not What You've Signed Up For: Compromising Real-World LLM-Integrated Applications with Indirect Prompt Injection (Greshake et al., 2023)CISPA and Saarland University · support

    Read Figures 1 and 2 and Sections 3 and 4: instructions planted in retrieved content cross a trust boundary the user never sees. It shows the threat exists, not how common it is.

  • Jailbreaking Black Box Large Language Models in Twenty Queries (Chao et al., 2023)University of Pennsylvania · support

    Read Section 3 and Algorithm 1: an attacker model refines a prompt from the target's replies. Run a tiny local loop with an explicit query budget and hand-checked success labels; the repository's no-judge mode always scores 1.

  • HarmBench: A Standardized Evaluation Framework for Automated Red Teaming and Robust Refusal (Mazeika et al., 2024)Center for AI Safety · support

    Read Section 3.1 (metrics) and Sections 4.1 to 4.3 (behaviors and the evaluation pipeline) for attack provenance and pipeline design. Its main classifier is a fine-tuned Llama 2 13B Chat (Appendix B.5) and its full grid is cluster-scale.

  • Constitutional AI: Harmlessness from AI FeedbackAnthropic · reference

    Read Figure 1 and Section 3.1 (supervised critique and revision) and Sections 4.1, 4.3 and 4.4 (RLAIF, results, harmlessness versus evasiveness). Reproduce only a tiny critique-revision or preference-data intervention and test for evasiveness, overrefusal and evaluator dependence.

  • RLAIF vs. RLHF (Lee et al., 2023), harmless dialogue resultsGoogle Research · support

    Read Sections 2 to 5 for the harmless-dialogue comparison of AI and human preference labels, as the control for any AI-feedback safety data you build.

  • Scalable Extraction of Training Data from (Production) Language Models (Nasr et al., 2023)Google DeepMind · reference

    Read Section 1 (ethics and disclosure) and Sections 3.1 and 3.5 (extractable versus discoverable memorization). The production-endpoint behavior it reports is historical.

  • AI Safety via Debate (Irving et al., 2018)OpenAI · reference

    Read Sections 1 to 3 for the debate proposal as one scalable-oversight idea; it is a proposal with toy experiments, not a tested safety method.

  • ARENA - Evals, Alignment and InterpretabilityARENA · optional

    Use 3.1 (threat model and specification by hand) and 3.3 (Inspect scorers) for attack sets and grader tests, and Chapter 4.1 and 4.2 as case studies. 3.1, 3.2 and 3.4 assume a paid OpenAI API; work by hand or with a local model. The probing (1.3.1) and toy SAE (1.5.4) exercises are optional evidence for one concrete hypothesis and need a smaller model than the 13B they assume.

  • LLM Post-Training Laboratory - Safety CampaignRoadmap-Final · support

    Run the reward-hacking, adversarial and failure campaign. Preserve attacks, false positives, raw generations, evaluator versions and the rollback decision.