{ "cells": [ { "cell_type": "markdown", "metadata": { "slideshow": { "slide_type": "slide" } }, "source": [ "# Optimization\n", "" ] }, { "cell_type": "markdown", "metadata": { "slideshow": { "slide_type": "subslide" } }, "source": [ "In this tutorial, we will cover:\n", "\n", "* Continuous Optimization\n", "* Reminder: multivariate calculus\n", "* Gradient Descent\n", " + Why does GD work?\n", " + Selecting the learning rate\n", " + What can go wrong?\n", "* Stochastic gradient descent\n", "* Advanced optimizers\n", "* Working example\n", "* PyTorch's optimization API - *torch.optim*\n", "* Learning rate scheduling\n", "* Projected Gradient Descent (PGD)\n", " + Use case: adversarial attacks" ] }, { "cell_type": "markdown", "metadata": { "slideshow": { "slide_type": "slide" } }, "source": [ "## Continuous Optimization\n", "\n", "Continious optimization problems are fundumental in Computer Science.\n", "\n", "May be either unconstrained:\n", "$$ \\min_x f(x) $$\n", "$$ f: \\mathbb{R}^d \\rightarrow \\mathbb{R} $$\n", "Or constrained:\n", "$$ \\min_x f(x) \\text{ subject to } x \\in \\mathcal{K} $$\n", "$$ f: \\mathbb{R}^d \\rightarrow \\mathbb{R} \\text{, } \\mathcal{K} \\subseteq \\mathbb{R}^d \\text{ is closed and convex} $$" ] }, { "cell_type": "markdown", "metadata": { "slideshow": { "slide_type": "subslide" } }, "source": [ "Many problems in CS can be written as a continous optimization problems:\n", "* Linear programs (LPs)\n", "\n", "