A topic in the Open Knowledge Graph — a free, open map of 15,290 topics and the order to learn them in.

Optimization Theory for ML

Research Depth 98 in the knowledge graph I know this Set as goal
14topics build on this
676prerequisites beneath it
See this on the map →
Convex Optimization FundamentalsGradient Descent and Optimization+1 moreDeep Learning TheoryImplicit Regularization+1 more
optimization convergence-rates sgd stochastic-optimization

Core Idea

Optimization theory for machine learning analyzes the convergence rates and computational complexity of training algorithms. Gradient descent on smooth convex functions converges at rate O(1/T), where T is the number of iterations. Stochastic gradient descent (SGD) — which uses a single random sample's gradient rather than the full gradient — converges at rate O(1/sqrt(T)) for convex problems, trading per-iteration cost for slower convergence. For strongly convex functions, both rates improve to O(exp(-T)) and O(1/T) respectively. The gap between GD and SGD rates reflects the fundamental tradeoff between computation per iteration and convergence speed, and the analysis of SGD noise explains why it often generalizes better than full-batch GD despite converging more slowly.

Explainer

In practice, training a machine learning model means solving an optimization problem: find the parameters that minimize a loss function over training data. Optimization theory for ML provides the convergence rate guarantees that tell us how quickly different algorithms approach the optimum and how this depends on properties of the loss function.

The baseline is gradient descent (GD) on smooth convex functions. At each step, GD moves in the direction of the negative gradient: x_{t+1} = x_t - eta * gradient(f, x_t). For a function with L-Lipschitz gradients (the gradient does not change too fast), GD with step size eta = 1/L achieves f(x_T) - f(x*) <= O(L * ||x_0 - x*||^2 / T). This O(1/T) rate means halving the error requires doubling the iterations — slow but predictable. For strongly convex functions (which curve upward like a quadratic), the rate improves to exponential: f(x_T) - f(x*) <= O(exp(-mu*T/L)), where mu is the strong convexity parameter. The condition number kappa = L/mu controls the rate — ill-conditioned problems (large kappa) converge slowly.

Stochastic gradient descent replaces the full gradient with a gradient computed on a single (or mini-batch of) randomly sampled data point(s). The per-step cost drops from O(n) to O(1), but the gradient estimate is noisy. For convex functions, SGD converges at O(1/sqrt(T)) — slower than GD's O(1/T), but each step is n times cheaper. For strongly convex functions, SGD achieves O(1/T) — matching GD's convex rate but not its exponential rate in the strongly convex case. The noise prevents SGD from exploiting strong convexity as fully as GD can.

The practical implications are profound. For large datasets (n >> 1), SGD dominates because the per-iteration cost savings outweigh the slower convergence rate. Modern deep learning training is essentially SGD (or its adaptive variants like Adam), and the noise in SGD has been shown to have beneficial regularization effects — it biases the optimization toward flatter minima that generalize better. Variance reduction methods (SVRG, SAGA) achieve the best of both worlds: O(1/T) convergence with near-SGD per-step cost by periodically computing a full gradient to correct the stochastic noise. The landscape of optimization for ML is a rich interplay between convergence speed, computational cost, noise structure, and generalization — and the theory provides the precise quantitative tradeoffs that guide algorithm selection.

Practice Questions 4 questions

Prerequisite Chain

Understanding ZeroThe Number ZeroCounting to FiveCounting to 10Counting to 20Counting a Set of Objects Up to 20Cardinality: The Last Number CountedMatching Numerals to QuantitiesSubitizing Small QuantitiesAddition Within 10Number Bonds to 10Addition Within 20Doubles and Near DoublesDoubles Facts Within 10Near Doubles Facts Within 20Mental Math Strategies for AdditionMental Math: Adding and Subtracting TensAddition Within 100Repeated Addition as MultiplicationMultiplication as Equal GroupsMultiplication: ArraysBasic Multiplication Facts (0s, 1s, 2s, 5s, 10s)Multiplication Facts Within 100Division as Equal SharingDivision as Grouping (Measurement Division)Division: Grouping (Repeated Subtraction) ModelDivision: Fair Sharing ModelDivision as Equal SharingDivision as GroupingBasic Division FactsDivision Facts Within 100Multiplication and Division Fact FamiliesRelationship Between Multiplication and DivisionDivision Facts as Inverse of MultiplicationRemainders and Quotients in DivisionDivision Word ProblemsMulti-Step Word ProblemsSolving Multi-Step Word ProblemsMultiplication Word ProblemsDivision Word ProblemsIntroduction to Long DivisionFactors and MultiplesPrime and Composite NumbersEquivalent FractionsRelating Fractions and DecimalsDecimal Place ValueIntegers and the Number LineComparing and Ordering IntegersAbsolute ValueAdding IntegersSubtracting IntegersMultiplying IntegersDividing IntegersUnit RatesProportionsPercent ConceptConverting Between Fractions, Decimals, and PercentsOperations with Rational NumbersTwo-Step EquationsSolving Multi-Step EquationsEquations with Variables on Both SidesAngle Pairs: Complementary, Supplementary, and VerticalParallel Lines and TransversalsCorresponding AnglesAlternate Interior AnglesTriangle Angle Sum TheoremExterior Angle TheoremTriangle Inequality TheoremSimilar Triangles: AA SimilaritySimilar Triangles: SSS and SAS SimilarityProportions in Similar TrianglesRight Triangle Trigonometry IntroductionSine, Cosine, and Tangent RatiosTrigonometric Ratios ReviewRadian MeasureConverting Between Degrees and RadiansThe Unit CircleGraphing Sine and CosineGraphing Tangent and Reciprocal Trigonometric FunctionsDerivatives of Trigonometric FunctionsAntiderivativesIndefinite IntegralsBasic Integration RulesRiemann SumsDefinite Integral DefinitionProbability Density Functions and Continuous DistributionsCumulative Distribution FunctionsContinuous Random VariablesProbability Density FunctionsExpected ValueLinear Regression in Machine LearningNeural Network FundamentalsBackpropagation AlgorithmMultilayer Perceptrons (MLPs)Activation Functions in Neural NetworksVanishing Gradient ProblemGradient Descent and OptimizationConvex Optimization FundamentalsOptimization Theory for ML

Longest path: 99 steps · 676 total prerequisite topics

Prerequisites (3)

Leads To (3)