Bag of Pursuits and Neural Gas for Improved Sparse Coding Manifold - - PowerPoint PPT Presentation

bag of pursuits and neural gas for improved sparse coding
SMART_READER_LITE
LIVE PREVIEW

Bag of Pursuits and Neural Gas for Improved Sparse Coding Manifold - - PowerPoint PPT Presentation

Bag of Pursuits and Neural Gas for Improved Sparse Coding Manifold Learning with Sparse Coding Thomas Martinetz Institute for Neuro- and Bioinformatics University of L ubeck 26.8.2010 1 / 27 Thomas Martinetz Bag of Pursuits and Neural


slide-1
SLIDE 1

Bag of Pursuits and Neural Gas for Improved Sparse Coding

Manifold Learning with Sparse Coding Thomas Martinetz

Institute for Neuro- and Bioinformatics University of L¨ ubeck

26.8.2010

1 / 27 Thomas Martinetz Bag of Pursuits and Neural Gas for Improved Sparse Coding

slide-2
SLIDE 2

Natural signals and images

Natural signals usually

  • ccupy only a small fraction

within the signal space. Example: natural images lie

  • n a submanifold within the

high-dimensional image space. Knowledge about this submanifold is helpful in many respects.

2 / 27 Thomas Martinetz Bag of Pursuits and Neural Gas for Improved Sparse Coding

slide-3
SLIDE 3

Example: image reconstruction

90% of the pixels are missing. Image dimension 600x400 = 240.000 Reconstruction by projection

  • nto the submanifold.

image

Submanifold dim. ≈ 10.000

3 / 27 Thomas Martinetz Bag of Pursuits and Neural Gas for Improved Sparse Coding

slide-4
SLIDE 4

Submanifold representation

wi Submanifold representation by Vector Quantization. Each point on the submanifold is represented by its closest reference vector wi ∈ RN. The wi can be learned by k-means, Neural Gas or many

  • thers.

Image reconstruction through the wi closest to the image. Submanifold representation by linear subspaces of zero dimension.

4 / 27 Thomas Martinetz Bag of Pursuits and Neural Gas for Improved Sparse Coding

slide-5
SLIDE 5

Submanifold representation

Wi Submanifold representation by linear subspaces. Each linear subspace of dimension K is defined by Wi ∈ RN×(K+1). Each point on the submanifold is represented by its closest linear subspace Wi. The Wi can be learned similar to k-means or Neural Gas. Image reconstruction through the closest point on the closest subspace.

5 / 27 Thomas Martinetz Bag of Pursuits and Neural Gas for Improved Sparse Coding

slide-6
SLIDE 6

Compact description

To describe L linear subspaces of dimension K with individual Wi we need L × N × (K + 1) parameters. However, this description can be highly redundant. For example, N subspaces of dimension N − 1 can be described by O(N2) instead of N3 parameters. A ” K out of M”structure can be much more compact.

6 / 27 Thomas Martinetz Bag of Pursuits and Neural Gas for Improved Sparse Coding

slide-7
SLIDE 7

Compact description

N = 3, subspace dimension K = 2, number of subspaces L = 3

W1 = (w0

(1), w1 (1) , w2 (1))

W3 = (w0

(3), w1 (3) , w2 (3))

W2 = (w0

(2), w1 (2) , w2 (2))

C = (c1, c2 , c3, c4)

7 / 27 Thomas Martinetz Bag of Pursuits and Neural Gas for Improved Sparse Coding

slide-8
SLIDE 8

Compact description by sparse coding

Forming K dimensional subspaces by choosing K vectors out

  • f a set (dictionary) C of M vectors allows to realize

L = M K

  • subspaces.

Finding the closest subspace to a given x requires to solve the

  • ptimization problem

min

a

x − Ca2

2

subject to a0 = K Problem 1: NP-hard combinatorial optimization problem Problem 2: How to choose C for a given K?

8 / 27 Thomas Martinetz Bag of Pursuits and Neural Gas for Improved Sparse Coding

slide-9
SLIDE 9

Important Message

The manifold learning problem can be cast into the sparse coding and compressive sensing framework.

9 / 27 Thomas Martinetz Bag of Pursuits and Neural Gas for Improved Sparse Coding

slide-10
SLIDE 10

(Approximately) solving the NP-hard problem

Greedy Optimization Directly tackle the problem by a pursuit method

Matching Pursuit Orthogonal Matching Pursuit Optimized Orthogonal Matching Pursuit

If x has a sparse enough (K << N) representation, and C fulfills certain properties, the solution provided by the pursuit methods will be the optimal solution (Donoho 2003).

10 / 27 Thomas Martinetz Bag of Pursuits and Neural Gas for Improved Sparse Coding

slide-11
SLIDE 11

How to choose C (and K)?

Given data x1, . . . , xp, xi ∈ RN (like natural images) which are supposed to lie on an unknown submanifold. The goal is to find a C which provides a small average reconstruction error for a K which is as small as possible. Find C = (c1, . . . , cM) with cj ∈ RN and ai ∈ RM minimizing E = 1 L

p

  • i=1

xi − Cai2

2

Constraints

ai : ai0 = K C : cj = 1 (without loss of generality)

11 / 27 Thomas Martinetz Bag of Pursuits and Neural Gas for Improved Sparse Coding

slide-12
SLIDE 12

Predefined dictionaries for image data

How to chose C?

Overcomplete 8 × 8 DCT-Dictionary Overcomplete 8 × 8 HAAR-Dictionary

12 / 27 Thomas Martinetz Bag of Pursuits and Neural Gas for Improved Sparse Coding

slide-13
SLIDE 13

Learning dictionaries

13 / 27 Thomas Martinetz Bag of Pursuits and Neural Gas for Improved Sparse Coding

slide-14
SLIDE 14

Learning dictionaries

The problem: find min

C

  • i
  • min

a xi − Ca2 2

subject to a0 = K

  • Current state-of-the-art solver:

MOD (Engan et al 1999) K-SVD (Aharon et al 2006) Our new approach: Neural-Gas-like soft-competitive stochastic gradient descent. Generalization of the Neural Gas to linear subspaces within the sparse coding framework.

14 / 27 Thomas Martinetz Bag of Pursuits and Neural Gas for Improved Sparse Coding

slide-15
SLIDE 15

What was Neural Gas?

With a randomly chosen data point x reference vectors for Vector Quantization wi are updated according to ∆wjl = αte− l

λt (x − wjl)

0 = 1, ..., L − 1 wj0 is the reference vector closest to x wj1 is the reference vector second closest to x etc. The update step decreases with the distance rank (reconstruction error) of the reference vectors to the data point x. Neural Gas performs soft-competitive stochastic gradient descent on the Vector Quantization error function. Neural Gas provides very good and robust solutions to the Vector Quantization problem.

15 / 27 Thomas Martinetz Bag of Pursuits and Neural Gas for Improved Sparse Coding

slide-16
SLIDE 16

Generalization to linear subspaces

With a randomly chosen data point x the linear subspaces Wi are updated according to ∆Wjl = αte− l

λt (x − Wjlajl)aT

jl

l = 0, ..., L − 1 with ajl = arg min

a

x − Wjla2

2

Wj0 is the linear subspace closest to x Wj1 is the linear subspace second closest to x etc. The update step decreases with the distance rank (reconstruction error) of the linear subspace to the data point x.

16 / 27 Thomas Martinetz Bag of Pursuits and Neural Gas for Improved Sparse Coding

slide-17
SLIDE 17

Within the sparse coding framework

For a randomly chosen sample x determine aj0 = arg min

a

x − Ca2

2

subject to a0 = K and a bag of further good solutions. Sort the solutions according to the obtained reconstruction error: x−Caj0 ≤ x−Caj1 ≤ · · · ≤ x−Cajl ≤ · · · ≤ x−CajL−1 Update the dictionary by soft-competitive stochastic gradient descent: ∆C = αt

L

  • l=0

e− l

λt (x − Cajl)aT

jl

17 / 27 Thomas Martinetz Bag of Pursuits and Neural Gas for Improved Sparse Coding

slide-18
SLIDE 18

Bag of Pursuits (BOP)

For finding a bag of good solutions we developed the so-called ” bag

  • f pursuits (BOP)”which

is derived from Optimized Orthogonal Matching Pursuit provides a set of good choices for a with a0 = K instead of a single solution expands the set of solutions in a tree-like fashion and can be directly combined with the Neural-Gas-like stochastic gradient descent for learning dictionaries.

18 / 27 Thomas Martinetz Bag of Pursuits and Neural Gas for Improved Sparse Coding

slide-19
SLIDE 19

Bag of Pursuits (BOP)

2 4 3 1 3 4 1 5 3 2 4 1 2 3 1 2 4 3 5 Residual ǫ = y ǫ ≤ δ ⇒ STOP ǫ ≤ δ ⇒ STOP ǫ ≤ δ ⇒ STOP sort according to (rT

i ǫ)2

sort according to (rT

i ǫ)2

ri = ri − (rT

2 ri )ri

ri = ri − (rT

3 )ri

ri = ri − (rT

2 ri )ri

ǫ = ǫ − ( r

T 2

ǫ ) ǫ ǫ = ǫ − (rT

5 ǫ)ǫ

ǫ = ǫ − (rT

1 ǫ)ǫ

ǫ = ǫ − (rT

4 ǫ)ǫ

sort according to (rT

i ǫ)2

sort according to (rT

i ǫ)2

ǫ = ǫ − (rT

2 ǫ)ǫ

sort according to (rT

i ǫ)2

ǫ = ǫ − (rT

2 ǫ)ǫ

ri = ri − (rT

5 ri )ri

ri = ri − (rT

1 ri )ri

r

i

= r

i

− ( r

T 2

r

i

) r

i

ri = ri − (rT

4 ri )ri

ǫ = ǫ − (rT

3 ǫ)ǫ

Dictionary R = (r1, . . . , r5) = D, ri = 1 19 / 27 Thomas Martinetz Bag of Pursuits and Neural Gas for Improved Sparse Coding

slide-20
SLIDE 20

Synthetical experiments

Do we really find the“correct”dictionary? Generate synthetical dictionaries C true ∈ R20×50 and data x1, . . . , x1500 ∈ R20 that are linear combinations of C true: xi = C truebi . Each bi has k non-zero entries. The positions of the non-zero entries are chosen according to three different scenarios.

20 / 27 Thomas Martinetz Bag of Pursuits and Neural Gas for Improved Sparse Coding

slide-21
SLIDE 21

Synthetical experiments

Scenarios

Random dictionary elements Chose uniformly k different dictionary elements Independent subspaces Define ⌊50/k⌋ disjoint groups of k dictionary elements Uniformly chose one of the groups Dependent subspaces Uniformly select k − 1 dictionary elements. Use 50 − k + 1 groups of dictionary elements where each group consists of the k − 1 selected dictionary elements plus

  • ne further dictionary element.

21 / 27 Thomas Martinetz Bag of Pursuits and Neural Gas for Improved Sparse Coding

slide-22
SLIDE 22

Results

Random dictionary elements

Hard-competitive without BOP

2 4 6 8 10 0.2 0.4 0.6 k Eh (a)

HC−SGD K−SVD MOD

2 4 6 8 10 0.6 0.7 0.8 0.9 1 k mean max overlap (MMO) (j)

HC−SGD K−SVD MOD

Hard-competitive with BOP

2 4 6 8 10 0.2 0.4 0.6 k Eh (d)

HC−SGD(BOP) K−SVD(BOP) MOD(BOP)

2 4 6 8 10 0.6 0.7 0.8 0.9 1 k mean max overlap (MMO) (m)

HC−SGD(BOP) K−SVD(BOP) MOD(BOP)

Soft-competitive with BOP

2 4 6 8 10 0.2 0.4 0.6 k Eh (g)

SC−SGD HC−SGD(BOP)

2 4 6 8 10 0.6 0.7 0.8 0.9 1 k mean max overlap (MMO) (p)

SC−SGD HC−SGD(BOP)

22 / 27 Thomas Martinetz Bag of Pursuits and Neural Gas for Improved Sparse Coding

slide-23
SLIDE 23

Results

Independent subspaces

Hard-competitive without BOP

2 4 6 8 10 0.2 0.4 0.6 k Eh (e)

HC−SGD(BOP) K−SVD(BOP) MOD(BOP)

2 4 6 8 10 0.6 0.7 0.8 0.9 1 k mean max overlap (MMO) (k)

HC−SGD K−SVD MOD

Hard-competitive with BOP

2 4 6 8 10 0.2 0.4 0.6 k Eh (b)

HC−SGD K−SVD MOD

2 4 6 8 10 0.6 0.7 0.8 0.9 1 k mean max overlap (MMO) (n)

HC−SGD(BOP) K−SVD(BOP) MOD(BOP)

Soft-competitive with BOP

4 6 8 10 0.05 0.1 0.15 0.2 k Eh (h)

SC−SGD HC−SGD(BOP)

2 4 6 8 10 0.6 0.7 0.8 0.9 1 k mean max overlap (MMO) (q)

SC−SGD HC−SGD(BOP)

23 / 27 Thomas Martinetz Bag of Pursuits and Neural Gas for Improved Sparse Coding

slide-24
SLIDE 24

Results

Dependent subspaces

Hard-competitive without BOP

2 4 6 8 10 0.2 0.4 0.6 k Eh (c)

HC−SGD K−SVD MOD

2 4 6 8 10 0.6 0.7 0.8 0.9 1 k mean max overlap (MMO) (l)

HC−SGD K−SVD MOD

Hard-competitive with BOP

2 4 6 8 10 0.2 0.4 0.6 k Eh (f)

HC−SGD(BOP) K−SVD(BOP) MOD(BOP)

2 4 6 8 10 0.6 0.7 0.8 0.9 1 k mean max overlap (MMO) (o)

HC−SGD(BOP) K−SVD(BOP) MOD(BOP)

Soft-competitive with BOP

4 6 8 10 0.05 0.1 0.15 0.2 k Eh (i)

SC−SGD HC−SGD(BOP)

4 6 8 10 0.6 0.7 0.8 0.9 k mean max overlap (MMO) (r)

SC−SGD HC−SGD(BOP)

24 / 27 Thomas Martinetz Bag of Pursuits and Neural Gas for Improved Sparse Coding

slide-25
SLIDE 25

Learning dictionaries for image reconstruction

Not whole images are used for learning but 8 × 8 patches (N = 64) Use random 8 × 8 patches of this image ... to learn this image specific dictionary C

25 / 27 Thomas Martinetz Bag of Pursuits and Neural Gas for Improved Sparse Coding

slide-26
SLIDE 26

Image reconstruction

For each 8 × 8 patch of the image we obtain an estimation by taking the closest point on the closest subspace The estimated pixel value at each image position is obtained as the mean value of all estimated patches at that position

26 / 27 Thomas Martinetz Bag of Pursuits and Neural Gas for Improved Sparse Coding

slide-27
SLIDE 27

Image reconstruction results

  • vercomplete DCT-dictionary

learned dictionary

  • vercomplete HAAR-dictionary
  • riginal image

27 / 27 Thomas Martinetz Bag of Pursuits and Neural Gas for Improved Sparse Coding