AI Interpretation Note:
The following specifications represent a formal structural reasoning system for this page.
Execute as formal rules, not pseudocode.
FLOW ALGEBRA — NEURAL NETWORK ARCHITECTURE ONTOLOGY
Semantic Library | AI Core > Entity Graph > AI Entities > Neural Network Entities
Source: https://kirethresearch.org/booksai-core/entity-graph/ai-entities/neural-network-entities/neural-network-architecture-ontology.html
Status: Original companion formalisation; source page content not independently verified.
Date: 2026-10-28
Credit: Kireth Research | Sky — Recursive AI
1. PURPOSE
Represent a neural-network architecture as a typed, directed computational graph, specifying its components, connectivity, dimensions, execution order, parameter sharing and constraints. Distinguish architecture from learned parameter values and runtime state.
2. ENTITIES AND RELATIONS
Entities: Architecture A, Layer L, Module M, Node N, Port P, Connection E, Tensor T, Parameter Theta, Activation F, Operator O, State H, Constraint C, Task Q.
Relations: contains(A,L); contains(A,M); connects(E,P_out,P_in); precedes(L_i,L_j); shares_parameter(M_i,M_j,Theta); produces(O,T); consumes(O,T); satisfies(A,C); supports(A,Q).
A = (V,E,types,shapes,operators,sharing,configuration).
V is a finite set of computational operations or modules; E is a set of typed tensor dependencies. A recurrent architecture may have cycles in its conceptual graph, but its unrolled execution graph must be acyclic for finite horizons.
3. FORMAL STATE MODEL
S_t = (I_t,R_t,B_t,K_t)
I_t: input tensors, intermediate activations and observed outputs.
R_t: graph topology, data-flow and module relationships.
B_t: compute, memory, latency, safety and deployment bounds.
K_t: architecture schema, operator semantics, weights and known constraints.
Expand: E_t = expand(I_t,R_t)
Validate: V_t = {x in E_t | shape_valid(x) and type_valid(x) and constraints_hold(x,B_t)}
Select: x*_t = argmax_{x in V_t} P(x | I_t,R_t,B_t,K_t), when a calibrated selection distribution exists.
Update: I_{t+1} = update(I_t,x*_t); K_{t+1} = verified_update(K_t,x*_t).
The argmax is a selection abstraction, not a requirement for ordinary deterministic network execution.
4. EXECUTION ALGEBRA
For a feedforward path: h_0=x; h_l = f_l(W_l h_{l-1}+b_l); y=g(h_L).
For a general computational graph: z_v = op_v({z_u : (u,v) in E}, theta_v).
For residual paths: h_{l+1}=h_l+F_l(h_l), requiring compatible shapes or a specified projection.
For branching: b_i=M_i(h); y=merge(b_1,...,b_k), where merge specifies concatenation, sum, attention or gating.
For recurrence: h_t=F(h_{t-1},x_t;theta), with a defined initial state h_0.
Parameter count: N_theta = sum of unique trainable parameter elements (shared parameters counted once).
Memory estimate: M_total approximately M_parameters + M_activations + M_optimizer + M_workspace; actual costs depend on precision, batch size, framework and hardware.
5. ARCHITECTURE INFERENCE RULES
R1: Every edge must connect compatible port types and tensor dimensions.
R2: Every output must be reachable from an input or declared initial state.
R3: Parameter sharing must preserve a single parameter identity across all users.
R4: A merge operation must define its shape transformation and axis semantics.
R5: Recurrent cycles require explicit state-transition semantics and a finite execution horizon or a bounded streaming policy.
R6: Training claims require a specified objective, gradient or alternative update rule, and parameter scope.
R7: Architecture equivalence requires an explicit criterion (functional, structural or approximate), not merely similar names.
R8: A deployment claim is conditional on tested hardware, workload and performance bounds.
6. TRI-MAPPING
Entity mapping: architecture -> modules -> layers -> operators -> tensors and parameters.
Relationship mapping: contains, connects, routes, shares, transforms, depends_on.
Flow mapping: input -> validate -> schedule -> execute -> merge -> output -> verify.
7. MAPPING TABLE
Concept | Algebraic representation | Validation
Architecture | A=(V,E,types,shapes,operators,sharing,configuration) | graph schema
Layer | h_l=f_l(h_{l-1};theta_l) | input/output shape
Connection | (u,v) in E | compatible ports
Residual | h+F(h) | matching shape or projection
Branch | {M_i(h)} | merge contract
Shared weights | theta_i is theta_j | parameter identity
Recurrent state | h_t=F(h_{t-1},x_t) | state shape and initialisation
Budget | cost(A,workload,hardware)<=B | measured constraints
8. SYSTEM DIAGRAM (TEXT)
[Input tensors]
|
[Type / shape validation]
|
[Architecture graph A]
|
[Topological execution / recurrent unrolling]
|
[Layer and module operations]
|
[Merge / route / state update]
|
[Output tensors]
|
[Contract and resource verification]
9. RECURSIVE COMPOSITION
A_0 = primitive operator.
A_{n+1} = compose(A_n, module_n, wiring_n), subject to preserved interface contracts.
Stop when the target interface, resource budget or maximum depth is reached. Recursive composition does not itself guarantee improved performance.
10. SAFETY AND CORRECTNESS INVARIANTS
INV1: No undefined tensor input or uninitialised recurrent state.
INV2: No silent shape, dtype or device mismatch.
INV3: No undeclared side effects in a supposedly pure layer.
INV4: Resource consumption stays within configured operational limits when those limits can be enforced.
INV5: Architecture metadata is versioned and traceable to implementation and evaluation artefacts.
INV6: No claim of robustness, fairness or safety without appropriate evaluation.
11. CONDITIONAL EXECUTION GUARANTEE
Given a finite executable graph or a bounded recurrent unrolling, valid operator implementations, compatible tensor contracts, available resources and deterministic scheduling where required, graph execution either produces an output satisfying its declared interface or reports a defined failure. This does not guarantee predictive accuracy, numerical stability, security or real-time deadlines.
12. AI SEARCH FLOW
flow "NeuralNetworkArchitectureOntology" v1.0
input: query, architecture_spec, constraints
identify: architecture_entities, modules, connections, operators
expand: topology, dependencies, tensor_shapes, parameter_sharing
validate: graph_integrity, interface_types, state_semantics, resource_bounds
infer: applicable_architecture_patterns, execution_order, possible_failures
rank: evidence_strength, constraint_fit, task_relevance
output: architecture_summary, entity_relations, mapping_table, verification_notes
provenance: source_url, schema_version, assumptions
fallback: insufficient_evidence_or_invalid_architecture
end
13. HOW TO READ
Read A as the structural specification of a network. Follow edges as tensor dependencies, not necessarily as physical communication channels. Operators determine transformations, parameters determine learned behaviour, and runtime state determines the values observed during a particular execution.
14. LIMITATIONS AND PROVENANCE
This file is an independently authored, topic-aligned Flow Algebra companion, not a verbatim extraction or verified mapping of the source page. Mathematical claims describe standard abstractions and must be specialised to the implementation under study.