Skip to content

lev.program: classifiers as data, fitted on labelled cases - #4

Merged
yogthos merged 2 commits into
mainfrom
program
Oct 13, 2026
Merged

yogthos merged 2 commits into
mainfrom
program

Conversation

@yogthos

@yogthos yogthos commented Oct 13, 2026

Copy link
Copy Markdown
Member

Tests the neurosymbolic idea from the hydraulics discussion: a model writes a classifier once as data (regex facts, typed questions, ordered rules), lev runs it deterministically, and its cutoffs are fitted on labelled cases before it is trusted.

lev.program has validate / run / observe / fit, and POST /v1/program runs a program over the wire. bench/program.clj scores a program and bench/compile.clj has a local GGUF write one. Both are measured on LogHub BGL log lines and civil_comments.

Results (test halves, bench/README.md has the rest):

  • BGL: regex programs score 1.000 by hand and 0.990 written by Qwen3.8-27B, with no model calls. The encoder answering directly scores 0.286, Qwen3.5-4B 0.741 at ~1.9 s a line.
  • Toxicity: fitting the direct question's cutoff takes the encoder from 0.755 to 0.933, the best result. Facet decomposition (0.920) and Qwen's own program (0.905 fitted, 0.733 as written) don't beat it.

Regex facts, typed questions and ordered rules, run deterministically:
facts first, the model only for the questions the undecided rules read.
fit sets the rules' cutoffs from labelled cases. POST /v1/program runs
one over the wire. bench/program.clj and bench/compile.clj measure it on
BGL log lines and civil_comments, with programs written by hand and by
Qwen3.8-27B; results in bench/README.md.
@yogthos
yogthos merged commit 3b866aa into main Oct 13, 2026
2 checks passed
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.

1 participant