Calculus for ML · 142
Glossary
The technical terms of this track, with short definitions (and the Persian term where available). Each term links to the lesson where it is introduced.
- action
- In mechanics, the functional . Its Euler–Lagrange equation is Newton's law (Hamilton's principle). Introduced in: Lesson 13
- activation
- The output of a layer after the elementwise activation function (ReLU, tanh, ...). Introduced in: Lesson 6
- adjoint
- In reverse mode, the gradient of the final scalar output with respect to an intermediate value . It has the same shape as . Introduced in: Lesson 4
- antiderivative
- A function with . By the fundamental theorem of calculus, . Introduced in: Lesson 10
- automatic differentiation (AD)
- Computing exact derivatives of a program (up to rounding) by applying the chain rule to each primitive operation. The cost is a small constant times the cost of the program. Introduced in: Lesson 5
- backpropagation
- Reverse-mode AD applied to a neural network: one backward sweep gives the gradient of the loss with respect to every weight. Introduced in: Lesson 6
- baseline (control variate)
- A constant subtracted in the score-function estimator, . It keeps the estimator unbiased, because the score has mean zero, and can reduce its variance. Introduced in: Lesson 12
- Bayesian information criterion (BIC)
- , a large- form of the Laplace evidence for parameters and data points. Smaller is better. Introduced in: Lesson 11
- calculus of variations
- The calculus of functionals: how changes when the function changes, and the conditions for to minimize or make stationary. Introduced in: Lesson 13
- catastrophic cancellation
- The loss of correct digits when two nearly equal floating-point numbers are subtracted. Introduced in: Lesson 7
- centering matrix
- The matrix . subtracts the mean of the entries of from each entry. Introduced in: Lesson 6
- central difference
- . Its truncation error is (second order). Introduced in: Lesson 7
- chain rule
- The derivative of a composition is the product of the derivatives: . In one variable, rates multiply. Introduced in: Lesson 4
- change-of-variables formula
- For a diffeomorphism : . Small volumes scale by . Introduced in: Lesson 10
- checkpointing
- Storing only some intermediate values in the forward run and recomputing the others in the backward run. It trades extra compute for less memory. Introduced in: Lesson 5
- complex-step derivative
- The approximation for a real-analytic . It has no subtraction, so the step can be tiny and the result is accurate to machine precision. Introduced in: Lesson 7
- computational graph
- A directed acyclic graph with one node per intermediate value of a program and an edge when is computed from . Introduced in: Lesson 4
- condition number
- For a quadratic bowl, the ratio of the largest to the smallest curvature (Hessian eigenvalue). A large means long thin contour ellipses and slow, zig-zag gradient descent. Introduced in: Lesson 2
- continuously differentiable ()
- A function whose partial derivatives all exist and are continuous. Such a function is differentiable. Introduced in: Lesson 2
- contour plot
- A drawing of a function of two variables by its level sets (contour lines) in the plane, like the height lines of a map. Introduced in: Lesson 2
- convex function
- A function whose chords lie on or above its graph: for . A twice differentiable function of one variable is convex exactly when . Introduced in: Lesson 1
- cotangent
- The output weighting vector in a VJP . In reverse mode it is the adjoint that flows backward. Introduced in: Lesson 5
- critical point
- A point where the derivative is zero (, or in many variables). Every inner local minimum or maximum of a differentiable function is one, but not every critical point is an extremum. Introduced in: Lesson 1
- deep equilibrium model (DEQ)
- A network whose output is a fixed point of one layer. It is trained with an implicit gradient, so memory does not grow with the number of solver iterations. Introduced in: Lesson 9
- definite integral
- The limit of Riemann sums as the strips get thin, the signed area under the graph of . Introduced in: Lesson 10
- degenerate critical point
- A critical point whose Hessian is singular (has a zero eigenvalue). When the other eigenvalues all have one sign, the second-order test cannot decide its type. Introduced in: Lesson 3
- derivative
- The number , when this limit exists. It is the slope of the tangent line and the rate of change of at . Introduced in: Lesson 1
- diffeomorphism
- A one-to-one map onto its image such that and both have continuous derivatives. Introduced in: Lesson 10
- difference quotient
- The slope of a secant line. The derivative is its limit as . Introduced in: Lesson 1
- differentiable
- A function is differentiable at if its derivative exists there, that is, if . In many variables: if a linear map with exists. Introduced in: Lesson 1
- directional check
- A cheap gradient check along one random direction : compare with . Introduced in: Lesson 7
- directional derivative
- The rate of change of at along a vector : . For a differentiable it equals . Introduced in: Lesson 2
- Dirichlet energy
- The functional . Its Euler–Lagrange equation is the Poisson equation . Introduced in: Lesson 13
- dual number
- A number with . Then , so arithmetic on dual numbers is forward-mode AD. Introduced in: Lesson 5
- energy (Ritz) loss
- A physics loss that minimizes the energy functional of a network directly, as in the Deep Ritz method. Introduced in: Lesson 13
- error signal
- In backpropagation, , the gradient of the loss with respect to the pre-activation of layer . Introduced in: Lesson 6
- essential boundary condition
- A boundary condition that prescribes the value of (a Dirichlet condition). It must be imposed on the admissible functions. Introduced in: Lesson 13
- Euler–Lagrange equation
- The condition that a smooth minimizer (or stationary point) of must satisfy. Introduced in: Lesson 13
- expectation
- , the average of weighted by the density of . Introduced in: Lesson 10
- exploding gradients
- The gradient of early layers grows exponentially with depth because it is a product of many Jacobians that stretch vectors. Introduced in: Lesson 6
- expression swell
- The fast growth of the size of a formula, and of its symbolic derivative, when a program with repeated subexpressions is written as one expression. Introduced in: Lesson 5
- fan-out
- A value fans out when several later operations use it. Its adjoint is the sum of the contributions of all its uses. Introduced in: Lesson 4
- finite difference
- An approximation of a derivative by a difference of function values divided by a step, such as . Introduced in: Lesson 7
- first variation
- The directional derivative of a functional: . Introduced in: Lesson 13
- Fisher information matrix
- , with drawn from the model. For exponential-family outputs with natural parameters, it equals the Gauss-Newton matrix. Introduced in: Lesson 8
- fixed point
- A point with . Its derivative is when is invertible. Introduced in: Lesson 9
- forward difference
- . Its truncation error is (first order). Introduced in: Lesson 7
- forward mode
- AD that carries a tangent next to each value and computes one JVP per run. Good for few inputs and many outputs. Introduced in: Lesson 5
- functional
- A map from a function to a number , for example the length of a curve or an energy . Introduced in: Lesson 13
- functional derivative
- The function with for all admissible . It is the gradient of in the inner product. Introduced in: Lesson 13
- Gauss-Newton matrix
- For a loss , the matrix with . It drops the curvature of and is positive semidefinite when is convex. Introduced in: Lesson 8
- Gaussian integral
- for symmetric positive definite . In 1-D, . Introduced in: Lesson 11
- Gaussian smoothing
- Estimating from function values only (evolution strategies). Introduced in: Lesson 12
- Gauss–Hermite quadrature
- A -node rule that is exact for polynomials of degree up to . It turns Gaussian expectations into short sums. Introduced in: Lesson 11
- gradient
- The vector of all partial derivatives of a scalar function . It points in the direction of steepest increase and is orthogonal to the level set through . Introduced in: Lesson 2
- gradient check
- A test of a gradient implementation: compare it with finite differences and require a small relative error. Introduced in: Lesson 7
- gradient descent
- The iteration : take a small step against the gradient to decrease . Introduced in: Lesson 1
- gradient estimator
- A random vector computed from samples that estimates . It is unbiased if equals the true gradient. Introduced in: Lesson 12
- gradient flow
- The evolution , the continuous-time limit of gradient descent on a functional. For the Dirichlet energy it is the heat equation. Introduced in: Lesson 13
- Hessian
- The matrix of second partial derivatives of a scalar function. It is symmetric when is , and it describes the curvature of . Introduced in: Lesson 3
- Hessian-vector product (HVP)
- The product . AD computes it exactly for a few times the cost of a gradient, without forming . Introduced in: Lesson 8
- Hutchinson estimator
- The trace estimate with random probes such that . It needs only products . Introduced in: Lesson 8
- implicit differentiation
- Differentiating the solution of an equation through the equation itself, with one linear solve at the solution, instead of through the solver's iterations. Introduced in: Lesson 9
- implicit function theorem
- If , is and is invertible there, then the solution is a function near with . Introduced in: Lesson 9
- implicit reparameterization
- A pathwise gradient for distributions without a simple sampling path, from the CDF: . Introduced in: Lesson 12
- inflection point
- A point where the graph changes from curving up to curving down, or back. Example: at 0. Introduced in: Lesson 1
- iterated integral
- An integral over several variables computed one variable at a time. Fubini's and Tonelli's theorems say when the order does not matter. Introduced in: Lesson 10
- Jacobian
- The matrix of a map , with entries . It is the derivative of the map: . Introduced in: Lesson 3
- Jacobian-vector product (JVP)
- The product of a Jacobian with an input direction . Forward mode computes JVPs without forming . Introduced in: Lesson 4
- knowledge distillation
- Training a student model on the softmax outputs of a teacher model, often with a temperature . Introduced in: Lesson 6
- label smoothing
- Training with a soft target distribution instead of a one-hot vector. For softmax cross-entropy the gradient with respect to the logits is . Introduced in: Lesson 6
- Lagrangian
- The integrand of a functional , where stands for . Introduced in: Lesson 13
- Laplace approximation
- The Gaussian that approximates a posterior, with the MAP estimate and the Hessian of the negative log joint there. Introduced in: Lesson 11
- Laplace's method
- Approximating by replacing with its second-order Taylor expansion at the minimum: . Introduced in: Lesson 11
- level set
- The set of all inputs where has the fixed value . In 2-D it is a contour line. Introduced in: Lesson 2
- Levenberg-Marquardt
- A damped Gauss-Newton method that solves with . Introduced in: Lesson 8
- local derivative
- The derivative of one primitive operation with respect to one of its inputs, with the other inputs fixed. It sits on the edge of the graph. Introduced in: Lesson 4
- log-derivative trick
- The identity . It turns the gradient of an expectation into an expectation. Introduced in: Lesson 12
- log-partition function
- The log of the normalizing constant of an exponential family with natural parameter . Its gradient is the mean and its Hessian is the covariance of the sufficient statistic. Introduced in: Lesson 6
- log-sum-exp
- The function . Its gradient is ; compute it stably as with . Introduced in: Lesson 6
- logits
- The unnormalized scores of the output layer, one per class. Softmax turns them into probabilities. Introduced in: Lesson 6
- machine epsilon
- The relative spacing of floating-point numbers near 1: about in float64 and in float32. Introduced in: Lesson 7
- MAP estimate
- The maximum a posteriori estimate . Introduced in: Lesson 11
- marginal likelihood (evidence)
- The probability of the data with the parameters integrated out: . Introduced in: Lesson 11
- midpoint rule
- A Riemann sum with the value of at the middle of each strip. Its error is . Introduced in: Lesson 10
- Monte Carlo integration
- Estimating an integral as an average of the integrand at random points, for example with uniform . The error falls like in any dimension. Introduced in: Lesson 10
- natural boundary condition
- A boundary condition that the minimization itself produces at a free end, there; for the Dirichlet energy it is . Introduced in: Lesson 13
- negative log joint
- . In deep learning it is the training loss with weight decay, up to a constant. Introduced in: Lesson 11
- Neumann series
- The series , which converges when the spectral radius of is below 1. Introduced in: Lesson 9
- Newton step
- The step to the critical point of the quadratic model. It is the minimizer of the model when is positive definite. Introduced in: Lesson 3
- normalizing flow
- A generative model with an invertible map and a simple base density, so that is exact. Introduced in: Lesson 10
- numerical differentiation
- Approximating derivatives by finite differences of function values. It has truncation and rounding errors and needs about two evaluations per input. Introduced in: Lesson 5
- Occam factor
- In the Laplace evidence, the factor , roughly the posterior volume divided by the prior volume. It penalizes models that are more flexible than the data need. Introduced in: Lesson 11
- one-hot vector
- The vector with 1 in entry and 0 elsewhere. It encodes the true class . Introduced in: Lesson 6
- one-sided derivative
- The limit of the difference quotient when goes to 0 only from the right () or only from the left (). The derivative exists when both exist and are equal. Introduced in: Lesson 1
- operator overloading
- Redefining , and other operators for a new number type, so that ordinary code also computes derivatives. Introduced in: Lesson 5
- partial derivative
- The derivative of with respect to one variable , with all other variables kept fixed. Written . Introduced in: Lesson 2
- pathwise estimator (reparameterization trick)
- Write with fixed noise and use . It needs a differentiable and path, and usually has much lower variance. Introduced in: Lesson 12
- pre-activation
- The value of a layer before the elementwise activation function. Introduced in: Lesson 6
- precision matrix
- The inverse of a covariance matrix. It is the matrix in the quadratic exponent of a Gaussian density. Introduced in: Lesson 11
- preconditioned gradient
- A gradient multiplied by a positive definite matrix, . It is the steepest direction in the norm defined by ; with the Hessian it is Newton's direction. Introduced in: Lesson 2
- primitive operation
- A small operation whose derivative is known in closed form, such as , , , or a matrix product. Programs are compositions of primitives. Introduced in: Lesson 4
- probability density
- A function with and . It is probability per unit volume, so it can be larger than 1. Introduced in: Lesson 10
- quadratic model
- The second-order Taylor approximation with and . Introduced in: Lesson 3
- quadrature rule
- An approximation of an integral by a weighted sum of function values at chosen nodes. Introduced in: Lesson 11
- Rademacher vector
- A random vector whose entries are independent and equal to or with probability 1/2 each. Introduced in: Lesson 8
- relative error
- For gradients, . It does not depend on the scale of the gradient. Introduced in: Lesson 7
- residual (PINN) loss
- A physics loss that penalizes the squared residual of the differential equation at collocation points, as in physics-informed neural networks. Introduced in: Lesson 13
- residual connection
- A layer of the form . Its Jacobian is , so the identity path passes the gradient back unchanged. Introduced in: Lesson 4
- reverse mode
- AD that runs the program forward, records it, then propagates adjoints backward to compute one VJP per run. One backward run gives the full gradient of a scalar loss. Introduced in: Lesson 5
- Richardson extrapolation
- Combining approximations with steps and to cancel the leading error term, for example . Introduced in: Lesson 7
- Riemann sum
- The sum of the areas of thin rectangles under a curve. Its limit, when it exists, is the integral. Introduced in: Lesson 10
- Ritz method
- Minimizing a functional over trial functions (or a network ). The finite element method is the Ritz method with piecewise polynomials. Introduced in: Lesson 13
- rounding error
- The error from storing numbers with finite precision. In a finite difference it grows like as the step shrinks. Introduced in: Lesson 7
- saddle point
- A critical point where goes up in some directions and down in others. Its Hessian has both positive and negative eigenvalues. Introduced in: Lesson 3
- saturation
- An activation function saturates where its derivative is almost 0, for example sigmoid and tanh for large . Gradients that pass through it become very small. Introduced in: Lesson 1
- score
- The gradient of the log-density with respect to the parameters, . Its mean under is zero. Introduced in: Lesson 12
- score-function estimator (REINFORCE)
- The estimator with . It needs only values of and works for discrete samples, but it is often noisy. Introduced in: Lesson 12
- secant line
- The line through two points of a graph, at and . Its slope is the difference quotient. Introduced in: Lesson 1
- second derivative
- The derivative of the derivative . It says how the slope changes, so it measures curvature. Introduced in: Lesson 1
- second difference
- , an approximation of the second derivative. Introduced in: Lesson 7
- second variation
- The second derivative at . Like the Hessian, it decides whether a stationary point is a minimum. Introduced in: Lesson 13
- softplus
- The function , a smooth version of ReLU. Its derivative is the sigmoid . Introduced in: Lesson 6
- steepest descent direction
- Among all unit vectors (in the Euclidean norm), decreases fastest. In another norm, the steepest direction changes (for example, for the norm ). Introduced in: Lesson 2
- Stein's lemma
- For and a differentiable with : . Introduced in: Lesson 10
- step size (learning rate)
- The number that scales each gradient-descent step. For with , gradient descent converges exactly when . Introduced in: Lesson 1
- strict local minimum
- A point with for all near it. A critical point whose Hessian is positive definite is one. Introduced in: Lesson 3
- subgradient
- For a convex , a number with for all . At a kink there are many; for ReLU at 0, every is one. Introduced in: Lesson 1
- symbolic differentiation
- Differentiation of a formula into a new formula, as in computer algebra systems. The result can grow very large (expression swell). Introduced in: Lesson 5
- tangent
- In forward mode, the rate of change of a value when the input moves along a chosen direction. Also the name of the input vector in a JVP . Introduced in: Lesson 5
- tangent line
- The line that touches the graph at . It is the best linear approximation of near . Introduced in: Lesson 1
- tangent plane
- The graph of the linear approximation of a scalar function of several variables. Introduced in: Lesson 3
- tape
- The record of the operations and intermediate values of a forward run, which reverse mode reads backward. Introduced in: Lesson 5
- Taylor polynomial
- The polynomial of order that matches and its first derivatives at : . Introduced in: Lesson 1
- Taylor test
- A gradient check: the error must shrink like when is the correct gradient, and only like when it is wrong. Introduced in: Lesson 3
- Taylor's theorem
- A smooth function is close to a polynomial near a point, with a known error. For a scalar : . Introduced in: Lesson 3
- topological order
- An order of the nodes of a graph in which every node comes after all of its parents. The forward pass visits nodes in this order and the backward pass in the reverse order. Introduced in: Lesson 4
- trapezoid rule
- An integration rule that joins the end values of each strip by a straight line. Its error is . Introduced in: Lesson 10
- truncation error
- The error of an approximation formula in exact arithmetic, for example the gap between a secant slope and the tangent slope. It shrinks as the step shrinks. Introduced in: Lesson 7
- unrolling
- Differentiating through all iterations of a solver by backpropagation. It stores every iterate and differentiates the algorithm, not only the solution. Introduced in: Lesson 9
- vanishing gradients
- The gradient of early layers shrinks exponentially with depth because it is a product of many Jacobians with norm below 1. Introduced in: Lesson 6
- vector-Jacobian product (VJP)
- The product (or ) of an output vector with a Jacobian . Reverse mode computes VJPs without forming . Introduced in: Lesson 4