An introduction to Nonnegative Matrix Factorisation
Slim ESSID
Telecom ParisTech
June 2015
Slim ESSID (Telecom ParisTech) Introduction to NMF TPT - UPS – June 2015 1 / 53
An introduction to Nonnegative Matrix Factorisation Slim ESSID - - PowerPoint PPT Presentation
An introduction to Nonnegative Matrix Factorisation Slim ESSID Telecom ParisTech June 2015 Slim ESSID (Telecom ParisTech) Introduction to NMF TPT - UPS June 2015 1 / 53 Credits Some illustrations, slides and demos are reproduced
Telecom ParisTech
Slim ESSID (Telecom ParisTech) Introduction to NMF TPT - UPS – June 2015 1 / 53
Slim ESSID (Telecom ParisTech) Introduction to NMF TPT - UPS – June 2015 2 / 53
Slim ESSID (Telecom ParisTech) Introduction to NMF TPT - UPS – June 2015 3 / 53
Introduction Motivation
Illustration by C. Févotte
Slim ESSID (Telecom ParisTech) Introduction to NMF TPT - UPS – June 2015 4 / 53
Introduction Motivation
Illustration by C. Févotte
Slim ESSID (Telecom ParisTech) Introduction to NMF TPT - UPS – June 2015 4 / 53
Introduction Motivation
1slide adapted from (Févotte, 2012).
Slim ESSID (Telecom ParisTech) Introduction to NMF TPT - UPS – June 2015 5 / 53
Introduction Motivation
− W = [wfk] s.t. wfk ≥ 0
− H = [hkn] s.t. hkn ≥ 0.
Illustration by N. Seichepine
Slim ESSID (Telecom ParisTech) Introduction to NMF TPT - UPS – June 2015 6 / 53
Introduction Motivation
2slide adapted from (Févotte, 2012).
Slim ESSID (Telecom ParisTech) Introduction to NMF TPT - UPS – June 2015 7 / 53
Introduction Motivation
Slim ESSID (Telecom ParisTech) Introduction to NMF TPT - UPS – June 2015 8 / 53
Introduction Motivation
Illustration by C. Févotte
Slim ESSID (Telecom ParisTech) Introduction to NMF TPT - UPS – June 2015 9 / 53
Introduction Motivation
− F features (rows), − N observations/examples/feature vectors (columns);
+; vn is a row vector;
− wfk is one of its coefficients, − wk a dictionary/basis vector among K elements; Slim ESSID (Telecom ParisTech) Introduction to NMF TPT - UPS – June 2015 10 / 53
Introduction Motivation
− hn : the column vector of activation coefficients for observation vn :
K
− hk: : the row vector of activation coefficients relating to basis vector wk. Slim ESSID (Telecom ParisTech) Introduction to NMF TPT - UPS – June 2015 11 / 53
NMF models
Slim ESSID (Telecom ParisTech) Introduction to NMF TPT - UPS – June 2015 12 / 53
NMF models Cost functions
W,H≥0 D(V|WH) ,
F
N
Slim ESSID (Telecom ParisTech) Introduction to NMF TPT - UPS – June 2015 13 / 53
NMF models Cost functions
2
Slim ESSID (Telecom ParisTech) Introduction to NMF TPT - UPS – June 2015 14 / 53
NMF models Cost functions
Slim ESSID (Telecom ParisTech) Introduction to NMF TPT - UPS – June 2015 15 / 53
NMF models Cost functions
3slide adapted from (Févotte, 2012).
Slim ESSID (Telecom ParisTech) Introduction to NMF TPT - UPS – June 2015 16 / 53
NMF models Weighted NMF schemes
W,H≥0 F
N
W,H≥0 F
N
Slim ESSID (Telecom ParisTech) Introduction to NMF TPT - UPS – June 2015 17 / 53
NMF models Weighted NMF schemes
Slim ESSID (Telecom ParisTech) Introduction to NMF TPT - UPS – June 2015 18 / 53
NMF models Weighted NMF schemes
Slim ESSID (Telecom ParisTech) Introduction to NMF TPT - UPS – June 2015 19 / 53
Algorithms for solving NMF
Slim ESSID (Telecom ParisTech) Introduction to NMF TPT - UPS – June 2015 20 / 53
Algorithms for solving NMF Preliminaries
W,H≥0 D(V|WH) ⇔ min θ C(θ) ; C(θ) def
Slim ESSID (Telecom ParisTech) Introduction to NMF TPT - UPS – June 2015 21 / 53
Algorithms for solving NMF Difficulties in NMF
Slim ESSID (Telecom ParisTech) Introduction to NMF TPT - UPS – June 2015 22 / 53
Algorithms for solving NMF Difficulties in NMF
k=1 λkwk; λk ≥ 0
Introduction to NMF TPT - UPS – June 2015 23 / 53
Algorithms for solving NMF Difficulties in NMF
k=1 λkwk; λk ≥ 0
Slim ESSID (Telecom ParisTech) Introduction to NMF TPT - UPS – June 2015 23 / 53
Algorithms for solving NMF Difficulties in NMF
k=1 λkwk; λk ≥ 0
Slim ESSID (Telecom ParisTech) Introduction to NMF TPT - UPS – June 2015 23 / 53
Algorithms for solving NMF Multiplicative update rules
Slim ESSID (Telecom ParisTech) Introduction to NMF TPT - UPS – June 2015 24 / 53
Algorithms for solving NMF Multiplicative update rules
Slim ESSID (Telecom ParisTech) Introduction to NMF TPT - UPS – June 2015 25 / 53
Algorithms for solving NMF Multiplicative update rules
Slim ESSID (Telecom ParisTech) Introduction to NMF TPT - UPS – June 2015 26 / 53
Algorithms for solving NMF Multiplicative update rules
Slim ESSID (Telecom ParisTech) Introduction to NMF TPT - UPS – June 2015 27 / 53
Algorithms for solving NMF Multiplicative update rules
3 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 0.45 0.5 Objective function C(s)
Illustration by C. Févotte
Slim ESSID (Telecom ParisTech) Introduction to NMF TPT - UPS – June 2015 28 / 53
Algorithms for solving NMF Multiplicative update rules
3 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 0.45 0.5 s(0) s(1) Objective function C(s) Auxiliary function G(s|s(0))
Illustration by C. Févotte
Slim ESSID (Telecom ParisTech) Introduction to NMF TPT - UPS – June 2015 28 / 53
Algorithms for solving NMF Multiplicative update rules
3 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 0.45 0.5 s(1) s(2) s(0) Objective function C(s) Auxiliary function G(s|s(1))
Illustration by C. Févotte
Slim ESSID (Telecom ParisTech) Introduction to NMF TPT - UPS – June 2015 28 / 53
Algorithms for solving NMF Multiplicative update rules
3 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 0.45 0.5 s(3) s(2) s(1) s(0) Objective function C(s) Auxiliary function G(s|s(2))
Illustration by C. Févotte
Slim ESSID (Telecom ParisTech) Introduction to NMF TPT - UPS – June 2015 28 / 53
Algorithms for solving NMF Multiplicative update rules
3 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 0.45 0.5 s* s(3) s(2) s(1) s(0) Objective function C(s) Auxiliary function G(s|s*)
Illustration by C. Févotte
Slim ESSID (Telecom ParisTech) Introduction to NMF TPT - UPS – June 2015 28 / 53
Algorithms for solving NMF Multiplicative update rules
Slim ESSID (Telecom ParisTech) Introduction to NMF TPT - UPS – June 2015 28 / 53
Algorithms for solving NMF Multiplicative update rules
Slim ESSID (Telecom ParisTech) Introduction to NMF TPT - UPS – June 2015 29 / 53
Applications
Slim ESSID (Telecom ParisTech) Introduction to NMF TPT - UPS – June 2015 30 / 53
Applications Text analysis
Slim ESSID (Telecom ParisTech) Introduction to NMF TPT - UPS – June 2015 31 / 53
Applications Text analysis
Slim ESSID (Telecom ParisTech) Introduction to NMF TPT - UPS – June 2015 32 / 53
Applications Music transcription
Slim ESSID (Telecom ParisTech) Introduction to NMF TPT - UPS – June 2015 33 / 53
Applications Music transcription
Three representations of the data.
Slim ESSID (Telecom ParisTech) Introduction to NMF TPT - UPS – June 2015 34 / 53
Applications Music transcription
Drawing by J. Laroche Slim ESSID (Telecom ParisTech) Introduction to NMF TPT - UPS – June 2015 35 / 53
Applications Music transcription
Three representations of the data.
Slim ESSID (Telecom ParisTech) Introduction to NMF TPT - UPS – June 2015 36 / 53
Applications Music transcription
−10 −8 −6 −4 −2 K = 1 Dictionary W 5000 10000 15000 Coefficients H −0.2 0.2 Reconstructed components −10 −8 −6 −4 −2 K = 2 5000 10000 −0.2 0.2 −10 −8 −6 −4 −2 K = 3 2000 4000 6000 −0.2 0.2 −10 −8 −6 −4 −2 K = 4 2000 4000 6000 8000 −0.2 0.2 −10 −8 −6 −4 −2 K = 5 1000 2000 −0.2 0.2 −10 −8 −6 −4 −2 K = 6 100 200 −0.2 0.2 −10 −8 −6 −4 −2 K = 7 2 4 −0.2 0.2 50 100 150 200 250 300 350 400 450 500 −10 −8 −6 −4 −2 K = 8 100 200 300 400 500 600 1 2 0.5 1 1.5 2 2.5 3 x 10
5−0.2 0.2
Pitch estimates: 65.0 68.0 61.0 72.0 (True values: 61, 65, 68, 72)
Slim ESSID (Telecom ParisTech) Introduction to NMF TPT - UPS – June 2015 37 / 53
Applications Video structuring
Slim ESSID (Telecom ParisTech) Introduction to NMF TPT - UPS – June 2015 38 / 53
Applications Video structuring
Slim ESSID (Telecom ParisTech) Introduction to NMF TPT - UPS – June 2015 39 / 53
Applications Video structuring
"Full group" "Multiple participants" "Multiple participants" "Participant 1" "Participant 2" "Participant 2" "Participant 3" "Participant 4" "Participant 5"
illustration by N. Seichepine
Slim ESSID (Telecom ParisTech) Introduction to NMF TPT - UPS – June 2015 40 / 53
Applications Video structuring
A/V frames Vocab.
Word vocab. extraction Histograms
NMF Activation thresholding
Structure extracted
images/ audio segments
Slim ESSID (Telecom ParisTech) Introduction to NMF TPT - UPS – June 2015 41 / 53
Applications Video structuring
2.hDatahfactorisation A/V frames Vocab.
Wordhvocab. extraction Histograms
KL-NMF Activation thresholding
Structurehextracted
Slim ESSID (Telecom ParisTech) Introduction to NMF TPT - UPS – June 2015 41 / 53
Applications Video structuring
2.hDatahfactorisation A/V frames Vocab.
Wordhvocab. extraction Histograms
KL-NMF Activation thresholding
Structurehextracted
Slim ESSID (Telecom ParisTech) Introduction to NMF TPT - UPS – June 2015 41 / 53
Applications Video structuring
2.hDatahfactorisation A/V frames Vocab.
Wordhvocab. extraction Histograms
KL-NMF Activation thresholding
Structurehextracted
Slim ESSID (Telecom ParisTech) Introduction to NMF TPT - UPS – June 2015 41 / 53
Applications Video structuring
fn dKL(vfn| k wfkhkn): fit-to-data term such that
y − x + y;
K
N
Slim ESSID (Telecom ParisTech) Introduction to NMF TPT - UPS – June 2015 42 / 53
Applications Video structuring
"Full group" "Multiple participants" "Multiple participants" "Participant 1" "Participant 2" "Participant 2" "Participant 3" "Participant 4" "Participant 5"
Slim ESSID (Telecom ParisTech) Introduction to NMF TPT - UPS – June 2015 43 / 53
Applications Video structuring
− PHOW features (Bosch et al., 2007): histograms of
− quantization over 128 bins using K-means. Slim ESSID (Telecom ParisTech) Introduction to NMF TPT - UPS – June 2015 44 / 53
Applications Video structuring
Full group Speaker 1 Speaker 2 Speaker 3 Speaker 4 Speaker 5 Full group MP Speaker 5 Full group
MP: Multiple Participants
MP
Slim ESSID (Telecom ParisTech) Introduction to NMF TPT - UPS – June 2015 45 / 53
Applications Video structuring
− broadcasts featuring a moderator and 2 to 4 guests; − moderators, guest and background vary; − 7 hours of video content: 10 minutes from each of the first 41 shows; − 189 distinct persons; 28521 video shots. Slim ESSID (Telecom ParisTech) Introduction to NMF TPT - UPS – June 2015 46 / 53
Applications Video structuring
1 2 3 4 10 20 30 40 50 60 70 80 NMF,
= 0NMF,
= 0.1NMF,
= 1HMM ref. Slim ESSID (Telecom ParisTech) Introduction to NMF TPT - UPS – June 2015 47 / 53
Conclusion Summary and future challenges
− it tends to provide “meaningful” and “natural” part-based data
− it can be used both for feature learning, topic extraction, clustering,
Slim ESSID (Telecom ParisTech) Introduction to NMF TPT - UPS – June 2015 48 / 53
Conclusion Summary and future challenges
− multiplicative updates: heuristic, simple and easy to implement, but slow
− majorisation-minimisation: well-founded for a variety of cost functions,
− gradient-descent and Newton: fast but unstable.
Slim ESSID (Telecom ParisTech) Introduction to NMF TPT - UPS – June 2015 49 / 53
Conclusion Summary and future challenges
Slim ESSID (Telecom ParisTech) Introduction to NMF TPT - UPS – June 2015 50 / 53
Conclusion NMF software & bibliography
Language
Python Weighted tensor decomposition, all β-divergences, MM
sklearn.decomposition.NMF
Python ℓ2-norm, gradient-descent, sparsity IMM DTU NMF toolbox Matlab ℓ2-norm, MM, gradient-descent, ALS Févotte’s matlab scripts Matlab ℓ2-norm, KL and IS-div, MM, probabilistic Seichepine’s matlab scripts Matlab Soft co-factorisation, ℓ2-norm, KL and IS-div, ℓ1/ℓ2-norm temporal smoothing, MM svmnmf Matlab Geometric SVM-based NMF, kernel-based non-linear decompositions, fast libNMF C ℓ2-norm, MM, gradient-descent, ALS, multi-core, fast
Slim ESSID (Telecom ParisTech) Introduction to NMF TPT - UPS – June 2015 51 / 53
Conclusion NMF software & bibliography
In Image and Vision Computing, 2008.
International Conference on Computer Vision. IEEE, 2007. URL http://www.computer.org/portal/web/csdl/doi/10.1109/ICCV.2007.4409066.
10.1109/TMM.2012.2228474.
Application to Music Analysis. Neural Computation, 21(3), Mar. 2009.
application to music analysis. Neural Computation, 21(3):793–830, 2009.
788–791, 1999.
Information Processing Systems 13, pages 556–562, 2001.
Machine learning in Python. Journal of Machine Learning Research, 12:2825–2830, 2011. Slim ESSID (Telecom ParisTech) Introduction to NMF TPT - UPS – June 2015 52 / 53
Conclusion NMF software & bibliography
multimodal speaker diarization. In IEEE International Conference on Acoustics, Speech, and Signal Processing (ICASSP), Vancouver, 2013.
978-1-4244-4800-5. doi: 10.1109/ACII.2009.5349466. URL http://ieeexplore.ieee.org/lpdocs/epic03/wrapper.htm?arnumber=5349466. Slim ESSID (Telecom ParisTech) Introduction to NMF TPT - UPS – June 2015 53 / 53