Chapter 9

Optimization

Loss functions, gradient descent, learning rates, momentum, regularization, and training as search.

What this chapter does

Optimization turns learning into repeated measurement and adjustment. This chapter teaches how losses become search signals, how gradients suggest directions, and why step size, batches, momentum, regularization, and stability determine whether training behaves.

Lessons

Read these in order.

Start with the chapter introduction, then move through the topic lessons. The order is chosen so each page can reuse ideas from the pages before it.

  1. 01
    Introduction

    Why optimization is the training language of modern models.

  2. 02
    Objectives and Loss Functions

    Turning a learning goal into a number the model can reduce.

  3. 03
    Minima and Maxima

    The low and high points that optimization searches around.

  4. 04
    Gradient Descent

    Using the gradient to choose a direction that lowers loss.

  5. 05
    Stochastic and Mini-Batch Gradient Descent

    Estimating useful update directions from part of the data.

  6. 06
    Learning Rate

    The step size that controls how much each update changes.

  7. 07
    Momentum

    Remembering recent directions to smooth noisy updates.

  8. 08
    Adaptive Methods

    Optimizers that adjust step sizes from past gradients.

  9. 09
    Convexity

    A special case where local low points are global low points.

  10. 10
    Regularization

    Adding a preference for simpler or safer solutions.

  11. 11
    Numerical Stability in Training

    Keeping optimization from failing because numbers misbehave.

Before moving on

  • Read optimization as repeated measurement, direction, and step size.
  • Understand why learning rate, batches, regularization, and stability matter.
  • Explain why a lower training loss is useful evidence, not a guarantee of learning.
  • Connect gradient descent to training loops.

Where this leads

  • Deep Learning
  • Reinforcement Learning

Chapter progress