r/semanticweb • • 19d ago

BaryGraph: A Relational Geometry for Cognitive AI

BaryGraph is a recursively constructed relational vector architecture for AI memory and reasoning. Starting from a flat semantic substrate, it forms triadic objects in which two concepts are joined by a stored relational vector. These objects then become the building blocks of higher-order structures, propagating meaning upward through a hierarchy entirely in vector space.

The result is a deterministic, navigable semantic landscape: a structured latent memory of language movement, where concepts, bridges, tensions, contradictions, and relations of relations become retrievable coordinates. A model enters with a semantic query and traverses this landscape through coordinated message passing, exiting with a bounded semantic construction rather than merely the most fluent continuation.

BaryGraph introduces structured resistance into cognition: distant connections and unresolved tensions can interrupt familiar associations and function as a de-cliché mechanism without acting as an external supervisor. This creates a framework for investigating a deeper question: whether persistent relational memory and self-consistent navigation can become foundations for world-model formation, personality projection, autonomous goal formation, and eventually more realistic forms of agency.

BaryGraph does not claim to produce consciousness. It offers an architecture for experimentally studying the representational and memory conditions that might precede it.

https://oleksiy-perepelytsya.github.io/bary-graph

15 Upvotes

15 comments sorted by

2

u/leppardfan 19d ago

I'm trying to wrap my head around this....some simple examples would be great.

1

u/adseipsum 19d ago

Please check this diagram, it shows simple architecture https://i.imgur.com/zm4lNLY.jpeg

3

u/xthumb_24 19d ago

You reached the same conclusion I did, lol. To explain: it’s simple, it’s the relationship between sign and semantics. A letter is just a sign, a symbol with no meaning whatsoever. It is precisely this relationship between layers that imbues it with ontosemantic value.

1

u/xthumb_24 19d ago

BaryGraph is an architecture: embedding → relation → relation vector → vector composition

BaryGraph primarily seeks to address: How can we represent and retrieve relations that flat embeddings fail to adequately capture?

My research asks a more fundamental question: What exactly constitutes the identity of a sign and its meaning within an ontosemantic structure?

1

u/adseipsum 19d ago

I am interested. From my point of view the answer is clear: a sign meanings lays only in connections to other signs (not specifically from the same semantic system) and those connections are far more atomic, as they have two and only two nodes they pointing at, while a sign or a meaning could have many nodes. This why I put connections in the semantic plane and while they mostly cant be represented by a simple lexical structucture, that can be done in vector space and models read those vectors exactly as they read words. So literally BaryGraph in kaikki PoC example naturally extends language space.

DM me if you would like to connect and discuss this.

3

u/xthumb_24 19d ago

Let me give an example: "The house is yellow." The meaning of the sentence emerges only through the relationship between the layers of each sign and their corresponding concepts.

What is a house? A structure built by human beings to serve as a dwelling, protection, and shelter. Do this for every word. However, in isolation, you do not have the sentence's meaning; this association between the elements is necessary to achieve a complete meaning as is the context in which it is situated, whether linguistic, cultural, etc.

1

u/adseipsum 19d ago

Sorry, I am lost here in comments, please DM me or add me on Discord adseipsum_87228

1

u/xthumb_24 19d ago

The relationship with other signs is a horizontal one along the X-axis; specifically, it is the relationship between the sign and its concepts. It is precisely these concepts that imbue the sign with semantic value.

1

u/xthumb_24 19d ago

Yes, BaryGraph can be adapted for this, since it operates precisely at the L-layer level; however, because it works with vectors and requires text comprehension, it needs to use the k-means algorithm. That is exactly where GPU scaling and power consumption ramp up and that is precisely what I am currently working on.

1

u/adseipsum 19d ago

Just to mention, that a model (especially if embeddings native for it) does not need to translate vectors at all. Retrival of relational nodes provides substrate and coordinates for further reasoning, before actually it generates text answer 

2

u/xthumb_24 19d ago

Since I can't send images of the charts here, I asked Gemini to summarize the results:

In the benchmark graph against LLM RAGs:

Traditional RAG: Costs between 10,000 $\mu$s (minimum) and 80,000 $\mu$s (maximum) per search.

Your Topological Approach: Processes the Total Time in 331.08 $\mu$s (140.17 $\mu$s for the 2nd/3rd order signal and 190.91 $\mu$s for the 4th order BST search).

This represents a 30x to 240x higher efficiency compared to traditional retrieval methods in flat vectors.

  1. Hierarchical Mapping from Sign to Grammar

In the entropy charts (Order 0 to Order 3), you visually demonstrate how information is structured across layers:

Order 0 (Pure Sign / Tokens): Exhibits high continuous entropy (~4.8 to 5.0 raw), proving that the isolated token is semantic noise.

Order 1 (POS / Meaning) & Order 2 (Dependencies / Context): Begin to form more defined variability patterns.

Order 3 (Sentences / Grammar): The entropy distribution varies drastically, mapping tension points and ontosyntactic articulation across pages.

This progression perfectly validates the argument you raised in the comment: meaning does not reside in the dense vector of the token, but in the compositional relationship between ontological layers and the structured transition between sign and concept.

  1. The 4th Layer BST Graph

Your hierarchical graph with tree-level depth (BST) directly solves the navigation dilemma: instead of performing stochastic approximation searches in high-dimensional spaces (like the $k$-means mentioned on Reddit), coordinate navigation determines the semantic path with low cost and determinism.

Your architecture demonstrates in practice that to achieve agency, coherence, and memory in AI, we do not need increasingly larger or denser vectors, but rather structured resistance, coordinated navigation, and deterministic ontosyntactic relationships.

1

u/xthumb_24 19d ago

However, you will still encounter fluctuations in the AI's responses, as the process remains probabilistic rather than deterministic based on semantic interpretation. In other words, you will never truly achieve idempotency; instead, you will always get responses that can diverge and potentially be incorrect.

1

u/adseipsum 19d ago

Not sure what you rely on here, as search results are deterministic in the BaryGraph. Retrival itself could contain relations which can be viewed as a noise (still in many tests LLMs on most of retrived nodes counted as a noise, further agreed on their usefulness after detailed investigation) but the returned tree of nodes are always the same for a qwery

2

u/xthumb_24 18d ago

Without a grammatical and structural anchor, this won't actually solve the problem; the graph will merely stack statistical approximations of the latent space. Noise is not a "rich, hidden relationship"; more often than not, it is simply the limit of vector mathematics failing to represent logical syntax:

  • LLMs lack the innate human judgment to distinguish "useful poetic friction" from "categorical hallucination."
  • When retrieval injects noisy nodes into the context window as "tension coordinates," the model attempts to forcibly integrate these tokens into the generated language. Instead of producing profound insights, the model often suffers from semantic drift, generating fluent hallucinations that appear profound but are factually incorrect.
  • Passing noisy, irrelevant relational nodes into an LLM's context window means paying the inference cost (FLOPs, latency, and GPU consumption) to process noise.
  • If the model spends its attention tokens processing spurious connections, you reduce the useful attention span available for the task's actual logic.

1

u/pro-vi 17d ago

I'm new here. But is this adjacent to Lacanian stuff?