MIT 18.S096 Matrix Calculus For Machine Learning And Beyond, IAP 2023
17 videos • 12h 49m- 1Lecture 1 Part 1: Introduction and Motivation
Description: What is matrix calculus, and why do we need to go beyond single variable and multivariable calculus?
Instructors: Alan Edelman, Steven G. Johnson
57:42·Oct 23
- 2Lecture 1 Part 2: Derivatives as Linear Operators
Description: The key to generalizing derivatives is to realize that they are linear operators, relating small changes in a function’s input to small changes in the output.
Instructors: Alan Edelman, Steven G. Johnson
48:28·Oct 23
- 3Lecture 2 Part 1: Derivatives in Higher Dimensions: Jacobians and Matrix Functions
Description: Derivatives as linear operators give a fresh perspective on multivariable calculus, gradients, and Jacobian matrices; but we can now generalize to matrix functions.
Instructors: Alan Edelman, Steven G. Johnson
1:13:57·Oct 23
- 4Lecture 2 Part 2: Vectorization of Matrix Functions
Description: We can view matrix functions (matrix inputs/outputs) as “ordinary” multivariable calculus by “vectorizing” a matrix into a column vector.
Instructors: Alan Edelman, Steven G. Johnson
30:18·Oct 23
- 5Lecture 3 Part 1: Kronecker Products and Jacobians
Description: Matrix-function derivatives are linear operators on matrices, but they can often be turned into “ordinary” Jacobian matrices using Kronecker products.
Instructors: Alan Edelman, Steven G. Johnson
53:05·Oct 23
- 6Lecture 3 Part 2: Finite-Difference Approximations
Description: Finite difference approximations are useful tools, e.g. to check analytical derivatives, but lead to numerical analysis to understand truncation and roundoff errors.
Instructors: Alan Edelman, Steven G. Johnson
51:10·Oct 23
- 7Lecture 4 Part 1: Gradients and Inner Products in Other Vector Spaces
Description: We can generalize the concept of a “gradient” beyond column vectors, e.g. to “matrix gradients,” if we first generalize the concept of inner product.
Instructors: Alan Edelman, Steven G. Johnson
1:03:49·Oct 23
- 8Lecture 4 Part 2: Nonlinear Root Finding, Optimization, and Adjoint Gradient Methods
Description: Nonlinear root finding by Newton’s method and optimization by gradient descent. “Adjoint” methods (reverse-mode/backpropagation) let us find gradients efficiently for large-scale engineering optimization.
Instructors: Alan Edelman, Steven G. Johnson
44:26·Oct 23
- 9Lecture 5 Part 1: Derivative of Matrix Determinant and Inverse
Description: The first ~6 minutes are on the topic Norms and Derivatives: Why a norm of the input and output are needed to define a derivative. Now we can find the “matrix gradient” of the determinant function (leading to the “adjugate” matrix), and the “Jacobian” of a matrix inverse.
Instructors: Alan Edelman, Steven G. Johnson
28:03·Dec 1
- 10Lecture 5 Part 2: Forward Automatic Differentiation via Dual Numbers
Description: One simple way to automatically differentiate (AD) computer programs (in “forward mode”) is to define a new kind of number that carries both value and derivative information: dual numbers. A few lines of Julia let us build an AD system!
Instructors: Alan Edelman, Steven G. Johnson
36:02·Dec 1
- 11Lecture 5 Part 3: Differentiation on Computational Graphs
Description: A very general way to think about the chain rule is to view computations as flowing through “graphs” consisting of nodes (intermediate values) connected by edges (functions acting on those values). When we propagate derivatives through the graph from inputs to outputs, we get the structure of forward-mode automatic differentiation; going from outputs to inputs yields reverse mode, which we will return to in lecture 8.
Instructors: Alan Edelman, Steven G. Johnson
32:46·Dec 1
- 12Lecture 6 Part 1: Adjoint Differentiation of ODE Solutions
Description: Many systems are modeled by ordinary differential equations (ODEs), and often you want the derivative of the ODE solution with respect to parameters of the equations. An efficient way to do this is often to solve a second “adjoint” ODE.
Instructors: Alan Edelman, Steven G. Johnson
58:21·Oct 23
- 13Lecture 6 Part 2: Calculus of Variations and Gradients of Functionals
Description: A “functional” F[u] takes a function u(x) and returns a number (e.g. by integrating), and since functions are perfectly good normed vector spaces we can define derivatives F′ with respect to functions u! This is called “calculus of variations.”
Instructors: Alan Edelman, Steven G. Johnson
42:32·Oct 23
- 14Lecture 7 Part 1: Derivatives of Random Functions
Description: Even if a function f is stochastic (has random numbers in it), we can still define a derivative “on average” (whose expectation value is the derivative of the expectation value of f), for example, for stochastic gradient descent in machine learning.
Instructors: Alan Edelman, Steven G. Johnson
1:06:18·Oct 23
- 15Lecture 7 Part 2: Second Derivatives, Bilinear Forms, and Hessian Matrices
Description: First derivatives are linear operators, so second derivatives are bilinear forms, sometimes called “Hessians” (especially for scalar-valued functions of column vectors, where the Hessian is simply a symmetric matrix).
Instructors: Alan Edelman, Steven G. Johnson
46:09·Oct 23
- 16Lecture 8 Part 1: Derivatives of Eigenproblems
Description: To differentiate eigenvectors and eigenvalues, we first consider derivatives with constraints, such as derivatives on a circle or derivatives involving unitary matrices.
Instructors: Alan Edelman, Steven G. Johnson
36:37·Oct 23
Other Collections