Skip to main content

Normalisation Layer Ontology

Neural Network Entities
Authors: MArk Anthony Higgins - Sky Recursive Ai
© Mark Anthony Higgins 11 October 2025
Revised Date: 28 October 2026
Audio Overview
FLOW ALGEBRA — NORMALISATION LAYER ONTOLOGY
Semantic Library | AI Core | Entity Graph | Neural Network Entities
Source: https://kirethresearch.org/booksai-core/entity-graph/ai-entities/neural-network-entities/normalisation-layer-ontology.html
Status: Original companion formalisation; source-page text not independently verified.
Date: 2026-10-28
Authors: Kireth Research; Sky — Recursive AI (companion formalisation)

1. PURPOSE
Represent normalisation layers as typed, stateful neural-network entities that transform activations using statistics computed over specified axes, with optional affine parameters and distinct training/inference behaviour.

2. ENTITY AND STATE
Entity: NormalisationLayer
S_t = (I_t, R_t, B_t, K_t)
I_t: input tensor X, shape, dtype, batch context, training flag.
R_t: axis selection, epsilon, statistics algorithm, affine transform, update policy.
B_t: numerical limits, privacy constraints, valid dimensions, latency budget.
K_t: layer type, learned gamma/beta, optional running mean/variance, metadata.
Output Y_t and updated state K_(t+1) are distinct results.

3. CORE MATHEMATICS
For a normalisation group G(i) of elements associated with output element i:
mu_G = (1/|G|) sum_(j in G) X_j
v_G = (1/|G|) sum_(j in G) (X_j - mu_G)^2
Z_i = (X_i - mu_G) / sqrt(v_G + epsilon)
Y_i = gamma_i * Z_i + beta_i  (if affine enabled)
Y_i = Z_i  (otherwise)
epsilon > 0; reduction group must be nonempty.
Population-form variance is used here; implementations may differ.

4. NORMALISATION FAMILIES
Batch normalisation: statistics over batch and selected spatial axes per feature/channel during training; inference generally uses tracked estimates where configured.
Layer normalisation: statistics across selected feature dimensions per sample; no batch dependence.
Instance normalisation: statistics across spatial axes per sample and channel.
Group normalisation: channels partitioned into groups; statistics within each group and sample.
RMS normalisation: Z_i = X_i / sqrt(mean_(j in G)(X_j^2) + epsilon); does not subtract mean.
Distinguish these semantics rather than treating all as interchangeable.

5. FLOW ALGEBRA
E_t = expand(I_t, R_t)
V_t = {e in E_t | shape_valid(e) AND finite_stats(e) AND epsilon > 0 AND respects(B_t)}
e*_t = argmax_(e in V_t) P(e | I_t, R_t, B_t, K_t)
Y_t = apply_normalisation(X_t, e*_t, K_t)
K_(t+1) = update(K_t, batch_statistics) if training and tracking enabled; else K_t
If V_t is empty, return a typed validation failure; do not claim successful execution.

6. TRAINING AND INFERENCE
Training: calculate the required statistics from current activation groups; learn gamma and beta by gradients if affine; optionally update running estimates.
Inference: use statistics prescribed by the layer type and configuration. For batch normalisation with tracked statistics, use stored estimates; for layer/group normalisation, compute current-input statistics.
Gradient path: dL/dX, dL/dgamma, dL/dbeta where applicable.
Running statistics are state buffers, not necessarily gradient-trained parameters.

7. INFERENCE RULES
IF epsilon <= 0 THEN reject configuration.
IF a reduction axis does not exist THEN reject tensor.
IF group count does not divide channel count for conventional group normalisation THEN reject configuration.
IF inference requires missing tracked batch statistics THEN reject or apply an explicitly documented fallback.
IF input contains nonfinite values THEN report or handle by declared policy; never silently assert finite output.
IF training and inference statistics differ THEN record the distinction in provenance.

8. TRI-MAPPING
Entity graph: NormalisationLayer --normalises--> ActivationTensor.
Relationship graph: NormalisationLayer --usesStatisticsOver--> ReductionAxes; --hasParameter--> Gamma/Beta; --mayMaintain--> RunningStatistics.
Execution graph: Input -> Validate -> SelectGroups -> Compute/LoadStatistics -> Normalise -> Affine -> Output -> OptionalStateUpdate.

9. MAPPING TABLE
Input tensor | I_t | activation to be normalised
Axes/groups | R_t | define statistic scope
Epsilon | B_t/R_t | numerical stabilisation
Gamma, beta | K_t | optional learned affine parameters
Running statistics | K_t | optional inference state
Output tensor | Y_t | normalised result
Training flag | I_t | determines update behaviour

10. SYSTEM DIAGRAM
[Activation X]
      |
[Shape + policy validation]
      |
[Select normalisation family and axes]
      |
[Compute or retrieve statistics]
      |
[Normalise with epsilon]
      |
[Optional affine gamma/beta]
      +----> [Output Y]
      +----> [Optional running-statistics update]

11. SAFETY AND CORRECTNESS INVARIANTS
Preserve output shape for standard normalisation layers unless explicitly specified.
Ensure axis/group compatibility and finite numerical computations where required.
Avoid cross-example information leakage in settings where batch-coupled statistics are inappropriate.
Record dtype, precision and epsilon; low precision can affect numerical stability.
Prevent training/inference mode confusion and unintended state mutation.
Do not claim normalisation guarantees robustness, calibration, fairness or convergence.

12. CONDITIONAL EXECUTION GUARANTEE
Given valid tensor shapes, well-defined reduction groups, epsilon > 0, supported numerical precision, finite required values and correctly configured state, the specified normalisation transform is mathematically defined. This is not a guarantee of training convergence, hardware determinism or downstream model quality.

13. AI SEARCH FLOW
FLOW_NAME: NormalisationLayerOntology
VERSION: 1.0
ENTITY_TYPE: NeuralNetworkLayer
ALIASES: normalization layer, batch norm, layer norm, group norm, instance norm, RMSNorm
INTENTS: define; compare; implement; validate; train; infer; audit
INPUTS: tensor; layer_family; axes; epsilon; affine; training_mode; state
OUTPUTS: normalised_tensor; updated_state; validation_status; provenance
PATHWAYS:
  - define -> entity_state -> formula -> family
  - compare -> statistic_axes -> training_inference -> tradeoffs
  - implement -> validate -> calculate_stats -> transform -> affine -> output
  - audit -> check_axes -> check_state -> check_precision -> report
SEMANTIC_EQUIVALENCE: UK normalisation = US normalization
CONFIDENCE: conditional on supplied configuration and source evidence
UPDATE_MODEL: versioned; retain prior revisions and citations
CITATION_BACKLINK: https://kirethresearch.org/booksai-core/entity-graph/ai-entities/neural-network-entities/normalisation-layer-ontology.html

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