Numerical tensor methods and their applications

Similar documents
Numerical tensor methods and their applications

Introduction to the Tensor Train Decomposition and Its Applications in Machine Learning

Math 671: Tensor Train decomposition methods II

für Mathematik in den Naturwissenschaften Leipzig

NUMERICAL METHODS WITH TENSOR REPRESENTATIONS OF DATA

Tensor networks and deep learning

NEW TENSOR DECOMPOSITIONS IN NUMERICAL ANALYSIS AND DATA PROCESSING

Direct Numerical Solution of Algebraic Lyapunov Equations For Large-Scale Systems Using Quantized Tensor Trains

Math 671: Tensor Train decomposition methods

Matrix-Product-States/ Tensor-Trains

Max Planck Institute Magdeburg Preprints

TENSORS AND COMPUTATIONS

APPLIED NUMERICAL LINEAR ALGEBRA

Low Rank Approximation Lecture 7. Daniel Kressner Chair for Numerical Algorithms and HPC Institute of Mathematics, EPFL

Lecture 1: Introduction to low-rank tensor representation/approximation. Center for Uncertainty Quantification. Alexander Litvinenko

TENSOR APPROXIMATION TOOLS FREE OF THE CURSE OF DIMENSIONALITY

Tensor networks, TT (Matrix Product States) and Hierarchical Tucker decomposition

Tensor-Product Representation of Operators and Functions (7 introductory lectures) Boris N. Khoromskij

An Introduction to Hierachical (H ) Rank and TT Rank of Tensors with Examples

Lecture 4. Tensor-Related Singular Value Decompositions. Charles F. Van Loan

Motivation: Sparse matrices and numerical PDE's

Lecture Notes for Inf-Mat 3350/4350, Tom Lyche

4. Multi-linear algebra (MLA) with Kronecker-product data.

Final Examination. CS 205A: Mathematical Methods for Robotics, Vision, and Graphics (Fall 2013), Stanford University

Computational methods for large-scale linear matrix equations and application to FDEs. V. Simoncini

Lecture 9 Approximations of Laplace s Equation, Finite Element Method. Mathématiques appliquées (MATH0504-1) B. Dewals, C.

Tensor Product Approximation

Numerical Methods in Matrix Computations

Institute for Computational Mathematics Hong Kong Baptist University

Main matrix factorizations

M.A. Botchev. September 5, 2014

1. Structured representation of high-order tensors revisited. 2. Multi-linear algebra (MLA) with Kronecker-product data.

Preliminary Examination, Numerical Analysis, August 2016

Book of Abstracts - Extract th Annual Meeting. March 23-27, 2015 Lecce, Italy. jahrestagung.gamm-ev.de

Lecture 18 Classical Iterative Methods

Statistical Geometry Processing Winter Semester 2011/2012

Tensor approach to optimal control problems with fractional d-dimensional elliptic operator in constraints

Name: INSERT YOUR NAME HERE. Due to dropbox by 6pm PDT, Wednesday, December 14, 2011

Hands-on Matrix Algebra Using R

Lecture 1: Center for Uncertainty Quantification. Alexander Litvinenko. Computation of Karhunen-Loeve Expansion:

Q1 Q2 Q3 Q4 Tot Letr Xtra

McGill University Department of Mathematics and Statistics. Ph.D. preliminary examination, PART A. PURE AND APPLIED MATHEMATICS Paper BETA

The multiple-vector tensor-vector product

Krylov subspace methods for linear systems with tensor product structure

( nonlinear constraints)

Scientific Computing with Case Studies SIAM Press, Lecture Notes for Unit VII Sparse Matrix

Lecture 1: Introduction to low-rank tensor representation/approximation. Center for Uncertainty Quantification. Alexander Litvinenko

Contributors and Resources


für Mathematik in den Naturwissenschaften Leipzig

Tensor properties of multilevel Toeplitz and related. matrices.

Algebra C Numerical Linear Algebra Sample Exam Problems

Lecture4 INF-MAT : 5. Fast Direct Solution of Large Linear Systems

Geometric Modeling Summer Semester 2012 Linear Algebra & Function Spaces

A FAST SOLVER FOR ELLIPTIC EQUATIONS WITH HARMONIC COEFFICIENT APPROXIMATIONS

Dimensionality Reduction: PCA. Nicholas Ruozzi University of Texas at Dallas

STA141C: Big Data & High Performance Statistical Computing

Computational Methods. Eigenvalues and Singular Values

Topics. The CG Algorithm Algorithmic Options CG s Two Main Convergence Theorems

This work has been submitted to ChesterRep the University of Chester s online research repository.

Preconditioned inverse iteration and shift-invert Arnoldi method

Projected Schur Complement Method for Solving Non-Symmetric Saddle-Point Systems (Arising from Fictitious Domain Approaches)

AMS526: Numerical Analysis I (Numerical Linear Algebra for Computational and Data Sciences)

Eigenvalue Problems CHAPTER 1 : PRELIMINARIES

A fast and well-conditioned spectral method: The US method

6.4 Krylov Subspaces and Conjugate Gradients

STA141C: Big Data & High Performance Statistical Computing

Machine Learning with Quantum-Inspired Tensor Networks

Announce Statistical Motivation Properties Spectral Theorem Other ODE Theory Spectral Embedding. Eigenproblems I

The automatic solution of PDEs using a global spectral method

Dynamical low rank approximation in hierarchical tensor format

SPARSE SIGNAL RESTORATION. 1. Introduction

Announce Statistical Motivation ODE Theory Spectral Embedding Properties Spectral Theorem Other. Eigenproblems I

Fall TMA4145 Linear Methods. Exercise set Given the matrix 1 2

Contents. Acknowledgments

Dynamical low-rank approximation

A New Scheme for the Tensor Representation

arxiv: v2 [math.na] 13 Dec 2014

STAT 309: MATHEMATICAL COMPUTATIONS I FALL 2018 LECTURE 9

The tensor structure of a class of adaptive algebraic wavelet transforms

From Stationary Methods to Krylov Subspaces

Linear Algebra. Session 12

Solving Symmetric Indefinite Systems with Symmetric Positive Definite Preconditioners

Least Squares Optimization

AMS 147 Computational Methods and Applications Lecture 17 Copyright by Hongyun Wang, UCSC

UNDERSTANDING ENGINEERING MATHEMATICS

Qualifying Examination

Numerical Linear and Multilinear Algebra in Quantum Tensor Networks

Geometric Modeling Summer Semester 2010 Mathematical Tools (1)

A First Course in Wavelets with Fourier Analysis

Homework 1 Elena Davidson (B) (C) (D) (E) (F) (G) (H) (I)

HOMEWORK PROBLEMS FROM STRANG S LINEAR ALGEBRA AND ITS APPLICATIONS (4TH EDITION)

An Accurate Fourier-Spectral Solver for Variable Coefficient Elliptic Equations

Applied Machine Learning for Biomedical Engineering. Enrico Grisan

Preconditioning for Nonsymmetry and Time-dependence

AM 205: lecture 8. Last time: Cholesky factorization, QR factorization Today: how to compute the QR factorization, the Singular Value Decomposition

Linear Algebra Review

COMP 558 lecture 18 Nov. 15, 2010

Common Core Algebra 2 Review Session 1

Computational Linear Algebra

Transcription:

Numerical tensor methods and their applications 8 May 2013

All lectures 4 lectures, 2 May, 08:00-10:00: Introduction: ideas, matrix results, history. 7 May, 08:00-10:00: Novel tensor formats (TT, HT, QTT). 8 May, 08:00-10:00: Advanced tensor methods (eigenproblems, linear systems). 14 May, 08:00-10:00: Advanced topics, recent results and open problems.

Brief recap of Lecture 2 Tensor Train format Arithmetics Rounding QTT-format (idea of tensorization) Cross approximation

Plan of lecture 2 QTT-format: explicit representations of functions QTT-format: explicit representation of operators Classification theory QTT-Fourier transform QTT-convolution Linear systems Eigenvalue problems

QTT-format (publications-first) [1] S. V. Dolgov, B. N. Khoromskij, and D. V. Savostyanov. Superfast Fourier transform using QTT approximation. J. Fourier Anal. Appl., 18(5):915 953, 2012. [2] V. Kazeev, B. N. Khoromskij, and E. E. Tyrtyshnikov. Multilevel Toeplitz matrices generated by tensor-structured vectors and convolution with logarithmic complexity. Technical Report 36, MPI MIS, Leipzig, 2011. [3] V. A. Kazeev and B. N. Khoromskij. Low-rank explicit QTT representation of the Laplace operator and its inverse. SIAM J. Matrix Anal. Appl., 33(3):742 758, 2012. [4] B. N. Khoromskij. O(d log n) Quantics approximation of N d tensors in high-dimensional numerical modeling. Constr. Appr., 34(2):257 280, 2011. [5] I. V. Oseledets. Approximation of 2 d 2 d matrices using tensor decomposition. SIAM J. Matrix Anal. Appl., 31(4):2130 2145, 2010.

QTT-format We have a vector v of values of a function f on a uniform grid with 2 d points: v(i) = f (x i ), x i = a + ih, h = (b a)/(n 1).

QTT-format We have a vector v of values of a function f on a uniform grid with 2 d points: v(i) = f (x i ), x i = a + ih, h = (b a)/(n 1). Reshaping into a tensor: i (i 0, i 1,..., i d 1 ). i = i 1 + 2i 2 + 4i 3 +... + 2 d 1 i d V (i 1,..., i d ) = v(i).

QTT-format Finally, we have: V (i 1,..., i d ) = f (t 1 +... + t d ), t k = a d + 2k i k h

Exponential function f (x) = exp λx, Then f (t 1 +... + t d ) = exp(λt 1 )... exp(λt d ), it has rank 1!

Linear function f (x) = x f (t 1 +... + t d ) = t 1 +... + t d

Linear function(full steps) t 1 + t 2 + t 3 + t 4 =

Linear function(full steps) t 1 + t 2 + t 3 + t 4 = ( t 1 1 ) ( 1 t 2 + t 3 + t 4 )

Linear function(full steps) t 1 + t 2 + t 3 + t 4 = ( t 1 1 ) ( ) 1 t 2 + t 3 + t 4 = ( t 1 1 ) ( ) ( ) 1 0 1 t 2 1 t 3 + t 4 =

Linear function(full steps) t 1 + t 2 + t 3 + t 4 = ( t 1 1 ) ( ) 1 t 2 + t 3 + t 4 = ( t 1 1 ) ( ) ( ) 1 0 1 = t 2 1 t 3 + t 4 = ( t 1 1 ) ( ) ( ( ) 1 0 1 0 1 t 2 1 t 3 1) t 4 =

Sine function Similar representation can be obtained for a sine function: f (x) = sin λx f (t 1 +... + t d ) = sin(t 1 +... + t d ) = = ( ) ( ) ( ) ( ) sin t 2 cos t 2 sin td 1 cos t sin t 1 cos t 1... d 1 cos xd cos t 2 sin t 2 cos t d 1 sin t d 1 sin x d The rank is still 2!

General result Theorem Let f be such that (O. Const. Approx., 2013) f (x + y) = r u α (x)v α (y) α=1 then the QTT-ranks are bounded by r Interesting example: rational functions

TT-format for matrices What about matrices?

TT-format for matrices What about matrices? Solution - a vector x associated with a d-tensor X (i 1,..., i d ) Linear operators, acting on such tensors, can be indexed as A(i 1,..., i d ; j 1,..., j d ). Terminology: d-level matrix

Two-level matrix: illustration Even in 2d it is interesting: A, B are n n, Kronecker product a 11 B a 12 B a 13 B a 14 B C = A B = a 21 B a 22 B a 23 B a 24 B a 31 B a 32 B a 33 B a 34 B a 41 B a 42 B a 43 B a 44 B

Two-level matrix: illustration In the index form: C = A B C(i 1, i 2 ; j 1 j 2 ) = A(i 1, j 1 )B(i 2, j 2 )

Two-level matrix: illustration In the index form: C = A B C(i 1, i 2 ; j 1 j 2 ) = A(i 1, j 1 )B(i 2, j 2 ) Exactly rank-1 decomposition under permutation

Back to d-dimensions Let A be a d-level matrix: A(i 1,..., i d ; j 1,..., j d ) (say, d-dimensional Laplace operator)

Back to d-dimensions Let A be a d-level matrix: A(i 1,..., i d ; j 1,..., j d ) (say, d-dimensional Laplace operator) No low TT-ranks if considered as a 2d-array!

Back to d-dimensions Right way: permute indices B(i 1 j 1 ; i 2 j 2 ;... i d j d ) = A(i 1,..., i d ; j 1,..., j d ) A(i 1,..., i d ; j 1,..., j d ) = A 1 (i 1, j 1 )A 2 (i 2, j 2 )... A d (i d, j d )

Matrix-by-vector product A(i 1,..., i d ; j 1,... j d ) = A 1 (i 1, j 1 )... A d (i d, j d ) X (j 1,..., j d ) = X 1 (j 1 )... X d (j d ) Y (I ) = J A(I, J)X (J) Exercise: Find a formula

QTT-matrix Matrices in the QTT-format: a ij = 1 i j + 0.5, i, j = 1,..., 2d. Let us see what are the ranks. (Demo)

Laplace operator Consider an operator d 2 dx with Dirichlet boundary 2 conditions, discretized using the simplest finite-difference scheme: (Illustration for n = 4) 2 1 0 0 = 1 2 1 0 0 1 2 1 0 0 1 2 (Demo)

Laplace operator V. Kazeev: QTT-ranks of the Laplace operator are bounded by 3

Laplace operator: general results We will need a special matrix-by-matrix product: [ ] [ ] A 11 A 12 B 11 B 12 = A 21 A 22 B 21 B 22 [ ] A 11 B 11 + A 12 B 21 A 11 B 12 + A 12 B 22 = A 21 B 11 + A 22 B 21 A 21 B 12 + A 22 B 22 Doing Kronecker product for the blocks!

Basic QTT-blocks ( ) ( ) ( ) 1 0 0 1 0 1 I =, J =, P =, 0 1 0 0 1 0 ( ) ( ) 0 0 1 0 I 2 =, I 1 =, 0 1 0 0 ( ) 1 1 E =, F = 1 1 ( ) 1 1, 1 1 ( ) ( ) 1 0 0 1 K =, L =, 0 1 1 0

QTT representation of 1D-Laplace ] (d) DD [I = J I J J J J J (d 2) 2I J J J J

QTT representation in the Toolbox In the TT-Toolbox, it is defined via the function tt_qlaplace_dd

Wavelets and tensor trains QTT can be applied to matrices: A(i, j) A(i 1,..., i d, j 1,..., j d ) A(i 1, j 1, i 2, j 2,..., i d, j d )

Wavelets and tensor trains Smooth function and/or special function: 512 512 Hilbert image : a ij = 1.0/(i j + 0.5) 540 bytes (QTT) vs 8 KB (JPEG)

Wavelets and tensor trains QTT compression of simple images Good: Triangle BAD: Circle 50 bytes (QTT) vs 8 KB (JPEG) 70 KB (QTT) vs 8 KB (JPEG)

Wavelets and tensor trains Wavelet tensor train: One step of TT-SVD is equivalent to: U A = v 11 v 12... v 21 v 22... v 31 v 32... v 41 v 42...

Problems with a circle Wavelet: First (dominant) rows compress further, others are sparse QTT: Leave only rows of large norms (large singular values)

Problems with a circle That is why it is bad: r n, mem = O(n 2 )

Idea with the circle Leaving sparse singular vectors a novel digital data compression technique (to be combined with others)! Wavelet decomposition with adaptive number of moments!

Image compression New: 50 bytes (WTT) vs 8 KB (JPEG)

Image compression latex Lena 7 KB(WTT), PSNR 32.45 12 KB (WTT), PSNR 35.62 19 KB (WTT), PSNR 38.79

Fourier transform Consider now an important operation: the Fourier transform (FFT) Example of a matrix with large QTT-ranks! (We can test) y = Fx, F = w kl, w = exp 2πi n Question: Given x in the QTT-format, can we compute y?

FFT matrix and tensor networks Let us do quantization again: k = k 1 + 2k 2 +... + 2 d 1 k d l = l 1 + 2l 2 +... + 2 d 1 l d w kl = pq G pq(k p, l q ) G pq (k p, l q ) = w 2p 1 k p 2 q 1 l q Rank-1 two-dimensional tensor network!

FFT matrix and tensor networks(2) k 1, l 1 k 1, l 2 k 1, l 3 k 1, l 4 k 2, l 1 k 2, l 2 k 2, l 3 k 2, l 4 k 3, l 1 k 3, l 2 k 3, l 3 k 3, l 4 k 4, l 1 k 4, l 2 k 4, l 3 k 4, l 4

FFT of a vector ( ) l 1,...,l d pq G pq(k p, l q ) x 1 (l 1 )... x d (l d ) It can be rewritten as a Hadamard product of d rank-2 tensors! Hint: l k takes only two values Complexity: O(d 2 r 3 log n)

Convolution The convolution operation is defined as c i = j a i jb j. How to do it in the QTT-format?

Convolution Idea: Write convolution as c i = jk E ijka k b j E ijk = δ k i+j. Write down the tensor E: E ijk = E(i 1,..., i d, j 1,..., j d, k 1,..., k d+1 ). Permute dimensions: (i 1, j 1, k 1, i 2, j 2, k 2,...). Find an explicit representation

Convolution: results Summary of the results (Hackbusch and Kazeev, Khoromskij, Tyrtyshnikov) Toeplitz matrix generated by QTT-vectors of rank r has rank 2r Convolution of two vectors of rank r has rank 2r Multidimensional Toeplitz matrices have the same rank bound, but two QTT-matvecs required

Solving eigenvalue problems and linear systems Now, let us go to more advanced problems: Ax = λx Ax = f, with x = X (j 1,..., j d ), f = F (i 1,..., i d ), A(i 1,..., i d ; j 1,..., j d )

Tensor-structured solvers Path 1: Do iterative methods with truncation (Krylov, preconditioning, multigrid, etc.) Path 2: Use the information about the structure of the solution

Using the information about the solution How to use the information about the solution?

Using the information about the solution How to use the information about the solution? Formulate as an optimization problem!

Formulation as an optimization problem Ax = λx, A = A, We can minimize the Rayleigh quotient: (Ax, x) (x, x) min, Minimize not over the whole space, but over the set of structured tensors! Nonconvex optimization problem Have to guess the ranks

Idea of alternating iterations The idea of alternating iterations is simple: Fix all except X k (i k ). The local problem reduces to the linear eigenvalue problem Guess the rank!

Idea of DMRG Here comes the wonderful idea of DMRG (Density Matrix Renormalization Group, S. White, 1993) Generalization of the Wilson renormalization group (=ALS) Optimize not over one core, but over a pair of cores, X k and X k+1!

Idea of DMRG X (i 1, i 2, i 3, i 4 ) = X 1 (i 1 )X 2 (i 2 )X 3 (i 3 )X 4 (i 4 ) = = W 12 (i 1, i 2 )X 3 (i 3 )X 4 (i 4 ). Solve for W 12 Split back by the SVD: W 12 (i 1, i 2 ) = X 1 (i 1 )X 2 (i 2 ). The rank is determined adaptively!

DMRG and QTT The DMRG method creates modes of size n 2. Very good for spin systems (n = 2 or n = 4) Very good for the QTT (n = 2).

DMRG and QTT: papers Holtz, S., Rohwedder, T., Schneider, R., The alternating linear scheme for tensor optimization in the tensor train format (idea) S.V. Dolgov,, Solution of linear systems and matrix inversion in the TT-format (working code)

Difficulties in the DMRG S.V. Dolgov, Solution of linear systems and matrix inversion in the TT-format SVD-based truncation: L 2 -norm approximation of x, but the equation can be differential How to avoid local minima Fast solution of local systems Appplication to matrix inversion

Large mode sizes What if the mode size is large? Basically, the question is now how to increase the k-th rank. Answer: Using (projected) residuals of the Krylov methods!

Large mode sizes The k-th ALS-step: The x is in the special linear subspace: x = (U I V )φ, Analogously to the rounding procedure U and V are structured-orthogonal matrix and φ is r k 1 n k r k. The local problem is then Û AÛφ = Ûf. Can enrich the basis with the (low-rank) approximation of the two-block residual

AMEN: further details S.V. Dolgov and D.V. Savostyanov, 2013: Alternating minimal energy methods for linear systems in higher dimensions. Part I/II For more details: convergence estimates, algorithmic details and so on. Still A LOT to be done on algorithms...

Solving linear systems and eigenvalue problems (Demo) Solving the high-dimensional Poisson equation in the QTT-format: u = f.

Other important problems Solving block eigenvalue problems (minimizing block Rayleigh quotient) Solving nonstationary problems dy dt = Ay, how to rewrite as a minimization problem

Next lecture The plan for the next (and the last!) Applications, new results, open problems