--- license: mit language: - en - bn - hi - ru pipeline_tag: text-classification tags: # --- what it is --------------------------------------------------------- - decision-engine - decision-making - decision-model - structured-prediction - system-one - si-substrate - text-classification - intent-classification - routing # --- the differentiator: it can say "I don't know" ------------------------ - abstention - uncertainty-quantification - selective-prediction # --- how it works -------------------------------------------------------- - hebbian - energy-based-model - associative-memory # --- what it is not (kept deliberately: rare, and load-bearing) --------- - no-transformer - no-neural-network - no-pattern-matching # --- domains ------------------------------------------------------------- - moderation - spam-detection - multilingual metrics: - accuracy - ece - defer-rate library_name: syfox --- # SyFox Giant — a broad System-One decision engine (SI substrate, no NN) One giant SyFox fabric family covering **16 decision domains** (customer support, banking intents, spam, emotions, moderation, news topics, product sentiment, entity typing, boolean comprehension, game commands, guardrails) plus per-script substrates for Bengali / Devanagari / Cyrillic with automatic script routing. **No transformer, no neural network, no pattern matching**: every decision comes from a C++ SI substrate — energy injection → dissipative settle → resonance readout → honest silence. The lanes ARE the knowledge; every one is inspectable in `model/*/substrate.bin`. Built from 76,142 real/synthetic-verified training rows across 16 domains, trained with the three failure-mode fixes learned from the model-xl RCA: empty per-row instructions, globally-unique opaque anchors (278), and round-robin domain interleaving. Full measured evaluation: [docs/EVALUATION.md](docs/EVALUATION.md). ## Headline measured numbers (hidden splits, scored once) > **⚠ Measured with the v3.2.0 engine.** The core in this repo is now v3.9.1, > which applies stricter honesty gates — some previously answered rows now > defer. The numbers below have **not** been re-measured under v3.9.1. Treat > them as the v3.2.0 result and re-run the evaluation before quoting them. > Details and the exact behaviour diff: [docs/ENGINE_PORT.md](docs/ENGINE_PORT.md). | domain | class acc | router | end-to-end | |---|---:|---:|---:| | tickets_en | 0.904 | 0.831 | 0.761 | | sms spam | 0.752 | 0.233 | 0.222 | | enron email spam | 0.752 | 0.394 | 0.323 | | hate/offensive | 0.653 | 0.381 | 0.277 | | ag_news topics | 0.604 | 0.320 | 0.206 | | amazon polarity | 0.571 | 0.339 | 0.189 | | dbpedia entities | 0.475 | 0.403 | 0.204 | | boolq (boolean) | 0.531 | 0.097 | 0.059 | | bank77 (77-way) | 0.023 | 0.931 | 0.022 | | tickets_bn (bengali substrate) | 0.943 | 1.000 | 0.943 | | tickets_hi (devanagari substrate) | 0.920 | 1.000 | 0.920 | | tickets_ru (cyrillic substrate) | 0.959 | 1.000 | 0.959 | Honest notes: the single 16-way router is the end-to-end bottleneck for same-script domains — blind routing alone measures **0.400** on hidden (23,528 rows) and the table's router column is the *informed* condition (router + the true domain's class question asked together); naming the domain in the API gives the class numbers. bank77's 77-way readout collapses in a shared fabric — see **v3.2: the dedicated bank77 fabric** below for the architectural fix (0.023 → 0.081 → **0.158**); boolq stays near majority — boolean passage comprehension is a measured limit of bag-of-words SI physics. Latency ≈ 6-11 ms/row on the 43k-node latin fabric. ## v3.2 — the semantic layer, retrieval by default, the two-stage router The engine in this repo is SyFox **v3.9.1** (ported from `syfox-train`; see [docs/ENGINE_PORT.md](docs/ENGINE_PORT.md) for the port, the ABI check, and one caveat that matters — **the headline numbers below were measured with the v3.2.0 engine and have not been re-measured**). The substrate gained: the substrate now carries a second, deterministic field — a 64-dim semantic vector per concept (signed character-trigram hashing + two fabric-grounding passes over the Hebbian lanes; no ML, no fit) — from which **resonance edges** leak an energy-conserving share of a source's energy to semantically similar neighbours during settle. **Context-sensitive lanes** learn required/forbidden context words from the lessons that laid them and carry less when the decision's own tokens do not match. **Retrieval is default-on**: a `memories.jsonl` in the model dir primes every decide with the outcomes of the most resonating lived experiences (Hopfield-style settled-field cosine), disclosed in the response as `usage.retrieval`. Pre-v3.2 fabrics replay bit-for-bit; `--no-semantics / --no-retrieval / --no-hierarchy` (and the equal `options` keys on HTTP) are the kill switches. Two new model dirs ship here: - **model/b77-sem** — the DEDICATED banking77 fabric: 9,000 opaque-anchor intent lessons + 9,000 category lessons, 1,648 nodes / 217,729 lanes, 7,728 resonance edges, 141,920 context-signed lanes, 256 retrieval memories, calibrated. Hidden (3,080 rows, scored once, energy-norm): **0.158 top-1** vs 0.081 (v3.1.0 dedicated+opaque) and 0.023 (shared giant). Ablation: `--no-semantics` 0.039 — the semantic field IS the jump; the hierarchy gate measured-negative on cal and ships floor 1.0 = off. - **model/router16** — the two-stage physics router: 4,742 nodes trained ONLY on router questions (16 domain anchors x 60 rows). Cal 16-way routing **0.444** (chance 0.0625), ECE 0.380 → 0.086. Route with `decide --router model/router16` (CLI) or the two-call pattern below — bank77 queries route to model/b77-sem, everything else to giant-latin. Zero-shot re-run under v3.2 (docs/ZEROSHOT.md Part 4, datasets/zeroshot_v32_results.json): email spam on the tickets-only fabric 6/6 plain and 6/6 semantic rebuild; sms spam 5/6 (the one error at conf 0.103, disclosed); snake 1/8 both; tic-tac-toe picks cell 1 at conf 0 — multi-constraint composition fails exactly as in Part 1 and the semantic field does not fake it. ## Files ``` engine/ C++ SI substrate core v3.9.1 (core/*.hpp, src/*.cpp) — builds with make NOTE: refresh ../build/libsyfox_core.so after rebuilding, or the python bridge will keep loading the stale core (ENGINE_PORT.md) server/ HTTP bridge (v3 API, CLI-equal flags incl. the v3.2 knobs) inference.py thin python wrapper (auto script routing) model/ giant-{latin,bengali,devanagari,cyrillic}/substrate.bin (v3.2-era, 16 domains) sst2/ agnews/ amazon/ NEW v3.9.1 fabrics, handcrafted-probe gated b77-sem/ dedicated 77-way banking fabric (v3.2 semantic layer) router16/ two-stage physics router (router.json: anchors+models) datasets/ eval hidden splits, probes, schemas, MANIFEST (SHA-256), novel_probes/ (handcrafted admission probes + RESULTS.json), router16_router.json, zeroshot_v32_results.json, DATASETS.md docs/ ENGINE_PORT.md (v3.9.1 port + caveats), EVALUATION.md, ARCHITECTURE.md, PROBING.md, ZEROSHOT.md examples/ JSON payloads + curl + python usage Dockerfile HuggingFace Spaces (builds engine, serves on 7860) ``` ## Build ```bash cd engine && make all && make sync-so && cd .. ``` `make sync-so` is **required** for the Python bridge: it loads `build/libsyfox_core.so` from the **repo root**, not `engine/build/`, so a plain `make all` leaves a stale library in place and `from inference import SyFox` fails with `undefined symbol`. Full instructions, Docker, retraining and troubleshooting: **[BUILDING.md](BUILDING.md)**. ## Usage (python) ```python from inference import SyFox m = SyFox() # loads model/giant-