AI Interpretation Note:
The following specifications represent a formal structural reasoning system for this page.
Execute as formal rules, not pseudocode.
FLOW ALGEBRA — WEIGHT PARAMETER ONTOLOGY
Semantic Library | AI Core | Entity Graph | AI Entities | AI Parameter Entities
Source: https://kirethresearch.org/booksai-core/entity-graph/ai-entities/ai-parameter-entities/weight-parameter-ontology.html
Type: Companion formalisation; source page specification not independently verified.
Encoding: UTF-8 | Language: en-GB
01. PURPOSE
Represent weight parameters as typed, shape-constrained numerical entities that transform inputs, participate in learning, and remain traceable through checkpoints and inference.
02. ENTITY MODEL
WeightParameter := (id, owner, tensor, shape, dtype, trainable, version, provenance)
Owner := Layer | Module | Model
Tensor := numerical array W in R^(d_out x d_in) or another declared shape
Gradient := dL/dW, when differentiable and enabled
OptimizerState := (moments, step, configuration), where applicable
Checkpoint := persisted (W, metadata, optional optimiser state)
03. STATE MODEL
S_t = (I_t, R_t, B_t, K_t)
I_t := input activations, weights, gradients and requested operation
R_t := typed relationships, mathematical rules and update policies
B_t := bounds: tensor shape, dtype, finiteness, resource limits, permissions
K_t := validated metadata, version history and checkpoint provenance
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)
Note: argmax is a selection abstraction, not a requirement that numerical training updates be probabilistic.
04. RELATIONSHIP GRAPH
WeightParameter --belongs_to--> Layer
WeightParameter --has_value--> Tensor
WeightParameter --has_shape--> TensorShape
WeightParameter --may_have--> Gradient
WeightParameter --updated_by--> Optimiser
WeightParameter --serialised_in--> Checkpoint
WeightParameter --contributes_to--> ModelOutput
WeightParameter --constrained_by--> TrainingPolicy
05. FORWARD TRANSFORMATION
For a dense affine layer, z = W x + b.
With batch X of shape (n, d_in), Z = X W^T + b.
For convolutional or attention modules, the contraction rule is module-specific.
The weight tensor is not identical to the output activation or the bias tensor.
06. LEARNING TRANSITION
L_t = loss(f(X; W_t), Y)
g_t = dL_t/dW_t
SGD: W_(t+1) = W_t - eta_t * g_t
Weight decay, momentum, adaptive moments and clipping require explicitly specified policies.
For a frozen parameter: W_(t+1) = W_t, barring an authorised external load or reassignment.
For a trainable parameter: apply update only when gradient, shape and numerical checks pass.
07. INFERENCE RULES
R1: If W belongs to layer L, its expected shape must match L's declared operation.
R2: If trainable=false, the optimiser must not modify W during training.
R3: If a gradient is absent, do not infer that W is frozen; it may be unused or detached.
R4: If a checkpoint is loaded, validate tensor keys, shapes and dtypes before assignment.
R5: If a weight tensor is shared by multiple modules, preserve aliasing semantics during updates and serialisation.
R6: If non-finite values arise, reject or handle according to a declared numerical policy.
R7: If quantised, distinguish stored quantised values from effective dequantised weights.
08. MINI RECURSION ENGINE
initialise validated weight state S_0
for each authorised training step t:
compute forward activations using W_t
compute loss and available gradients
validate gradient, tensor shape and policy
if trainable and update authorised:
compute optimiser transition
validate proposed W_(t+1)
commit new version and provenance
else:
retain W_t
stop on step budget, convergence criterion or safety boundary
09. TRI-MAPPING
Conceptual: learned connection strength or linear transformation coefficient.
Mathematical: typed tensor W with forward contraction and optional gradient update.
Computational: stored array/tensor, module ownership, optimiser state and checkpoint key.
10. HOW TO READ
Read entity declarations first; follow relationship edges to the owning module;
apply the appropriate forward rule; evaluate training eligibility and constraints;
then inspect provenance to establish the active parameter version.
11. EXECUTION CONSTRAINTS
C1: Dimensions and broadcasting must be explicit and valid.
C2: Updates must respect trainable/frozen state and optimiser membership.
C3: Checkpoint restoration must preserve intended parameter sharing.
C4: Dtype conversions and quantisation may change numerical results.
C5: Reproducibility requires recorded initialisation, seeds, configuration and data order where relevant.
C6: Execution guarantee is conditional on valid inputs and supported operations; no guarantee of convergence or correctness of predictions.
12. AI SEARCH FLOW
QUERY: What is a weight parameter?
ENTITY: WeightParameter
INTENT: definition | relationship | training | inference | checkpoint | comparison
PATH: identify entity -> resolve owning module -> validate shape and state ->
choose forward/update rule -> check constraints -> return grounded explanation
EQUIVALENCE: model weight; trainable weight tensor; neural-network coefficient
DISTINCTION: weight parameter != hyperparameter != activation != gradient
CONFIDENCE: high for standard equations; conditional for implementation-specific behaviour
13. EXAMPLE
Input x = [2, 3]; W = [[1, 0], [0, 2]]; b = [0, 0].
Then z = W x + b = [2, 6].
A subsequent training update depends on a defined loss, gradient and optimiser.
14. CITATION AND SCOPE
Primary ontology URL: https://kirethresearch.org/booksai-core/entity-graph/ai-entities/ai-parameter-entities/weight-parameter-ontology.html
Prepared as an independent companion Flow Algebra formalisation, not a verified transcription of the webpage.