K-SVD: an Algorithm for Designing Overcomplete Dictionaries for Sparse Representation
Total Page:16
File Type:pdf, Size:1020Kb
IEEE TRANSACTIONS ON SIGNAL PROCESSING, VOL. 54, NO. 11, NOVEMBER 2006 4311 u-SVD: An Algorithm for Designing Overcomplete Dictionaries for Sparse Representation Michal Aharon, Michael Elad, and Alfred Bruckstein Abstract—In recent years there has been a growing interest in the deviation are the -norms for and . In this paper, the study of sparse representation of signals. Using an overcom- we shall concentrate on the case of . plete dictionary that contains prototype signal-atoms, signals are If and is a full-rank matrix, an infinite number described by sparse linear combinations of these atoms. Applica- tions that use sparse representation are many and include compres- of solutions are available for the representation problem, hence sion, regularization in inverse problems, feature extraction, and constraints on the solution must be set. The solution with the more. Recent activity in this field has concentrated mainly on the fewest number of nonzero coefficients is certainly an appealing study of pursuit algorithms that decompose signals with respect representation. This sparsest representation is the solution of to a given dictionary. Designing dictionaries to better fit the above either model can be done by either selecting one from a prespecified set of linear transforms or adapting the dictionary to a set of training sig- subject to (1) nals. Both of these techniques have been considered, but this topic is largely still open. In this paper we propose a novel algorithm for or adapting dictionaries in order to achieve sparse signal representa- tions. Given a set of training signals, we seek the dictionary that subject to (2) leads to the best representation for each member in this set, under strict sparsity constraints. We present a new method—the u-SVD algorithm—generalizing the u-means clustering process. u-SVD where is the norm, counting the nonzero entries of a is an iterative method that alternates between sparse coding of the vector. examples based on the current dictionary and a process of updating Applications that can benefit from the sparsity and overcom- the dictionary atoms to better fit the data. The update of the dictio- pleteness concepts (together or separately) include compres- nary columns is combined with an update of the sparse represen- tations, thereby accelerating convergence. The u-SVD algorithm sion, regularization in inverse problems, feature extraction, and is flexible and can work with any pursuit method (e.g., basis pur- more. Indeed, the success of the JPEG2000 coding standard can suit, FOCUSS, or matching pursuit). We analyze this algorithm be attributed to the sparsity of the wavelet coefficients of natural and demonstrate its results both on synthetic tests and in applica- images [1]. In denoising, wavelet methods and shift-invariant tions on real image data. variations that exploit overcomplete representation are among Index Terms—Atom decomposition, basis pursuit, codebook, the most effective known algorithms for this task [2]–[5]. Spar- dictionary, FOCUSS, gain-shape VQ, u-means, u-SVD, matching sity and overcompleteness have been successfully used for dy- pursuit, sparse representation, training, vector quantization. namic range compression in images [6], separation of texture and cartoon content in images [7], [8], inpainting [9], and more. Extraction of the sparsest representation is a hard problem I. INTRODUCTION that has been extensively investigated in the past few years. We review some of the most popular methods in Section II. In all A. Sparse Representation of Signals those methods, there is a preliminary assumption that the dic- tionary is known and fixed. In this paper, we address the issue ECENT years have witnessed a growing interest in the of designing the proper dictionary in order to better fit the spar- R search for sparse representations of signals. Using an over- sity model imposed. complete dictionary matrix that contains proto- type signal-atoms for columns, , a signal can B. The Choice of the Dictionary be represented as a sparse linear combination of these atoms. An overcomplete dictionary that leads to sparse represen- The representation of may either be exact or ap- tations can either be chosen as a prespecified set of functions or proximate, , satisfying . The vector designed by adapting its content to fit a given set of signal ex- contains the representation coefficients of the signal amples. In approximation methods, typical norms used for measuring Choosing a prespecified transform matrix is appealing be- cause it is simpler. Also, in many cases it leads to simple and fast Manuscript received December 26, 2004; revised January 21, 2006. This algorithms for the evaluation of the sparse representation. This work was supported in part by The Technion under V.P.R. funds and by the Is- is indeed the case for overcomplete wavelets, curvelets, con- rael Science Foundation under Grant 796/05. The associate editor coordinating the review of this manuscript and approving it for publication was Dr. Steven tourlets, steerable wavelet filters, short-time Fourier transforms, L. Grant. and more. Preference is typically given to tight frames that can The authors are with the Department of Computer Science, The easily be pseudoinverted. The success of such dictionaries in ap- Technion—Israel Institute of Technology, Haifa 32000, Israel (e-mail: [email protected]; [email protected]; [email protected]). plications depends on how suitable they are to sparsely describe Digital Object Identifier 10.1109/TSP.2006.881199 the signals in question. Multiscale analysis with oriented basis 1053-587X/$20.00 © 2006 IEEE 4312 IEEE TRANSACTIONS ON SIGNAL PROCESSING, VOL. 54, NO. 11, NOVEMBER 2006 functions and a shift-invariant property are guidelines in such suit algorithms have been proposed. The simplest ones are the constructions. matching pursuit (MP) [12] and the orthogonal matching pur- In this paper, we consider a different route for designing dic- suit (OMP) algorithms [13]–[16]. These are greedy algorithms tionaries based on learning. Our goal is to find the dictio- that select the dictionary atoms sequentially. These methods nary that yields sparse representations for the training sig- are very simple, involving the computation of inner products nals. We believe that such dictionaries have the potential to out- between the signal and dictionary columns, and possibly de- perform commonly used predetermined dictionaries. With ever- ploying some least squares solvers. Both (1) and (2) are easily growing computational capabilities, computational cost may be- addressed by changing the stopping rule of the algorithm. come secondary in importance to the improved performance A second well-known pursuit approach is the basis pursuit achievable by methods that adapt dictionaries for special classes (BP) [17]. It suggests a convexification of the problems posed of signals. in (1) and (2) by replacing the -norm with an -norm. The focal underdetermined system solver (FOCUSS) is very similar, C. Our Paper’s Contribution and Structure using the -norm with as a replacement for the -norm In this paper, we present a novel algorithm for adapting dictio- [18]–[21]. Here, for , the similarity to the true sparsity naries so as to represent signals sparsely. Given a set of training measure is better but the overall problem becomes nonconvex, signals , we seek the dictionary that leads to the giving rise to local minima that may mislead in the search for so- best possible representations for each member in this set with lutions. Lagrange multipliers are used to convert the constraint strict sparsity constraints. We introduce the -SVD algorithm into a penalty term, and an iterative method is derived based that addresses the above task, generalizing the -means algo- on the idea of iterated reweighed least squares that handles the rithm. The -SVD is an iterative method that alternates between -norm as an weighted norm. sparse coding of the examples based on the current dictionary Both the BP and the FOCUSS can be motivated based on and an update process for the dictionary atoms so as to better fit maximum a posteriori (MAP) estimation, and indeed several the data. The update of the dictionary columns is done jointly works used this reasoning directly [22]–[25]. The MAP can be with an update of the sparse representation coefficients related to used to estimate the coefficients as random variables by maxi- it, resulting in accelerated convergence. The -SVD algorithm mizing the posterior . The prior is flexible and can work with any pursuit method, thereby tai- distribution on the coefficient vector is assumed to be a super- loring the dictionary to the application in mind. In this paper, we Gaussian (i.i.d.) distribution that favors sparsity. For the Laplace present the -SVD algorithm, analyze it, discuss its relation to distribution, this approach is equivalent to BP [22]. prior art, and prove its superior performance. We demonstrate Extensive study of these algorithms in recent years has es- the -SVD results in both synthetic tests and applications in- tablished that if the sought solution is sparse enough, these volving real image data. techniques recover it well in the exact case [16], [26]–[30]. Fur- In Section II, we survey pursuit algorithms that are later used ther work considered the approximated versions and has shown by the -SVD, together with some recent theoretical results jus- stability in recovery of [31], [32]. The recent front of activity tifying their use for sparse coding. In Section III, we refer to re- revisits those questions within a probabilistic setting, obtaining cent work done in the field of sparse-representation dictionary more realistic assessments on pursuit algorithm performance design and describe different algorithms that were proposed for and success [33]–[35]. The properties of the dictionary set this task. In Section IV, we describe our algorithm, its possible the limits on the sparsity of the coefficient vector that conse- variations, and its relation to previously proposed methods.