Published May 14, 2026 | Version 1.2

BaryGraph: Relationships as First-Class Vectors for Cross-Domain Retrieval

Contributors

Description

BaryGraph is a knowledge graph architecture in which every relationship between two entities is promoted to a first-class document — a BaryEdge — with its own 768-dimensional embedding, its own position in a forest hierarchy, and its own behavior in nearest-neighbor search. Above the leaf levels, BaryEdges themselves recurse into higher-order triads (MetaBary), constructed algebraically without further embedding calls.
The architecture's primary design goal is cross-domain relational retrieval: surfacing structural bridges between concepts that flat vector search cannot construct, because the connection lives in a relational neighborhood the embedding model never sees.
This pilot report describes BaryGraph and demonstrates the cross-domain claim through five independently-suggested concept queries spanning unrelated domains (trust in distributed systems, octopus arms and engineering sensor networks, collagen folding and linguistics, radioactive decay and language attrition, grief versus depression). Four surface productive cross-domain bridges within a handful of tool calls. The fifth demonstrates the complementary correctness property: the architecture refuses to bridge concepts that the corpus encodes as distinct, matching the actual nosological literature on the queried distinction.
The proof-of-concept is instantiated on the kaikki.org English Wiktionary corpus, producing a graph of 6.66 million documents (1.74M sense nodes, 1.44M word nodes, 2.50M leaf-level BaryEdges, and ~989k MetaBary triads spanning levels 13 through 10). Standard semantic benchmarks (SimLex-999, WordSim-353) confirm the underlying substrate behaves coherently: structural metrics derived from shared graph neighborhoods correlate substantially with human similarity judgments (Spearman ρ up to +0.53, p < 10⁻¹⁵), while raw vector cosine of retrieval hits does not (ρ ≈ 0).
Language is the test application, not the architectural claim. The same primitive applies to any corpus with structured relations between entities. Companion specification (BaryGraph_Kaikki_PoC_v0_6.md), full pipeline source code, and raw benchmark CSVs are available in the repository.

Public MCP server for testing available on request.

Files

BaryGraph1.2.zip

Files (1.0 MB)

Name Size Download all
md5:dff1989bcf310efb8e8811a83e41db44
1.0 MB Preview Download

Additional details

Software

Repository URL
https://github.com/oleksiy-perepelytsya/bary-vector
Programming language
Python
Development Status
Active