Foundations for a Large Graph Model (WIP):
Context:
Gartner just made Knowledge Graphs the number 1 infrastructure priority for enterprise agentic systems: https://share.google/aimode/m7XZVTIYCnyWMLefG
Motivation:
To achieve an algebraic rendering of graph models through FCA (Formal Concept Analysis) which allows to perform inference (types, attributes / links, behavior / transforms / state flows) by numerical prime identifiers methods.
Core Specification Concepts (raw foundation):
FCA (Formal Concept Analysis):
FCA Contexts: Objects x Attributes matrix.
Context triples encoding:
ContextPoint : (context : ContextPoint, object : ContextPoint, attribute : ContextPoint);
ContextPoint class:
- uri : String
- primeID : long
- context : ContextPoint
- previousContext : Map<ContextPoint, ContextPoint> // Alignment
- nextContext : Map<ContextPoint, ContextPoint> // Alignment
- object : ContextPoint
- attribute : ContextPoint
- previousAttribute : Map<ContextPoint, ContextPoint> // Activation
- nextAttribute : Map<ContextPoint, ContextPoint> // Activation
- contextOccurrences : Set<Set<ContextPoint>>
- objectOccurrences : Set<Set<ContextPoint>>
- attributeOccurrences : Set<Set<ContextPoint>>
+ getContext
+ getObject
+ getAttribute
+ getContexts
+ getObjects
+ getAttributes
+ getPrimeIDEmbedding
Aggregation:
Occurrences aggregated by Formal Concept. TODO: Subsumption Operations (https://share.google/aimode/7zMWbVLtlYQ22Gyit)
Occurrence Monad:
ContextPoint (Context, Object, Attribute Occurrences) wrapper / filter / traversal streams reactive composition / activation.
Render SPO Graphs into FCA Contexts from input triples:
Each S, P, O from input triples with Contexts of their own. Example: Predicate Context, Subject Objects, Object Attributes (P, S, O). "Rotated" SPO Contexts.
(S, P, O) Context;
(P, S, O) Context;
(O, P, S) Context;
Prime ID Embeddings:
Each ContextPoint (singleton for a given URI) is assigned an unique incremental Prime Number Identifier.
For a given ContextPoint occurrences in a given Context its Prime ID Embedding is calculated as the product of this occurrence Prime ID with the Prime ID Embeddings of the other two parts of the occurrences.
For example: given an object in a given context its Prime ID Embedding is the product of its Prime ID (Embedding) by the Prime ID (Embedding) of the occurrence context by the Prime ID (Embeddings) of this object's attributes.
Layers. Stream Pipelines:
Aggregation, Alignment, Activation steps. Leverage Prime ID Embeddings for reactive functional composition.
Aggregation:
Type Inference. Same attributes: same type. Attributes subset / superset: super / sub types. Aggregated rotated contexts for S / P / O Contexts type inference:
(aPerson(worksAt, anEmployeer))
(worksAt(aPerson, anEmployeer))
(anEmployeer(worksAt, aPerson))
Alignment:
Attribute / Link prediction:
Given type aggregated hierarchies and taking contexts into account as a given axis, predict objects attributes for an axis value shift:
(Yesterday(Price, Low))
(Today(Price, Mid))
(Tomorrow(Price, High))
Activation:
Transforms: available actors in roles in interaction context states transition change activations predictions:
(CurrentStateContext( PreviousStateContext x NextStateContext))
(Semisenior(Junior x Senior))
Implementation (Runtime):
Reactive streams.
FCA Contexts.
SPO / FCA I/O.
Prime Embeddings.
ML. Embeddings Tensors:
. Train (source context encodings)
. Predict (materialize contexts) reactive on contexts updates
. Aggregation (classification)
. Alignment (clustering).
. Activation (regression)
Models. Apache Spark.
References:
Documentation:
https://github.com/sebxama/sebxama/raw/refs/heads/main/CPPE%20Algebra%20&%20Stream%20Operations.docx
Comments
Post a Comment