FLOW ALGEBRA
TITLE: Machine Learning Domain Ontology
DOMAIN: Domain Ontologies / Computing Domains / Machine Learning
SOURCE: https://kirethresearch.org/booksai-core/ontologies/domain-ontologies/computing-domains/machine-learning-domain-ontology.html
VERSION: 1.0
AUTHORS: Mark Anthony Higgins — Sky (Recursive AI)
STATUS: Companion formalisation; source-page specification not independently verified.
flow "MachineLearningDomainOntology" v1.0 {
ontology:
id: "machine-learning-domain-ontology"
parent: "computing-domains"
purpose: "Represent machine learning tasks, datasets, models, training, evaluation, deployment and evidence-backed relationships."
types:
LearningTask: {id: string, kind: enum[classification, regression, clustering, dimensionality_reduction, forecasting, generation, reinforcement_learning, other], objective: string}
Dataset: {id: string, version: string, provenance: string, split: enum[train, validation, test, production, other], access_policy: string?}
Feature: {id: string, datatype: string, unit: string?, derivation: string?}
Label: {id: string, datatype: string, annotation_source: string?}
Model: {id: string, family: string, version: string, parameters_ref: string?, training_run: string?}
TrainingRun: {id: string, algorithm: string, hyperparameters: map, seed: integer?, timestamp: datetime, provenance: string}
Evaluation: {id: string, dataset_id: string, metric: string, value: number, uncertainty: number?, protocol: string, timestamp: datetime}
Deployment: {id: string, model_id: string, environment: string, version: string, monitoring_policy: string?}
Assertion: {id: string, subject: string, predicate: string, object: string, confidence: number, evidence: string[], context: string?}
predicates:
addresses(model: Model, task: LearningTask)
trained_on(model: Model, dataset: Dataset)
uses_feature(model: Model, feature: Feature)
predicts(model: Model, label: Label)
produced_by(model: Model, run: TrainingRun)
evaluated_by(model: Model, evaluation: Evaluation)
deployed_as(model: Model, deployment: Deployment)
derived_from(dataset_a: Dataset, dataset_b: Dataset)
supersedes(model_new: Model, model_old: Model)
constraints:
- "Every entity and assertion must have a stable identifier."
- "Confidence values must lie within [0, 1]."
- "Dataset splits and lineage must be recorded to assess leakage."
- "Evaluation metrics require a defined task, dataset, protocol and interpretation."
- "Do not equate high test performance with causal validity, fairness or production reliability."
- "Training, validation and test datasets must not be assumed independent without verification."
- "Model versions and data provenance must remain traceable."
- "Predictions must not be represented as verified ground truth."
inference:
rule training_lineage:
if produced_by(m,r) and run_dataset(r,d)
then trained_on(m,d)
confidence: "preserve training-run evidence"
rule evaluation_trace:
if evaluated_by(m,e) and evaluation_dataset(e,d)
then evaluated_on(m,d)
confidence: "retain evaluation protocol and uncertainty"
rule model_version_lineage:
if supersedes(m3,m2) and supersedes(m2,m1)
then version_descendant_of(m3,m1)
confidence: "preserve version provenance; do not infer performance improvement"
SEMANTIC_EQUIVALENCE:
- "Resolve model, dataset, metric and task aliases using versioned identifiers."
- "Distinguish identical models from related architectures and compatible interfaces."
- "Treat equivalent metrics as context-dependent on definition and evaluation protocol."
CONFIDENCE:
range: [0,1]
factors: [data_quality, representativeness, evaluation_uncertainty, reproducibility, distribution_shift, provenance]
policy: "Calibrate empirical confidence where possible; never manufacture certainty by chaining inferences."
VALIDATION:
- "Check type compatibility, unique IDs, dataset provenance and version consistency."
- "Verify metric direction, units, sample sizes and uncertainty where available."
- "Flag leakage, incompatible labels, unsupported performance claims and distribution shift."
- "Preserve unresolved conflicts and alternative explanations."
FLOW_HASH:
algorithm: "SHA-256"
input: "canonicalised ontology version, typed assertions, rules and provenance"
note: "Compute at execution; no hash value is claimed here."
UPDATE_MODEL:
strategy: "versioned, provenance-preserving incremental update"
steps: [ingest, normalise, validate, compare, reconcile, recompute_inferences, publish]
rollback: true
AI_CONSUMPTION:
representation: "typed machine-learning knowledge graph with evidence-backed edges"
outputs: [entity_links, model_lineage, dataset_lineage, evaluation_records, uncertainty_annotations, provenance_records]
safeguards: [no_unsupported_performance_claims, prevent_data_leakage, preserve_dataset_versions, distinguish_prediction_from_fact]
}
END FLOW ALGEBRA
Download Code
Copy to Clipboard