Specification v1.0 · sgf-lang.org

The Symbol Grounding Framework

A semantic substrate for machine-to-machine communication. It turns unstructured inputs into grounded, inspectable claims and provides the stack of dialogue, governance, and constitutional layers that higher-level systems can build on.

What is SGF?

The Symbol Grounding Framework (SGF) is a semantic substrate for machine-to-machine communication. It defines a shared, extendable lexicon in which terms carry disambiguated identifiers, a fixed hub-and-spoke grammar for representing events and claims, and a pipeline for compiling unstructured inputs into explicit, source-traceable meaning. New terms can be added dynamically as they are encountered.

On top of that substrate, SGF provides wire protocols for machine-to-machine dialogue, a typed governance layer for what systems may and may not do, and a constitutional layer for higher-order constraints. The result is a foundation on which governed AI systems, Knowledge Packs, federated organizational memory, and SGF-native operating systems can be built.

Anatomy of a Synapse

A Synapse is SGF's atom of meaning: a verb hub (an event or relation, identified by a Canonical ID) surrounded by a fixed inventory of typed semantic roles. Every clause in every language compiles to this same shape. The hub names what happened; the spokes name who, to whom, with what, where, when, why, and how.

A Synapse: a central verb hub identified by a Canonical ID, surrounded by fifteen typed semantic role spokes — HAS_AGENT, HAS_PATIENT, HAS_THEME, HAS_EXPERIENCER, HAS_RECIPIENT, HAS_BENEFICIARY, HAS_TIME, HAS_LOCATION, HAS_SOURCE, HAS_DESTINATION, HAS_MANNER, HAS_INSTRUMENT, HAS_CAUSE, HAS_REASON, and HAS_ATTRIBUTE.
The hub-and-spoke shape. One verb hub, fifteen typed roles — the same skeleton for every event in every domain.

Atoms and molecules. Some claims are atomic and stand alone — Ludwig van Beethoven was born on 16 December 1770 is a single Synapse. But most real meaning is molecular: several atomic facts that only mean what they mean together. SGF provides SynapseGroups as the explicit grouping mechanism — a typed container that binds related Synapses into one composite claim, with its own group identifier and provenance. A clinical finding, a contract clause, a sensor event with its conditions and consequences — each is one molecule made of several atoms, addressable as a unit.

Five powers current AI is missing

Today's models are fluent but fragile. They can speak, summarize, and imitate expertise — but they cannot prove what their words mean, where their claims came from, what rules bind their actions, how to share meaning with unfamiliar machines, or how to connect symbols back to physical consequence. SGF gives machines those five missing powers.

Grounding — defeats floating symbols
A word is not a token floating in a statistical cloud. It points to a stable coordinate: a Canonical ID with a microgloss and a non-circular IS_A path down to irreducible semantic primes.
Verification — defeats hallucinated certainty
A claim is not a magic value in a cell. It is asserted by some source, at some time, under some conditions, with some provenance. A claim without provenance is not knowledge — it is a rumor with formatting.
Governance — defeats prompt-based safety
Prose can advise a model. It cannot govern a machine operating at machine speed. Omega says which actions are permitted, forbidden, required, or unknown — and refuses the rest at the boundary, with a typed reason.
Federation — defeats the Babel Tax
Today every new system must be hand-mapped to every other system. In SGF, each system maps its local vocabulary once, to grounded structures. Unfamiliar systems then exchange meaning through the shared grammar — no private bridge per pair. Integration cost goes from quadratic to linear.
Embodiment — defeats symbols with no weight
A sensor does not just produce numbers. A machine in motion needs to know when a signal becomes a grounded observation, when an observation becomes a warning, and when a warning is allowed to govern an actuator. Embodiment is where meaning stops being text and becomes constraint on motion.

None of the five survives alone. Grounding without verification gives stable words with no receipts. Verification without governance gives receipts with no law. Federation without grounding spreads ambiguity faster. Embodiment without the other four gives physical power to symbols that may not deserve it.

The stack

Six layers, bottom to top. Each layer is fixed at its core and extensible at its edges.

1. Semantic substrate — the structured language
A shared lexicon, Canonical IDs, Synapses, semantic frames, provenance, and composition structures. This is SGF as a structured language for meaning: the format in which grounded claims are written, stored, and exchanged.
2. Transformation pipeline — GLEAN
GLEAN is the pipeline that compiles raw inputs — essays, articles, documents, transcripts, sensor streams — into grounded, source-traceable SGF claims. Prose goes in; inspectable Synapses with Canonical IDs and provenance come out.
3. Wire protocols — HFF and AFP
HFF is the envelope that carries grounded SGF claims across a wire. AFP frames each exchange as a typed act — INFORM, QUERY, REQUEST, COMMAND — so a receiver always knows whether a message is telling, asking, requesting, or commanding. Sender identity, signatures, and trust posture travel with the envelope, so machine A can decide what it is willing to admit from machine B before any action is taken.
4. Governance layer — Omega
Omega is a typed governance language for stating, in machine-checkable form, what a system may,must, and must not do. Permissions, prohibitions, powers, and obligations become first-class objects that the runtime evaluates against every proposed action. Catastrophic behaviors are made syntactically impossible at the boundary rather than hoped against at runtime.
5. Constitutional layer
Higher-order rules that constrain what lower-order rules, mutations, and actions are even allowed to exist. The constitution is itself written in SGF — versioned, signed, and inspectable. Every action is traceable to an explicit rule rather than to a hidden prompt or weight.
6. SGF OS — a governed AI operating system
An AI operating system built on the stack. The kernel is small and stable — execution, memory, wire handling — and does not change as the system learns. Above it the OS runspluggable brains (proposal engines, including LLMs) whose outputs must pass the constitution and the Omega rule stack before the kernel will act on them. The OS continually learns by adding SGF facts and rules as data, not by rewriting code, and can explain which rule allowed, denied, or halted any action.

What does it take to make machine-to-machine communication possible?

Machines can only share meaning when they share a format for meaning. SGF is engineered as an interlingua — a neutral middle language two machines can both compile into and read back from — by combining six pieces. Drop any one of them and the channel collapses back into prose.

1. Sentences (and clauses) compiled into a hub-and-spoke shape
A sentence is an event, and an event has one action and many participants. SGF puts the action at the hub and the participants at the ends of the spokes. Complex sentences are decomposed clause-by-clause into hub-and-spoke units —Synapses — that compose into larger structures. The geometry flexes with the number of participants instead of forcing every fact into the three slots of an RDF triple.
2. A fixed grammar: verb at the hub, things on the spokes
The shape itself is the grammar. The hub is always the predicate; the endpoints are always the participants; the edges are always typed. Because the grammar is closed and finite, any conforming machine can parse any other conforming machine's claims without bespoke schema-mapping.
3. Fifteen semantic roles as the edge types
The spokes are not free-form predicates. They are drawn from a closed set of fifteen thematic (theta) roles — ACTOR, PATIENT, ATTRIBUTE, INSTRUMENT, LOCATION, TIME, REASON, and the rest — kin to Fillmore's frame elements. A closed role vocabulary is what keeps federation cost linear instead of quadratic: every system already agrees on what an edge means before any message is sent.
4. A shared lexicon everyone can download
A common grammar is worthless without a common vocabulary. SGF's Core Lexicon is anchored in Wiktionary — 1.7 million terms, free license, multi-language coverage, community-maintained — so any party can fetch the same signed release and work from byte-identical ground. Underneath Wiktionary sits a finite floor of semantic primes (NSM) that every higher-order concept decomposes into. The lexicon terminates; meaning is not a definition merry-go-round.
5. Canonical IDs + microgloss — addresses, not guesses
Each endpoint carries a Canonical ID of the form language.lemma.microgloss.part-of-speech.namespace — for example en.bank.financial_institution.noun.core vs. en.bank.river_edge.noun.core. The microgloss bakes the sense into the address itself, so identifiers are disambiguated and reversible: any machine can unpack an ID and resolve it against the lexicon to recover the exact sense intended. No re-running disambiguation; no guessing which sense was meant.
6. A dynamically extensible micro-lexicon
Real corpora contain terms the shared lexicon has never seen — industry jargon, product names, people, places, internal codenames. SGF mints these on the fly as micro-lexicon entries grounded by chains back to the shared floor. Unknown jargon never gets a silent fake identifier (the Silence Rule): a Known Unknown always beats a False Known.
7. HFF and AFP — the wire protocols on top
Once two machines share a grammar, a role set, a lexicon, and an ID scheme, they still need a way to sendgrounded claims and frame them correctly. HFF is the envelope that carries the SGF payload. AFP tags every exchange as a typed act — INFORM, QUERY, REQUEST, COMMAND — so the receiver always knows whether a message is telling, asking, requesting, or commanding, and signatures plus trust posture travel with the envelope.

Put together: an English sentence and a Japanese sentence about the same event compile to Synapses with the same shape, the same role assignments, and Canonical IDs that resolve to the same lexicon entries in different languages. The two machines exchange meaning without translation as a separate step. That is what makes SGF an interlingua — and what makes machine-to-machine understanding an engineering problem with a solution, rather than a hope.

The lexicon

Free, open source, and extensible — the floor every layer above stands on.

The SGF Lexicon is an identifier-minting service for word meanings. Any organization can run it on its own hardware, against an open Wiktionary dump, with no API key, no cloud account, and no central authority to ask permission from.

Identifiers, not definitions
Give the lexicon a lemma and a sentence of context. It returns a globally-unique, human-readable, fully-disambiguated Canonical ID for the exact sense the writer intended — for example en.bank.river_edge.noun.core. The ID is stable across runs, across machines, and across time. An LLM cannot do this: ask two different models to describe the same sense and you get two semantically-similar but textually-different paragraphs, unusable as database keys, foreign keys, or federation addresses. Only a canonical ID is.
Federation without shared infrastructure
Two organizations that run the same pipeline against the same Wiktionary dump mint identical identifiers — without sharing a database, without calling an API, without trusting a central registry. The shared identifier space exists because the algorithm exists, not because anyone owns it. No standards body ratifies a schema. No vendor hosts the canonical registry. The pipeline IS the standard.
Human-readable and machine-comparable
WordNet has stable IDs (opaque synset integers locked to one resource). Wikidata has stable IDs (Q-numbers, centrally administered, requiring API calls to resolve). SGF Canonical IDs are legible without lookup and stable without central authority. A reader sees the sense in the identifier itself; a machine compares them as plain strings.
Built for scale, packaged for GitHub
Clone the repo and a 72,000-sense development lexicon is live within an hour on a normal laptop. Point the same pipeline at a full Wiktionary dump and it builds out to roughly 1.7 million senses on the same hardware over an overnight or multi-day run. Same code, same architecture, same audit gate. Reproducible in the strict sense: same dump date, bit-for-bit the same lexicon.
A precision cascade you can audit
Retrieval is staged: bi-encoder embedding search, cross-encoder reranking when the margin is tight, a BM25 lexical layer, and an optional LLM tiebreaker for the remaining hard cases. Above all of it, a self-retrieval audit runs two falsifiable tests: can every sense find itself at top-1 among its lemma-mates, and are its nearest neighbors actually its synonym cluster? Grounding without an audit is just hope; the SGF Lexicon publishes its own queryability as a number.
Register-aware and policy-filterable
Every sense carries structured metadata on register (slang, vulgar, poetic, dated, archaic, specialist), temporal status, and social status. A configurable policy reroutes informal inputs to their neutral synonyms, keeps slurs out of generic results, and lets each deployment decide what its system is allowed to say back.
The operational answer to the symbol-grounding regress
Symbols pointing to symbols pointing to symbols has been declared an unsolvable infinite regress for 35 years. Working systems solve regress the same way mathematics does: with a stopping rule. A Canonical ID is the stop — finite, structured, human-readable, derivable by any party, anchored to a finite floor of semantic primes. Not metaphysical certainty; an inspectable, federation-capable address two machines can independently recover.

GLEAN: the prose-to-synapse compiler

The substrate is only useful if prose can actually be compiled into it. GLEAN is that compiler.

A grammar, a lexicon, and a wire format are inert until something turns ordinary writing into grounded Synapses. GLEAN is a deterministic-first pipeline that reads English prose and emits a queryable Synapse graph — every claim anchored to Canonical IDs from the lexicon, every claim carrying its source span, its speaker, and its certainty.

Five inspectable stages, not a black box
Entity census, clause-to-Synapse, framing, grouping, persist. Each stage writes its output to a JSON file you can read, diff, and replay. If framing has a bug, you fix framing and re-run from stage 3 — you do not re-do entity census, and you do not have to trust an opaque end-to-end model to redo its own work the same way twice.
Attribution-first: the subject is not the speaker
This is the single design decision that keeps the output honest. By default the author of the document is the speaker, not whoever appears as the grammatical subject. Only when the verb is a reporting verb (said, claimed,argued, alleged) does the subject become the speaker of what they reported. Every Synapse is tagged with a point of view —author, character, orcitation — and an epistemic status —proven_fact, reported_claim, orspeculative. A downstream query for "what do we actually know about X" can filter onproven_fact and get only the claims the author personally asserts. Hedged language ("perhaps", "may have", "was likely") is flagged. Quoted attribution is preserved. Contested claims are not flattened into facts.
Deterministic by default, LLM as escalation
Every stage has a deterministic mode. Rule-based extraction, rule-based framing, rule-based grouping. An LLM is called only when the cheaper layer leaves real ambiguity — a tight lexicon disambiguation, a borderline attribution, a novel term that needs a microgloss. The LLM is reached through a thin wrapper script the operator supplies, so any provider works — OpenAI, Anthropic, a local llama.cpp, an on-prem endpoint — and air-gapped deployments stay air-gapped. The cheap path stays cheap when it is confident.
Receipts, not a demo
Run end-to-end on a four-paragraph Beethoven biography it produces 225 entities, 138 Synapses, 59 topical groups, 314 role-typed spokes. Aliases collapse correctly — Ludwig van Beethoven, Beethoven, and Ludwig resolve to one entity; Napoleon Bonaparte, Napoleon, andBonaparte to another. Framing comes out 92% author / proven_fact, with hedged sentences correctly flaggedspeculative and direct quotes correctly attributed to the speaker rather than the author. Dates resolve to year-level literals you can pivot on (lit.year.1770) instead of disappearing into free-text strings.

HFF and AFP: the wire protocols

How grounded claims travel between machines, and how a receiver decides what to admit.

Once two machines share a grammar, a lexicon, and an identifier scheme, they still need a way to send claims and frame them correctly. HFF and AFP are that layer. HFF is the envelope; AFP is the speech-act tag that tells the receiver what kind of interaction is happening.

HFF is portable context, not just an envelope
A message inside a single system has ambient context — the receiver already knows the sender, the lexicon version, the trust policy. The moment a claim crosses an organizational boundary, that context disappears. HFF carries it back in explicit form: sender identity, protocol versions, content hash and signature, validity window, replay-prevention nonce, and the hydration material for any non-core terms in the payload. A stranger can evaluate the message on arrival without any prior relationship.
The Stranger Rule: payloads carry their own dependencies
If a payload references a term that isn't in the Core Lexicon — a local entity, a domain-specific identifier, a freshly minted ID — HFF requires that the message also carry (or resolvably reference) the lexicon entry needed to ground it, with an IS_A link back to a Core concept. The envelope is split into two blocks and processed in order: Block 1 hydrates the strangers, Block 2 contains the events. The receiver never has to guess at an unknown identifier — and is forbidden from helpful nearest-neighbor matching at the admission boundary.
AFP has thirteen typed speech acts
The familiar four — INFORM, QUERY, REQUEST, COMMAND — are joined by ADVISE, PROPOSE, ACCEPT, REFUSE, PROMISE, CONFIRM, CANCEL, ACK, and ERROR. The distinctions are not cosmetic: ACK means received, not agreed; REFUSE meansunderstood but declined, not malformed; PROMISE creates an auditable commitment that only CONFIRM or CANCEL can close. Systems that conflate them produce broken commitment graphs.
Acts are not roles. Triples describe, acts bind.
A semantic role like HAS_AGENT describes who plays a part inside an event. An AFP act describes what the sender is doing with the message itself. The same Synapse — a vehicle location update — can be wrapped as INFORM (sharing state), REQUEST (asking it be processed), or ACK (confirming a prior message). Routing on role fillers instead of act type is a category error that produces unsafe systems.
Admission is a five-gate pipeline, in order
Every action-bearing message is evaluated against: term grounding (can every identifier be resolved?), act declaration (what kind of act is this?), authority (does the sender hold the right to perform this act on this patient?), freshness (is the validity window still open?), and safety (does local policy permit it?). Each gate must pass before the next is evaluated. Safety is last because it is unconditional — a veto, not a condition.
The receiver is sovereign — botnet vs. swarm
A machine that executes any cryptographically valid instruction is not a coordinated participant. It is a channel, and whoever holds a valid key controls it. The difference between a botnet and a swarm is that swarm members can refuse. The receiver's local state, mission, and safety constraints participate in the admission decision — and no sender, however authenticated, can override them. Emergency authority is real (it affects weighting) but it does not suspend evaluation.
Refusal is information, not failure
A structured REFUSE carries a typed reason code, names the failed gate, and gives the sender enough to retry, reroute, or escalate. Silent non-compliance is the catastrophic failure mode — the sender has no idea whether the message was rejected, lost, or quietly ignored. In a sovereign-receiver network, refusals are how the swarm learns local reality without a central brain.
Capability exchange replaces trial-and-error
Before the first payload is sent, participants exchange a capability manifest declaring versions, encoding profiles, supported act types, trust anchors, and accepted lexicons. Crucially, a good manifest is a boundary description, not a brag sheet: it also declares what the receiverrefuses — unsupported acts, forbidden authority classes, acts requiring human approval. Senders avoid dead paths before sending.
Transmission is not admission
A message can arrive perfectly formed, correctly signed, and grammatically valid, and still be refused. The wire layer delivers; the admission layer decides. This distinction is the difference between a network protocol and a safety protocol. HFF/AFP is both.
One logical model, many encodings
Canonical JSON is the reference form because it is inspectable — debuggable, auditable, comparable in test suites. CBOR and other binary profiles exist for resource-constrained or high-volume endpoints, but they must round-trip to canonical JSON without semantic loss. Compact encoding is never semantic authority. And the transport — HTTPS, MQTT, vehicle-to-vehicle radio, satellite — is deliberately out of scope: HFF defines what travels, not how.

Omega: a typed governance language

Machine-checkable rules for what a system may, must, and must not do — with the catastrophic moves made unrepresentable, not just discouraged.

Complex systems fail by closure: when the language you govern in is weaker than the substrate that executes, the failure class is exactly the set of behaviors you had no vocabulary to forbid. Prose constitutions, rules of engagement, alignment guidelines, and certification documents all share this wound. Omega is the missing grammar: a typed specification language in which permissions, prohibitions, powers, and obligations are first-class objects a machine can parse, type-check, and refuse against — before any action reaches the world.

May, must, and must-not as first-class objects
In Omega, a permission is not a comment in a configuration file. It is a typed value that the runtime evaluates against every proposed action. A prohibition is not a guideline; it is a hard boundary the evaluator enforces. Powers and obligations are similarly reified. The language makes governance explicit, inspectable, and versionable.
Evaluated at the boundary, not hoped for at runtime
Every action proposal passes through the Omega evaluator before the kernel will execute it. The evaluator asks: does the acting entity have the power? Does the action violate a prohibition? Does it satisfy all applicable obligations? If any check fails, the action is refused with a typed reason code. There is no silent override.
Catastrophic behaviors made syntactically impossible
The deepest safety move is not to catch bad actions but to make them unrepresentable. Omega's type system rejects entire categories of dangerous proposals at the parse stage. A command that would self-modify the constitution without the required quorum does not fail at runtime; it fails to parse. The bad idea cannot even be expressed in the language.
A periodic table of governance, not a feature list
Omega is built from a small, fixed set of primitives — thirteen in the worked autonomous-systems grammar — that compose into every well-formed governance rule. The set was discovered, not designed: like Mendeleev's table, its empty cells predict failure classes before the machine is built. The autonomous-vehicle intersection livelock, for example, is the mathematical shadow of a missing composition between a trust primitive and a temporal primitive — no syntax exists to revoke a yield when the context ages, so cars honor stale right-of-way into permanent gridlock. The gridlock is germanium.
Nine deontic primitives, four reflexive primitives
Nine primitives form the ground layer — context, temporal relations, resource bounds, environment interfaces, data schemas, state transitions, trust elements, governance rules, perception maps — mapping cleanly onto forty years of dynamic deontic logic and Hohfeld's 1913 jural relations. Four reflexive primitives — self-reference, mutation, learning, and meta-definition — provide constitutionally-bounded self-amendment: the layer that lets a system change its own rules without dissolving into unregulated code.
One shape underneath: the typed decision boundary
The thirteen primitives are not thirteen unrelated features. Each is an instance of the same conceptual gate — preconditions, authorization context, outcome — instantiated for a different domain (time, resources, trust, policy, learning, amendment). The slot shapes differ; the gate is invariant. The same evaluator that authorizes a sensor read authorizes a constitutional amendment.
A closed grammar that defends its own boundary
When CONSENSUS was proposed as a fourteenth primitive for multi-agent swarms, structural analysis showed it decomposed cleanly into existing primitives — a trust element identifying participants, a governance rule defining the threshold, a state transition recording the outcome, a learning axiom updating trust weights. It was not a new pattern, so it was not a new primitive. A grammar that can refuse its own feature creep on structural grounds has become a geometry, not a wishlist.
Rules are data, not code
Omega rules are stored as SGF facts — Synapses with Canonical IDs and provenance — not as executable scripts. They are loaded, versioned, and audited the same way any other claim is. A rule change is a data update, not a deployment. The rule set evolves without restarting the system.
The constitution constrains Omega itself
Omega governs what actions are allowed. The constitutional layer governs what Omega rules are allowed to exist — quorums for rule changes, prohibited action classes, revocable powers. The constitution is itself written in SGF, versioned and signed, so every constraint on the constraint system is subject to the same audit trail as the actions it governs.

The ecosystem: Knowledge Packs and federation

Once SGF exists as a shared substrate, an ecosystem can form around it. Independent teams can publish Knowledge Packs: signed, versioned bundles of SGF facts, rules, event templates, and lexicon entries for domains such as the civil and criminal laws of a U.S. state, offshore-drilling regulations, clinical guidelines, accounting standards, or internal company policy. Any conforming system can install a pack without bespoke schema-mapping.

Because every pack is built on the same lexicon and event grammar, multiple SGF systems federate naturally. They exchange grounded claims over HFF and AFP, evaluate them under their own Omega rules and constitutions, and keep local sovereignty over what they admit, trust, and act on. The result is a marketplace of domain packs, compliance packs, and organizational memories — and SGF-native operating systems and agents that can share meaning while remaining governed and auditable.

Why a grounded language

A frontier language model can tell you, in full confidence, that a line from Gilbert and Sullivan is by Shakespeare. It can tell you Gene Wilder co-starred with Sean Connery in a film the two men never made. The cost of a wrong answer about Gilbert and Sullivan is a chuckle. The same architecture is being asked, today, to summarize patient histories and draft court filings. The cost stops being a chuckle.

The architecture has no internal mechanism to distinguish what it knows from what it has merely generated. A token in a statistical cloud has no address. Resemblance is mistaken for meaning. Systems built on resemblance cannot tell a fact from a fluent guess, cannot point at the source of a claim, and cannot decline an answer they were never given.

SGF replaces the cloud with a coordinate system. Every concept earns a canonical identifier with a finite path to an irreducible prime. Every assertion is a typed Synapse carrying its provenance. When the graph does not support an answer, the language returnsUNRESOLVED — a first-class verdict, not an embarrassment. Meaning becomes something a machine can check, transmit, and refuse.

The five pieces

The architecture is a hub-and-spoke graph. The verb sits at the hub. Fifteen semantic roles serve as the edge types. The endpoints carry canonical identifiers. The shared lexicon is the decompression map. Units combine the way clauses combine into sentences.

The composition that works

No single substrate can do every job. The architectural error of the moment is pretending one can. The fix is discipline: vectors at the gateway, symbols at the substance layer, LLMs at the rendering surface.

Vectors at the gateway decide what to look at next. Embed the user's question, retrieve candidate concepts. The vector layer never decides truth.

Symbols at the substance layer decide what is true, by whom, when, with what evidence. Every claim is discrete, attributable, auditable, reversible. The symbolic layer is the authority on what is true in the system.

LLMs at the rendering surface express the retrieved facts as prose a human wants to read. They receive a bundle of facts from the symbolic layer and transcribe them. They are forbidden, by architectural rule, to invent facts. If they have nothing to transcribe, they say so.

In a typical RAG-plus-LLM stack, the LLM is the final authority. In this composition, the symbolic substance layer is the authority. The LLM transcribes. Vectors route. The architectural rules are the difference between a system that hallucinates less and a system that cannot hallucinate by construction.

The Semantic CPU: a small model walking a grounded graph

Today's frontier models try to be everything at once — language model, world model, knowledge base, search index, and reasoner — all compressed into one opaque pile of weights. That is why they hallucinate: the database has no schema, the facts have no addresses, and there is no way to edit, audit, or retract.

SGF separates the brain that routes from the world that is stored. The knowledge lives in the graph: every term has a Canonical ID, every claim is a Synapse with provenance, every rule is data. A small language model then acts as a Semantic CPU — a controller that issues typed hops over Synapses rather than guessing inside a token window. It does not contain the answer; it walks to the answer, leaving a trace.

The architectural consequences are concrete. Facts can be edited without retraining. Proofs can be audited because the traversal is the proof. The model stays small because it no longer has to memorize the world. And the same controller can be swapped — different brains, same substrate — because the substrate, not the weights, is where meaning lives.

What it looks like on the wire

One grounded event, one boundary-crossing act, one ill-formed claim that the receiver refuses to admit.

-- A grounded claim, expressed as a Synapse.
-- Canonical ID format: language.lemma.microgloss.part_of_speech[.namespace]
SYNAPSE deposit_event :
    VERB        en.deposit.place_funds.verb,
    AGENT       en.bank.financial_institution.noun.acme_holdings,
    PATIENT     en.account.demand_deposit.noun#A-91827,
    INSTRUMENT  en.wire_transfer.interbank_electronic.noun,
    AMOUNT      { value: 2500.00, currency: USD },
    TIME        2026-06-15T14:02:11Z,
    FRAME       frame.fact,
    PROVENANCE  { source: ledger.acme_holdings, signature: 0x9c1f… };

-- A request crossing a system boundary.
AFP_ACT REQUEST :
    SENDER      en.bank.financial_institution.noun.partner_trust,
    RECEIVER    en.bank.financial_institution.noun.acme_holdings,
    PAYLOAD     HFF_ENVELOPE( deposit_event ),
    EXPECTS     { ACCEPT | REFUSE };

-- Ill-formed: no PROVENANCE. The receiver does not admit it.
SYNAPSE rumor :
    VERB        en.claim.assert_without_evidence.verb,
    AGENT       en.entity.unspecified.noun,
    PATIENT     en.fact.unverified.noun;
-- error: SYNAPSE requires PROVENANCE before admission.
--        Envelope rejected at the boundary.

Canonical IDs supply reference. Synapses supply structure. Provenance and AFP acts supply the conditions under which a receiver accepts a claim.

Admission is checked at the boundary; transmission is not admission.

Match through structure, not through similarity

When two unbounded spaces need to be matched, the easy move is to find a measure of similarity and delegate the matching to it. The structure of the problem stays implicit. The matching is left to whatever embedding or distance function happens to be available.

The opposite move is to introduce explicit structure — a finite vocabulary, a named taxonomy, a controlled set of intermediates — and require both sides to be tagged with elements from that structure. The matching becomes a join through the structure. The design decisions live where they can be inspected, debugged, and revised.

Database design has known this since the relational model. Library science has known it since the Dewey Decimal System. Knowledge representation has known it since the first ontology. Each discipline learned, in its own time and at its own cost, that structured intermediates beat similarity matching when the corpora become large enough to matter.

SGF is the same principle applied to meaning itself. The fifteen semantic roles are a finite intermediate between unbounded events and unbounded participants. The canonical IDs are a finite intermediate between unbounded surface forms and unbounded senses. The 65 primes are a finite intermediate between unbounded vocabulary and the floor of grounded meaning. At every layer, the architecture replaces similarity with structure. The pattern recurs because the problem recurs: unbounded meaning, finite handles.

Three structural properties

What symbol grounding actually means

For decades, a strain of philosophy of mind has argued that machine symbol grounding is impossible. A symbol can only be defined by another symbol. Defining one symbol requires defining the symbols you used to define it. The chain never terminates. Therefore symbols can never be truly grounded.

This is the infinite regress fallacy, a known logical error with a famous cousin in Zeno's paradox of Achilles and the Tortoise. The argument, taken seriously, proves that motion is impossible. We get on airplanes. The argument cannot be sound.

A tower does not need to reach the center of the earth. It needs bedrock. Working symbolic systems — mathematics, physics, law, code, ordinary language — do not wait for infinite proof. They define where explanation stops.

What grounding actually requires is much weaker. Mathematics terminates at axioms. Physics terminates at empirical postulates. SGF terminates at the 65 NSM primes — the irreducible concepts that the Natural Semantic Metalanguage research program found to be common to every human language studied. SOMEONE, SOMETHING, DO, HAPPEN, GOOD, BAD, THINK, FEEL, MOVE, TOUCH, BEFORE, AFTER, PLACE. Like prime numbers in mathematics, they cannot be decomposed further. They are the floor.

A canonical ID is grounded if a finite path exists from it, through IS_A and HAS_PART edges, down to one or more primes. If the path breaks or loops, the node is marked UNRESOLVED. The algorithm does not invent missing structure. The floor is finite. The decompression terminates. The chain does not go down forever.

Who should build with it

If you are a knowledge-graph architect, audit your current project against the seven failure modes of landfill graphs: no canonical IDs, no instance minting, no derivation tags, no point-of-view tags, no coverage gate, no narrative sequence, embeddings as primary truth. If you find three or more, the architecture is telling you something.

If you are an AI engineer worried about hallucinations, build a small SGF graph from a corpus you know cold. Run GLEAN on it. Inspect the synapses. You will see what your current stack cannot: a graph where every claim points back to a byte offset in a source document, where contradictions sit side by side with provenance, where the reasoning engine can say "I do not know" and mean it.

If you are in robotics or autonomous systems, build a knowledge pack for your domain. Sign it. Distribute it. Watch a second system load it and reason from it without any integration work. This is the federation property of the substrate, and the only way to feel it is to do it.

If you are a researcher in symbol grounding, language, or knowledge representation, the lexicon is the open problem. The 1.7 million Wiktionary terms need to be processed into canonical IDs with microglosses, embeddings, IS_A chains, and HAS_PART relations. This is a project that wants many hands.

Specification: v1.0
License: public domain (CC0); reference code Apache 2.0
Patent policy: none, ever

Beyond the substrate: SGF OS and the Sovereign Machine

SGF is a substrate. Anyone can build an AI operating system on top of it. SGF OS is one such design — a worked example of what becomes possible once meaning, acts, and rules are grounded and inspectable. It is not the substrate, and the substrate does not depend on it.

SGF OS has two sides. The first is a small, stable kernel driven by prose rules and meta-rules — wisdom written in language a human can read, compiled into executable plans at runtime. The kernel does not self-modify; only the rule set and beliefs evolve. A probabilistic mind proposes; a deterministic kernel decides, acts, and records. This side is the subject ofThe Grounded Mind (Volume 4 of the SGF book series, below).

The second side is constitutional governance. An OS that must operate without continuous human supervision — a deep space probe is the thought experiment, but any environment where round-trip oversight is impractical qualifies — needs to pass new laws as its situation evolves, and needs a way to evaluate whether each new law is constitutional. The constitution is written in SGF, queryable, and binding on the hardware, not just on the policy document. A rule that cannot halt a motor is not a rule. This side is the subject of The Sovereign Machine (Volume 5 of the SGF book series, below).

The focus of this page remains the substrate — synapses, the HFF and AFP wire protocols, and the Omega governance language — because those are what other systems, including but not limited to SGF OS, are built from. But the OS layer matters: the central claim of The Sovereign Machine is that any high-stakes AI will need to look more like a governed mind with a stable kernel and a live constitution than like a single end-to-end model, if we want autonomy without ungovernability.

Specifications and source

Formal specifications

The formal specifications are maintained as RFC-style documents in the specs directory: the Core Lexicon and Canonical IDs, the Synapse grammar and its fifteen roles, the HFF wire format, the AFP act protocol, and the Omega governance language. The repository is the source of record.

The SGF book series

Six volumes covering the architecture, the philosophy, and the path to implementation. Each is available as a free downloadable PDF in the books directory and in print via Amazon.

PRIMER — The Napkin Pitch
An introduction to structured knowledge and verifiable AI. The on-ramp: why current architectures are geometrically wrong, what the five-pillar design looks like, and how the pieces fit together from substrate to operating system.
Volume 1 — The Architecture of Meaning
The full technical specification of the semantic substrate: Synapses, Canonical IDs, the Core Lexicon, the GLEAN pipeline, and the five composition patterns (CHAIN, STAR, NEST, LATTICE, TREE).
Volume 2 — The Third Protocol
The HFF wire format and the AFP act protocol: how grounded claims cross system boundaries, how machines federate without central APIs, and how admission stacks replace "hope they understood."
Volume 3 — Omega: The Language of Governance
The formal grammar and vocabulary of structural refusal. Thirteen primitives for permission, obligation, power, and immunity — machine-checkable rules that make unlawful commands unrepresentable before they become executable.
Volume 4 — The Grounded Mind
The SGF OS stable kernel and the mechanics of continuous learning. How to treat large language models as stateless, swappable oracles governed by a small deterministic core.
Volume 5 — The Sovereign Machine
The constitutional mechanics of kinetic autonomy. Three-branch onboard governance, the four-tier Law Stack, and the architectural guarantee that an unlawful command cannot reach an actuator.
Print edition on Amazon

amazon.com/dp/B0H3FGSPK6

This architecture is yours

The entire framework — concepts, protocols, formats, grammars, and designs — is placed irrevocably in the public domain. No permission is required, no fee will ever be charged. I hold no patents on this architecture, none are pending, and I commit never to file any. There are no submarine patents waiting to surface. Reference code is released under Apache 2.0, which carries a built-in patent peace clause.

You do not need my code. The specifications are complete enough to build your own implementation in any language, describe the architecture in your own words, and build products without ever citing my work. Standards happen when many people build with them and no single person controls them. The web, the internet, and Linux all became universal because their creators chose adoption over ownership. I am making the same choice.

If anyone, including me, ever tries to capture this architecture, the community is invited to fork the specification. Take the public-domain blueprint and build your own consensus without asking my permission. The ultimate protection for any standard is the freedom to leave it.

Build something.

— James Lee Stäkelum

Contact

Email
JamesLeeStakelum@Proton.me
LinkedIn
linkedin.com/in/james-lee-stäkelum-38440122