-
Notifications
You must be signed in to change notification settings - Fork 8
Brain-AI SOTA research → streaming decoder, FM promotion gates, CoW branch store, DFA/Hurst + privacy gate (Rust + WASM + TS) - #10
Draft
ruvnet wants to merge 6 commits into
Draft
Conversation
... swarm Seven parallel research agents plus a synthesis agent swept the latest (2025–2026) state of the art across brain-to-text, neural foundation models, invasive BCI, non-invasive sensing, neuromorphic/SNN, whole-brain simulation and brain-inspired algorithms, and the ruvnet npm metaharness flywheel ecosystem. Findings are mapped onto ruv-neural crates and ADRs 0001–0024 with recommended actions, plus a continuous flywheel playbook (metaharness + Darwin Mode + @metaharness/flywheel + agenticow) and an explicit gaps/caveats section. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01T2uFD8uGFrakkvnQX66pHv
...e (Rust + WASM + TS) Implements the two 'adopt now' actions from the brain-AI SOTA 2026 research sweep (docs/research/brain-ai-sota-2026.md §9): - ruv-neural-signal::lrtc — detrended fluctuation analysis (DFA-1) with closed-form per-window detrending (O(n) per scale, no per-window allocation), Hurst exponent, and band_envelope_dfa for alpha-band amplitude-envelope LRTC. Validated against theoretical exponents (white ~0.5, pink ~1.0, Brownian ~1.5) and benchmarked: 5.4x faster than a naive reference at 16k samples (751 us vs 4.16 ms), linear scaling to 65k samples (3.1 ms). - ruv-neural-core::gate — decode-armed / decode-locked thought-password gate (Kunz et al., Cell 2025 pattern; ADR-0007/0009/0022): fail-locked on non-finite input and clock regression, bounded armed window, bounded audit log of transitions. Re-exported from ruv-neural-brain2text. - ruv-neural-wasm — compute_dfa and WasmDecodeGate browser bindings; builds for wasm32-unknown-unknown. - apps/ruv-neural-ui — TypeScript reference implementations (src/lrtc/dfa.ts, src/safety/decodeGate.ts) mirrored operation-for-operation; cross-language parity fixture agrees with Rust to <1e-9, and the gate semantics suite mirrors the Rust tests one-for-one. 15 new vitest tests; full UI suite passes (56 tests). Tests: 8 Rust suites green across core/signal/brain2text (incl. new doctests), clippy clean on new code, rustfmt applied, criterion bench added (benches/lrtc.rs). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01T2uFD8uGFrakkvnQX66pHv
@ruvnet
ruvnet
changed the title
(削除) docs(research): brain-AI SOTA 2025–2026 deep-research sweep via agent swarm (削除ここまで)
(追記) Brain-AI SOTA 2026 research sweep + DFA/Hurst LRTC and mental-privacy decode gate (Rust + WASM + TS) (追記ここまで)
Aug 8, 2026
...win dry-run
Executes steps 1-2 of the flywheel playbook (docs/research/
brain-ai-sota-2026.md §10) against this repo with metaharness 0.4.3 /
@metaharness/darwin 0.8.2:
- npx metaharness score/genome: harnessFit 67, toolSafety 100, risk 21%,
verdict READY, archetype rust-crate-harness
- Scaffolded harness/ from the tool-recommended vertical:coding template
(claude-code host): architect/implementer/reviewer/test-writer agents,
plan-change + evolve skills, doctor/review-diff commands, default-deny
permission posture (no git push, no rm -rf, no .env reads). Smoke
tests 4/4 green; harness doctor HEALTHY.
- harness sign/verify: 19-entry SHA-256 witness manifest committed.
Ed25519 signature is degraded in this environment (placeholder key,
kernel witnessVerify unavailable) — content-hash witness only until
CI signs with a real key.
- Darwin Mode dry-run (mock sandbox, 2 gen x 3 children): winner g2_v5
on the contextBuilder surface, +0.110 over baseline; promotion
lineage committed in harness/.metaharness/{archive,lineage}.json as
audit-trail evidence. Variant scratch trees are gitignored.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01T2uFD8uGFrakkvnQX66pHv
... (8/8 findings) A harness-style review swarm (3 reviewers -> adversarial verifiers -> architect) audited the new DFA/gate code; all 8 findings survived verification with concrete reproductions and are fixed here: - critical: a non-finite clock could arm the gate with armed_at_s=-inf and never time out (NaN >= timeout is always false), leaving decoded output released indefinitely. update() now fails locked on any non-finite timestamp (new ClockAnomaly audit reason) and drops the frame. - major: clock regression while armed froze the timeout at zero elapsed time (clamped clock never advances). Regression now locks the gate and adopts the new timeline so re-arming and timeouts work after a clock step. - major: derived Deserialize resurrected armed state across restore and bypassed config validation. Deserialize is now manual: config is revalidated, state always resumes Locked (new Restored audit reason), the audit log is preserved and bounded, and null last_now_s (serde's encoding of -inf) roundtrips. - major: TS state/transitions getters returned live mutable internals; type-checked caller code could set armedAtS=Infinity and disable the timeout. Getters now return defensive copies and fields are readonly. - major: Rust/WASM transition logs used snake_case (at_s/armed_at_s) while TS used camelCase — incompatible wire shapes. Rust now serializes camelCase (atS/armedAtS) to match the TS mirror, with a wire-shape test. - minor: finite out-of-range confidence (percent-scaled detectors) clamped to 1.0 and armed the gate; values outside [0,1] now read as 0.0 in both languages. - minor: WasmDecodeGate silently coerced negative/fractional arm_frames at the u32 boundary; now validated with a clear error. - minor: TS dfa() accepted non-integer scale config unrepresentable in Rust; now rejected to prevent silent cross-language divergence. Tests: gate suite grown to 14 Rust tests (77 core total) and the TS suite to 13 gate tests (58 UI total), covering every fixed scenario; clippy/rustfmt/tsc clean; wasm32 release build green. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01T2uFD8uGFrakkvnQX66pHv
Implements the architect's planned increment (§9 rows 5, 1, 17), grounded in a deep-research sweep with 3-vote adversarial claim verification (105 agents, 23 primary sources, 115 claims -> 25 verified, 2 refuted). ruv-neural-brain2text/src/stream.rs — causal streaming decoder: fixed frame hop with incremental state, strictly causal rolling normalization (no frame sees a future sample), every emission wrapped in DecodeGate. Default hop 80 ms, the validated streaming cadence, treated as a SOFT budget (the published system meets it in 99.3% of steps) with overruns reported via StreamStats rather than assumed away; the 10-ms regime is supported since a causal decoder is published at that hop. Also implements the LibriBrain event-referenced keyword-spotting formulation for low-SNR non-invasive signals: [-0.1s, +0.3s] windows, AUPRC, base-rate permutation null, and false-alarms-per-hour. Deliberately does NOT implement an RNN-T: that attribution was refuted 0-3 in verification, so only the cadence and causality the sources actually establish are committed to. ruv-neural-embed/src/promotion.rs — executable ADR-0016 point-4 gates transcribing the mid-2026 negative-control protocol: random-init comparator capped at 100K params (the published bar is a 16K EEGNet at 61.3% beating LaBraM 57.3% / EEGMamba 56.6%), subject-disjoint LOSO folds, chance-margin check catching the LOSO-at-chance failure mode, pretraining-leakage check, exact Wilcoxon signed-rank test, and AUPRC lift over the base-rate null. Verdicts are conjunctive: a strong headline number cannot buy back a failed control. min_folds is 6, not 5, because the exact Wilcoxon minimum two-sided p is 2/2^n — n=5 tops out at 0.0625 and can never reach alpha=0.05. The dataset-identity probe is ruv-neural's own design (no verified source specifies one) and is labelled as such rather than cited. ruv-neural-memory/src/branch.rs — copy-on-write branched embedding store: immutable base plus per-branch overlay deltas, tombstones, read-through resolution at arbitrary branch depth, checkpoint/rollback/ drop for reversible closed-loop experiments. The research sweep found zero independently verified sources for CoW vector stores (the only material is vendor self-published with a single shared author), so this is our own design with semantics defined and tested here, citing no external performance numbers; merge and GC are explicitly out of scope because nothing defines them. Tests: 37 new tests (11 stream, 13 promotion, 13 branch); full suites green across the five touched crates; clippy and rustfmt clean on new code. Benchmarks (ruv-neural-brain2text/benches/stream.rs): 66.9 us per frame at 306 channels — a 1,196x margin against the 80-ms budget — and 29.4 us at the 10-ms cadence (340x margin). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01T2uFD8uGFrakkvnQX66pHv
...veats The workflow-written artifact was a 17-line stub with zero citations despite presenting itself as a cited report. Replaced with the full verified synthesis: per-source findings with URLs and DOIs, the two refuted claims called out explicitly (the RNN-T attribution and the SparrKULee r=0.069 figure), the modality caveat that every latency and accuracy number comes from invasive or MEG recordings, the empty evidence base for CoW vector stores, the open questions, the implementation mapping, and the process note that web-fetch summarization hallucinated table values twice during verification. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01T2uFD8uGFrakkvnQX66pHv
@ruvnet
ruvnet
changed the title
(削除) Brain-AI SOTA 2026 research sweep + DFA/Hurst LRTC and mental-privacy decode gate (Rust + WASM + TS) (削除ここまで)
(追記) Brain-AI SOTA research → streaming decoder, FM promotion gates, CoW branch store, DFA/Hurst + privacy gate (Rust + WASM + TS) (追記ここまで)
Aug 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
Summary
A research-to-implementation loop run end to end: two adversarially-verified research sweeps, a metaharness agent harness, and six new modules across Rust, WASM, and TypeScript — all tested, validated, and benchmarked.
Commits: SOTA research sweep → DFA/Hurst + privacy gate implementation → metaharness harness → gate hardening from a review swarm → streaming decoder + promotion gates + CoW branch store → completed deep-research report.
Implemented modules
ruv-neural-signal/src/lrtc.rsband_envelope_dfafor alpha-band LRTC. O(n) per scale, zero per-window allocationruv-neural-core/src/gate.rsruv-neural-brain2text/src/stream.rsruv-neural-embed/src/promotion.rsruv-neural-memory/src/branch.rsruv-neural-wasm/src/lrtc_wasm.rs+apps/ruv-neural-ui/src/{lrtc,safety}/Research grounding
Two workflows, both with adversarial verification:
docs/research/brain-ai-sota-2026.md, with a 19-row mapping onto crates/ADRs.docs/research/streaming-eval-cow-deep-research-2026.md.What the verification changed in the code:
StreamStats, not assumed away; the 10-ms regime is supported.branch.rsis our own design, cites no external numbers, and leaves merge/GC explicitly out of scope.2/2n, so 5 folds can never reach p<0.05 →min_foldsis 6.Review swarm → 8/8 gate fixes
A harness-style swarm (3 reviewers → adversarial verifiers → architect, 12 agents) audited the gate. The DFA math got a clean bill; all 8 gate/bindings findings were confirmed with reproductions and fixed, including a critical one: a NaN clock armed the gate with
armed_at_s = -inf, makingNaN >= timeoutalways false — permanently armed. Also fixed: clock regression froze the countdown; serde restore resurrected armed state and bypassed validation; TS getters leaked live mutable internals (armedAtS = Infinitydisabled the timeout); Rust/TS wire shapes disagreed (snake_case vs camelCase); percent-scaled confidence armed the gate; WASM coerced fractionalarm_frames; TS accepted non-integer DFA config.Tests & validation
tsc --noEmitclean; Rust↔TS DFA parity < 1e-9.Benchmarks (criterion)
Harness (flywheel playbook executed)
npx metaharness score/genome→ verdict READY (harnessFit 67, toolSafety 100). Scaffoldedharness/(vertical:coding, claude-code host) with default-deny permissions; smoke tests 4/4,harness doctorHEALTHY; 19-entry witness manifest committed (caveat: Ed25519 signature degraded in this environment — content-hash witness only until CI signs with a real key). Darwin Mode dry-run: winnerg2_v5on thecontextBuildersurface, +0.110 over baseline.Notes for review
🤖 Generated with Claude Code
https://claude.ai/code/session_01T2uFD8uGFrakkvnQX66pHv