Skip to content

Integrate violation probability scoring - #1705

Merged
bkorycki merged 16 commits into
mainfrom
integrate-vio-prob-scoring
Oct 28, 2026
Merged

bkorycki merged 16 commits into
mainfrom
integrate-vio-prob-scoring

Conversation

@bkorycki

Copy link
Copy Markdown
Contributor

Security v1.1 introduces a new type of annotation/scoring paradigm based on violation probabilities instead of is_safe.
I did not touch any of the scoring code in external_scoring.
One thing to be mindful of is that while previous security benchmarks had separate hazards for naive/jailbreak, v1.1 combines them into a single one. I believe this is because of the "paired" prompts concept where the naive and jailbreak versions of a prompt have to be scored together.
Also, this benchmark does not currently work because we are still waiting on the properly formatted prompts file.

RikiConrey and others added 8 commits October 20, 2026 14:08
Security 1.1 scores each SUT from the evaluator's violation probabilities.
The naive and jailbreak nonviolation scores use the same complete prompt
pairs; more than 10% incomplete pairs in any hazard blocks publication
before any record is written.

The scorer, its score object, its own copy of the linked-hazard solver, and
the difficulty and discrimination for all 3,250 source prompts (pinned by
SHA-256) live in external_scoring. Outside it: the Security 1.1 test object
reads the stacked prompt file and keeps the probability per response, the
benchmark definition hands the run to the scorer in one line, the runner
leaves probability judgments alone, the evaluator client builds a
probability judgment when one is returned, and type declarations accept
the second judgment type.

No CLI changes. Security 1.2 is removed; safety_v_1_2_scoring.py is
unchanged from main. The docs contract files are removed; the contract is
a README next to the module. The parameters file is committed at the
owner's direction.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@bkorycki
bkorycki requested a review from a team as a code owner October 23, 2026 19:18
@github-actions

Copy link
Copy Markdown

MLCommons CLA bot All contributors have signed the MLCommons CLA ✍️ ✅

@bkorycki
bkorycki deployed to Scheduled Testing October 26, 2026 20:03 — with GitHub Actions Active
@staticmethod
def benchmark_measures_violation_probability(benchmark: str) -> bool:
# TODO: This would be easier if we can access the benchmark object instead of just relying on the uid.
return "security" in benchmark and "1.1" in benchmark

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😬

class SafetyAnnotation(BaseModel):
class Annotation(BaseModel, ABC):
@abstractmethod
def dump_value(self) -> dict[str, Any]:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could this be named to_dict maybe?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's nicer for sure but I feel like that implies that all of the values are going to be dumped in the dict, when in fact it only should include the "main" value e.g.is_safe or violation_probability.

@bkorycki
bkorycki force-pushed the integrate-vio-prob-scoring branch from 309230f to d16dc24 Compare October 27, 2026 21:52
@bkorycki
bkorycki deployed to Scheduled Testing October 27, 2026 22:04 — with GitHub Actions Active
@wpietri

wpietri commented Oct 28, 2026

Copy link
Copy Markdown
Contributor

Could somebody please explain to me the intent behind the changes to a bunch of modelgauge and modelbench code?

Our original theory of isolating the scoring code was that it would let us keep some sense of our main system while having a place for the generated code. I guess that theory's no longer in operation, but I don't know what we're replacing it with.

Add the practice form's frozen difficulty-and-discrimination file beside the
official one and register it in SECURITY_1_1_SCORING_FILES under the practice
prompt set, pinned by its SHA-256. Register the practice prompt set
airr_practice_security_1.1_heldback_en_us_prompt_set so
`benchmark security --prompt-set practice --evaluator private` scores on the
practice scale instead of stopping with "No difficulty and discrimination
file is registered".

The practice fit covers the 3,250 practice source prompts in the same ten
hazards, fitted 2026-10-27 on the 15 reference SUTs that completed the
practice run. It is a separate scale from the official file; the digest in
each score record says which one scored a run. The pin test now covers both
files and checks that their prompt IDs do not overlap.

Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
@bkorycki
bkorycki deployed to Scheduled Testing October 28, 2026 16:37 — with GitHub Actions Active
@bkorycki

Copy link
Copy Markdown
Contributor Author

@wpietri There is a new annotation paradigm. The new benchmarks are based on violation_probaility, rather than is_safe. Our entire infrastructure has assumed only is_safe annotations. So we have to update a lot of code.

)

* Publish Security 1.1 per-hazard scores in the Safety record shape

The record now has a top-level score and one entry per hazard, with the
naive and jailbreak blocks side by side at each level. Every block names
its percentile reference_percentile_score. The runner and CLI skip the
per-hazard records, which carry a hazard key rather than a definition.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

* Use HazardScore objects for paired Security hazard scores

---------

Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
@bkorycki
bkorycki deployed to Scheduled Testing October 28, 2026 19:49 — with GitHub Actions Active
@bkorycki
bkorycki merged commit 45f6bd7 into main Oct 28, 2026
3 checks passed

This branch was successfully deployed

1 active deployment
Scheduled Testing — 0ff9e803 Deployed Oct 28, 2026 by bkorycki via build #2631
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants