Blog

The MLP That Never Got Written: Teaching a Deterministic Compiler to See Heat

CJC-Lang’s compiler advisory stack (CANA + NSS) got its first trained model this week — and the story is not the one I planned. The handoff said ‘train a 2-layer MLP.’ A mandated data-sanity pass found the feature set was type-blind: no model of any capacity could have learned the thermal signal, because the information wasn’t in the inputs. One physically-motivated static feature took held-out R² from −0.05 to +0.96, the model that won was linear regression — 22 numbers, trained by closed-form ridge OLS so the weights themselves are bit-reproducible — and the shadow gate promoted it with a 9× error reduction against measured labels. Also in this post: the quantum-inspired energy ranker I measured at exactly zero effect on compiler output, and the structural reason why training can’t fix that.
CJC-Lang
CANA
NSS
compilers
machine-learning
physics-informed
determinism
energy
green-computing

A field report on putting the first trained model inside CJC-Lang’s deterministic compiler pipeline. The §2.1 data-sanity pass killed the planned MLP before a line of training code existed: recorded thermal pressure (FP-op density) was unpredictable from the existing features by ANY model class, because every static feature counted expressions without knowing their type. A conservative float-propagation analysis (TypeMix) closed the information gap; linear regression then saturated the task (held-out R² 0.952); the trained head shipped as a content-addressed CPB0 weight bundle whose model identity flows into report hashes; and a shadow-mode gate promoted it 9× over the v1 closed form. The honest nulls are documented with mechanisms: the Ising-style energy re-ranker permutes within an already-decided pass set (zero outcome effect, architectural not trainable), cpu/memory labels carry no learnable variance, and the first energy-head attempt fails held-out so badly it earns a design constraint for part two.

Locke v0.8: A LendingClub Demo, an Honest Model, and the Three Gaps the Audit Found

Built the first real Locke demo on the full 2.26M-row LendingClub 2007–2018 dataset. The audit’s surprises forced two ADRs — a custom-detector extension layer (ADR-0041) so analyst domain knowledge becomes composable Locke configuration, and a Str-to-Float auto-promotion + E9070 wiring fix (ADR-0042) that closes a silent-skip gap on numeric columns mis-typed by CSV readers. The 4-way honest-model AUC measurement is the headline: pre-Locke |AUC| = 0.9993, Locke-filtered 0.9995, Locke + custom detector 0.7388, hand-curated domain-honest 0.7394. The custom detector closes the gap inside Locke configuration, within 0.0006 of the hand-curated baseline. Shipped as cjc-locke v0.1.11 on crates.io and cjc-locke v0.1.2 on PyPI.
CJC-Lang
Locke
data-quality
validation
leakage
LendingClub
credit-risk
determinism
Python
release

A field report on building Locke’s first end-to-end demo on real production-scale data. The LendingClub 2007–2018 leakage audit’s honest-model AUC measurement (the 4-way logistic-regression comparison) revealed that Locke’s built-in |AUC|≥0.85 leakage heuristic catches the strongest signals but not all of them. That finding drove two ADRs in the same session — a custom-detector extension layer that lets analysts encode domain knowledge as first-class Locke configuration with structural determinism that survives the Python boundary, and a Str-to-Float auto-promotion fix that unblocks three detector families on numeric columns CSV readers mis-type. Five commits, two ADRs, 71 new tests, 25 Rust crates + a Python wheel published. The discovery-driven nature of the work — each step uncovering the next gap — is the secondary headline.

Validating UCI Adult with Three Tools: What Locke Catches Out-of-the-Box That Pandera and Great Expectations Don’t

A side-by-side run of Pandera, Great Expectations, and Locke on a synthetic-but-faithful UCI Adult clone. Locke’s default report fires 32 deterministic findings — including the famous ‘?’ sentinel, the label-encoded nominal masquerading as an ordinal, near-duplicate category collisions, and a heavy-tailed distribution — without any expectation files, schemas, or suites. The same run is byte-identical across machines. This post is the practical comparison and a guided tour of Locke’s full capability surface, exercised from Python via the new PyO3 wrapper.
CJC-Lang
Locke
data-quality
validation
tutorial
comparison
pandera
great-expectations
python
adult

Three tools, one dataset. UCI Adult (synthetic clone, 5,000 rows × 15 cols, deterministic seed) goes through Pandera, Great Expectations, and Locke with each tool’s default configuration. Locke’s report fires 32 findings without any expectation file or schema — the ‘?’ string sentinels (E9007 + E9008), the redundant education-num label encoding (E9023), heavy-tailed capital gains (E9024), edit-distance near-duplicate categories (E9082), and seven other quality signatures the other two miss on defaults. The post also walks Locke’s complete capability surface — the belief-score algebra, the lineage/audit chain, the streaming validator, the policy gate, the causal guardrail, byte-identical JSON across runs — from the new Python wrapper. Includes the full data-generation script, the Locke run, the actual finding output, and an honest critique section naming three places where the adoption story currently needs more concrete demos, richer notebook UX (Arrow/Parquet/sklearn integration), and tighter pairing of every philosophical claim with a measurable engineering capability.

Diabetes-130 Revisited: ABNG Climbs Into the Strong-Model Band — and an Honest Account of What Locke Did (and Didn’t)

A second pass on the UCI Diabetes-130 dataset with both the Adaptive Belief Network Graph and Locke, the determinism-first data-quality layer. Headline AUC moved from 0.611 to 0.6645 ± 0.0018 across 3 seeds at full 101,766 rows — into the strong-published-model band (0.64–0.68), still on a linear-BLR model, no MLP heads. The reason is data scale and configuration. Locke contributed structurally (E9004 patient-leak; ?-sentinel detector gap; proposed E9064) but did not directly drive the AUC headline. The handoff’s flagship ‘Locke prune → AUC up’ hypothesis falsified itself — and that’s its own publishable finding.
CJC-Lang
ABNG
Locke
medical
diabetes
calibration
determinism
experimental

Phase 0.10 returns to UCI Diabetes 130-US Hospitals with both ABNG and Locke. Tuning K_ROUTING=2 + stronger BLR prior + the full 101,766 rows lifts held-out test AUC to 0.6645 ± 0.0018 across 3 seeds — in the strong-published-model band (0.64–0.68) without any architectural change, still on the linear BLR head. The route the handoff predicted to get there (Locke surfaces leakage → drop death-discharge rows → AUC up) did not work — Locke’s E9063 detector didn’t fire on the per-level leakage, and applying the prune via domain knowledge hurt AUC by 0.0118 because it shifted MI-selected routing features. Five commits, every chain head reproducible, six section outputs, a published role-by-role assessment of where each tool actually helped.

No matching items