forgo.cloud
Sign in
Repo workspace

forkjoin-ai/gnosis

Topological spectrometer — dual-track plan (Monster Mesh × Gnosis Math)

distributed-inference/TOPOLOGICAL_SPECTROMETER_DUAL_TRACK.md
forkjoin-ai/gnosis

Topological spectrometer — dual-track plan (Monster Mesh × Gnosis Math)

This names two implementable lines of sight that both use the word “topology” but satisfy different contracts. Running them in parallel is encouraged; merging them into a single scalar “truth” is not automatic (see §Handoff).


Track A — Mesh physics spectrometer (operational, near-term)

Goal: treat the distributed inference stack as an instrument: record, aggregate, and regress execution-space signals (latency, parity, residual norms, cache pressure) with falsifiable gates.

Existing surfaces (already in-tree):

Signal Where / how
Residual streams residual_capture.rsGNOSIS_RESIDUAL_CAPTURE BWMR + optional mesh JSONL; GNOSIS_MESH_AUTO_CAPTURE_BATCH_X_EXPORT taps NativeLlamaPipeline::get_batch_x_residual / Gemma4Pipeline::get_residual into capture_residual; optional GNOSIS_MESH_CAPTURE_LAYER_IDX; mesh JSON omits layer_idx when unset / unknown ([CAPTURE_LAYER_UNKNOWN] = 65535 in BWMR); monotonic export seq; replay hint via hint_amplituhedron_replay_hit; Pleromatic / pleromatic_frame consumers
Mesh transport & bench MESH_CONSUMPTION_WAVE_STATUS.md, MESH_CONSUMPTION_PROTOCOL.md, mesh-consumption-bench — Pair X, frame coalesce, Amplituhedron replay/capture
Swarm / node liveness swarm_net.rs — UDP vibe registry; aeon-monitor, get-swarm-history style CLIs
Amplituhedron / memo parity model.rs caches, worker /amplituhedron/* endpoints (see status doc table)
CV “topology” pipelines TOPOLOGY_IMAGING.md — masks, mesh depth, _why ink topology (not knot theory)

Next engineering bites (no new science, just integration):

  1. Unified spectrometer sink (partial)capture_residual, auto-export hooks on batch-x reads, replay hint from kernel, row-level lane overlays (capture_residual_with_row_lane_overlay), unknown layer sentinel. Still open: Parquet / keyed (prompt_hash, layer, station) from bench merge.
  2. SLO regressions — wire the 1e-4 Pair X parity gate and p50/p95 from mesh-consumption-bench into CI or a nightly “mesh window” job (the status doc already calls out missing deployment measurement).
  3. Dashboardsaeon-monitor-class views extended with spectrometer panels (residual L2 bands vs layer, seed hit rate vs layer depth).

Falsification rule: any claim of TPS uplift or “health” without the bench + deployment window remains architecture-ready, per the project’s own labeling in MESH_CONSUMPTION_WAVE_STATUS.md.


Track B — Knot-shadow spectrometer (formal kernel, longer arc)

Goal: carry a small, explicit shadow of the Kauffman/Jones combinatorics used in open-source/gnosis-math (KhovanovCategorifiesJones, BridgeKhovanovRT3D, ReshetikhinTuraev3DTQFT) alongside mesh artifacts, without pretending that token-space statistics are link diagrams.

Existing surfaces:

Piece Role
Rknot / .rknot rknot/ — spectral weight transport; “knot” naming is tensor/bitwise resonance, not PD codes for links
Lean gallery Finite Diagram galleries, evalAtMinusOne, RT tab — witness theorems; normalization seams are documented in-file
encode-rknot / knot-* CLIs Binary carriers and replay — potential sidecar channel for future Diagram blobs

Architecture that stays honest:

  1. Separate codec — define a versioned container (e.g. gnosis.knot-shadow.v1) with: nPlus, nMinus, resolution rows (h,k)*, optional diagram label. Lives next to workflow metadata, not inside weight tensors.
  2. Pure evaluator — mirror LaurentPoly.evalAtMinusOne / writhe shift in Rust or WASM for the same schema that Lean uses, with golden vectors taken from native_decide-closed examples (unknot, Hopf, trefoil, figure-eight). The Lean module remains the specification; Rust is the deployable oracle.
  3. Report, do not ordain — surface jonesPoly / bracket integers and, separately, RT-style rtUnnormJonesFromNatDet where applicable. Do not silently equate them; the bridge file already records where abs matches and where trefoil incurs a documented factor.

Falsification rule: if a shadow value disagrees with Lean’s closed test vectors, the Rust/WASM evaluator is wrong until fixed — not the mesh.


How the tracks meet (without collapsing them)

  • Correlation-only layer: map time windows of Track A (e.g. residual drift, Pair X miss spikes) to presence or absence of Track B sidecars for the same experiment id. No claim that trefoil surplus “causes” TPS regression.
  • Product framing: Track A answers “is the mesh instrument healthy?” Track B answers “does this run carry a tagged combinatorial shadow, and does it match spec?”

Dependencies (external to this crate)

  • Lean proofs continue to live in open-source/gnosis-math under lake build Gnosis.*; they are not pulled into the Rust hot path unless you add an explicit build step (WASM/bindgen or codegen).
  • BridgeKhovanovRT3D.lean remains the cross-file witness table for bracket vs RT absolute values on the small gallery.

Next exploration

  • Track A: implement the unified spectrometer sink schema and one CI or cron job that runs mesh-consumption-bench against a fixed prompt chain with flags documented in MESH_CONSUMPTION_PROTOCOL.md.
  • Track B: add knot-shadow.v1 protobuf/JSON schema + Rust golden tests that load the same integers as BridgeKhovanovRT3D for unknot/Hopf/trefoil; only then consider wiring encode-rknot sidecars.