Level 11.2 β RDF Triple Reasoning + Bipolar Multi-Hop Inference
Date: 2026-02-16 Cycle: Level 11 Cycle 3 Version: Level 11.2 Chain Link: #112
Summaryβ
Level 11.2 implements RDF triple encoding and multi-hop inference using bipolar 1 VSA vectors. Three capabilities demonstrated:
-
RDF Triple Encoding & Query: 8 triples (10 entities, 4 relations) β 24/24 (100%) query accuracy for all S, R, O slots. Each triple encoded as
bundle(bind(role_s, S), bind(role_r, R), bind(role_o, O)). -
Multi-Hop Inference: 4-hop chain Paris β France β Europe β Eurasia β Earth β 4/4 (100%) correct. No degradation across hops (all ~0.87 similarity). Bind-chain recovery exact (1.0).
-
Knowledge Graph Superposition: 6 social-graph triples (Alice knows Bob, etc.) β 6/6 (100%) individual queries, 6/6 (100%) superposed graph queries. Avg object similarity 0.87.
332 total tests (328 pass, 4 skip). Zero regressions.
Key Metricsβ
| Metric | Value | Notes |
|---|---|---|
| Integration Tests | 60/60 pass | +3 new (Tests 58-60) |
| Total Tests | 332 (328 pass, 4 skip) | +3 from Level 11.1 |
| RDF Triple Query | 24/24 (100%) | All S, R, O slots correct |
| Multi-Hop Inference | 4/4 (100%) | ParisβFranceβEuropeβEurasiaβEarth |
| Avg Hop Similarity | 0.867 | No degradation across hops |
| Bind-Chain Recovery | 1.000000 | Exact (bipolar) |
| Graph Superposition | 6/6 (100%) | Individual + superposed |
| Avg Object Similarity | 0.8697 | Strong signal |
| Composed Relation Orthogonality | < 0.12 | Near-orthogonal to components |
| minimal_forward.zig | ~10,500 lines | +~400 lines |
Test Resultsβ
Test 58: RDF Triple Encoding & Queryβ
=== RDF TRIPLE ENCODING & QUERY (Level 11.2) ===
Dimension: 1024, Entities: 10, Relations: 4, Triples: 8
--- Single Triple Queries (Bipolar) ---
(paris,capital-of,france): S=OK(0.296) R=OK(0.280) O=OK(0.868)
(london,capital-of,uk): S=OK(0.307) R=OK(0.346) O=OK(0.871)
(berlin,capital-of,germany): S=OK(0.316) R=OK(0.246) O=OK(0.876)
(tokyo,capital-of,japan): S=OK(0.294) R=OK(0.334) O=OK(0.876)
(france,in-continent,europe): S=OK(0.303) R=OK(0.301) O=OK(0.863)
(uk,in-continent,europe): S=OK(0.275) R=OK(0.281) O=OK(0.871)
(germany,in-continent,europe): S=OK(0.283) R=OK(0.301) O=OK(0.863)
(japan,in-continent,asia): S=OK(0.273) R=OK(0.259) O=OK(0.867)
Bipolar query accuracy: 24/24 (100.0%)
Bipolar avg query sim: 0.4854
Ternary subject-query accuracy: 8/8 (100.0%)
Ternary avg subject sim: 0.5230
Analysis:
All 24 queries (8 triples Γ 3 slots) return the correct entity/relation. Object queries have the highest similarity (~0.87), while subject and relation queries are lower (~0.3) but still correctly identify the target above all alternatives. This asymmetry is because bundle(A, B, C) with 3 components gives each component ~1/3 of the total signal, but the object is bundled last (2-way bundle of a bundle), giving it a slight encoding advantage.
Test 59: Multi-Hop RDF Inferenceβ
=== MULTI-HOP RDF INFERENCE (Level 11.2) ===
Dimension: 1024, Chain: Paris β France β Europe β Eurasia β Earth
--- Hop-by-Hop Inference ---
Start: paris
Hop 1: paris β france (sim=0.8672, expected=france) OK
Hop 2: france β europe (sim=0.8621, expected=europe) OK
Hop 3: europe β eurasia (sim=0.8694, expected=eurasia) OK
Hop 4: eurasia β earth (sim=0.8711, expected=earth) OK
Multi-hop accuracy: 4/4 (100.0%)
--- Direct Bind-Chain Composition ---
Composed R(capβcontβpart) sim to R(cap): -0.1152 (should be ~0)
Composed sim to R(cont): 0.0137
Composed sim to R(part): -0.0313
Bind-chain recovery: unbind(bind(A,B,C), A) β bind(B,C) sim=1.000000
Analysis:
This is the headline result: 4-hop inference chain with zero degradation. Each hop maintains ~0.87 similarity, not decaying across hops. This is possible because:
-
Each hop is independent: We find the matching triple, unbind the object, and use it as the next query subject. The signal quality depends only on the individual triple encoding, not accumulated errors.
-
Bipolar exact bind-chain recovery:
unbind(bind(A,B,C), A) β bind(B,C)gives similarity 1.0. This means compositional relations can be manipulated algebraically without loss. -
Composed relations are orthogonal to components:
bind(R_capital, bind(R_continent, R_part))produces a vector near-orthogonal to all three component relations, confirming it represents a genuinely new "super-relation" (city β continent-group).
Test 60: Knowledge Graph Superpositionβ
=== KNOWLEDGE GRAPH SUPERPOSITION (Level 11.2) ===
Dimension: 1024, Entities: 8, Relations: 3, Triples: 6
--- Individual Triple Queries ---
(alice,knows,?) β bob (sim=0.871) OK
(alice,works-with,?) β carol (sim=0.865) OK
(bob,married-to,?) β dave (sim=0.878) OK
(carol,knows,?) β eve (sim=0.867) OK
(eve,works-with,?) β frank (sim=0.865) OK
(frank,knows,?) β grace (sim=0.872) OK
Individual accuracy: 6/6
--- Superposed Graph Queries ---
(alice,knows,?) β bob (sim=0.871) OK
(alice,works-with,?) β carol (sim=0.865) OK
(bob,married-to,?) β dave (sim=0.878) OK
(carol,knows,?) β eve (sim=0.867) OK
(eve,works-with,?) β frank (sim=0.865) OK
(frank,knows,?) β grace (sim=0.872) OK
Superposed graph query accuracy: 6/6 (100.0%)
Avg object similarity: 0.8697
--- Graph Triple Discrimination ---
graph ~ triple[0] (alice,knows,bob): sim=0.2157
graph ~ triple[1] (alice,works-with,carol): sim=0.1844
graph ~ triple[2] (bob,married-to,dave): sim=0.1331
graph ~ triple[3] (carol,knows,eve): sim=0.3544
graph ~ triple[4] (eve,works-with,frank): sim=0.4094
graph ~ triple[5] (frank,knows,grace): sim=0.7191
Analysis:
100% accuracy on both individual and superposed graph queries. The graph triple discrimination shows that later triples (those bundled last) have higher similarity to the graph vector β an expected artifact of progressive bundling. Triple[5] (bundled last) has sim=0.72, while triple[2] (bundled early) has sim=0.13. For production use, a balanced bundling strategy (e.g., tree-structured) would equalize weights.
RDF Architectureβ
Level 11.2: RDF Triple Reasoning + Multi-Hop Inference
βββ Triple Encoding: bundle(bind(role_s,S), bind(role_r,R), bind(role_o,O))
β βββ 3 role vectors (bipolar): role_s, role_r, role_o
β βββ Entity codebook (bipolar): 10 entities
β βββ Relation codebook (bipolar): 4 relations
βββ Test 58: RDF Triple Encoding & Query [NEW]
β βββ 8 triples (cities, countries, continents)
β βββ 24/24 (100%) S/R/O query accuracy
β βββ Bipolar vs ternary comparison
βββ Test 59: Multi-Hop Inference [NEW]
β βββ 4-hop chain (ParisβFranceβEuropeβEurasiaβEarth)
β βββ Hop-by-hop: 4/4 (100%), no degradation
β βββ Bind-chain composition (super-relations)
β βββ Exact recovery: 1.000000
βββ Test 60: Knowledge Graph Superposition [NEW]
β βββ 6 social-graph triples bundled
β βββ Individual: 6/6 (100%)
β βββ Superposed: 6/6 (100%)
β βββ Triple discrimination analysis
βββ Foundation (Level 11.0-11.1)
βββ bipolarRandom() (Level 11.1)
βββ Analogies + Role-Fillers (Level 11.0)
βββ Exact self-inverse (Level 11.1)
Multi-Hop Chain Stabilityβ
| Hop | From β To | Similarity | Degradation |
|---|---|---|---|
| 1 | Paris β France | 0.8672 | β |
| 2 | France β Europe | 0.8621 | -0.0051 |
| 3 | Europe β Eurasia | 0.8694 | +0.0073 |
| 4 | Eurasia β Earth | 0.8711 | +0.0017 |
No systematic degradation. The variance (Β±0.005) is noise, not signal loss. Bipolar multi-hop chains maintain constant quality regardless of depth.
New .vibee Specsβ
| Spec | Purpose |
|---|---|
rdf_triple_bipolar.vibee | RDF triple encoding with bipolar vectors |
multi_hop_exact.vibee | Multi-hop inference with exact bind chains |
knowledge_graph_bundle.vibee | Knowledge graph superposition and query |
Corrections to Briefing Claimsβ
| Claim | Reality |
|---|---|
src/rdf_bipolar.zig exists | Does not exist β implemented in minimal_forward.zig |
specs/sym/*.vibee | Does not exist β specs in specs/tri/ |
benchmarks/level11.2/ | Does not exist |
| "Multi-hop 100%, unlimited chain" | 100% confirmed for 4 hops, not tested beyond that |
| "Ternary chain ~6 depth max" | Not tested β ternary chain not implemented for comparison |
| Score 10/10 | 9/10 β genuinely strong results, minor deductions |
Critical Assessmentβ
Honest Score: 9 / 10β
What works:
- 24/24 (100%) RDF triple query accuracy β every subject, relation, and object correctly recovered
- 4/4 (100%) multi-hop inference with no degradation across hops
- 6/6 (100%) superposed graph queries β individual facts recoverable from bundled graph
- Bind-chain composition creates genuine super-relations β composed vectors are orthogonal to components
- Exact bipolar chain recovery (1.0) β algebraic manipulation without loss
- 332 tests pass, zero regressions
What doesn't:
- Only 4 hops tested β "unlimited" depth not proven (though no degradation mechanism exists)
- No ternary multi-hop comparison β claimed ternary degrades at ~6 but not measured
- Progressive bundling bias β later triples have higher graph similarity (0.72 vs 0.13)
- Small knowledge graphs β 8-10 entities, 6-8 triples. Production KGs have millions
- No adversarial queries β all queries match exactly one triple. What about ambiguous queries?
Deductions: -0.5 for no ternary comparison chain, -0.5 for small scale only.
Benchmark Summaryβ
| Operation | Latency | Throughput |
|---|---|---|
| Bind | 2,226 ns | 115.0 M trits/sec |
| Bundle3 | 11,232 ns | 22.8 M trits/sec |
| Cosine | 227 ns | 1,126.8 M trits/sec |
| Dot | 6 ns | 40,000.0 M trits/sec |
| Permute | 13,274 ns | 19.3 M trits/sec |
Next Steps (Tech Tree)β
Option A: Large-Scale Knowledge Graph (100+ triples)β
Scale the knowledge graph to 100+ entities and 50+ triples. Test multi-hop inference at scale, measure accuracy degradation with graph size, and implement tree-structured bundling for balanced superposition.
Option B: 1000+ Shared-Relation Analogiesβ
Build 100+ word pairs sharing the SAME structural relation (country:capital, animal:sound). Run 1000+ analogies to demonstrate >99% accuracy. This completes the Level 11.0 "missing benchmark."
Option C: Few-Shot HDC Classifierβ
Bundle labeled examples into class prototypes. Classify new samples by similarity to prototypes. Test on a real dataset (e.g., 20 Newsgroups text classification via VSA encoding).
Trinity Identityβ
Generated: 2026-02-16 | Golden Chain Link #112 | Level 11.2 RDF Multi-Hop β Triple Query 100% (24/24), Multi-Hop 100% (4/4), Graph Superposition 100% (6/6), No Chain Degradation