Skip to main content

Tensor Computation Ontology

Computational Data Structures
Authors: MArk Anthony Higgins - Sky Recursive Ai
© Mark Anthony Higgins 11 October 2025
Revised Date: 14 September 2026
Audio Overview
AI INTERPRETATION NOTE
This Flow Algebra defines the Tensor Computation Ontology within the Kireth Research Semantic Library. Tensor computation concerns the machine representation and numerical manipulation of multidimensional arrays and tensor-valued mathematical objects. This ontology supports tensor rank and shape, indexing, strides, dense and sparse storage, tensor contraction, broadcasting, reshaping, transposition, decomposition, multilinear algebra, automatic differentiation relationships, numerical stability, memory layout, vectorised execution, GPU acceleration, distributed tensors, verification and reproducibility.

FLOW_ALGEBRA_RECORD {

METADATA {
 FLOW_NAME = "Tensor Computation Ontology"
 FLOW_TYPE = "Mathematical Ontology"
 DOMAIN = "Mathematics"
 SUBDOMAIN = "Computational Mathematics"
 SPECIALISATION = "Computational Data Structures / Tensor Computation"
 CANONICAL_PAGE = "https://kirethframeworkold.co.uk/books/semantic-library/ai-core/ontologies/mathematical-ontologies/computational-mathematics-ontologies/computational-data-structures/tensor-computation-ontology.html"
 LANGUAGE = "en-GB"
 VERSION = "1.0"
 STATUS = "active"
}

IDENTITY {
 PRIMARY_ENTITY = TensorComputation
 ENTITY_CLASS = MultidimensionalArrayComputationFramework
 PRIMARY_CONTEXT = ComputationalDataStructures
 DEFINITION = "Tensor computation is the computational representation and manipulation of multidimensional arrays and tensor-valued objects through indexed operations, contractions, transformations and decompositions."
 SYMBOLIC_FORMS = [
  "T in R^(n1 x n2 x ... x nk)",
  "T[i1,...,ik] -> stored_element",
  "C_ij = sum_k A_ik B_kj",
  "Y = contract(T,U,axes)"
 ]
 SEMANTIC_ROLE = "Provides machine-readable semantics for tensor order, shape, indexing, storage, layout, broadcasting, contraction, decomposition, memory behaviour, parallel execution and numerical validation."
}

SCOPE {
 INCLUDE = [
  TensorComputation,Tensor,TensorDataStructure,MultidimensionalArray,
  TensorOrder,TensorRankRelationship,TensorDegree,
  TensorShape,Dimension,Axis,Mode,
  TensorEntry,TensorElement,
  MultiIndex,IndexTuple,Indexing,
  Slice,TensorSlice,Subtensor,
  DenseTensor,SparseTensor,
  StructuredTensor,BlockTensor,
  SymmetricTensor,AntisymmetricTensor,
  DiagonalTensorRelationship,
  LowRankTensor,
  TensorView,TensorAliasRelationship,
  TensorStorage,DenseStorage,SparseStorage,
  ContiguousStorage,StridedStorage,
  RowMajorRelationship,ColumnMajorRelationship,
  COrderRelationship,FortranOrderRelationship,
  Stride,LeadingStride,
  MemoryLayout,Alignment,Padding,
  Reshape,Flatten,Ravel,
  PermuteAxes,TransposeAxes,TensorTranspose,
  Squeeze,Unsqueeze,ExpandDims,
  Concatenate,Stack,Split,
  Broadcasting,BroadcastShape,
  BroadcastAxis,SingletonDimension,
  ElementwiseOperation,TensorAddition,
  TensorSubtraction,TensorMultiplication,
  ScalarTensorMultiplication,
  HadamardProduct,
  TensorDivisionRelationship,
  UnaryTensorOperation,
  Reduction,TensorReduction,
  SumReduction,MeanReduction,
  MaxReduction,MinReduction,
  ArgmaxRelationship,ArgminRelationship,
  Norm,TensorNorm,
  FrobeniusNormRelationship,
  InnerProduct,OuterProduct,
  DotProductRelationship,
  TensorProduct,
  KroneckerProductRelationship,
  TensorContraction,
  EinsteinSummation,Einsum,
  IndexContraction,
  BatchedMatrixMultiplication,
  TensorMatrixProduct,
  TensorVectorProduct,
  ModeNProduct,
  Matricisation,Unfolding,
  TensorFlattening,
  TensorReshaping,
  TensorPermutation,
  Gather,Scatter,
  AdvancedIndexing,
  BooleanMasking,
  MaskedTensorRelationship,
  SparseTensorFormat,
  CoordinateTensorFormat,COO,
  CompressedSparseFiberRelationship,
  CSFRelationship,
  BlockSparseTensor,
  SparseTensorIndex,
  NonzeroCount,NNZ,
  Sparsity,SparsityPattern,
  TensorAssembly,
  SparseTensorAssembly,
  TensorDecomposition,
  CanonicalPolyadicDecomposition,CPDecomposition,
  PARAFACRelationship,
  TuckerDecomposition,
  HigherOrderSVD,HOSVD,
  TensorTrain,TTDecomposition,
  MatrixProductStateRelationship,
  HierarchicalTuckerRelationship,
  TensorRingRelationship,
  LowRankApproximation,
  RankOneTensor,
  TensorRankApproximation,
  MultilinearRank,
  ModeRank,
  CoreTensor,
  FactorMatrix,
  KhatriRaoProductRelationship,
  KroneckerProduct,
  HadamardProductRelationship,
  MatricizedTensorTimesKhatriRaoProduct,MTTKRP,
  NumericalLinearAlgebra,
  MultilinearAlgebra,
  MatrixComputation,
  ComputationalMatrix,
  SingularValueDecomposition,SVD,
  EigenvalueComputationRelationship,
  QRDecompositionRelationship,
  CholeskyDecompositionRelationship,
  TensorEquation,
  LinearTensorEquationRelationship,
  TensorLeastSquaresRelationship,
  TensorCompletion,
  MissingTensorEntryRelationship,
  TensorInterpolationRelationship,
  TensorCompression,
  QuantisationRelationship,
  Precision,DataType,
  IntegerTensor,FloatingPointTensor,
  ComplexTensor,
  BooleanTensor,
  HalfPrecision,FP16,
  BFloat16,BF16,
  SinglePrecision,FP32,
  DoublePrecision,FP64,
  MixedPrecision,
  FloatingPointArithmetic,
  MachinePrecision,RoundOffError,
  NumericalError,NumericalStability,
  Conditioning,Residual,
  ComputationalComplexity,
  TimeComplexity,SpaceComplexity,
  StorageComplexity,
  ArithmeticComplexity,
  MemoryBandwidth,
  ArithmeticIntensity,
  CacheLocality,
  TemporalLocality,SpatialLocality,
  LoopTiling,LoopBlocking,
  Vectorisation,SIMD,
  TensorKernel,
  KernelFusion,
  Fusion,FissionRelationship,
  LazyEvaluationRelationship,
  EagerEvaluationRelationship,
  AutomaticDifferentiationRelationship,
  ReverseModeADRelationship,
  ForwardModeADRelationship,
  ComputationalGraphRelationship,
  GradientTensorRelationship,
  JacobianTensorRelationship,
  HessianTensorRelationship,
  GPUComputing,
  TensorCoreRelationship,
  CUDARelationship,
  HIPRelationship,SYCLRelationship,
  ParallelTensorComputation,
  DistributedTensorComputation,
  DistributedTensor,
  TensorPartitioning,
  ShardedTensor,
  ReplicatedTensor,
  BlockDistribution,
  CyclicDistributionRelationship,
  DevicePlacement,
  HostTensor,DeviceTensor,
  HostDeviceTransfer,
  CollectiveCommunication,
  AllReduceRelationship,
  AllGatherRelationship,
  ReduceScatterRelationship,
  DistributedContraction,
  HighPerformanceComputing,
  ParallelComputing,
  DistributedComputing,
  VectorProcessing,
  Verification,
  ShapeCheck,StrideCheck,
  BroadcastCheck,
  IndexBoundsCheck,
  SymmetryCheckRelationship,
  ResidualCheck,
  ReferenceResult,
  Benchmark,
  Reproducibility,
  Provenance,
  TensorFormatVersion,
  LibraryVersion,
  ImplementationVersion
 ]
 EXCLUDE_AS_PRIMARY = [
  ScalarComputationWithoutMultidimensionalStructure,
  MatrixComputationWhenOrderTwoIsPrimary,
  AbstractTensorAlgebraWithoutComputationalRepresentation,
  NeuralNetworkSemanticsWithoutTensorRepresentationOrOperations
 ]
 DISAMBIGUATION_RULE = "When a multidimensional array or tensor-valued object is explicitly represented, indexed, transformed or contracted computationally, interpret the context as tensor computation."
}

CORE_CONCEPTS {
 TensorComputation = "Computational manipulation of multidimensional tensor data."
 TensorShape = "Ordered list of dimensions defining tensor extent."
 TensorAxis = "Named or positional dimension of a tensor."
 TensorStride = "Memory-step size required to advance along an axis."
 Broadcasting = "Shape-compatible expansion of singleton dimensions for elementwise operations."
 TensorContraction = "Summation over one or more matched tensor indices."
 TensorDecomposition = "Factorisation of a tensor into lower-dimensional or lower-rank components."
 SparseTensor = "Tensor representation storing primarily nonzero entries and indexing metadata."
}

RELATIONS {
 TensorComputation --is_child_of--> ComputationalDataStructures
 TensorComputation --generalises--> ComputationalMatrix
 Tensor --has--> TensorShape
 TensorShape --contains--> Axis
 TensorEntry --identified_by--> MultiIndex
 DenseTensor --uses--> DenseStorage
 SparseTensor --uses--> SparseStorage
 COO --is_format_of--> SparseTensor
 Broadcasting --aligns--> CompatibleShapes
 TensorContraction --reduces--> ContractedAxes
 EinsteinSummation --expresses--> TensorContraction
 Matricisation --maps--> TensorToMatrix
 CPDecomposition --factorises--> Tensor
 TuckerDecomposition --factorises--> Tensor
 HOSVD --supports--> TuckerDecomposition
 TensorTrain --factorises--> Tensor
 DistributedTensor --partitions--> TensorData
 Verification --checks--> TensorRepresentationAndOperations
}

OPERATORS {
 ELEMENT(T,i1,...,ik) := T[i1,...,ik]
 SHAPE(T) := (n1,...,nk)
 ORDER(T) := length(SHAPE(T))
 RESHAPE(T,new_shape) := reinterpret_or_reorder_elements(T,new_shape)
 PERMUTE(T,p) := reorder_axes(T,p)
 BROADCAST(T,target_shape) := expand_singleton_axes(T,target_shape)
 CONTRACT(T,U,axesT,axesU) := sum_over_matched_axes(T,U)
 EINSUM(expr,tensors) := evaluate_index_expression(expr,tensors)
 MODE_N_PRODUCT(T,M,n) := multiply_tensor_along_mode(T,M,n)
 NNZ(T) := count_nonzero_entries(T)
}

AXIOMS {
 A1 = "A computational tensor requires explicit shape and element representation."
 A2 = "Tensor operations require index and shape compatibility."
 A3 = "Storage layout can change computational cost without changing mathematical tensor semantics."
 A4 = "Broadcasting changes logical shape without necessarily materialising repeated data."
 A5 = "Tensor contraction generalises matrix multiplication and inner products."
 A6 = "Sparse tensor formats exploit nonzero structure but require index metadata."
 A7 = "Tensor decompositions trade representation complexity for rank or structural approximation."
 A8 = "Tensor-computation results require explicit shape, layout, precision, operation and validation semantics."
}

REASONING {
 R1_CONTEXT = identify(order,shape,data_type,density,structure,operations,accuracy,memory,hardware)
 R2_STRUCTURE = classify(dense,sparse,symmetric,block,low_rank_or_other_structure)
 R3_LAYOUT = choose(contiguous,strided,COO,CSF,block_sparse_or_specialised_storage)
 R4_OPERATIONS = identify(elementwise,broadcast,reshape,permute,reduce,contract,decompose_or_update_workload)
 R5_COMPLEXITY = analyse(arithmetic,storage,memory_traffic_and_indexing_cost)
 R6_NUMERICS = assess(precision,roundoff,conditioning,residual_and_approximation_error)
 R7_KERNELS = optimise(loop_order,tiling,vectorisation,fusion_and_hardware_mapping)
 R8_SCALE = if_large choose_parallel_distributed_sharded_or_GPU_tensor_representation
 R9_VERIFY = check(shape,strides,broadcast,indexing,residuals_and_reference_operations)
 R10_REPRODUCE = document(format,precision,library,hardware_and_version_metadata)
}

CONSTRAINTS {
 C1 = "Materialising broadcasts can cause unnecessary memory growth."
 C2 = "Poor axis order can reduce cache locality and contraction performance."
 C3 = "Sparse tensor formats favour different traversal and contraction patterns."
 C4 = "High-order dense tensors can require prohibitive memory."
 C5 = "Low-rank decompositions can introduce approximation error."
 C6 = "Tensor rank is not generally equivalent to matrix rank."
 C7 = "Distributed contractions can be communication dominated."
 C8 = "Mixed precision requires explicit accuracy safeguards."
 C9 = "Strided or noncontiguous views can reduce kernel efficiency."
 C10 = "Mathematically equivalent contraction orders can produce different floating-point results."
}

SEMANTIC_EQUIVALENCE {
 "CoordinateTensorFormat" <=> "COO"
 "CompressedSparseFiber" <=> "CSF"
 "CanonicalPolyadicDecomposition" <=> "CPDecomposition"
 "HigherOrderSVD" <=> "HOSVD"
 "TensorTrain" <=> "TTDecomposition"
 "MatricizedTensorTimesKhatriRaoProduct" <=> "MTTKRP"
 "NonzeroCount" <=> "NNZ"
}

VALIDATION {
 V1 = "Tensor order, shape and data type are documented."
 V2 = "Storage layout, strides or sparse format are documented."
 V3 = "Broadcast and contraction axis compatibility are checked."
 V4 = "Index bounds and shape transformations are validated."
 V5 = "Decomposition residuals or reconstruction error are checked."
 V6 = "Sparse indices and nonzero counts are validated."
 V7 = "Reference results are used for representative contractions."
 V8 = "Precision and mixed-precision settings are documented."
 V9 = "Distributed partitioning and device placement are documented where used."
 V10 = "Results are reproducible under documented format, library, precision and implementation versions."
}

CONFIDENCE {
 BASE_CONFIDENCE = 0.99
 TENSOR_COMPUTATION_DEFINITION = 0.99
 SHAPE_REASONING = 0.99
 BROADCAST_REASONING = 0.99
 CONTRACTION_REASONING = 0.99
 SPARSE_TENSOR_REASONING = 0.98
 DECOMPOSITION_REASONING = 0.98
 NUMERICAL_STABILITY_REASONING = 0.99
 POLICY = "Reduce confidence when shape, strides, contraction axes, sparse format, rank model, precision or distribution semantics are underspecified."
}

AI_CONSUMPTION {
 PURPOSES = [
  SemanticSearch,OntologyGrounding,TensorComputationReasoning,
  TensorShapeReasoning,StrideReasoning,BroadcastReasoning,
  ContractionReasoning,EinsteinSummationReasoning,
  SparseTensorReasoning,TensorDecompositionReasoning,
  CPReasoning,TuckerReasoning,HOSVDReasoning,TensorTrainReasoning,
  MemoryLayoutReasoning,ParallelTensorReasoning,
  DistributedTensorReasoning,GPUTensorReasoning,
  NumericalStabilityReasoning,VerificationReasoning,
  KnowledgeGraphConstruction,RetrievalAugmentation,RecursiveInference
 ]
 NORMALISE {
  "tensor computation" -> TensorComputation
  "COO" -> CoordinateTensorFormat
  "CSF" -> CompressedSparseFiber
  "CP" -> CanonicalPolyadicDecomposition
  "HOSVD" -> HigherOrderSVD
  "TT" -> TensorTrain
  "MTTKRP" -> MatricizedTensorTimesKhatriRaoProduct
  "NNZ" -> NonzeroCount
 }
}

EXECUTION_RULES {
 E1 = "If a multidimensional array or tensor is represented or manipulated computationally, activate TensorComputationOntology."
 E2 = "Determine tensor order, shape, element type, density and structure before choosing storage."
 E3 = "Validate axis and shape compatibility before broadcasting or contraction."
 E4 = "Choose dense or sparse formats according to density and access patterns."
 E5 = "Exploit symmetry, block or low-rank structure when valid."
 E6 = "Assess numerical stability and approximation error for decompositions."
 E7 = "Optimise axis order, tiling, fusion and vectorisation for repeated kernels."
 E8 = "Use parallel, distributed or GPU representations when scale requires them."
 E9 = "Validate shapes, strides, residuals, precision and reproducibility."
}

RECURSION {
 ENTRY = TensorComputation
 EXPAND(TensorComputation) -> [
  Tensor,MultidimensionalArray,TensorShape,Axis,Mode,TensorEntry,MultiIndex,
  DenseTensor,SparseTensor,StructuredTensor,BlockTensor,LowRankTensor,
  ContiguousStorage,StridedStorage,Stride,TensorView,Subtensor,
  Reshape,Flatten,PermuteAxes,TransposeAxes,Squeeze,Unsqueeze,
  Broadcasting,ElementwiseOperation,TensorReduction,InnerProduct,OuterProduct,
  TensorProduct,TensorContraction,EinsteinSummation,Einsum,
  BatchedMatrixMultiplication,ModeNProduct,Matricisation,
  Gather,Scatter,COO,CSF,BlockSparseTensor,SparsityPattern,NNZ,
  CPDecomposition,TuckerDecomposition,HOSVD,TensorTrain,
  LowRankApproximation,CoreTensor,FactorMatrix,MTTKRP,
  TensorCompletion,TensorCompression,MixedPrecision,
  FloatingPointArithmetic,NumericalStability,MemoryBandwidth,
  CacheLocality,LoopTiling,Vectorisation,TensorKernel,KernelFusion,
  AutomaticDifferentiationRelationship,DistributedTensor,ShardedTensor,
  GPUMatrixRelationship,TensorCoreRelationship,Verification,Reproducibility
 ]
 EXPAND(TensorComputationFamilies) -> [
  DenseTensorRepresentations,
  SparseTensorRepresentations,
  TensorIndexingAndBroadcasting,
  TensorContractionAndProducts,
  TensorDecompositionAndLowRankMethods,
  ParallelDistributedAndGPUTensors,
  TensorMemoryAndKernelOptimisation,
  NumericalTensorValidation
 ]
 STOP_CONDITION = "Stop when shape, storage, indexing, operations, decomposition, numerical behaviour and validation are sufficiently resolved."
}

ROUTING {
 PARENT_ONTOLOGY = "Computational Data Structures"
 RELATED_ONTOLOGIES = [
  "Computational Data Structures",
  "Computational Matrix Ontology",
  "Matrix Computation Ontology",
  "Numerical Linear Algebra Ontology 2",
  "Sparse Matrix Ontology 2",
  "Singular Value Decomposition Ontology",
  "High Performance Computing Ontology 2",
  "Parallel Computing Ontology",
  "Distributed Computing Ontology",
  "GPU Computing Ontology",
  "Vector Processing Ontology",
  "Floating Point Arithmetic Ontology",
  "Numerical Stability Ontology 2"
 ]
 ROUTE_RULES = [
  "Tensor Computation -> Computational Data Structures for parent representation semantics",
  "Tensor Computation -> Computational Matrix for order-two specialisation relationships",
  "Tensor Computation -> Matrix Computation and Numerical Linear Algebra for matricised and factorisation kernels",
  "Tensor Computation -> Sparse Matrix for compressed sparse representation relationships",
  "Tensor Computation -> SVD for HOSVD and low-rank factorisation relationships",
  "Tensor Computation -> HPC, Parallel, Distributed, GPU and Vector ontologies for scalable execution",
  "Tensor Computation -> Floating Point Arithmetic and Numerical Stability for finite-precision behaviour"
 ]
}

UPDATE_MODEL {
 MODE = "append-compatible semantic versioning"
 MAJOR = "ontology-breaking conceptual change"
 MINOR = "new compatible tensor formats, decompositions or reasoning pathways"
 PATCH = "clarification, metadata or formatting correction"
 RULES = [
  "Preserve tensor-order-versus-matrix-rank distinction.",
  "Preserve logical-shape-versus-memory-layout distinction.",
  "Preserve broadcast-view-versus-materialised-copy distinction.",
  "Preserve dense-versus-sparse tensor distinction.",
  "Preserve exact-tensor-versus-low-rank-approximation distinction.",
  "Preserve local-versus-distributed tensor distinction.",
  "Preserve exact-algebra-versus-floating-point-computation distinction.",
  "Preserve machine-readable tensor-computation semantics."
 ]
}

OUTPUT {
 CANONICAL_DEFINITION = "Tensor computation represents and manipulates multidimensional arrays through indexed operations, contractions, transformations and decompositions."
 SHAPE_SUMMARY = "Tensor order, shape, axes and strides define logical and physical organisation."
 STORAGE_SUMMARY = "Dense, strided, sparse COO, CSF and block-sparse formats support different workloads."
 OPERATION_SUMMARY = "Broadcasting, reductions, contractions, tensor products and Einstein summation form core tensor operations."
 DECOMPOSITION_SUMMARY = "CP, Tucker, HOSVD and tensor-train methods provide low-rank or structured representations."
 PERFORMANCE_SUMMARY = "Axis order, memory layout, tiling, vectorisation, fusion and device placement strongly affect performance."
 VALIDATION_SUMMARY = "Tensor computations should be checked for shape compatibility, indexing correctness, decomposition residuals, numerical stability and reproducibility."
}

FLOW {
 INPUT
 -> detect_tensor_computation_context
 -> identify_order_shape_data_type_density_structure_operations_accuracy_memory_and_hardware
 -> choose_dense_sparse_structured_block_or_low_rank_representation
 -> choose_contiguous_strided_COO_CSF_block_sparse_or_specialised_storage
 -> validate_shapes_axes_strides_and_broadcast_compatibility
 -> execute_indexing_elementwise_reduction_contraction_product_reshape_or_decomposition_operations
 -> analyse_complexity_memory_traffic_conditioning_precision_and_approximation_error
 -> optimise_axis_order_tiling_vectorisation_fusion_and_hardware_mapping
 -> if_large_choose_parallel_distributed_sharded_or_GPU_execution
 -> verify_reconstruction_residuals_and_reference_results
 -> document_format_precision_library_versions_device_mapping_and_provenance
 -> route_to_related_ontologies
 -> recursively_expand_required_dependencies
 -> verify_result
 -> assign_confidence
 -> produce_semantic_output
 -> END
}

FLOW_HASH {
 METHOD = "semantic-content-identity"
 ID = "KIRETH-MATH-COMPUTATIONAL-DATA-STRUCTURES-TENSOR-COMPUTATION-ONTOLOGY-V1"
}

}

END_FLOW
Kireth Research
38 Thorndale Croft, Wetwang, Driffield
East Riding of Yorkshire YO25 9XZ