Skip to content

D-EPI-COT C3c: learned ordering of scent leads over Codec9/lut9 - #1844

Merged
AdaWorldAPI merged 7 commits into
mainfrom
ccr-39105428-bcm2m2-epi-cot-c3c
Oct 28, 2026
Merged

AdaWorldAPI merged 7 commits into
mainfrom
ccr-39105428-bcm2m2-epi-cot-c3c

Conversation

@AdaWorldAPI

@AdaWorldAPI AdaWorldAPI commented Oct 28, 2026 •

Copy link
Copy Markdown
Owner

C3c of D-EPI-COT. It builds on C3b (scent, #1842, merged) and is independent of C3 (#1843).

What it does

nars::scent_learn::ScentLearner uses investigation outcomes to learn which C3b leads to test first.

  • It reorders leads only within a status group, so a contested lead stays ahead of a settled one (PZ8).
  • Its output is an order. It holds no ledger or edge and writes no truth, Epi5 bits, CE64 bits or ledger entry (PZ4).
  • Each outcome source trains it once (PZ6).

Numerics: no runtime rounding, no float roundtrip

The runtime adds no kernel; it uses the merged ndarray::hpc::codec9::EpiLane9 and ndarray::simd::lut9.

  • Delta. A delta is computed in code space as M = |r|·x / 255 with integer truncation, which is odd and deterministic. Its sign comes from r.
  • Zero rule. A bit mask sets the sign bit: P = present AND (positive OR M == 0). A delta of −0.49 therefore becomes −0 and then +0, never "never touched" (PZ2). lut9 applies the same rule to its output.
  • Rate. The learning rate is one lut9 lookup of an odd table. Only symmetric rules are prepared; asymmetric and biased rules are refused (PZ3). Weights are added and saturated as integers and written back as SM9 codewords.
  • Rounding. The only rounding happens once, offline, when the rate table is built. It follows TFLM LUTPopulateInt8: x·η, then TfLiteRound (ties away from zero), then saturation. data/tflm_lut_step_golden.txt was generated by docs/research/epistemic-cot/oracles/tflm_lut_step_oracle.cc, compiled against AdaWorldAPI/tflite-micro 5f64e4a. The table matches it on all 256 int8 codes for 4 rates.
  • Spec binding. A prepared table carries its ModelSpec (schema, feature scale, rate), and a learner refuses a table built for another spec (PZ7). This binding is transient and in memory; it is not the EXO-152 PZL-4/G1 binding.

Falsifiers

There are 14 tests plus an ignored cost probe. Each of 10 disables turns a test red:

  • cross-group ranking;
  • no replay guard;
  • no spec check;
  • admitting an asymmetric rule;
  • an absent feature written as touched;
  • ties-to-even rounding;
  • no weight write;
  • dropping M == 0 from the zero rule;
  • a float roundtrip with rounding for the delta;
  • a rank that ignores the score.

The zero-rule disable stayed green twice before its test bound it: first no fixture had a zero delta, then the fixture's residual was positive. The test now uses a negative residual, which is the −0.49 case.

Measured

PZ5 trains on 3-decoy worlds and evaluates on 600 held-out 7-decoy worlds with the known link on the other side (standard error about 0.1):

policy informative fixture uninformative twin
learned 1.00 4.59
scent 4.51 4.51
round-robin 4.55 4.55
random 4.47 4.47

Earlier 60-world runs read 3.77 on the twin; that was sampling noise. Cost, on one host, release build, 8 leads (reported, not gated):

operation time
rank 706 ns
learn 425 ns
scent 3.0 µs

NSL plans (AdaWorldAPI/neural-structured-learning #1–#8)

The NSL plans are docs-only and predate lut9. Two parts apply here:

  • 05a: tables are certified offline and a query is a plain lookup. This PR follows that, with TFLM's ties-away rule deciding rational ties.
  • Scratchpad §5: the TFLM rounding contract and the Codec code spaces are kept.

No lance-graph-nsl crate is added. The NSL scratchpad gates lance-graph code on a frozen NSL oracle (H7) and the G01–G12 neighbor fixtures (H1), and neither exists yet.

Gates

  • Planner lib: 499 tests pass.
  • fmt and clippy --lib are clean.

Not in this PR

  • The informative fixture is separable, so 1.00 shows a separating feature is found, not performance on overlapping evidence.
  • The training label is "hydrated". The c3-plan §5 label, "the ablation discriminated" (from the ledger's sensitivity), is the next step.
  • No HIRO or Odoo outcomes are used.
  • Bits 50..52 are untouched.

Owner check and claim: EXO-50 CC:session_01XAqKMPWTwovjYJEUMuGPb4/D-EPI-COT-C3C-OWNER-CHECK-20261028-01.

Draft; not for automatic merge.

🤖 Generated with Claude Code

https://claude.ai/code/session_01XAqKMPWTwovjYJEUMuGPb4

…C3c)

ScentLearner reorders C3b leads within a status group from investigation
outcomes. Weights and steps are ndarray Codec9 lanes (NEVER_TOUCHED = feature
never seen); the learning rate is applied through ndarray::simd::lut9 with a
table built by TFLM's LUTPopulateInt8 recipe and pinned against a golden
generated from tflite-micro. Only odd rules are prepared; a table for another
spec refuses; one source trains once. Output is an order only.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XAqKMPWTwovjYJEUMuGPb4
… entry)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XAqKMPWTwovjYJEUMuGPb4
@coderabbitai

coderabbitai Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: bcf2e4cd-765a-4597-9ad8-e7bec1a402d1
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

…e rounding)

Deltas are built by integer truncation with the zero rule
P = present AND (positive OR M == 0); weights add and saturate as integers.
Rounding happens only when the rate table is built offline (TFLM recipe).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XAqKMPWTwovjYJEUMuGPb4
…n bound

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XAqKMPWTwovjYJEUMuGPb4
… plan crosswalk

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XAqKMPWTwovjYJEUMuGPb4
@AdaWorldAPI
AdaWorldAPI marked this pull request as ready for review October 28, 2026 21:50
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-28T21:51:20.076653Z 9d8fe7b Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@AdaWorldAPI
AdaWorldAPI merged commit 20097d4 into main Oct 28, 2026
12 checks passed
AdaWorldAPI added a commit that referenced this pull request Oct 28, 2026
…ndex

board: regenerate entries index after #1844; generic ERP wording in C3c docs
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.

2 participants