Stochastic gradient descent (SGD) in its online form updates model weights using the gradient computed from a single training example, or a small mini-batch, at each step, rather than computing the gradient over the entire training dataset before any single update, trading noisier individual gradient estimates for the ability to begin updating weights immediately rather than waiting for a full-dataset pass. This per-example or per-mini-batch update frequency is what originally distinguished stochastic gradient descent from classical batch gradient descent, and remains the foundational update pattern that virtually all modern neural network optimizers, including Adam and AdamW, still build directly upon.