Lably
Skip to content

Sparse dictionary learning

Representation learning method

  • 9 min read
  • 3 chapters

Related on Lably

Through Linear combination, Data analysis and Computer vision

One of the most important applications of sparse dictionary learning is in the field of compressed sensing or signal recovery. In compressed sensing, a high-dimensional signal can be recovered with only a few linear measurements, provided that the signal is sparse or near-sparse. Since not all signals satisfy this condition, it is crucial to find a sparse representation of that signal such as the wavelet transform or the directional gradient of a rasterized matrix. Once a matrix or a high-dimensional vector is transferred to a sparse space, different recovery algorithms like basis pursuit, CoSaMP, or fast non-iterative algorithms can be used to recover the signal.

One of the key principles of dictionary learning is that the dictionary has to be inferred from the input data. The emergence of sparse dictionary learning methods was stimulated by the fact that in signal processing, one typically wants to represent the input data using a minimal amount of components. Before this approach, the general practice was to use predefined dictionaries such as Fourier or wavelet transforms. However, in certain cases, a dictionary that is trained to fit the input data can significantly improve the sparsity, which has applications in data decomposition, compression, and analysis, and has been used in the fields of image denoising and classification, and video and audio processing. Sparsity and overcomplete dictionaries have immense applications in image compression, image fusion, and inpainting.

Problem statement

Given the input dataset X=[x1,...,xK],xi∈Rd we wish to find a dictionary D∈Rd×n:D=[d1,...,dn] and a representation R=[r1,...,rK],ri∈Rn such that both ‖X−DR‖F2 is minimized and the representations ri are sparse enough. This can be formulated as the following optimization problem:

argminD∈C,ri∈Rn∑i=1K‖xi−Dri‖22+λ‖ri‖0, where C≡{D∈Rd×n:‖di‖2≤1∀i=1,...,n}, λ>0

C is required to constrain D so that its atoms would not reach arbitrarily high values allowing for arbitrarily low (but non-zero) values of ri. λ controls the trade off between the sparsity and the minimization error.

The minimization problem above is not convex because of the ℓ0-"norm" and solving this problem is NP-hard. In some cases L1-norm is known to ensure sparsity and so the above becomes a convex optimization problem with respect to each of the variables D and R when the other one is fixed, but it is not jointly convex in (D,R).

Properties of the dictionary

The dictionary D defined above can be "undercomplete" if n<d or "overcomplete" in case n>d with the latter being a typical assumption for a sparse dictionary learning problem. The case of a complete dictionary does not provide any improvement from a representational point of view and thus isn't considered.

Undercomplete dictionaries represent the setup in which the actual input data lies in a lower-dimensional space. This case is strongly related to dimensionality reduction and techniques like principal component analysis which require atoms d1,...,dn to be orthogonal. The choice of these subspaces is crucial for efficient dimensionality reduction, but it is not trivial. And dimensionality reduction based on dictionary representation can be extended to address specific tasks such as data analysis or classification. However, their main downside is limiting the choice of atoms.

Overcomplete dictionaries, however, do not require the atoms to be orthogonal (they will never have a basis anyway) thus allowing for more flexible dictionaries and richer data representations.

An overcomplete dictionary which allows for sparse representation of signal can be a famous transform matrix (wavelets transform, fourier transform) or it can be formulated so that its elements are changed in such a way that it sparsely represents the given signal in a best way. Learned dictionaries are capable of giving sparser solutions as compared to predefined transform matrices.

Sign in to keep reading

2 more chapters are free with a Lably account.

More in Computing and communication