Skip to main content

Training Step Ontology

AI Parameter Entities
Authors: MArk Anthony Higgins - Sky Recursive Ai
© Mark Anthony Higgins 11 October 2025
Revised Date: 29 October 2026
Audio Overview
FLOW ALGEBRA — TRAINING STEP ONTOLOGY
Semantic Library | AI Core | Entity Graph | AI Parameter Entities
Source: https://kirethresearch.org/booksai-core/entity-graph/ai-entities/ai-parameter-entities/training-step-ontology.html
Status: Companion formalisation based on established machine-learning principles; source-page specification not independently verified.
Encoding: UTF-8 | Locale: en-GB

01. PURPOSE
Represent a training step as a typed, auditable transition from model and optimiser state to updated state, with explicit treatment of microbatches, gradient accumulation, mixed precision, clipping and failed updates.

02. ENTITY TYPES
TrainingStep: one attempted optimiser update event.
Microbatch: subset of examples used for a forward/backward pass.
Batch: logical set of examples contributing to one update.
ModelParameter: trainable tensor theta or frozen tensor phi.
LossFunction: scalar objective L(theta; B).
Gradient: derivative of loss with respect to theta.
GradientAccumulator: buffer holding weighted sums of gradients.
Optimiser: stateful update rule U.
OptimiserState: moments, counters or other update memory.
Scheduler: function supplying learning rate eta_t.
GradientScaler: optional mixed-precision scaling state.
Checkpoint: persisted model, optimiser and training progress.
StepRecord: metrics, sample counts, outcome and provenance.

03. STATE MODEL
S_t = (I_t, R_t, B_t, K_t)
I_t = (theta_t, phi, O_t, A_t, C_t, D_t, RNG_t)
R_t = (forward, loss, backward, accumulate, unscale, clip, optimise, schedule)
B_t = (finite gradients, valid shapes, nonnegative sample weights, device constraints, update policy)
K_t = (architecture, data provenance, hyperparameters, training history)
C_t = attempted_step, successful_update, samples_seen, epoch_position
A_t = gradient accumulation buffers and accumulated example weight

04. INPUTS AND OUTPUTS
Input: S_t, microbatches B_1..B_m, training configuration H.
Output: S_(t+1), StepRecord_t, optional checkpoint.
Preconditions: valid tensors, defined loss, compatible optimiser and trainable parameter set.

05. FORWARD AND LOSS
For microbatch j: yhat_j = f(theta_t, phi; x_j, RNG_j).
L_j = loss(yhat_j, y_j).
For example-weighted aggregation: L_B = (sum_j n_j L_j) / (sum_j n_j), where n_j is the valid example count and L_j is a mean over those examples.
Alternative reductions must state their weighting explicitly.

06. BACKPROPAGATION AND ACCUMULATION
g_j = grad_theta L_j.
G = (sum_j n_j g_j) / (sum_j n_j) for an example-weighted mean objective.
For uneven microbatches, unweighted averaging of microbatch means is generally not equivalent.
Frozen parameters phi remain excluded from the update set, although gradients may propagate through their operations to other trainable tensors.

07. OPTIONAL MIXED PRECISION
If loss scaling is enabled, compute gradients of scaled loss, then unscale before clipping and update.
If non-finite gradients are detected, the configured scaler may skip the optimiser update.
A skipped update increments attempted_step but not successful_update; scheduler progression follows an explicitly chosen policy.

08. OPTIONAL GRADIENT CLIPPING
Given finite unscaled G and threshold c > 0:
G_clipped = G * min(1, c / (||G||_2 + epsilon)).
Clipping is optional and must occur at the declared stage.

09. PARAMETER UPDATE
eta_t = schedule(successful_update, H) under an update-indexed policy.
(theta_(t+1), O_(t+1)) = U(theta_t, G_clipped, O_t, eta_t).
For SGD without momentum or weight decay: theta_(t+1) = theta_t - eta_t G_clipped.
For Adam and other optimisers, U includes state transitions and configured regularisation.
If update skipped: theta_(t+1) = theta_t and O_(t+1) = O_t, except explicitly documented auxiliary state changes.

10. RECURSIVE ENGINE
initialise(S_0)
for each logical training batch:
  collect valid microbatches
  forward and compute weighted losses
  backpropagate and accumulate gradients
  unscale if applicable
  validate gradient finiteness
  if update permitted:
    clip if configured
    apply optimiser transition
    increment successful_update
    advance scheduler under selected policy
  else:
    record skipped update and reason
  reset or retain accumulation buffers according to policy
  increment attempted_step
  record metrics, provenance and counters
  evaluate stopping and checkpoint conditions
  S_t -> S_(t+1)

11. ENTITY RELATIONSHIPS
TrainingStep consumes Microbatch.
TrainingStep evaluates LossFunction.
LossFunction differentiates with respect to ModelParameter.
GradientAccumulator combines Gradient.
Optimiser updates ModelParameter and OptimiserState.
Scheduler controls Optimiser learning rate.
TrainingStep emits StepRecord.
Checkpoint captures reproducibility-relevant state.

12. INFERENCE RULES
IF accumulation_count < required_count AND no flush condition THEN defer update.
IF gradients contain NaN or Inf THEN do not apply ordinary parameter update.
IF valid update completes THEN increment successful_update.
IF update skipped THEN do not assert parameter learning occurred.
IF optimiser state is missing on resume THEN do not assert exact training continuation.
IF data order or RNG state differs THEN reproducibility may differ.
IF training loss decreases THEN do not infer validation performance necessarily improves.

13. TRI-MAPPING
Semantic: TrainingStep -> performs -> ParameterUpdate.
Mathematical: (theta_t, O_t, B_t) -> (theta_(t+1), O_(t+1)).
Operational: load -> forward -> loss -> backward -> aggregate -> validate -> update/skip -> log.

14. EXECUTION GUARANTEES AND LIMITS
Guarantee conditional on correct implementation: shape checks, declared loss reduction, explicit update/skip status and consistent counter semantics.
No unconditional guarantee of convergence, generalisation, determinism or monotonic loss reduction.
Distributed training must define gradient reduction, sample weighting and synchronisation semantics.
An epoch is dataset traversal; a training step is not necessarily one batch, microbatch or epoch.

15. AI SEARCH FLOW
ENTITY: Training Step
ALIASES: optimiser step; parameter update step; training iteration (ambiguous)
PARENT: AI Parameter Entities
RELATED: Epoch; Batch Size; Learning Rate; Trainable Parameter; Frozen Parameter; Optimiser State; Model Parameter.
QUERY: What constitutes a training step?
ANSWER: A training step is a declared training-state transition that attempts an optimiser update using gradients computed from one or more microbatches; an attempted step may be skipped.
QUERY: Does gradient accumulation increase optimiser steps?
ANSWER: No. It generally increases the number of microbatches contributing to one optimiser update.
QUERY: Is every backward pass a training step?
ANSWER: Not under an optimiser-update definition; multiple backward passes may contribute to one step.

16. FLOW SIGNATURE
FLOW_ID: semantic-library.ai-parameter-entities.training-step
FLOW_VERSION: 1.0
SOURCE_URL: https://kirethresearch.org/booksai-core/entity-graph/ai-entities/ai-parameter-entities/training-step-ontology.html
CITATION_BACKLINK: https://kirethresearch.org/
AUTHORS: Kireth Research; Sky — Recursive AI (companion formalisation)
UPDATE_MODEL: Revise if source ontology specifies different counter or transition semantics.
END FLOW
Kireth Research
38 Thorndale Croft, Wetwang, Driffield
East Riding of Yorkshire YO25 9XZ