Professional Documents
Culture Documents
Representations Creuses Dans Le TduS BD
Representations Creuses Dans Le TduS BD
in signal processing
Bogdan Dumitrescu
Sparse Representations 1 / 46
Très Petit Larousse
Sparse Representations 2 / 46
Contents
1 Why sparsity?
2 Sparse representations
4 Dictionary learning
5 Applications
Sparse Representations 3 / 46
Why sparsity?
Sparse Representations 4 / 46
Sound
A musical instrument has a harmonic spectrum
The basic frequency and a few coefficients are enough to rebuild
the sound
Sparse Representations 5 / 46
Speech
Speech is not harmonic, especially consonants
However, spectrum is relatively sparse
Sparse Representations 6 / 46
Images
The image itself is not at all sparse
In transform domain, most coefficients are (almost) zero
Sparse Representations 7 / 46
Images
What is sparsity?
DFT 2D example
• Sparsity implies many zeros in a vector or a matrix
FFT Sparse
transform representation
Usage:
Compression
Analysis
Denoising
…… Reconstructed patch 4
Sparse Representations 8 / 46
Transforms and representations
Sparse Representations 9 / 46
Transforms?
= ·
y FH x
Sparse Representations 10 / 46
Contents
1 Why sparsity?
2 Sparse representations
4 Dictionary learning
5 Applications
Sparse Representations 11 / 46
Overcomplete transform
Overcomplete representation
y Dx
=
D∈ Rm×n , with m < n: fat matrix
= ·
y D x
Difficulty
Given y and D , the overcomplete system has many solutions x
Sparse Representations 12 / 46
Sparse solutions
= ·
y D x
Sparse Representations 13 / 46
The problem
Sparse Representations 14 / 46
Do sparse solutions exist?
Sparse Representations 15 / 46
How to compute a sparse solution?
x D DD
Least-squares solution = T ( T −1
) y
is NOT sparse
If the support I were known, then the system is overdetermined
= ·
y DI xI
Sparse Representations 16 / 46
NP-hard
Sparse Representations 17 / 46
Sparsity guarantees
x
Assume we have found a solution with s nonzeros
Is this the sparsest one?
D
spark( ) = smallest number of linearly dependent atoms
Sparsest solution
D
If s < spark( )/2, then x is the sparsest solution
That’s good news: generically each group of m atoms has
maximum rank
So, if s < (m + 1)/2, then the solution is the sparsest
There are not that many sparse solutions. . .
Sparse Representations 18 / 46
Mutual coherence
D
spark( ) ≥ 1 +
1
µ( ) D
Mutual coherence can be computed easier than the spark
Conclusion: the best dictionary would have atoms as
”orthogonal” as possible
Sparse Representations 19 / 46
Contents
1 Why sparsity?
2 Sparse representations
4 Dictionary learning
5 Applications
Sparse Representations 20 / 46
Sparse representation algorithms
Greedy
orthogonal matching pursuit (OMP)
orthogonal least squares (OLS)
. . . and many others
Optimization based
convex relaxation
min kx k1
x
s.t. y = Dx
. . . and many others
Sparse Representations 21 / 46
Orthogonal Matching Pursuit
e y d
X
= − xj j
j∈I
d e d
New atom: k for which | T k | = maxj6∈I | T j | e d
New support: I ← I ∪ {k}
New optimal representation is least-squares minimizer
xI = (DIT DI )−1DIT y
Sparse Representations 22 / 46
Illustration
An example for orthogonal matching
OMP first two steps
pursuit
Dictionary elements
Patch from latent
c1=-0.039 c2= 0.577 c3=0.054 c4=-0.031 c5 =-0.437
Correlation ci= diT x ……
x d1 d2 d3 d4 d5
Residual r = - ×0.577
c1=-0.035 c2= 0 c3=0.037 c4=-0.046 c5 =-0.289
Sparse Representations 23 / 46
Why convex relaxation?
Sparse Representations 24 / 46
p-norms
x
Pm
p-norms are k kp = ( i=1 |xi |p )
1/p
12
Shapes of |xi |p 1 Prologue
1.5 p=1
1 p=0.1
p=0.5
0.5
p=2
0
−1.5 −1 −0.5 0 0.5 1 1.5
Fig. 1.3 The behavior of |x| p for various values of p. As p tends to zero, |x| p approaches the
Sparse Representations 25 / 46
indicator function, which is 0 for x = 0 and 1 elsewhere.
1-norm relaxation
y = Dx is a hyperplane
Find smallest p-norm ball that still intersects the hyperplane
(is tangent, in fact)
1.6 Promoting Sparse Solutions 11
Fig. 1.2 The intersection between the ` p -ball and the set Ax = b defines the solution of (P p ). This
intersection is demonstrated here in 3D for
Sparse p = 2 (top left), p = 1.5 (top right), p = 1 (bottom
Representations 26 / 46
left), and p = 0.7 (bottom right). When p ≤ 1, the intersection takes place at a corner of the ball,
Lasso
min k −
x
y Dx k2 + λkx k1
Again convex optimization
λ > 0 is a sparsifying parameter
λ small ⇒ (almost) full solution
λ big ⇒ (too) sparse solution
Sparse Representations 27 / 46
Contents
1 Why sparsity?
2 Sparse representations
4 Dictionary learning
5 Applications
Sparse Representations 28 / 46
What kind of dictionaries?
Preset
Made from the rows of a classic transform
Random
Especially built e.g. for incoherence
Learned
Learned from training signals for each specific application
Sparse Representations 29 / 46
Fixed vs learned
a concrete figu
chine (an Inte
this assumptio
is given b
The base di
pact represent
implicit dictio
2
Fig. 3. (left) Overcomplete DCT dictionary for 8 8 image patches. (right) ranging from l
Sparse dictionary trained over the overcomplete DCT using Sparse K-SVD. lowing analys
Dictionary atoms are represented using 6 coefficients each. Marked atoms are dictionaries, w
magnified in Fig. 4.
1) Separab
Sparse Representations necker
30 / 46produc
Why learned dictionaries?
Advantages
Maximize performance for the application at hand
Learning can be done before application
Drawbacks
No structure, hence no fast algorithms
Learning dictionaries takes time and might be hard
Sparse Representations 31 / 46
Dictionary learning
Input
Data set Y ∈ Rm×N , the training signals
Sparsity level s
Sparse Representations 32 / 46
Representation of many signals
≈ ·
Y D X
Sparse Representations 33 / 46
Representation of a signal
≈ ·
Y D X
Sparse Representations 34 / 46
Short problem analysis
min k
X
Y − DX k2F
(SC)
s.t. kxi k0 ≤ s, 1 ≤ i ≤ N
Sparse Representations 36 / 46
Subproblems: dictionary update
Dictionary update
With fixed sparsity pattern Ω
min
D ,(X )
kY − DX k2F
(DU)
s.t. XΩ = 0
c
Sparse Representations 37 / 46
Basic DL algorithm
Initial dictionary
random atoms
random selection of signals
Stopping criteria
Fixed number of iterations
Reason: usually, error not monotonously decreasing
Sparse Representations 38 / 46
Basic algorithm structure
Sparse Representations 39 / 46
Contents
1 Why sparsity?
2 Sparse representations
4 Dictionary learning
5 Applications
Sparse Representations 40 / 46
Applications
Applications
denoising
compression
coding
classification
compressive sampling
. . . and many others
Main idea: sparse representation captures the essential
information in a signal (image)
Sparse Representations 41 / 46
Denoising
Application---Denoising
Sparse representation removes noise, which is not well
represented by (learned) atoms
Source
Result 30.829dB
Dictionary
PSNR = 22.1dB
Noisy image
Sparse Representations 42 / 46
[M. Elad, Springer 2010]
Compression
Application---Compression
Sparse representation contains few information: position of the
atoms and their coefficients
JPEG Dictionary
Original JPEG 2000 PCA based
550 bytes per
image
Bottom:
RMSE values
15.30 12.57 10.27 6.36
Sparse Representations 43 / 46
Compressive sampling (compressed sensing)
Sparse Representations 44 / 46
Decoder
x
Decoding: first compute sparse solving the system =y DF x T
F x
then recover η = T via the inverse transform
Dumb encoder, smart decoder
y
Robustness: all elements of have equal value, unlike those of x
Beats Nyquist bound
Sparse Representations 45 / 46
Very short bibliography
Sparse Representations 46 / 46