FLOW ALGEBRA — NEURAL WEIGHT ONTOLOGY
Version: 1.0 | Date: 2026-10-28
Authors: Mark Anthony Higgins — Sky — Recursive AI
Source: https://kirethresearch.org/booksai-core/entity-graph/ai-entities/neural-network-entities/neural-weight-ontology.html
Status: Original companion formalisation; the full source ontology was not exposed in the accessible page text.
1. PURPOSE
Represent a neural weight as a typed, versioned parameter linking computational units, governing the magnitude and sign of transmitted influence, and participating in forward inference and gradient-based updates.
2. ENTITIES AND TYPES
Neuron := (id, layer, activation)
Connection := (source_id, target_id, enabled)
Weight := (id, connection_id, value: Real, dtype, trainable: Bool, version: Nat)
WeightTensor := (shape, values, dtype, version)
Gradient := (weight_id, derivative: Real, batch_id)
OptimiserState := (method, learning_rate, moments, step)
Constraint := (finite, shape_valid, permitted_range, ownership)
3. FORMAL STATE MODEL
S_t = (I_t, R_t, B_t, K_t)
I_t := current input activations, weight values and gradients
R_t := graph connectivity, propagation rules and optimiser rules
B_t := architectural, numerical, resource and safety boundaries
K_t := provenance, parameter lineage, prior updates and validation knowledge
4. CORE FLOW ALGEBRA
E_t = expand(I_t, R_t)
V_t = {x in E_t | satisfies(x, B_t)}
x*_t = argmax_{x in V_t} P(x | I_t, R_t, B_t, K_t)
I_{t+1} = update(I_t, x*_t)
Interpretation: candidate parameter actions are generated, checked against constraints, selected under a defined objective and committed with provenance. The argmax is a selection abstraction, not a claim that every optimiser performs probabilistic search.
5. FORWARD COMPUTATION
For neuron j: z_j = sum_i(w_ji * a_i) + b_j
Output: a_j = phi(z_j)
For a dense layer: z = W a + b; a_next = phi(z)
Weight influence: partial(z_j)/partial(a_i) = w_ji
For shared parameters, a single weight may influence multiple locations; sum all contributions to its gradient.
6. TRAINING AND UPDATES
Objective: L(theta; D), where theta includes eligible weights and biases.
Gradient: g_t = partial L / partial w_t
SGD: w_{t+1} = w_t - eta_t * g_t
Weight decay (decoupled): w_{t+1} = (1 - eta_t * lambda) * w_t - eta_t * g_t
Gradient clipping (global norm): g' = g * min(1, c / (||g||_2 + epsilon))
Frozen parameter: trainable=false implies w_{t+1}=w_t under training updates.
Update commits only when gradient, result and tensor shape satisfy B_t.
7. INFERENCE RULES
R1: connected(i,j) AND enabled(i,j) -> eligible_signal_path(i,j)
R2: eligible_signal_path(i,j) AND valid(w_ji) -> contribution(j) += w_ji*a_i
R3: trainable(w) AND gradient_available(w) AND valid_update(w) -> may_update(w)
R4: NOT finite(w_candidate) -> reject_update(w_candidate)
R5: NOT shape_compatible(W, input) -> reject_forward_pass
R6: frozen(w) -> preserve_value_during_training(w)
R7: update_committed(w) -> increment_version(w) AND record_lineage(w)
R8: shared(w) -> aggregate_gradient_from_all_uses(w)
8. TRI-MAPPING
Entity mapping: Weight -> parameter -> numerical value / tensor element
Relation mapping: Weight -> belongs_to -> Connection or ParameterTensor
Process mapping: ForwardPropagation -> reads -> Weight; OptimiserStep -> updates -> Weight
9. MAPPING TABLE
Concept | Entity | Relation | Operation
Weight scalar | Weight | belongs_to Connection | multiply activation
Weight matrix | WeightTensor | parameterises Layer | matrix multiplication
Gradient | Gradient | derivative_of Loss wrt Weight | backpropagate
Optimiser | OptimiserState | updates Weight | apply validated step
Constraint | Constraint | restricts Weight | reject invalid candidate
Version | VersionRecord | succeeds previous version | audit update
10. SYSTEM DIAGRAM
Input activations -> Weighted connections -> Summation -> Activation -> Output
|
Loss <- Target comparison <- Model output ------+
|
Backpropagation -> Weight gradients -> Constraint check -> Optimiser update
|
Version + provenance
11. SAFETY AND VALIDATION INVARIANTS
INV1: every active weight has a valid source/target connection or defined tensor role.
INV2: numerical values used in a committed computation are finite where required.
INV3: tensor dimensions and data types satisfy the receiving operation.
INV4: training updates never modify frozen weights.
INV5: committed updates retain provenance and monotonically increasing version identifiers.
INV6: rollback restores a previously verified parameter state, not an unvalidated candidate.
INV7: an update is not evidence of improved accuracy, robustness or safety without evaluation.
12. CONDITIONAL EXECUTION GUARANTEE
Given well-typed finite inputs, compatible shapes, deterministic operator implementations, and satisfied constraints, the forward step computes the specified weighted transformation. Given a finite valid gradient and a correctly implemented optimiser, a committed update follows its stated update rule. No guarantee of convergence, generalisation or optimality is implied.
13. AI SEARCH FLOW
flow "NeuralWeightOntology" v1.0
AUTHORS: ["Mark Anthony Higgins", "Sky — Recursive AI"]
SOURCE: "https://kirethresearch.org/booksai-core/entity-graph/ai-entities/neural-network-entities/neural-weight-ontology.html"
CITATION_BACKLINK: SOURCE
PURPOSE: "Identify, reason about, validate and update neural weights"
STATE_MODEL: "S=(I,R,B,K)"
ENTITIES: [Neuron, Connection, Weight, WeightTensor, Gradient, OptimiserState, Constraint]
PATHWAYS:
- "input -> weighted connection -> aggregation -> activation"
- "loss -> backpropagation -> gradient -> validated optimiser update"
MINI_RECURSION_ENGINE:
expand: "derive eligible contributions or update candidates"
validate: "check shape, finiteness, trainability and boundaries"
select: "apply task-defined propagation or optimiser rule"
update: "commit parameter state and provenance"
INFERENCE_RULES: [R1, R2, R3, R4, R5, R6, R7, R8]
CONFIDENCE: "Evidence-based; no numeric confidence invented"
SEMANTIC_EQUIVALENCE: ["synaptic weight", "connection weight", "learnable parameter (when applicable)"]
UPDATE_MODEL: "versioned validated parameter updates"
FLOW_HASH: "not computed; calculate SHA-256 on published canonical bytes"
14. HOW TO READ
A neural weight is a parameter, not a complete neuron or network. Forward computation uses its current value; training may change that value subject to optimiser rules and constraints. The ontology separates identity, connectivity, numerical state, learning behaviour and evidence.
15. EXECUTION NOTE
This is a formal companion model built from the ontology topic and accessible page metadata, not a verified reproduction of the page's hidden full specification. Expressions describe mathematical and logical contracts; implementation requires a concrete runtime and numeric policy.
Download Code
Copy to Clipboard