Matrix and Tensor Factorization For Machine Learning: IFT 6760A
Matrix and Tensor Factorization For Machine Learning: IFT 6760A
Winter 2019
I What is this class about? Linear and multilinear algebra for ML...
I Class goals: refresh linear algebra, discover and have fun with
tensors and do research!
I Class logistics.
I Content overview.
I In-class quiz (not graded): for me to assess your background and
adjust material accordingly.
I Questions.
Material and discussion
I Objectives
I End goal: for you to know what tensors and tensor decomposition
techniques are and how they can be used in ML.
I Along the way: learn useful theoretical tools from linear algebra and
matrix decomposition techniques.
I We will start back from linear algebra and build up from there:
1. Linear algebra refresher with focus on matrix decomposition
2. Applications of Linear algebra in ML
3. Introduction to tensors and tensor decomposition techniques
4. Tensors in ML
5. Seminar part of the class → your turn! (more on that later)
(rough timeline: (1,2) in Jan., (3,4) in Feb, (5) in Mar.)
I I am very open to feedbacks and suggestions, and if there is a topic
you would like to see covered in class come see me / send a mail!
About this class
I Types of projects:
I Literature review: choose a topic/problem and present the existing
approaches to handle it, comparing them and analyzing their
drawbacks / advantages / limits, perform some experimental
comparison.
I Application: apply ideas/algorithms seen in class to a new problem
you find interesting or related to your research.
I Theory: focus on theoretical analysis of an algorithm or a problem
(e.g. robustness analysis, complexity analysis), propose a new
method to tackle a problem (existing or a new problem), ideally still
perform experiments (e.g. on synthetic data).
I Best case scenario: project ⇒ research paper
Times and dates
I Everyone’s welcome (as long as there are enough room, but this
should be ok!)
I Participating to research projects may be doable for auditing
students as well, come see me.
I Sign-up sheet
Questions?
Class high-level overview
v1 v3 v4 2 0 0 0 0 1 1 0
0 2 0 0 1 0 1 0
L=
0
−
0 3 0 1 1 0 1
v2
0 0 0 1 0 0 1 0
Linear Algebra and ML: Spectral Graph Clustering
v1 v3 v4 2 0 0 0 0 1 1 0
0 2 0 0 1 0 1 0
L=
0
−
0 3 0 1 1 0 1
v2
0 0 0 1 0 0 1 0
(if you don’t know what a weighted automaton is, think some kind
of RNN with linear activation functions)
Linear Algebra and ML: Method of Moments
M = E[xx> ] − σ 2 I
is at most k.
P
(we actually have M = i pi µi µ>
i )
Spectral Methods (high-level view)
M ∈ Rd1 ×d2
T ∈ Rd1 ×d2 ×d3
Mij ∈ R for
(T ijk ) ∈ R for i ∈ [d1 ], j ∈ [d2 ], k ∈ [d3 ]
i ∈ [d1 ], j ∈ [d2 ]
Tensors and Machine Learning
(i) Data has a tensor structure: color image, video, multivariate time
series...
(a) Mode-1 (column) fibers: x:jk (b) Mode-2 (row) fibers: xi:k (c) Mode-3 (tube) fibers: xij:
1
fig. from [Kolda and Bader, Tensor decompositions and applications, 2009].
Tensors: Matricizations
I T ∈ Rd1 ×d2 ×d3 can be reshaped into a matrix as
T T(1)
Tensors: Multiplication with Matrices
ex: If T ∈ Rd1 ×d2 ×d3 and B ∈ Rm2 ×d2 , then T ×2 B ∈ Rd1 ×m2 ×d3 and
d2
X
(T ×2 B)i1 ,i2 ,i3 = T i1 ,k,i3 Bi2 ,k for all i1 ∈ [d1 ], i2 ∈ [m2 ], i3 ∈ [d3 ].
k=1
Tensors are not easy...
Abstract. The idea that one might extend numerical linear algebra, the collection of matrix com-
putational methods that form the workhorse of scientific and engineering computing, to numeri-
cal multilinear algebra, an analogous collection of tools involving hypermatrices/tensors, appears
very promising and has attracted a lot of attention recently. We examine here the computational
tractability of some core problems in numerical multilinear algebra. We show that tensor analogues
of several standard problems that are readily computable in the matrix (i.e. 2-tensor) case are NP
hard. Our list here includes: determining the feasibility of a system of bilinear equations, determin-
ing an eigenvalue, a singular value, or the spectral norm of a 3-tensor, determining a best rank-1
approximation to a 3-tensor, determining the rank of a 3-tensor over R or C. Hence making tensor
computations feasible is likely to be a challenge.
[Hillar and Lim, Most tensor problems are NP-hard, Journal of the ACM, 2013.]
Tensors are not easy...
Abstract. The idea that one might extend numerical linear algebra, the collection of matrix com-
putational methods that form the workhorse of scientific and engineering computing, to numeri-
cal multilinear algebra, an analogous collection of tools involving hypermatrices/tensors, appears
very promising and has attracted a lot of attention recently. We examine here the computational
tractability of some core problems in numerical multilinear algebra. We show that tensor analogues
of several standard problems that are readily computable in the matrix (i.e. 2-tensor) case are NP
hard. Our list here includes: determining the feasibility of a system of bilinear equations, determin-
ing an eigenvalue, a singular value, or the spectral norm of a 3-tensor, determining a best rank-1
approximation to a 3-tensor, determining the rank of a 3-tensor over R or C. Hence making tensor
computations feasible is likely to be a challenge.
[Hillar and Lim, Most tensor problems are NP-hard, Journal of the ACM, 2013.]
I Tucker decomposition:
2
fig. from [Kolda and Bader, Tensor decompositions and applications, 2009].
Hardness results
Quiz Time