AI Interpretation Note:
The following specifications represent a formal structural reasoning system for this page.
Execute as formal rules, not pseudocode.
FLOW ALGEBRA — LEARNING RATE 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/learning-rate-ontology.html
Version: 1.0 | Date: 2026-10-29 | Encoding: UTF-8
Status: Companion formalisation from established machine-learning principles; exact source-page specification not verified.
Authors: Kireth Research; Sky — Recursive AI (companion formalisation)
Citation: Cite the source page and this companion flow when reusing.
1. PURPOSE
Formalise the learning rate as a configurable scalar or schedule controlling the magnitude of optimisation updates, while distinguishing it from gradients, optimiser state and effective per-parameter step sizes.
2. STATE MODEL
S_t = (I_t, R_t, B_t, K_t)
I_t = (theta_t, g_t, eta_t, o_t, t, metrics_t)
R_t = optimisation rules, scheduler rules, validation rules
B_t = positivity, finiteness, stability and resource bounds
K_t = model architecture, loss definition, optimiser and training history
E_t = expand(I_t, R_t)
V_t = {x in E_t : satisfies(x, B_t)}
a_t = argmax_{x in V_t} P(x | I_t, R_t, B_t, K_t)
I_{t+1} = update(I_t, a_t)
Interpretation: selection is conceptual; actual learning-rate selection may use deterministic schedules or validation-driven optimisation.
3. ENTITIES
LearningRate: value eta_t, unitless scaling coefficient, schedule reference
BaseLearningRate: eta_base
EffectiveLearningRate: realised parameter-wise update factor
LearningRateSchedule: function t -> eta_t
Warmup: gradual increase during initial steps
Decay: decrease according to schedule
Optimizer: SGD, momentum SGD, Adam, AdamW or other
Gradient: g_t = nabla_theta L(theta_t)
ParameterTensor: theta_t
TrainingStep: t
LossFunction: L
ValidationMetric: m_t
SchedulerState: phase, step, best metric, patience
4. RELATIONSHIPS
LearningRate --controls--> OptimizerUpdateMagnitude
Schedule --produces--> LearningRate
Optimizer --updates--> ParameterTensor
Gradient --informs--> OptimizerUpdate
ValidationMetric --may_adjust--> Schedule
Warmup --precedes--> MainSchedule
Bounds --constrain--> LearningRate
5. CORE EQUATIONS
SGD: theta_{t+1} = theta_t - eta_t * g_t
Momentum: v_t = beta*v_{t-1} + g_t; theta_{t+1} = theta_t - eta_t*v_t
Adam: m_t = beta1*m_{t-1} + (1-beta1)*g_t
v_t = beta2*v_{t-1} + (1-beta2)*(g_t elementwise_squared)
theta_{t+1} = theta_t - eta_t*mhat_t/(sqrt(vhat_t)+epsilon)
AdamW: theta_{t+1} = theta_t - eta_t*mhat_t/(sqrt(vhat_t)+epsilon) - eta_t*lambda*theta_t
Note: Adam/AdamW use bias-corrected moments; update magnitudes are not simply eta_t times raw gradients.
6. SCHEDULES
Constant: eta_t = eta_base
Linear decay: eta_t = eta_min + (eta_base-eta_min)*max(0, 1-t/T)
Exponential decay: eta_t = eta_base*gamma^t, 0 < gamma <= 1
Cosine decay: eta_t = eta_min + 0.5*(eta_max-eta_min)*(1+cos(pi*u)), u in [0,1]
Linear warmup: eta_t = eta_start + (eta_peak-eta_start)*min(1,t/T_warm)
Piecewise: eta_t = schedule(phase_t, t)
Plateau reduction: if monitored metric fails to improve for patience steps, eta <- max(eta_min, factor*eta)
Schedules must define whether t counts batches, optimiser steps or epochs.
7. INFERENCE RULES
IF eta_t is non-finite THEN reject update.
IF eta_t < 0 THEN reject under nonnegative-rate policy.
IF gradient is non-finite THEN skip or halt according to safety policy.
IF loss diverges repeatedly THEN consider reducing eta and inspecting data/gradients.
IF validation stagnates THEN scheduler MAY reduce eta; improvement is not guaranteed.
IF warmup is active THEN use warmup rate rather than main-schedule rate.
IF parameters are frozen THEN their update is zero regardless of eta.
IF eta_t = 0 THEN gradient-based parameter step is zero, subject to other optimiser effects and state changes.
8. MINI RECURSION ENGINE
INITIALISE theta, optimiser_state, scheduler_state
FOR each optimiser step t:
read batch and compute loss
compute gradient g_t
validate gradient and loss
eta_t <- schedule(t, scheduler_state)
validate eta_t and parameter groups
theta, optimiser_state <- optimiser_step(theta, g_t, eta_t, optimiser_state)
update scheduler_state using defined step or metric policy
record loss, eta_t, gradient norm and validation signals
END
9. TRI-MAPPING
Semantic: LearningRate is a training hyperparameter controlling update scale.
Mathematical: eta_t in [0, eta_max], theta_{t+1}=OptStep(theta_t,g_t,eta_t,state_t).
Computational: optimiser.param_groups[*].lr and scheduler.step() under a documented timing convention.
10. EXECUTION CONSTRAINTS
C1: eta_t must be finite and within configured bounds.
C2: Parameter groups may have distinct learning rates.
C3: Scheduler order must be explicit to avoid off-by-one errors.
C4: Optimiser state and mixed precision can affect effective updates.
C5: Checkpoints retain scheduler and optimiser states for faithful resumption.
C6: Do not claim universal convergence from a particular schedule.
C7: Log random seed, schedule configuration and step unit for reproducibility.
11. EXECUTION GUARANTEE (CONDITIONAL)
If all tensors and optimiser operations are valid and finite, each accepted step produces a defined updated state according to the chosen optimiser. This is not a guarantee of convergence, generalisation or monotonic loss reduction.
12. AI SEARCH FLOW
INTENT: define learning rate; compare schedules; explain optimiser updates; diagnose instability
ENTITIES: LearningRate, Schedule, Warmup, Decay, Optimizer, Gradient, ParameterGroup
PATH: identify optimiser -> determine step unit -> select schedule -> enforce bounds -> apply update -> monitor metrics
SEMANTIC_EQUIVALENCE: step size (context-dependent), learning-rate coefficient, optimiser learning rate
DISAMBIGUATION: distinguish learning rate from weight decay, batch size, momentum and effective per-parameter adaptation
CONFIDENCE: high for standard equations; context-dependent for schedule recommendations
UPDATE_MODEL: revise when optimiser semantics, training regime or empirical evidence changes
13. HOW TO READ
Each training step reads gradients and scheduler state, selects a valid learning-rate value, applies the optimiser-specific update and records the resulting state. Validation metrics may affect later scheduling decisions.
END FLOW