BRAIDGROUP
RESEARCH & DEV
Architecture: DTS Engine825 lines of C

Distinction Tree Storage

DTS is a graph-based knowledge store where every concept is a node with a 4D vector signature (concreteness, valence, self/other, focal/peripheral). Knowledge is explicit — named nodes and edges with confidence scores, not implicit float weights. Implemented in dts_reasoning.c.

Hash-Indexed Lookups

Word-pair relationships use FNV-1a hash indexing (4096 buckets) for O(matches) lookup instead of O(N) scan. Weight results are memoized in a 4096-bucket cache. This optimization dropped cascade time from ~67s to <1s.

N-Gram Embeddings

Character 2/3/4-grams are hashed into 64-dim vectors, L2-normalized, with IDF-like rarity boosting. Not learned — deterministic from text. Used for semantic similarity (cosine), contradiction detection, and knowledge transfer.

How It Works

1. Ingestion: Text is BPE-tokenized. Each unique token becomes a DtsNode with truth value, confidence, and source count. Adjacent tokens are linked as word-pair relationships.

2. Label Propagation: Jacobi-style iterative propagation (12 iterations) spreads activation through the graph. Node embeddings are computed from character n-grams and propagated through edges.

3. Reasoning: Queries activate seed nodes. The cognitive cascade (spread → decay → gradient → predict → synthesize) propagates activation through the graph until convergence. New knowledge is created through dialectical synthesis of active node pairs.

4. Proof Chains: Every reasoning step produces a linked proof structure. A proof is valid only if all steps have confidence > 0.5; final confidence is the product of all step confidences.

Current Limitations

Scaling: Performance degrades at 100K+ facts. Latency explodes from <1ms to 43s. Active research on parallel evaluation.

Compositional semantics: "not good" treats "not" and "good" as separate atoms. True negation is an open problem.

Knowledge integration: New facts are stored but score neutral (50). Sentiment doesn't extrapolate from context.

Research Area

The Cognitive Cascade

The cascade is a 5-phase energy minimization loop implemented in dts_cognitive_engine.c (1,328 lines). Phase 1: activation spreads through edges. Phase 2: decay prevents runaway. Phase 3: gradient descent attracts similar nodes, repels tense pairs. Phase 4: predictive coding — nodes predict their vector from neighbors. Phase 5: synthesis creates new knowledge from active node pairs when energy exceeds threshold and cosine similarity ≥ 0.7.

Convergence: the system stops after 5 consecutive spins with 0 new synthesized nodes. The system knows when it's done.

This is the core research — the cascade is working but scaling and semantic depth are active problems.