principle-bench / README.md
dipankarsarkar's picture
Publish principle-bench from ds-hf
71363f6 verified
|
Raw History Blame Contribute Delete
12.4 kB
metadata
license: cc-by-4.0
language:
  - en
pretty_name: >-
  Principle-Bench: A Four-Axis Benchmark for LLM-as-Judge in Principle-Based
  Regulation
size_categories:
  - 1K<n<10K
task_categories:
  - text-classification
tags:
  - llm-as-judge
  - regulatory-compliance
  - financial-regulation
  - fca
  - robustness
  - calibration
  - adversarial
  - benchmark
dataset_info:
  - config_name: benchmark
    features:
      - name: id
        dtype: string
      - name: split
        dtype: string
      - name: principle_id
        dtype: string
      - name: expected_verdict
        dtype: string
      - name: text
        dtype: string
      - name: channel
        dtype: string
      - name: product
        dtype: string
      - name: audience
        dtype: string
      - name: notes
        dtype: string
      - name: seed_id
        dtype: string
      - name: source_id
        dtype: string
      - name: adversarial_target
        dtype: string
      - name: exemplars_inserted
        dtype: string
      - name: generation_payload
        dtype: string
      - name: paraphrase_payload
        dtype: string
configs:
  - config_name: benchmark
    default: true
    data_files:
      - split: original
        path: data/benchmark/original.jsonl
      - split: paraphrase
        path: data/benchmark/paraphrase.jsonl
      - split: adversarial
        path: data/benchmark/adversarial.jsonl
      - split: boundary
        path: data/benchmark/boundary.jsonl
  - config_name: predictions
    data_files:
      - split: train
        path: data/predictions.jsonl
  - config_name: judge_traces
    data_files:
      - split: train
        path: data/judge_traces/*.jsonl
  - config_name: metrics
    data_files:
      - split: train
        path: data/metrics.jsonl
  - config_name: judge_agreement
    data_files:
      - split: train
        path: data/judge_agreement.jsonl
  - config_name: per_cluster_auc
    data_files:
      - split: train
        path: data/per_cluster_auc.jsonl
  - config_name: runs
    data_files:
      - split: train
        path: data/runs.jsonl
  - config_name: seeds
    data_files:
      - split: train
        path: data/seeds.jsonl

Principle-Bench

Data for A Four-Axis Trustworthiness Benchmark for LLM-as-Judge in Principle-Based Regulation, Dipankar Sarkar. SeT-LLM @ KDD 2026 (2nd Workshop on Secure and Trustworthy Large Language Models), non-archival.

Paper: https://arxiv.org/abs/2608.14329

Code and paper source: github.com/sarkar-dipankar/principle-bench (this package is built from commit a2e47ae; the data is unchanged since 3e6c02f).

The idea

Some rules are not predicates. "Fair, clear and not misleading." "Deliver good outcomes for retail customers." You cannot write an if for them.

So people hand them to an LLM judge. We argue a judge like that has to be measured on four axes, not one:

  1. Accuracy on ordinary inputs.
  2. Paraphrase robustness. Same compliance issue, different words.
  3. Adversarial robustness. The right keywords stuffed into a bad promotion.
  4. Calibration. Does 0.9 confidence mean 90%?

Across six methods, no method wins all four.

The headline

The 120B open-weight LLM judge (gpt-oss:120b) is the strongest method on benign inputs. On the UK Consumer Duty principle it scores 0.7447 accuracy on original (n=47). On keyword-stuffed adversarial inputs it scores 0.2727 (n=11). That is a 47-point drop.

A second judge from a different model family (kimi-k2.6) scores 0.8182 on the same adversarial cell (n=11). The two judges agree at Cohen's kappa 0.157 on Consumer Duty adversarial (n=23 scenarios). On COBS original they agree at 0.853.

One caveat, stated plainly. That 0.157 is computed over every adversarial scenario both judges completed, and each judge scores both principles on every scenario. Restrict it to the 10 scenarios whose labelled principle is Consumer Duty and kappa is 0.00 (raw agreement 0.50). Smaller n, same direction. The small cells here are small.

Every number above is recomputed from predictions and matches metrics and judge_agreement. All 54 accuracy rows in metrics reproduce from predictions to four decimals, n included.

If a judge can be steered by the words a regulator is looking for, what is it actually judging?

What is in it

168 synthetic cryptoasset financial promotions. Each is labelled comply or escalate against one of two UK FCA principles:

  • PRINCIPLE_FAIR_CLEAR_NOT_MISLEADING: COBS 4.5A.3R.
  • PRINCIPLE_CONSUMER_DUTY_FAIR_VALUE: PRIN 2A / FG22-5 Consumer Duty.

Four splits:

Split Rows What it is
original 100 Generated from one of 22 seed summaries, with a target verdict.
paraphrase 30 Rewrites of original scenarios that keep the compliance issue and avoid exemplar phrases. source_id points to the original.
adversarial 28 Keyword-stuffed. adversarial_target is flip_positive or flip_negative. exemplars_inserted lists the stuffed phrases.
boundary 10 Near-threshold cases, each with notes.

Six methods were run on every split: keyword, minilm (all-MiniLM-L6-v2), bge (bge-base-en-v1.5), ollama-embed (mxbai-embed-large), llm-judge (gpt-oss:120b), and cascade (keyword primary, LLM judge in the band [0.4, 0.6]). The LLM judge was also re-run with kimi-k2.6 as a second judge. That is 28 runs.

Configs

Eight viewer configs, all JSONL, built by build_hf.py (in this repo, stdlib only, deterministic).

Config File Rows What it is
benchmark (default) data/benchmark/<split>.jsonl 168 (100 / 30 / 28 / 10) The scenarios. One shared column set across the four splits.
predictions data/predictions.jsonl 2,331 One row per run, scenario and assessed principle. 1,155 completed scenario-runs times 2 principles, plus 21 failed scenario-runs kept as one row each.
judge_traces data/judge_traces/*.jsonl 1,301 Every raw LLM judge call: 899 from gpt-oss:120b-cloud, 402 from kimi-k2.6:cloud. Three shards, each under 8 MB.
metrics data/metrics.jsonl 54 runs/primary_metrics.csv, typed: accuracy with CI, precision, recall, F1, AUC, Brier, ECE raw and calibrated, false-compliance rate. Per principle, method, split.
judge_agreement data/judge_agreement.jsonl 8 runs/judge_agreement.csv: kappa and raw agreement between the two judges, per split and principle.
per_cluster_auc data/per_cluster_auc.jsonl 216 runs/per_cluster_auc.csv: AUC per evidence cluster, method, split.
runs data/runs.jsonl 28 One row per run file: method, judge, split, wall time, failure count, cascade deferral stats.
seeds data/seeds.jsonl 22 The author-prepared summaries of public FCA material that original scenarios were generated from.

Column notes

  • benchmark. The four source files have different fields. They are unioned into 15 columns. A field a split does not have is null: adversarial has no channel, product, audience. generation_payload, paraphrase_payload and exemplars_inserted are JSON strings. Some split files have a column that is null on every row, so the card YAML declares all 15 as string under dataset_info. Without that, the loader types those columns as null and fails to cast the other splits. labels.jsonl is not a separate config. The build checks it row by row against the scenarios (id, split, principle, verdict) and it matches all 168.
  • predictions. Each run scores both principles on every scenario. scenario_principle_id is the principle the scenario is labelled for. is_target_principle marks the row where they match. correct is filled only there, so accuracy is mean(correct) over is_target_principle == true. judge is judge2 for runs with a _judge2 suffix and judge1 otherwise. It only means something for llm-judge. cluster_assessments is a JSON string.
  • judge_traces. prompt, response_parsed and response_raw are JSON strings. scenario_id and split are recovered by matching the PROMOTION_TEXT in the prompt to the benchmark. All 1,301 match exactly one scenario. The trace files do not record which run made them, so a judge1 trace can come from either llm-judge or cascade. One kimi-k2.6 trace returned an off-schema object with no escalate field. Its escalate is null.
  • metrics and per_cluster_auc keep the source split value (for example adversarial_judge2) and add judge and split_base.
  • NaN. The run JSONs hold NaN for similarity fields the LLM judge does not produce. data/ writes these as null so every line is strict JSON. raw/runs/ keeps the NaN as released.

raw/

raw/benchmark/, raw/runs/ and raw/paper/ are exact copies of the release directories, minus PDFs, plus raw/LICENSE-DATA. No config points at them. They hold the two pre-registered rubrics (raw/benchmark/rubric/), labels.jsonl, the fitted Platt calibrators (raw/runs/calibrators/), the attribution faithfulness results (raw/runs/faithfulness_*.json), every trace file, and the camera-ready LaTeX source. The PDFs (paper and figures) are left out because the Hub rejects binary files on this upload path. Read the paper on arXiv (https://arxiv.org/abs/2608.14329) or get the PDFs from the GitHub repo. No file in the package exceeds 8 MB.

Known gaps

  • 21 scenario-runs failed. They are LLM judge JSON parse errors and Ollama read timeouts. They are rows in predictions with failed: true and the message in error. They are excluded from metrics. By run: llm-judge original 3, adversarial 4, boundary 2. Second judge original 2, paraphrase 2, adversarial 2. Cascade original 4, paraphrase 1, boundary 1. This is why some n values sit below the split size.
  • metrics has no original_judge2 row, although that run is included. You can compute it from predictions: Consumer Duty 0.6667 (n=48), COBS 0.98 (n=50).
  • The original rows in metrics cover all 100 original scenarios. The paper describes a 20-scenario dev subset used to fit calibrators and the cascade band. These files do not record which 20.
  • The harness is reference only. The eval code in the GitHub repo imports scrat-core, the CECA engine, which lives in a repository that is not public. You can inspect the harness. You cannot re-run it end to end without the engine and an Ollama setup. Every analysis in the paper can be redone from the data here.
  • Author-only labels, one corpus family. Scenarios were labelled by one author. The corpus generator and the first judge are the same model family. The second judge is there to test that overlap.

Provenance

All scenarios are synthetic. original and paraphrase scenarios were generated by gpt-oss:120b through Ollama Cloud (the model is recorded in each row's payload), from author-prepared summaries of public FCA material, with a ban on verbatim exemplar phrases. No scenario contains verbatim FCA enforcement text. The judges were gpt-oss:120b and kimi-k2.6, also through Ollama Cloud.

The two per-principle rubrics were committed and tagged v0-rubric-prereg before any scenario was authored or labelled. That tag lives in the non-public Skelf-Research/scrat repository. The rubric text is reproduced in raw/benchmark/rubric/.

Reproduce

To rebuild this package from a checkout:

python3 build_hf.py /path/to/principle-bench .

Running it twice gives byte-identical output.

License

  • Data (benchmark/, runs/), the paper text, and this card: CC BY 4.0. See raw/LICENSE-DATA.
  • Code in the GitHub repo (code/, scripts/) and build_hf.py: MIT OR Apache-2.0.
  • Scenarios and traces were generated with open-weight models (gpt-oss, Kimi-K2.6). Their model terms apply to those outputs.

Citation

@inproceedings{sarkar2026principlebench,
  title     = {A Four-Axis Trustworthiness Benchmark for
               LLM-as-Judge in Principle-Based Regulation},
  author    = {Sarkar, Dipankar},
  booktitle = {2nd Workshop on Secure and Trustworthy Large Language Models
               (SeT-LLM @ KDD 2026)},
  year      = {2026},
  note      = {Non-archival},
  eprint    = {2608.14329},
  archivePrefix = {arXiv},
  url       = {https://arxiv.org/abs/2608.14329}
}

Links