Arxiv:1902.01813V3 [Cs.LG] 28 Feb 2020 Tectures, and Thus Automatic Computation of Gradients Seems to Improve the Optimizer’S Performance

Total Page:16

File Type:pdf, Size:1020Kb

Arxiv:1902.01813V3 [Cs.LG] 28 Feb 2020 Tectures, and Thus Automatic Computation of Gradients Seems to Improve the Optimizer’S Performance Modular Block-diagonal Curvature Approximations for Feedforward Architectures Felix Dangel Stefan Harmeling Philipp Hennig University of Tübingen Heinrich Heine University University of Tübingen and [email protected] Düsseldorf MPI for Intelligent Systems, Tübingen [email protected] [email protected] Abstract δx = @E=@x and a positive semi-definite (PSD) cur- vature matrix C — the Hessian of E or approximations thereof. The quadratic is minimized by We propose a modular extension of backprop- 1 agation for the computation of block-diagonal x = x + ∆x with ∆x = C− δx : (1) approximations to various curvature matri- ∗ − ces of the training objective (in particular, Computing the update step requires that the C∆x = δx linear system be solved. To accomplish this task, the Hessian, generalized Gauss-Newton, and − positive-curvature Hessian). The approach re- providing a matrix-vector multiplication with the cur- duces the otherwise tedious manual derivation vature matrix C is sufficient. of these matrices into local modules, and is easy to integrate into existing machine learn- Approaches to second-order optimization: For ing libraries. Moreover, we develop a compact some curvature matrices, exact multiplication can be notation derived from matrix differential cal- performed at the cost of one backward pass by auto- culus. We outline different strategies applica- matic differentiation (Pearlmutter, 1994; Schraudolph, ble to our method. They subsume recently- 2002). This matrix-free formulation can then be lever- proposed block-diagonal approximations as aged to solve (1) using iterative solvers such as the special cases, and are extended to convolu- method of conjugate gradients (CG) (Martens, 2010). tional neural networks in this work. However, since this linear solver can still require multi- ple iterations, the increased per-iteration progress of the resulting optimizer might be compensated by in- 1 Introduction creased computational cost. Recently, a parallel version of Hessian-free optimization was proposed in (Zhang et al., 2017), which only considers the content of Hes- Gradient backpropagation is the central computational sian sub-blocks along the diagonal. Reducing the Hes- operation of contemporary deep learning. Its modular sian to a block diagonal allows for parallelization, tends structure allows easy extension across network archi- to lower the required number of CG iterations, and arXiv:1902.01813v3 [cs.LG] 28 Feb 2020 tectures, and thus automatic computation of gradients seems to improve the optimizer’s performance. given the computational graph of the forward pass (for a review, see Baydin et al., 2018). But optimization There have also been attempts to compute parts of using only the first-order information of the objective’s the Hessian in an iterative fashion (Mizutani and Drey- gradient can be unstable and slow, due to “vanishing” fus, 2008). Storing these constituents efficiently often or “exploding” behaviour of the gradient. Incorporat- requires an involved manual analysis of the Hessian’s ing curvature, second-order methods can avoid such structure, leveraging its outer-product form in many scaling issues and converge in fewer iterations. Such scenarios (Naumov, 2017; Bakker et al., 2018). Recent methods locally approximate the objective function E works developed different block-diagonal approxima- 1 by a quadratic E(x)+δx>(x x)+ (x x)>C(x x) tions (BDA) of curvature matrices that provide fast ∗− 2 ∗− ∗− around the current location x, using the gradient multiplication (Martens and Grosse, 2015; Grosse and Martens, 2016; Botev et al., 2017; Chen et al., 2018). Proceedings of the 23rdInternational Conference on Artificial These works have repeatedly shown that, empirically, Intelligence and Statistics (AISTATS) 2020, Palermo, Italy. second-order information can improve the training of PMLR: Volume 108. Copyright 2020 by the author(s). Code available at github.com/f-dangel/hbp. Modular Block-diagonal Curvature Approximations for Feedforward Architectures θ(1) θ(3) θ(`) δθ(1) δθ(3) δθ(`) z(0) z(1) z(2) z(3) z(`) E (1) (2) (3) (4) ::: (`) f δz(1) f δz(2) f δz(3) f f δz(`) E Figure 1: Standard feedforward network architecture, i.e. the repetition of affine transformations parameterized by θ(i) = (W (i); b(i)) followed by elementwise activations. Arrows from left to right and vice versa indicate the data flow during forward pass and gradient backpropagation, respectively. deep learning problems. Perhaps the most important tiplication by curvature matrices using automatic dif- practical hurdle to the adoption of second-order opti- ferentiation (Pearlmutter, 1994; Schraudolph, 2002). mizers is that they tend to be tedious to integrate in However, we also address a new class of curvature existing machine learning frameworks because they re- matrices, the positive-curvature Hessian (PCH) intro- quire manual implementations. As efficient automated duced in Chen et al.(2018). Our solutions to the latter implementations have arguably been more important two points are generalizations of previous works (Botev for the wide-spread use of deep learning than many con- et al., 2017; Chen et al., 2018) to the fully modular ceptual advances, we aim to develop a framework that case, which become accessible due to the first contri- makes computation of Hessian approximations about bution. They represent additional modifications to as easy and automated as gradient backpropagation. make the scheme computationally tractable and obtain curvature approximations with desirable properties for Contribution: This paper introduces a modular for- optimization. malism for the computation of block-diagonal approxi- mations of Hessian and curvature matrices, to various 2 Notation block resolutions, for feedforward neural networks. The framework unifies previous approaches in a form that, We consider feedforward neural networks composed similar to gradient backpropagation, reduces implemen- of ` modules f (i); i = 1; : : : ; `, which can be repre- tation and analysis to local modules. Following the sented as a computational graph mapping the input design pattern of gradient backprop also has the advan- z(0) = x to the output z(`) (Figure1). A module f (i) tage that this formalism can readily be integrated into (i 1) receives the parental output z − , applies an opera- existing machine learning libraries, and flexibly modi- tion involving the network parameters θ(i), and sends fied for different block groupings and approximations. the output z(i) to its child. Thus, f (i) is of the form (i) (i) (i 1) (i) The framework consists of three principal parts: z = f (z − ; θ ): Typical choices include elemen- twise nonlinear activation without any parameters and (i) (i) (i 1) (i) 1. a modular formulation for exact computation of affine transformations z = W z − + b with pa- (i) (i) Hessian block diagonals of feedforward neural nets. rameters given by the weights W and the bias b . We achieve a clear presentation by leveraging the Affine and activation modules are usually considered as notation of matrix differential calculus (Magnus a single conceptual unit, one layer of the network. How- and Neudecker, 1999). ever, for backpropagation of derivatives it is simpler to consider them separately as two modules. 2. projections onto the positive semi-definite cone by (`) (1;:::;`) eliminating sources of concavity. Given the network output z (x; θ ) of a datum x with label y, the goal is to minimize the expected risk 3. backpropagation strategies to obtain (i) exact cur- of the loss function E(z(`); y). Under the framework of vature matrix-vector products (with previously empirical risk minimization, the parameters are tuned N inaccessible BDAs of the Hessian) and (ii) further to optimize the loss on the training set Q = (x; y)i=1 , approximated multiplication routines that save 1 computations by evaluating the matrix representa- min E(z(`)(x); y) : (2) tions of intermediate quantities once, at the cost θ(1;:::;`) Q j j (x;y) Q of additional memory consumption. X2 In practice, the objective is typically further approxi- The first two contributions can be understood as an mated stochastically by drawing a mini-batch B Q ⊂ explicit formulation of well-known tricks for fast mul- from the training set. We will treat both scenarios Felix Dangel, Stefan Harmeling, Philipp Hennig Figure 2: Forward pass, gradient backpropagation, and θ Hessian backpropagation for a single module. Arrows δθ from left to right indicate the data flow in the forward pass θ H z = f(x; θ), while the opposite orientation indicates the x z gradient backpropagation by Equation (4). We suggest δx f δz to extend this by the backpropagation of the Hessian as x z H H indicated by Equation (7). without further distinction, since the structure relevant symmetry of both x and θ acting as input to the module. to our purposes is that Equation (2) is an average of Implementing gradient backpropagation thus requires terms depending on individual data points. Quantities multiplications by (transposed) Jacobians. for optimization, be it gradients or second derivatives We can apply the chain rule a second time to obtain of the loss with respect to the network parameters, can expressions for second-order partial derivatives of the be processed in parallel, then averaged. loss function E with respect to elements of x or θ, 2 3 Main contribution @ E(x) @ @zk = δzk @xi@xj @xj @xi ! First-order auto-differentiation for a custom module k X2 2 (5) requires the definition of only two local operations, @zk @ E(z) @zl @ zk = + δzk ; forward and backward, whose outputs are propagated @xi @zk@zl @xj @xi@xj k;l k along the computation graph. This modularity facili- X X tates the extension of gradient backpropagation by new @ @zl @ by means of =@xj = l( =@xj ) =@zl and the product operations, which can then be used to build networks rule. The first term of Equation (5) propagates cur- P by composition. To illustrate the principle, we consider vature information of the output further back, while a single module from the network of Figure1, depicted the second term introduces second-order effects of the in Figure2, in this section.
Recommended publications
  • SUPPLEMENTARY MATERIAL: I. Fitting of the Hessian Matrix
    Supplementary Material (ESI) for PCCP This journal is © the Owner Societies 2010 1 SUPPLEMENTARY MATERIAL: I. Fitting of the Hessian matrix In the fitting of the Hessian matrix elements as functions of the reaction coordinate, one can take advantage of symmetry. The non-diagonal elements may be written in the form of numerical derivatives as E(Δα, Δβ ) − E(Δα,−Δβ ) − E(−Δα, Δβ ) + E(−Δα,−Δβ ) H (α, β ) = . (S1) 4δ 2 Here, α and β label any of the 15 atomic coordinates in {Cx, Cy, …, H4z}, E(Δα,Δβ) denotes the DFT energy of CH4 interacting with Ni(111) with a small displacement along α and β, and δ the small displacement used in the second order differencing. For example, the H(Cx,Cy) (or H(Cy,Cx)) is 0, since E(ΔCx ,ΔC y ) = E(ΔC x ,−ΔC y ) and E(−ΔCx ,ΔC y ) = E(−ΔCx ,−ΔC y ) . From Eq.S1, one can deduce the symmetry properties of H of methane interacting with Ni(111) in a geometry belonging to the Cs symmetry (Fig. 1 in the paper): (1) there are always 18 zero elements in the lower triangle of the Hessian matrix (see Fig. S1), (2) the main block matrices A, B and F (see Fig. S1) can be split up in six 3×3 sub-blocks, namely A1, A2 , B1, B2, F1 and F2, in which the absolute values of all the corresponding elements in the sub-blocks corresponding to each other are numerically identical to each other except for the sign of their off-diagonal elements, (3) the triangular matrices E1 and E2 are also numerically the same except for the sign of their off-diagonal terms, (4) the 1 Supplementary Material (ESI) for PCCP This journal is © the Owner Societies 2010 2 block D is a unique block and its off-diagonal terms differ only from each other in their sign.
    [Show full text]
  • EUCLIDEAN DISTANCE MATRIX COMPLETION PROBLEMS June 6
    EUCLIDEAN DISTANCE MATRIX COMPLETION PROBLEMS HAW-REN FANG∗ AND DIANNE P. O’LEARY† June 6, 2010 Abstract. A Euclidean distance matrix is one in which the (i, j) entry specifies the squared distance between particle i and particle j. Given a partially-specified symmetric matrix A with zero diagonal, the Euclidean distance matrix completion problem (EDMCP) is to determine the unspecified entries to make A a Euclidean distance matrix. We survey three different approaches to solving the EDMCP. We advocate expressing the EDMCP as a nonconvex optimization problem using the particle positions as variables and solving using a modified Newton or quasi-Newton method. To avoid local minima, we develop a randomized initial- ization technique that involves a nonlinear version of the classical multidimensional scaling, and a dimensionality relaxation scheme with optional weighting. Our experiments show that the method easily solves the artificial problems introduced by Mor´e and Wu. It also solves the 12 much more difficult protein fragment problems introduced by Hen- drickson, and the 6 larger protein problems introduced by Grooms, Lewis, and Trosset. Key words. distance geometry, Euclidean distance matrices, global optimization, dimensional- ity relaxation, modified Cholesky factorizations, molecular conformation AMS subject classifications. 49M15, 65K05, 90C26, 92E10 1. Introduction. Given the distances between each pair of n particles in Rr, n r, it is easy to determine the relative positions of the particles. In many applications,≥ though, we are given only some of the distances and we would like to determine the missing distances and thus the particle positions. We focus in this paper on algorithms to solve this distance completion problem.
    [Show full text]
  • Removing External Degrees of Freedom from Transition State
    Removing External Degrees of Freedom from Transition State Search Methods using Quaternions Marko Melander1,2*, Kari Laasonen1,2, Hannes Jónsson3,4 1) COMP Centre of Excellence, Aalto University, FI-00076 Aalto, Finland 2) Department of Chemistry, Aalto University, FI-00076 Aalto, Finland 3) Department of Applied Physics, Aalto University, FI-00076 Aalto, Finland 4) Faculty of Physical Sciences, University of Iceland, 107 Reykjavík, Iceland 1 ABSTRACT In finite systems, such as nanoparticles and gas-phase molecules, calculations of minimum energy paths (MEP) connecting initial and final states of transitions as well as searches for saddle points are complicated by the presence of external degrees of freedom, such as overall translation and rotation. A method based on quaternion algebra for removing the external degrees of freedom is described here and applied in calculations using two commonly used methods: the nudged elastic band (NEB) method for finding minimum energy paths and DIMER method for finding the minimum mode in minimum mode following searches of first order saddle points. With the quaternion approach, fewer images in the NEB are needed to represent MEPs accurately. In both NEB and DIMER calculations of finite systems, the number of iterations required to reach convergence is significantly reduced. The algorithms have been implemented in the Atomic Simulation Environment (ASE) open source software. Keywords: Nudged Elastic Band, DIMER, quaternion, saddle point, transition. 2 1. INTRODUCTION Chemical reactions, diffusion events and configurational changes of molecules are transitions from some initial arrangement of the atoms to another, from an initial state minimum on the energy surface to a final state minimum.
    [Show full text]
  • Linear Algebra Review James Chuang
    Linear algebra review James Chuang December 15, 2016 Contents 2.1 vector-vector products ............................................... 1 2.2 matrix-vector products ............................................... 2 2.3 matrix-matrix products ............................................... 4 3.2 the transpose .................................................... 5 3.3 symmetric matrices ................................................. 5 3.4 the trace ....................................................... 6 3.5 norms ........................................................ 6 3.6 linear independence and rank ............................................ 7 3.7 the inverse ...................................................... 7 3.8 orthogonal matrices ................................................. 8 3.9 range and nullspace of a matrix ........................................... 8 3.10 the determinant ................................................... 9 3.11 quadratic forms and positive semidefinite matrices ................................ 10 3.12 eigenvalues and eigenvectors ........................................... 11 3.13 eigenvalues and eigenvectors of symmetric matrices ............................... 12 4.1 the gradient ..................................................... 13 4.2 the Hessian ..................................................... 14 4.3 gradients and hessians of linear and quadratic functions ............................. 15 4.5 gradients of the determinant ............................................ 16 4.6 eigenvalues
    [Show full text]
  • An Introduction to the HESSIAN
    An introduction to the HESSIAN 2nd Edition Photograph of Ludwig Otto Hesse (1811-1874), circa 1860 https://upload.wikimedia.org/wikipedia/commons/6/65/Ludwig_Otto_Hesse.jpg See page for author [Public domain], via Wikimedia Commons I. As the students of the first two years of mathematical analysis well know, the Wronskian, Jacobian and Hessian are the names of three determinants and matrixes, which were invented in the nineteenth century, to make life easy to the mathematicians and to provide nightmares to the students of mathematics. II. I don’t know how the Hessian came to the mind of Ludwig Otto Hesse (1811-1874), a quiet professor father of nine children, who was born in Koenigsberg (I think that Koenigsberg gave birth to a disproportionate 1 number of famous men). It is possible that he was studying the problem of finding maxima, minima and other anomalous points on a bi-dimensional surface. (An alternative hypothesis will be presented in section X. ) While pursuing such study, in one variable, one first looks for the points where the first derivative is zero (if it exists at all), and then examines the second derivative at each of those points, to find out its “quality”, whether it is a maximum, a minimum, or an inflection point. The variety of anomalies on a bi-dimensional surface is larger than for a one dimensional line, and one needs to employ more powerful mathematical instruments. Still, also in two dimensions one starts by looking for points where the two first partial derivatives, with respect to x and with respect to y respectively, exist and are both zero.
    [Show full text]
  • Linear Algebra Primer
    Linear Algebra Review Linear Algebra Primer Slides by Juan Carlos Niebles*, Ranjay Krishna* and Maxime Voisin *Stanford Vision and Learning Lab 27 - Sep - 2018 Another, very in-depth linear algebra review from CS229 is available here: http://cs229.stanford.edu/section/cs229-linalg.pdf And a video discussion of linear algebra from EE263 is here (lectures 3 and 4): https://see.stanford.edu/Course/EE263 1 Stanford University Outline Linear Algebra Review • Vectors and matrices – Basic Matrix Operations – Determinants, norms, trace – Special Matrices • Transformation Matrices – Homogeneous coordinates – Translation • Matrix inverse 27 - • Matrix rank Sep - • Eigenvalues and Eigenvectors 2018 • Matrix Calculus 2 Stanford University Outline Vectors and matrices are just Linear Algebra Review • Vectors and matrices collections of ordered numbers – Basic Matrix Operations that represent something: location in space, speed, pixel brightness, – Determinants, norms, trace etc. We’ll define some common – Special Matrices uses and standard operations on • Transformation Matrices them. – Homogeneous coordinates – Translation • Matrix inverse 27 - • Matrix rank Sep - • Eigenvalues and Eigenvectors 2018 • Matrix Calculus 3 Stanford University Vector Linear Algebra Review • A column vector where • A row vector where 27 - Sep - 2018 denotes the transpose operation 4 Stanford University Vector • We’ll default to column vectors in this class Linear Algebra Review 27 - Sep - • You’ll want to keep track of the orientation of your 2018 vectors when programming in python 5 Stanford University Some vectors have a geometric interpretation, others don’t… Linear Algebra Review • Other vectors don’t have a • Some vectors have a geometric interpretation: geometric – Vectors can represent any kind of interpretation: 27 data (pixels, gradients at an - – Points are just vectors image keypoint, etc) Sep - from the origin.
    [Show full text]
  • Lecture 11: Maxima and Minima
    LECTURE 11 Maxima and Minima n n Definition 11.1. Let f : R → R be a real-valued function of several variables. A point xo ∈ R is called a local minimum of f if there is a neighborhood U of xo such that f(x) ≥ f(xo) for all x ∈ U. n A point xo ∈ R is called a local maxmum of f if there is a neighborhood U of xo such that f(x) ≤ f(xo) for all x ∈ U . n A point xo ∈ R is called a local extremum if it is either a local minimum or a local maximum. Definition 11.2. Let f : Rn → R be a real-valued function of several variables. A critical point of f is a point xo where ∇f(xo)=0. If a critical point is not also a local extremum then it is called a saddle point. n Theorem 11.3. Suppose U is an open subset of R , f : U → R is differentiable, and xo is a local extremum. Then ∇f(xo)=0 i.e., xo is a critical point of f. Proof. Suppose xo is an extremum of f. Then there exists a neighborhood N of xo such that either f(x) ≥ f (xo) , for all x ∈ N or f(x) ≤ f (xo) , for all x ∈ NR. n Let σ : I ⊂ R → R be any smooth path such that σ(0) = xo. Since σ is in particular continuous, there must be a subinterval IN of I containing 0 such that σ(t) ∈ N,for all t ∈ IN . But then if we define h(t) ≡ f (σ(t)) we see that since σ(t)liesinNfor all t ∈ IN , we must have either h(t)=f(σ(t)) ≥ f (xo)=h(0) , for all t ∈ IN or h(t)=f(σ(t)) ≤ f (xo)=h(0) , for all t ∈ IN .
    [Show full text]
  • Hessian Matrices, Automorphisms of P-Groups, and Torsion Points of Elliptic Curves
    Mathematische Annalen https://doi.org/10.1007/s00208-021-02193-8 Mathematische Annalen Hessian matrices, automorphisms of p-groups, and torsion points of elliptic curves Mima Stanojkovski1 · Christopher Voll2 Received: 21 December 2019 / Revised: 13 April 2021 / Accepted: 22 April 2021 © The Author(s) 2021 Abstract We describe the automorphism groups of finite p-groups arising naturally via Hessian determinantal representations of elliptic curves defined over number fields. Moreover, we derive explicit formulas for the orders of these automorphism groups for elliptic curves of j-invariant 1728 given in Weierstrass form. We interpret these orders in terms of the numbers of 3-torsion points (or flex points) of the relevant curves over finite fields. Our work greatly generalizes and conceptualizes previous examples given by du Sautoy and Vaughan-Lee. It explains, in particular, why the orders arising in these examples are polynomial on Frobenius sets and vary with the primes in a nonquasipolynomial manner. Mathematics Subject Classification 20D15 · 11G20 · 14M12 Contents 1 Introduction and main results ...................................... 2 Groups and Lie algebras from (symmetric) forms ............................ 3 Automorphisms and torsion points of elliptic curves .......................... 4 Degeneracy loci and automorphisms of p-groups ............................ 5 Proofs of the main results and their corollaries ............................. References .................................................. Communicated by Andreas Thom. B Christopher Voll [email protected] Mima Stanojkovski [email protected] 1 Max-Planck-Institute for Mathematics in the Sciences, Inselstrasse 22, 04103 Leipzig, Germany 2 Fakultät für Mathematik, Universität Bielefeld, 33501 Bielefeld, Germany 123 M. Stanojkovski, C. Voll 1 Introduction and main results In the study of general questions about finite p-groups it is frequently beneficial to focus on groups in natural families.
    [Show full text]
  • Chapter 7 Principal Hessian Directions
    Chapter 7 Principal Hessian Directions The dimension reduction and visualization techniques introduced so far are based on the inverse regression point of view. The roles of Y and x are interchanged. In this chapter, a forward method, principal Hessian Direction( pHd ) (Li 1992, JASA) will be introduced. Let f (x) be the regression function E(Y |x), which is a p dimensional function. Consider the Hessian matrix H(x) of f (x), ∂2 H(x) = the p by p matrix with the ijth entry equal to f (x) ∂xi ∂x j Hessian matrices are important in studying multivariate nonlinear functions. The methodol- ogy of pHd focuses on the ultilization of the properties of Hessian matrices for dimension reduction and visualization. Similar to SIR, there are a few variants in the approach of pHd. For more recent development on PHD, see Cook(1998). 7.1 Principal Hessian directions. The Hessian matrix typically varies as x changes unless the surface is quadratic. Difficulties associated with the curse of dimensionality arise quickly if we were to estimate it for each location. Instead, we turn to the average Hessian, H¯ = EH(x) We define the principal Hessian directions to be the eigenvectors b1, ···, bp of the matrix ¯ Hx, where x denotes the covariance matrix of x : ¯ Hxb j = λ j b j , j = 1, ···, p (1.1) |λ1|≥···≥|λp| Why not defining the principal Hessian directions by the eigenvalue decomposition of ¯ the average Hessian H ? One reason is that with right-multiplication of x, the procedure becomes invariant under affine transformation of x. This is an important property to have for our purpose of visualization and dimension reduction.
    [Show full text]
  • Exact Calculation of the Product of the Hessian Matrix of Feed-Forward
    Exact Calculation of the Pro duct of the Hessian Matrix of Feed-Forward Network Error Functions and a Vector in O N Time Martin Mller Computer Science Department Aarhus University DK-8000 Arhus, Denmark Abstract Several methods for training feed-forward neural networks require second order information from the Hessian matrix of the error function. Although it is p ossible to calculate the Hessian matrix exactly it is often not desirable b ecause of the computation and memory requirements involved. Some learning techniques do es, however, only need the Hessian matrix times a vector. This pap er presents a method to calculate the Hessian matrix times a vector in O N time, where N is the numberofvariables in the network. This is in the same order as the calculation of the gradient to the error function. The usefulness of this algorithm is demonstrated by improvement of existing learning techniques. 1 Intro duction The second derivative information of the error function asso ciated with feed-forward neural networks forms an N N matrix, which is usually re- ferred to as the Hessian matrix. Second derivative information is needed in several learning algorithms, e.g., in some conjugate gradient algorithms This work was done while the author was visiting Scho ol of Computer Science, Carnegie Mellon University, Pittsburgh, PA. 1 [Mller 93a], and in recent network pruning techniques [MacKay 91], [Hassibi 92]. Several researchers have recently derived formulae for exact calculation of the elements in the Hessian matrix [Buntine 91], [Bishop 92]. In the gen- 2 eral case exact calculation of the Hessian matrix needs O N time- and memory requirements.
    [Show full text]
  • This Lecture: Lec2p1, ORF363/COS323
    Lec2p1, ORF363/COS323 This lecture: Instructor: Amir Ali Ahmadi Fall 2014 The goal of this lecture is to refresh your memory on some TAs: Y. Chen, topics in linear algebra and multivariable calculus that will be G. Hall, relevant to this course. You can use this as a reference J. Ye throughout the semester. The topics that we cover are the following: • Inner products and norms ○ Formal definitions ○ Euclidian inner product and orthogonality ○ Vector norms ○ Matrix norms ○ Cauchy-Schwarz inequality • Eigenvalues and eigenvectors ○ Definitions ○ Positive definite and positive semidefinite matrices • Elements of differential calculus ○ Continuity ○ Linear, affine and quadratic functions ○ Differentiability and useful rules to differentiation ○ Gradients and level sets ○ Hessians • Taylor expansion ○ Little o and big O notation ○ Taylor expansion Lec2 Page 1 Lec2p2, ORF363/COS323 Inner products and norms Definition of an inner product An inner product is a real-valued function that satisfies the following properties: • Positivity: and iif x=0. • Symmetry: • Additivity: • Homogeneity : Examples in small dimension Here are some examples in and that you are already familiar with. Example 1: Classical multiplication Check that this is indeed a inner product using the definition. Example 2: • This geometric definition is equivalent to the following algebraic one (why?): Notice that the inner product is positive when is smaller than 90 degrees, negative when it is greater than 90 degrees and zero when degrees. Lec2 Page 2 Lec2p3, ORF363/COS323 Euclidean inner product The two previous examples are particular cases ( and ) of the Euclidean inner product: Check that this is an inner product using the definition. Orthogonality We say that two vectors and are orthogonal if • Note that with this definition the zero vector is orthogonal to every other vector.
    [Show full text]
  • Math 233 Hessians Fall 2001 and Unconstrained Optimization
    Math 233 Hessians Fall 2001 and Unconstrained Optimization The Big Picture: Second derivatives, whether in single – or multi – variable calculus, measure the rate of change in slopes (i.e. the curvature of the function f). What makes problems harder in multivariable calc is that we have slopes in infinitely many directions (directional derivatives). So, we somehow need to examine how these infinite number of slopes change to help us determine the curvature and shape of the function f near critical points. This brings to mind something like second directional derivatives. We summarized the information about slopes by creating a vector of partial derivatives – the gradient. In a similar way, we can help to summarize known information about the rate of change of slopes by creating a matrix of second partial derivatives – the Hessian. So here is what we know: Function: f (x, y) ˆ ˆ Gradient: f (x, y) f x i f y j f x f y f xx f xy Hessian: H f (x, y) f yx f yy For example, take the function: f (x, y) 5xy 3 then the gradient is f (x, y) 5y 3 iˆ 15xy 2 ˆj and the Hessian is 2 0 15y H f (x, y) 2 (note that f xy f yx , as it will almost surely ) 15y 30xy We can evaluate these functions at specific points, for example when x = -3 and y = 2: 0 60 ˆ ˆ f ( )2,3 40i 180 j (so it isn’t a critical point) and H f ( )2,3 . 60 180 Some Matrix Theory: Suppose that we have an n row by n column (or square) matrix M.
    [Show full text]