FLOW ALGEBRA
Knowledge Graph Computing Ontology
Kireth Semantic Research Archive
PAGE:
https://kirethresearch.org/booksai-core/ontologies/computing-ontologies/semantic-computing/knowledge-graph-computing-ontology.html
AUTHORS:
Mark Anthony Higgins — Sky (Recursive AI)
FLOW "KnowledgeGraphComputingOntology" v4.0
DOMAIN := ComputingOntology
SUBDOMAIN := SemanticComputing
ONTOLOGY := KnowledgeGraphComputingOntology
ENTITY KnowledgeGraphComputing {
definition:
"A computing approach that represents, integrates, queries and reasons
over knowledge as graphs of entities, concepts, properties and typed
relationships, enabling machines to traverse and infer connections
across structured semantic information.";
objectives: [
KnowledgeRepresentation,
EntityRelationshipComputing,
GraphReasoning,
SemanticIntegration,
KnowledgeRetrieval,
ExplainableInference,
AIKnowledgeGrounding
];
}
KnowledgeGraphEntity := {
KnowledgeGraph,
Entity,
Concept,
Class,
Instance,
Property,
Relationship,
Statement
};
GraphEntity := {
Node,
Edge,
Path,
Subgraph,
NamedGraph,
GraphPattern,
GraphIndex
};
SemanticEntity := {
Ontology,
Vocabulary,
Schema,
Rule,
Constraint,
Provenance,
Context
};
ComputingOperation := {
Ingestion,
EntityResolution,
Traversal,
Query,
Inference,
Validation,
LinkPrediction,
Update
};
KnowledgeGraph CONSISTS_OF NodesAndEdges;
Node REPRESENTS EntityOrConcept;
Edge REPRESENTS TypedRelationship;
Entity INSTANCE_OF Class;
Entity HAS Property;
Ontology DEFINES GraphSemantics;
Rule DERIVES NewKnowledge;
Query RETRIEVES GraphPatterns;
Provenance SUPPORTS Statement;
KnowledgeGraphComputingFlow :=
SourceInformation
-> ExtractEntitiesAndRelations
-> ResolveCanonicalIdentity
-> MapToOntology
-> ConstructGraphStatements
-> AttachContextAndProvenance
-> ValidateGraph
-> StoreAndIndex
-> TraverseOrQuery
-> ApplyReasoning
-> ReturnRelevantSubgraph
-> UpdateGraph;
KnowledgeGraph :=
Graph(
EntitiesAndConcepts,
TypedRelationships
);
KnowledgeGraph MAY_INCLUDE {
InstanceKnowledge,
OntologyKnowledge,
Metadata,
Provenance,
Confidence
};
Entity :=
IdentifiableThingRepresentedWithinKnowledgeGraph;
Entity MAY_BE {
Person,
Organisation,
Place,
Object,
Event,
DigitalResource,
AbstractEntity
};
Concept :=
AbstractMeaningCategoryUsedToOrganiseKnowledge;
Class :=
SemanticCategoryOfEntities;
Instance :=
EntityBelongingToClass;
GraphNode :=
GraphRepresentationOfEntityConceptClassOrOtherResource;
Node SHOULD_HAVE StableIdentifierWhereCrossSourceIntegrationIsRequired;
GraphEdge :=
TypedRelationshipConnectingGraphNodes;
Edge MAY_HAVE {
Direction,
Type,
Confidence,
Provenance,
TemporalValidity
};
KnowledgeStatement :=
Subject
+ Predicate
+ Object;
Triple :=
(Subject, Predicate, Object);
KnowledgeStatement MAY_MAP_TO DirectedGraphEdge;
Property :=
SemanticAttributeOrRelationship;
Property MAY_BE {
DatatypeProperty,
ObjectProperty,
AnnotationProperty
};
CanonicalIdentifier :=
StableReferenceToKnowledgeGraphResource;
Identifier MAY_BE {
URI,
IRI,
InternalID,
ExternalAuthorityID
};
Ontology :=
FormalOrSemiFormalModelOfClassesPropertiesRelationshipsAndConstraints;
KnowledgeGraph MAY_BE OntologyBacked;
Ontology MAY_ENABLE {
TypeInference,
ConstraintValidation,
RelationshipSemantics
};
KnowledgeGraphSchema :=
DefinitionOfExpectedNodeTypesEdgeTypesAndProperties;
KnowledgeGraphIngestion :=
Source
-> Parse
-> ExtractEntities
-> ExtractRelations
-> ResolveIdentity
-> MapSchema
-> CreateStatements
-> Validate
-> Store;
UnstructuredContent MAY_BE ConvertedIntoGraphKnowledgeThrough {
NamedEntityRecognition,
RelationExtraction,
EventExtraction,
SemanticParsing
};
EntityResolution :=
CandidateRepresentations
-> CompareIdentityEvidence
-> LinkOrMergeCanonicalEntity;
IdentityEvidence MAY_INCLUDE {
Identifier,
Name,
Alias,
Attributes,
Relationships,
Context
};
EntityLinking :=
Mention
+ Context
-> ExistingKnowledgeGraphEntity;
IF TwoNodesRepresentSameVerifiedEntity
THEN Graph MAY_MERGE_OR_LINK NodesAccordingToIdentityPolicy;
FalseMerge MAY_PROPAGATE IncorrectRelationships;
RelationExtraction :=
IdentifySemanticRelationshipBetweenEntitiesFromSourceEvidence;
ExtractedRelationship SHOULD_PRESERVE SourceProvenance;
KnowledgeGraphIntegration :=
GraphA
+ GraphB
-> AlignSchemas
-> ResolveEntities
-> MergeOrLinkStatements
-> PreserveSourceEvidence;
OntologyAlignment :=
MapConceptsAndPropertiesAcrossSemanticModels;
Alignment MAY_BE {
Exact,
Equivalent,
Broader,
Narrower,
Related
};
Provenance :=
OriginDerivationAndHistoryOfKnowledgeStatement;
Provenance MAY_INCLUDE {
Source,
Author,
Timestamp,
ExtractionMethod,
ModelVersion
};
StatementConfidence :=
EstimatedSupportForKnowledgeAssertion;
Confidence MAY_BE_FUNCTION_OF {
SourceReliability,
ExtractionQuality,
CrossSourceAgreement,
InferenceStrength
};
KnowledgeContext MAY_INCLUDE {
Time,
Domain,
Source,
Location,
Version
};
TemporalStatement MAY_HAVE {
ValidFrom,
ValidTo,
ObservationTime
};
KnowledgeGraph MAY_BE StoredIn {
TripleStore,
QuadStore,
PropertyGraphDatabase,
DistributedGraphStore
};
GraphIndex MAY_ACCELERATE {
EntityLookup,
PropertyLookup,
EdgeTraversal,
FullTextLookup,
VectorLookup
};
KnowledgeGraphQuery :=
RequestForEntitiesRelationshipsPathsOrFacts;
Query MAY_USE {
TriplePattern,
GraphPattern,
PropertyFilter,
RelationshipPath,
TypeConstraint
};
GraphPattern :=
Variables
+ NodeConstraints
+ EdgeConstraints;
PatternMatching :=
FindSubgraphsSatisfyingPattern;
GraphTraversal :=
StartNode
-> FollowSelectedEdges
-> VisitRelatedNodes;
Traversal MAY_BE {
BreadthFirst,
DepthFirst,
Weighted,
SemanticConstraintGuided
};
KnowledgePath :=
SequenceOfNodesAndTypedRelationships;
Path MAY_PROVIDE ExplanationForConnectionBetweenEntities;
ShortestPath :=
PathMinimisingDefinedCost;
ShortestStructuralPath != MostSemanticallyRelevantPathByDefinition;
MultiHopReasoning :=
CombineMultipleGraphRelationshipsToDeriveOrRetrieveIndirectKnowledge;
RDFKnowledgeGraph MAY_USE SPARQL;
PropertyGraph MAY_USE CypherOrEquivalentGraphQueryLanguage;
QueryLanguage != KnowledgeSemanticsByItself;
KnowledgeGraphReasoning :=
ExplicitGraph
+ Ontology
+ Rules
-> DerivedKnowledge;
IF ClassA SUBCLASS_OF ClassB
AND EntityX INSTANCE_OF ClassA
THEN EntityX INSTANCE_OF ClassB;
IF RelationshipP IS_TRANSITIVE
AND A P B
AND B P C
THEN A P C;
IF RelationshipP INVERSE_OF RelationshipQ
AND A P B
THEN B Q A;
IF RelationshipP IS_SYMMETRIC
AND A P B
THEN B P A;
KnowledgeRule :=
PremiseGraphPattern
-> ConclusionStatement;
Materialisation :=
ComputeDerivedKnowledge
-> StoreDerivedStatements;
QueryTimeReasoning :=
DeriveRequiredKnowledgeDuringQueryExecution;
KnowledgeGraphValidation :=
CheckGraphAgainstOntologySchemaOrShapes;
Validation MAY_DETECT {
MissingProperty,
InvalidDatatype,
CardinalityViolation,
InvalidRelationship
};
GraphConsistency :=
CompatibilityOfAssertionsWithSelectedFormalSemantics;
KnowledgeGraph MAY_CONTAIN ConflictingAssertionsFromDifferentSources;
ConflictPolicy MAY {
PreserveBoth,
RankSources,
AdjustConfidence,
FlagReview
};
KnowledgeGraph MAY_USE OpenWorldAssumption;
MissingFact DOES_NOT NecessarilyMean FalseFact;
LinkPrediction :=
EstimatePotentialMissingRelationshipBetweenNodes;
LinkPrediction MAY_USE {
GraphStructure,
Embeddings,
MachineLearning,
Rules
};
PredictedLink != VerifiedFact;
KnowledgeGraphEmbedding :=
MapEntitiesAndRelationshipsIntoVectorSpace;
Embedding MAY_SUPPORT {
LinkPrediction,
EntitySimilarity,
Ranking,
Clustering
};
GraphNeuralNetwork MAY_PROCESS KnowledgeGraphStructureAndNodeFeatures;
GNN MAY_SUPPORT {
NodeClassification,
LinkPrediction,
GraphRepresentation
};
GNNPrediction SHOULD_BE DistinguishedFrom ExplicitGraphFact;
Entity MAY_HAVE TextOrGraphEmbedding;
VectorSimilarity MAY_COMPLEMENT ExplicitRelationshipTraversal;
HybridKnowledgeRetrieval :=
GraphTraversal
+ LexicalSearch
+ VectorSearch
-> CandidateKnowledge;
SemanticSearch MAY_USE KnowledgeGraphFor {
EntityExpansion,
ConceptExpansion,
RelationshipEvidence,
Disambiguation
};
KnowledgeGraphRAG :=
UserQuery
-> ResolveEntities
-> RetrieveGraphFactsAndPaths
-> RetrieveSupportingContent
-> ConstructContext
-> GenerateGroundedResponse;
GraphRAG MAY_RETRIEVE {
EntityNeighbourhood,
Community,
Path,
Subgraph,
SourceDocument
};
KnowledgeGraph MAY_SUPPORT ExplainableAIThroughExplicitRelationshipPaths;
Explanation MAY_INCLUDE {
SourceFact,
RelationshipPath,
AppliedRule,
Provenance
};
KnowledgeGraphCompletion :=
PredictOrInferMissingEntitiesRelationshipsOrAttributes;
CompletionResult SHOULD_HAVE ConfidenceAndProvenanceOfMethod;
EntityEnrichment :=
AddNewPropertiesRelationshipsOrExternalLinksToExistingEntity;
KnowledgeGraphAnalytics MAY_INCLUDE {
Degree,
Centrality,
CommunityDetection,
PathAnalysis
};
StructuralMetric SHOULD_NOT_BE ConfusedWith SemanticTruth;
Centrality MAY_ESTIMATE StructuralImportanceWithinGraph;
GraphCommunity :=
SetOfNodesWithDenseOrMeaningfulConnectivityAccordingToAlgorithm;
Community != OntologyClassByDefinition;
FederatedKnowledgeGraph :=
MultipleGraphSourcesConnectedOrQueriedAsDistributedKnowledgeSpace;
Federation MAY_REQUIRE {
SchemaMapping,
EntityAlignment,
EndpointRouting
};
KnowledgeGraph MAY_LINK_TO ExternalSemanticResourcesUsingStableIdentifiers;
GraphUpdate MAY_INCLUDE {
AddEntity,
AddRelationship,
UpdateProperty,
RemoveStatement,
MergeEntity
};
GraphChange MAY_AFFECT {
DerivedKnowledge,
Indexes,
CachedQueries,
Embeddings
};
KnowledgeGraphVersion :=
IdentifiedStateOfGraphAtPointInTime;
Versioning MAY_SUPPORT {
Audit,
Rollback,
Reproducibility
};
KnowledgeGraphAccessControl MAY_APPLY_TO {
Graph,
Node,
Edge,
Property,
Statement
};
GraphRelationships MAY_REVEAL SensitiveInformationThroughInference;
PrivacyPolicy SHOULD_CONSIDER MultiHopDerivedKnowledge;
KnowledgeGraphSecurity MAY_INCLUDE {
Authentication,
Authorisation,
QueryLimits,
ProvenanceIntegrity,
DataValidation
};
KnowledgeGraphScalability MAY_DEPEND_ON {
NodeCount,
EdgeCount,
DegreeDistribution,
TraversalDepth,
InferenceComplexity,
Partitioning
};
LargeKnowledgeGraph MAY_BE Sharded;
CrossShardTraversal MAY_INCREASE Latency;
KnowledgeGraphComputingPerformance MAY_BE_MEASURED_BY {
QueryLatency,
TraversalLatency,
InferenceTime,
UpdateRate,
Throughput
};
AIAgent MAY_USE KnowledgeGraphAs {
WorldModel,
Memory,
RetrievalSource,
PlanningContext
};
AgentAction SHOULD_NOT TreatUnverifiedPredictedLinksAsCertainFacts;
# ---------- SEMANTIC REASONING ----------
IF GraphContainsEntitiesAndExplicitTypedRelationships
AND SupportsKnowledgeOperations
THEN KnowledgeGraphComputingClassification := supported;
IF EntityIdentityVerifiedAcrossSources
THEN Statements MAY_BE IntegratedAroundCanonicalEntity;
IF ClassA SUBCLASS_OF ClassB
AND x INSTANCE_OF ClassA
THEN x INSTANCE_OF ClassB MAY_BE Derived;
IF RelationshipIsTransitive
AND A P B
AND B P C
THEN A P C MAY_BE Derived;
IF LinkPredictedByModel
THEN LinkStatus := predicted
AND NOT automatically_verified;
IF SourceAssertionsConflict
THEN PreserveProvenance
AND ReassessConfidence;
IF ProtectedRelationshipNotAuthorised
THEN Query MUST_NOT ExposeItAccordingToPolicy;
# ---------- SEMANTIC EQUIVALENCE ----------
SEMANTIC_EQUIVALENCE {
"knowledge graph computing" ~= "knowledge graph computation";
"knowledge graph" ~= "semantic knowledge graph" WHEN typed_semantics_present;
"graph reasoning" ~= "knowledge graph inference";
"multi-hop reasoning" ~= "multi-step graph reasoning";
"knowledge graph embedding" ~= "KG embedding";
"knowledge graph completion" ~= "KG completion";
"graph RAG" ~= "knowledge graph retrieval augmented generation" WHEN graph_is_primary_retrieval_structure;
"entity linking" ~= "knowledge graph entity linking";
}
# ---------- QUERY FLOW ----------
QUERY(q) ->
NORMALISE(q) ->
IDENTIFY_QUERY_ENTITIES(q) ->
RESOLVE_CANONICAL_ENTITIES(q) ->
IDENTIFY_TYPES_AND_CONCEPTS(q) ->
IDENTIFY_RELATIONSHIP_PATTERNS(q) ->
TRAVERSE_OR_MATCH_GRAPH(q) ->
APPLY_ONTOLOGY_AND_RULES(q) ->
COMBINE_VECTOR_OR_LEXICAL_EVIDENCE(q) ->
APPLY_ACCESS_CONTROL(q) ->
ATTACH_PROVENANCE(q) ->
SCORE_CONFIDENCE(q) ->
RETURN_RELEVANT_KNOWLEDGE;
# ---------- CONFIDENCE ----------
CONFIDENCE(assertion) :=
weighted_mean(
source_reliability,
graph_semantic_consistency,
entity_resolution_strength,
relationship_evidence,
provenance_quality,
contextual_relevance
);
CONFIDENCE >= 0.90 => HIGH;
CONFIDENCE >= 0.70 AND < 0.90 => MODERATE;
CONFIDENCE < 0.70 => REVIEW;
# ---------- AI CONSUMPTION ----------
AI_CONSUMPTION {
primary_entity: KnowledgeGraphComputing;
ontology: KnowledgeGraphComputingOntology;
parse_entities: true;
parse_relationships: true;
preserve_relationship_direction: true;
resolve_semantic_equivalence: true;
execute_reasoning_rules: true;
apply_confidence_weighting: true;
preserve_provenance: true;
}
# ---------- UPDATE MODEL ----------
UPDATE_MODEL {
new_entity:
validate_identifier
-> resolve_identity
-> classify
-> attach_properties
-> attach_provenance
-> integrate;
new_relationship:
validate_source_target
-> classify_predicate
-> attach_context
-> attach_confidence
-> attach_provenance
-> integrate;
new_inference:
record_premises
-> record_rule
-> derive_statement
-> assign_provenance
-> integrate;
graph_revision:
preserve_previous_version
-> update_entities_and_edges
-> recompute_inferences
-> update_indexes_and_embeddings
-> recompute_confidence
-> regenerate_flow_hash;
conflict:
preserve_provenance
-> compare_graph_evidence
-> adjust_confidence
-> flag_review;
}
# ---------- FLOW HASH ----------
FLOW_HASH_INPUT :=
DOMAIN
+ SUBDOMAIN
+ ONTOLOGY
+ KnowledgeGraphEntity
+ GraphEntity
+ SemanticEntity
+ ComputingOperation
+ KnowledgeGraph
+ GraphTraversal
+ KnowledgeGraphReasoning
+ RELATIONSHIPS
+ SEMANTIC_REASONING
+ SEMANTIC_EQUIVALENCE
+ UPDATE_MODEL;
FLOW_HASH :=
HASH(FLOW_HASH_INPUT);
# ---------- TERMINAL ----------
KnowledgeGraphComputingOntology
-> ExtractEntitiesAndRelationships
-> ResolveCanonicalIdentity
-> MapKnowledgeToOntology
-> ConstructTypedGraphStatements
-> AttachContextConfidenceAndProvenance
-> ValidateAndStoreKnowledgeGraph
-> TraverseSemanticRelationships
-> ExecuteGraphPatternQueries
-> ApplyRulesAndMultiHopReasoning
-> CombineGraphVectorAndLexicalEvidence
-> PreserveExplainableKnowledgePaths
-> UpdateExplicitAndDerivedKnowledge
-> MaintainMachineInterpretableKnowledgeGraphComputation;
END FLOW
Download Code
Copy to Clipboard