Download docs/rsi-implementation.md from Kai9987kai/Sonapse-LAB: direct link, hf CLI and curl.
- Browser
- Download file 5.35 kB
-
https://huggingface.co/Kai9987kai/Sonapse-LAB/resolve/main/docs/rsi-implementation.md
- Command line
-
hf download hf://Kai9987kai/Sonapse-LAB/docs/rsi-implementation.md
-
curl -L -o rsi-implementation.md https://huggingface.co/Kai9987kai/Sonapse-LAB/resolve/main/docs/rsi-implementation.md
Bounded improvement-policy implementation
This module executes a bounded local numeric improver, not an LLM weight writer or unrestricted self-modifying software. phi is a versioned immutable typed program specifying operator, replay multiplicity, support fraction/order, learning rate, update count, ridge coefficient, candidate tie ranking and mutation scale. Its identity includes its parent. The accepted inherited program actually controls generation of the subsequent candidates. The evaluator, seed split namespaces, score and caps are outside its editable surface.
run_study(output_dir, config, progress=None, cancelled=None) creates an exclusive new output directory; run_training is its explicit alias. Configuration rejects unknown fields, non-integer counts and resource caps. Cancellation is checked before neural initialization, between feature samples, generations and final evaluations; partial receipts are marked cancelled and cannot verify as completed. This is a developmental pilot rather than frozen confirmation.
The benchmark extracts real features from the integrated pinned GraftBrain/Tidal actor using controlled 155-dimensional synthetic cue observations. It concatenates cue-time and one-step occluded features into a resident 129-by-2 linear readout. The cue-time contribution means this is cue-memory consolidation, not evidence that the recurrent network solves long-delay navigation. Frozen source features are normalized per example. Initial resident readouts are identical zeros. Artificial graph activity, trained donor hidden state, memory/intent and compass features come from the actual actor; the feature encoder and bridges are not trained by this experiment.
Development families 0–1, repeatedly reused selection families 2–3, and sealed families 4–5 use different cue coordinates and independent seed namespaces. Each task has labeled support and frozen query examples. Adaptation receives support features and support labels only. Search selects policies from development/meta-validation, never from sealed scores. All registered generation policies are frozen before sealed scoring. Every arm has the same empty read-only archive and fresh task-local state. Family labels have only the narrow synthetic meaning defined here; they are not broad out-of-distribution evidence.
Fixed, nonrecursive-from-root, inherited recursive and matched random arms run with equal candidate caps (the fixed arm intentionally spends less search compute). Search records every candidate, parent, generation, seed/index, validation outcome, acceptance/rejection and fit exposure. Comparisons additionally include fixed gradient optimization, direct numeric Hebbian assignment and fitted ridge regression. Ridge is an ordinary fitted baseline, not a successful programmer. Actual wall time and fit/inference counts accompany the result; comparisons are not claimed to have exactly equal FLOPs.
Every frozen policy adapts identical fresh resident readouts. Graph, donor and memory lesions zero their declared feature blocks at both adaptation and scoring, including both cue and delayed halves. These are feature-path lesions; upstream indirect effects remain, so they do not establish independent causal subsystem contributions. A second comparison continues an old-task-trained resident readout and records each old family's before/after query accuracy and regression. The recurrent backbone remains frozen. Direct assignment and ridge replace the head by definition, whereas gradient updates continue its old weights.
Every evaluated readout is saved and reloaded before writer-off scoring; query execution performs matrix multiplication and argmax with no fitting. Checkpoints and frozen task arrays have content hashes. verify_study checks these hashes, reconstructs weights from recorded support plus exact policy, recomputes sealed outcomes, resource records and old-task retention, and regenerates every proposed child from its parent program and proposal seed/index. Replay uses recorded integrated features; it does not rerun upstream neural extraction or promise bitwise reproducibility across libraries/platforms. The receipt JSON itself is inspectable and not signed. Verification detects inconsistent/tampered measurements, not an adversary rewriting a wholly consistent study.
Primary uncertainty resamples paired lineage means, avoiding treatment of every query example as an independent replicate. With few lineages and only two sealed families, these intervals are descriptive. Default output explicitly says no confirmed RSI advantage. The first actual 2-lineage feasibility smoke gave zero recursive-minus-fixed difference for both lineages and replayed all 96 then-registered fresh evaluations. Current final pilot evidence is in the output receipt and should be read directly; no success is inferred from functioning inheritance alone.
Tests exercise initial zero-readout acquisition, immutable fresh resets, inherited parent identity, support/query isolation, both temporal feature-lesion halves, strict output exclusivity, cancellation, configuration caps and recomputation-based receipt-tampering detection. Initial collection failed because the implementation modules did not exist; the temporal-lesion test then caught and drove repair of a real missing delayed-half mask.