Serve the r4 Laya checkpoint, retrained on production traffic #25

Merged
james merged 3 commits from laya-r4 into main 2026-10-27 21:42:11 +00:00
Owner

Switches the Laya model server to laya-centinela-r4. The archive is already in the package registry and its SHA-256 matches laya/checkpoint.env, which the Laya build checks.

What r4 is

r4 continues from r2 with production traffic:

  • 4,499 requests picked from the training log: Forgejo file views it blocked, low-score blocks, high-score allows, uncertain answers and a random sample.
  • Labelled by a Qwen teacher told which apps each host serves.
  • Merged with r2's cases, 14,759 in all.

Results

Held-out production requests (711, policy balanced) r2 r4
attacks detected (flagged or blocked) 72.6% 96.4%
benign requests flagged or blocked 42.3% 0.6%
Forgejo file views allowed 2 of 135 135 of 135

These are measured against the teacher's labels. A hand check of the 15 disagreements found about 9 teacher errors where r4 is right, one real false positive (creating a Forgejo pull request) and 3 Spring Cloud Function exploits whose payload is in a header the model doesn't see. GPU latency: 33 ms median, 151 ms p90.

Trade-offs

  • Recon: r4 recognises reconnaissance (/.env, /.git/config), which r2 tagged as path traversal. The default policy flags recon rather than blocking it, so on the 68-request eval r4 blocks 21 of 29 attacks against r2's 24, at the same 17.9% false positives.
  • Regression: the login bypass username=admin'-- is a flag, not a block.

Both are on the r5 backlog, and blocking recon is a policy choice.

Changes

  • laya/checkpoint.env: r4.
  • laya/README.md and the README's Laya backend section: r4's method and results. The "does not recognise reconnaissance, run under monitor" advice is removed.

Rollout

Merging builds centinela-laya (laya-v0.0.4) with r4. A gitops PR then switches Laya's image; it downloads in seconds now through the in-cluster mirror. Laya restarts with about a minute without the model, and centinela fails open meanwhile.

Switches the Laya model server to `laya-centinela-r4`. The archive is already in the package registry and its SHA-256 matches `laya/checkpoint.env`, which the Laya build checks. ## What r4 is r4 continues from r2 with production traffic: - 4,499 requests picked from the training log: Forgejo file views it blocked, low-score blocks, high-score allows, uncertain answers and a random sample. - Labelled by a Qwen teacher told which apps each host serves. - Merged with r2's cases, 14,759 in all. ## Results | Held-out production requests (711, policy `balanced`) | r2 | r4 | |---|---|---| | attacks detected (flagged or blocked) | 72.6% | 96.4% | | benign requests flagged or blocked | 42.3% | 0.6% | | Forgejo file views allowed | 2 of 135 | 135 of 135 | These are measured against the teacher's labels. A hand check of the 15 disagreements found about 9 teacher errors where r4 is right, one real false positive (creating a Forgejo pull request) and 3 Spring Cloud Function exploits whose payload is in a header the model doesn't see. GPU latency: 33 ms median, 151 ms p90. ## Trade-offs - **Recon:** r4 recognises reconnaissance (`/.env`, `/.git/config`), which r2 tagged as path traversal. The default policy flags recon rather than blocking it, so on the 68-request eval r4 blocks 21 of 29 attacks against r2's 24, at the same 17.9% false positives. - **Regression:** the login bypass `username=admin'--` is a flag, not a block. Both are on the r5 backlog, and blocking recon is a policy choice. ## Changes - `laya/checkpoint.env`: r4. - `laya/README.md` and the README's Laya backend section: r4's method and results. The "does not recognise reconnaissance, run under monitor" advice is removed. ## Rollout Merging builds `centinela-laya` (laya-v0.0.4) with r4. A gitops PR then switches Laya's image; it downloads in seconds now through the in-cluster mirror. Laya restarts with about a minute without the model, and centinela fails open meanwhile.
Serve the r4 Laya checkpoint, retrained on production traffic
Some checks failed
security-scan / security-scan (pull_request) Successful in 22s
test / laya (pull_request) Successful in 5s
test / go (pull_request) Has been cancelled
2a9feed4c5
laya-centinela-r4 continues from r2 with 4,499 requests picked from the
production training log and labelled by a Qwen teacher told which apps each
host serves, merged with r2's cases (14,759 in all).

On 711 held-out production requests (policy balanced, against teacher
labels) detection goes from 72.6% to 96.4% and benign requests flagged or
blocked from 42.3% to 0.6%; all 135 Forgejo file views are now allowed.
A hand check of the disagreements found most to be teacher errors.

It recognises reconnaissance, which r2 did not, and the default policy flags
recon rather than blocking it, so on the 68-request evaluation it blocks 21
of 29 attacks against r2's 24 at the same 17.9% false positives. Its one
regression there is a login bypass (admin'--) scored as a flag.

The archive must be in the generic package registry before this merges:
the Laya build downloads it by checkpoint.env and checks its SHA-256.

🔎 ojo scan results

No findings.

<!-- ojo-scan-summary --> ### 🔎 ojo scan results No findings.
Refine laya-centinela-r4 documentation
Some checks failed
security-scan / security-scan (pull_request) Successful in 21s
test / laya (pull_request) Successful in 4s
test / go (pull_request) Has been cancelled
d3677e3a58
Merge branch 'main' into laya-r4
All checks were successful
security-scan / security-scan (pull_request) Successful in 28s
test / laya (pull_request) Successful in 4s
test / go (pull_request) Successful in 3m24s
25813ae37a
james merged commit e68a45e043 into main 2026-10-27 21:42:11 +00:00
james deleted branch laya-r4 2026-10-27 21:42:11 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
ColibriSec/centinela!25
No description provided.