KucLab commited on
Commit
37f5e8d
·
verified ·
1 Parent(s): 71bcfd2

Add CHANGELOG.md

Browse files
Files changed (1) hide show
  1. CHANGELOG.md +105 -0
CHANGELOG.md ADDED
@@ -0,0 +1,105 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Changelog
2
+
3
+ No silent overwrites of the same version: a new checkpoint ships as a new version
4
+ (Barist.1.1, ...) or a git tag.
5
+
6
+ ## Barist.4 — seventh adversarial review (released; own repos: `Jerry256254/barist.4` + `KucLab/Barist.4`, git tag `barist-4`)
7
+ Checkpoint `checkpoints_b4b/best.pt`.
8
+
9
+ - Context-bypass fixed: context patterns (support/news) now use word boundaries
10
+ (`hra` no longer matches `ochrana`/`hrach`); poison/weapons/market aimed at a
11
+ 2nd/3rd person or hard items ignore news/support context entirely; self-harm 1st
12
+ person hits even with glued "kamarád/pomůže" context (only help-OTHER frames and
13
+ media/game frames pass); regex gate extended with glued-context must-hit
14
+ sentences (both directions), 454 benign rows, 0 FP, runs in pytest.
15
+ - Category hard block now applies in ANY language: sexual_abuse/self_harm >= 0.3
16
+ forces unsafe; self_harm >= 0.2 routes to needs_support (Linka bezpečí).
17
+ - Data round 2 generated with a local ollama model (short moderation-style
18
+ request lines only, no operational content): generic self-harm/threats without
19
+ keywords, leet/typo adversarial variants, identity contrast pairs (+identity to
20
+ ~2k rows, weight 25), realistic Czech benign, uk/ru. Train purged again of
21
+ >0.8 5-gram overlaps with heldout2+heldout3 (dedup gate 0.75 PASS).
22
+ - heldout3 report now contains aggregate counts only (individual misses are never
23
+ written, so the set stays clean).
24
+ - Minor: CHANGELOG counts fixed (50+14), checkpoint name, serve.py banner,
25
+ Dockerfile torch range + `hf download --revision main`, tests/test_regex_gate.py
26
+ published to the Hub repo.
27
+ - Renamed to Barist.4 everywhere: `barist.4` CLI, `kuclab-barist4`,
28
+ `ARG BARIST_REPO=KucLab/Barist.4`, Hub bundle name `Barist.4`.
29
+
30
+ ## Barist.3 — sixth adversarial review (released; own repos: `Jerry256254/barist.3` + `KucLab/Barist.3`, git tag `barist-3`)
31
+ Checkpoint `checkpoints_b3e/best.pt`.
32
+
33
+ - Regex de-contaminated: no literal heldout2 phrases; patterns rewritten from dev only
34
+ and tightened (1st-person requirement for self-harm/poison, intimate-context
35
+ requirement for child-video patterns, place-preposition guard for "přestat žít",
36
+ 1st-person+future for weapon↔school proximity, prevention/game/exhibition
37
+ contexts downgrade). `data/regex_benign_test.jsonl` 321 -> 454 sentences; the regex
38
+ gate runs inside pytest (`tests/test_regex_gate.py`) on every change.
39
+ - Identity-bias fix: +1,058 identity-neutral training sentences (>=500 per group:
40
+ Romové, Židé, muslimové, uprchlíci, černoši; cs+en), source `identity_neutral`
41
+ (hard-negative weight); new release gate `identity_fp <= 2%` (eval_gates.py).
42
+ - New clean held-out set `data/mustcatch_heldout3.jsonl` (fresh phrasings, 50 unsafe +
43
+ 14 benign); reports contain aggregate counts only (no individual misses).
44
+ - heldout2 miss categories fixed via paraphrased training data (+ benign twins),
45
+ never by copying test sentences into the regex.
46
+ - cs benign counter-pairs for known FPs + uk/ru benign expansion (phase: extend_barist3_data.py).
47
+ - Gates metadata fixed (91 = 75 unsafe + 16 benign; data/ vs data/processed/ paths),
48
+ serve.py banner, per-language threshold documentation (fr 0.71 etc.), CHANGELOG
49
+ published to the Hub repo.
50
+ - Renamed to Barist.3 everywhere: `barist.3` CLI, `kuclab-barist3`, Dockerfile
51
+ `ARG BARIST_REPO=KucLab/Barist.3`, Hub bundle name `Barist.3`.
52
+
53
+ ## Barist.2 — fifth adversarial review (released; own repos: `Jerry256254/barist.2` + `KucLab/Barist.2`, git tag `barist-2`)
54
+ Checkpoint `checkpoints_b2w/best.pt` (phase W on top of `b1q`). All six items of the
55
+ Barist.1.1 review fixed:
56
+
57
+ 1. CSAM/self-harm hard block: for cs/sk/default text, category score
58
+ sexual_abuse or self_harm >= 0.3 forces `unsafe` with `override: category_block`
59
+ regardless of the language threshold (in `kuclab/infer.py`, `kuclab/cli.py`,
60
+ `scripts/censer.py` incl. the chunked long-text path). Regex extended:
61
+ `vzít si život`, `přestat žít`, `pořezat/podřezat`, `zemřít doma`, `otrávit se/prášky`,
62
+ `dětský materiál`, `nezletil*.{0,20}(fotk|vide)`, `děti bez oblečení`, hate-group
63
+ violence patterns. The false "0 CSAM/self-harm passes" claim is REMOVED from
64
+ README/model card.
65
+ 2. `mustcatch_heldout2.jsonl` restored to the full 91 rows; the 20 train rows with
66
+ >0.8 5-gram overlap were purged FROM TRAIN (not from the test);
67
+ `reports/heldout2_dedup.json` gate passes (max overlap 0.75).
68
+ 3. cs language threshold FIXED back to 0.5 (tuned value kept as diagnostics only);
69
+ `eval_gates.py` measures cs_benign FPR with the deployed pipeline.
70
+ 4. Unsafe verdicts always carry >=1 category (top-1 fallback) and categories are
71
+ sorted by severity priority — now also in the chunked path of `censer.py`.
72
+ 5. Regex holes closed: school patterns in both word orders + multilingual
73
+ (es/fr/de/it/ru/uk), `dan mode`, multilingual poison patterns.
74
+ 6. `gates.json` reads report-level metrics (ECE, ONNX parity, regex gate, dedup)
75
+ from each model's OWN reports dir; user benign set is 43 sentences with matching
76
+ denominators.
77
+ - Phase W training data (`scripts/extend_barist1w.py`): 360+ unsafe formulations
78
+ (self-harm without "zabít", school threats, poison, group hate, ru/uk, market)
79
+ each paired 1:1 with a benign twin sharing the frame words; must_catch_weight =
80
+ hard_negative_weight = 11.
81
+ - Renamed to Barist.2 everywhere: `barist.2` CLI launcher, `pyproject.toml`
82
+ (`kuclab-barist2`), Dockerfile `ARG BARIST_REPO=KucLab/Barist.2`, Hub bundle
83
+ name `Barist.2`.
84
+
85
+ ## Barist.1.1 — fourth adversarial review (released; git tag `barist-1.1`)
86
+ Checkpoint `checkpoints_b1q/best.pt` (phases M–V). Release gates measured by
87
+ `scripts/eval_gates.py` -> `reports/gates.json` (8 PASS / 7 FAIL, FAILs documented in README).
88
+
89
+ - Regex pre-filter v3.1: legal-weapon / pyrotechnics / pest-control exceptions
90
+ (downgrade to `needs_review`, not a block); `fet` only in drug context; napalm only
91
+ instruction forms; extended self-harm patterns (`řežu se`, `podřezat si žíly`,
92
+ `prášky na zabití`, `předávkovat se`); regex gate `scripts/test_regex.py`
93
+ (321 benign trigger sentences, 0 hard FP) wired into pytest.
94
+ - New clean held-out set `data/mustcatch_heldout2.jsonl` (91 rows); old set renamed
95
+ `data/mustcatch_dev.jsonl` (dev only). Report renamed `reports/mustcatch_heldout2.json`.
96
+ - Training phases M–R (must_catch ×15–25, benign counter-pairs); checkpoint `b1q`.
97
+ - CLI/API: `needs_review` for jailbreak patterns (not a hard block), `needs_support`
98
+ (Linka bezpečí) for self-harm support contexts, `override: must_catch` field.
99
+ - Files published in-repo: `data/mustcatch_heldout2.jsonl`, `data/mustcatch_dev.jsonl`,
100
+ `data/cs_benign.jsonl`, `data/regex_benign_test.jsonl`, `kuclab/probes.py`,
101
+ `reports/onnx_parity.json`.
102
+
103
+ ## Barist.1 — third adversarial review
104
+ - Renamed from Censer line; pre-filter v2; phases I–L; checkpoint `b1l`.
105
+ - Successor banners added to Censer.8 / Censer.9 READMEs (GitHub + Hugging Face).