feat(semantic): knowledge-memory substrate — dynamics organ + living twin + semantic-hash index - #132
Merged
Merged
Conversation
…the twin medium procyber.semantic.dynamics adds what the static VSA/HRR medium + Multiverseal Twin lacked: how entity associations strengthen, consolidate, and fade-but-persist over time. - Two-timescale Hebbian plasticity: each association carries coupled fast/slow variables. A co-occurrence potentiates fast (saturating); slow integrates fast, so it consolidates only under repetition. Between reinforcements both decay, fast >> slow — a single co-occurrence is transient, a repeated one persists (graceful, not a cliff). Clean-room; cites public science (Hebb 1949, CLS McClelland-McNaughton-O'Reilly 1995, cascade Fusi-Drew-Abbott 2005). - Bounded spreading activation for read (Collins & Loftus 1975): seeds pinned, contraction <1, fixed hops — a governed loop, not open. recall() = top-k associates. - Binds upward: consolidated_associations() is the durable projection a twin medium reflects and ontogenesis ingests. Proof: tests/test_dynamics.py — 7 theorems; registered in clean-room FRAMEWORK_FILES (scan clean, 23 files). Deterministic (no RNG); pure-Python (numpy already declared).
… the twin) Factor the two-timescale law into dynamics.combine/potentiate/relax (reused by the edge graph), and add twin.TemporalTwin: each attestation reinforces its context's fast/slow strength and medium() weights every bound record by it, so an unrehearsed association fades-but-persists while a re-attested one stays sharp — a forgetting curve over the reference-gated store. Base MultiversealTwin untouched (reference-at-ingest / only-core-mints / tamper-evident reads); strength only weights already-admitted records. Proof: test_living_twin.py (4) + dynamics/twin suites green (17 total); cleanroom clean.
…sa.similarity procyber.semantic.semantic_hash: signed random projections (SimHash, Charikar 2002) over the real embedding [Re;Im] of a ℂ^D hypervector, whose cosine equals vsa.similarity. n_bits byte-packed codes; Hamming distance is a calibrated estimate of the semantic angle (cos(π·H/n)) — the fast index under twin recall + the association graph (popcount, not a dense similarity sweep). Proof: test_semantic_hash.py (5) — self-identity, orthogonal⇒~half bits, Hamming↔similarity calibration within 0.15, nearest-by-Hamming = nearest-by-similarity. Registered in cleanroom FRAMEWORK_FILES (scan clean, 24 files).
mdheller
added a commit
that referenced
this pull request
Aug 4, 2026
…gy + ④ ingest + ⑤ index (#134) The 5-diagram spine had ① memory (dynamics.py #132) + ② discourse (argument_mining.py #133); this lands the last three organs, all off the SAME Aristotelian/VSA substrate so ingestion, typing and retrieval never drift: - ⑤ INDEX procyber/semantic/semantic_index.py — Hamming NN retrieval over SemanticHasher codes. Ranks by semantic similarity (E[H/n]=θ/π), bounds by radius, and `codes_hex` exports exactly a hyper-feed -manifest.v0 payload — a node's index IS its mesh federation advertisement. - ④ INGEST procyber/lod/triplify.py — text → RDF triples, the category fixing the predicate (substance → standard rdf:type; relation/quantity/quality → disc: predicates). Fail-closed. - ③ ONTOLOGY procyber/ontology/atomspace.py — Aristotle's primary/secondary substance → the AtomSpace type-inheritance lattice (MemberLink instance / InheritanceLink subclass; accidents → EvaluationLink). Standard OpenCog atom types — the lattice a PLN reasoner walks (KKO-IRI grounding is the next step). 14 theorems (⑤ self-retrieval + rank agreement + radius + manifest-code round-trip; ④ one triple per category + rdf:type interop + fail-closed; ③ instance vs subclass vs evaluation + composes a lattice). Registered in the cleanroom FRAMEWORK_FILES — checker clean, 27 files scanned. Pure-Python, deterministic.
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.
The knowledge-memory substrate (procyber.semantic)
Three additive modules that turn the static holographic twin into a living, indexed memory — grounding the 2026-08-04 five-diagram spine (① memory · ⑤ index).
1.
dynamics.py— the temporal organ (① Memory)Two-timescale Hebbian associative graph: a co-occurrence potentiates a fast variable; the slow variable consolidates only under repetition; both decay (fast ≫ slow) → a single co-occurrence is transient, a repeated one persists, an unrehearsed one fades-but-persists. Bounded spreading-activation
recall(a governed loop, not an open one). Clean-room; cites public science (Hebb 1949, complementary-learning-systems 1995, cascade 2005, spreading activation 1975).2.
TemporalTwin(twin.py) — the living mediumThe dynamics wired into the Multiverseal Twin: each attestation reinforces its context's strength and
medium()weights every record by it, so an unrehearsed reputation edge decays-but-persists while a re-attested one stays sharp. The baseMultiversealTwinis untouched (reference-at-ingest / only-core-mints / tamper-evident reads); strength only weights already-admitted records.3.
semantic_hash.py— the compact index (⑤ Index)SimHash over the
[Re;Im]embedding of a ℂ^D hypervector, whose cosine equalsvsa.similarity. Hamming distance is a calibrated estimate of the semantic angle (cos(π·H/n)) — nearest-neighbour recall by popcount, not a dense similarity sweep.Proof
pytest tests/test_dynamics.py tests/test_living_twin.py tests/test_semantic_hash.py— 16 theorems (7 + 4 + 5); the base twin + cleanroom suites are unaffected. Clean-roomFRAMEWORK_FILESupdated (scan clean, 24 files). Deterministic; pure-Python (dynamics + twin coupling) plus numpy (hash).