TL;DR
Many signals are sparse: only a few of their entries are nonzero, even when we measure them in a large, redundant set of directions. Orthogonal matching pursuit (OMP) finds those few entries greedily. It repeatedly picks the direction that best explains what is still unexplained, then refits all picked directions together by least squares, so the leftover error is always orthogonal to what has been chosen.
OMP is fast, simple to code, and provably correct for many well-behaved problems. It can still pick a wrong direction early on, and nothing in the algorithm goes back to fix that.
Where you'll see it: in compressed-sensing reconstruction of images from few measurements, in sparse channel estimation for wireless systems where only a few paths are active, and in sparse coding for signal and image dictionaries.
Intuition
Explain the biggest piece first
Suppose a friend hums a chord and you must work out which notes were played, from a box of a thousand possible notes. Only a handful are actually sounding. A simple strategy: play each possible note against the recording and pick the one that matches best. Subtract its contribution from the recording. Then look at what is left and pick the next best match. After a few rounds the recording is explained.
That is matching pursuit. The catch is that a note you already picked may still leave a little of its sound in the residual, so the second pick can partly repeat the first. OMP fixes this: after each pick, it refits the amplitudes of all picked notes at once, so the leftover is exactly what they cannot explain. Nothing that has already been chosen can contribute to the residual anymore.
The name says what it does. "Matching" means choosing the column that matches the residual best. "Pursuit" means repeating the search. "Orthogonal" means the refit keeps the residual perpendicular to every chosen direction.
- residual norm after each step
The setting
A sparse signal has entries, but only of them are nonzero. We observe a few linear measurements of it, , where is an matrix with . The columns of are called atoms (or dictionary elements). Since , the system has infinitely many solutions in general. Sparsity is what makes the answer unique and recoverable.
The math
The sparse recovery problem
Ideally we want the sparsest solution:
where counts the nonzero entries. This problem is hard in general, because checking every set of columns is combinatorially expensive. Greedy methods such as OMP avoid the search over all subsets by building the support one index at a time.
Given with unit-norm columns, a measurement , and a target sparsity , set the residual and the support . For :
- Choose the index that maximises , where is column of .
- Set .
- Solve , where holds the chosen columns.
- Update the residual .
Output the vector that has the entries placed on the support , and zeros elsewhere.
Here is the dot product of an atom with the residual, and the absolute value measures how strongly the atom explains the residual regardless of sign. The unit-norm assumption makes all atoms comparable.
Why the refit makes it orthogonal
The least-squares step in step 3 has normal equations . Substituting the solution into the residual gives
So the residual is orthogonal to every atom already on the support. Two consequences follow. First, a chosen atom has zero correlation with the residual, so step 1 will never pick it again. Second, the residual is the part of that the chosen atoms cannot represent, which is exactly what the next atom should explain.
The refit is what distinguishes OMP from plain matching pursuit. Plain matching pursuit subtracts only the newest atom's contribution, so its residual may still correlate with earlier atoms and the same direction can be picked repeatedly.
Exact recovery condition
The mutual coherence of is , the largest correlation between two distinct unit-norm atoms. Tropp (2004) showed that if , OMP recovers every -sparse signal from exactly. This is a sufficient condition: failing it does not mean OMP will fail, only that the guarantee does not apply.
Worked examples
Let the atoms be the columns of
so , and . Each has unit norm. The true signal is , which is 2-sparse, so the measurement is .
- Step 1 correlations: , , . The largest is 2.6, so pick index 1.
- Refit on : . The residual is .
- Step 2 correlations: , . The largest is 0.8, so OMP picks index 2, not the true index 3.
- Refit on : the two atoms span the whole measurement space, so the residual is zero and the output is .
Interpretation: OMP found a perfect explanation of , but with the wrong support. Here , and , so the exact-recovery condition fails. The example shows the greedy step can be fooled when atoms are correlated.
Take , the identity, so the atoms are the standard basis vectors. Measure the sparse signal with , so .
- Step 1 correlations are the entries of themselves: , and . The largest in absolute value is , so pick index 2.
- Refit on : . The residual is .
- Step 2 correlations are , and , so pick index 3.
- Refit on : , residual zero.
The output is , which matches . Here , so the condition holds for any .
Interpretation: with orthogonal atoms, each step is independent of the others, and greedy selection is always right. The difficulty of OMP is entirely in the correlations between atoms.
Consider a dictionary with atoms and measurements, recovering a signal with nonzeros.
- Step 1 of each iteration computes dot products of length . That is multiplications.
- The least-squares refit on atoms costs about operations if done with a factorisation that is updated incrementally. For this is at most per iteration, which is small compared with step 1.
- Ten iterations therefore cost about operations, plus smaller refit costs.
- Each iteration touches the whole dictionary once. Methods that solve an program instead can need many more passes over .
Interpretation: OMP is cheap when is small, which is typical for sparse signals. Its cost grows with the number of nonzeros, not with the size of the dictionary squared.
Tradeoffs and failure modes
OMP is a good default for small sparsity, but it is not the only method, and its failure modes matter.
| Situation | Problem | Better choice |
|---|---|---|
| Highly correlated atoms | Early wrong picks are never undone | Basis pursuit ( minimisation), or OMP with backtracking or swaps |
| Sparsity unknown | Stopping rule is a guess | Stop when the residual norm falls below the noise level |
| Large or large dictionary | Refit grows with support and still runs one step at a time | Iterative thresholding or solvers |
| Noisy measurements | Residual never reaches zero, and extra atoms fit noise | Stop early, or use a noise-aware method such as LASSO |
| Need a convex, globally analysed method | OMP is greedy, so its guarantees are weaker | Basis pursuit with a restricted isometry property guarantee |
Some practical warnings:
- Normalise the atoms. The selection rule compares correlations, so atoms with large norms are favoured unless they are rescaled to unit norm first.
- Do not run OMP past the true sparsity. After the support is found, extra steps can only add atoms that fit noise.
- Check the residual, not only the output. A residual of zero with a wrong support, as in the first example, is a sign that the atoms are too correlated to trust.
- Plain matching pursuit is not OMP. Without the refit, the same atom can be picked repeatedly and the residual does not shrink as fast.
History
Stéphane Mallat and Zhifeng Zhang introduced matching pursuit in 1993 for decomposing signals over redundant time-frequency dictionaries, the family of wavelet-like and Gabor-like atoms used in signal analysis. Their greedy step was the same select-and-subtract idea, without the refit.
Y. C. Pati, R. Rezaiifar and P. S. Krishnaprasad introduced the orthogonal variant in 1993 as well, adding the least-squares refit that keeps the residual orthogonal to the chosen atoms. Subsequent work by Joel Tropp, and by Tropp with Anna Gilbert, analysed when OMP provably recovers sparse signals, connecting it to the coherence condition above.
The method caught on in the 2000s with the rise of compressed sensing, the idea that a sparse signal can be recovered from far fewer measurements than its length. David Donoho, and independently Emmanuel Candès, Justin Romberg and Terence Tao, gave the theory that made sparse recovery a mainstream tool. OMP remained popular because it is simple, fast for small sparsity, and easy to understand, even when convex methods have stronger guarantees.
Check yourself
QuestionIn a single OMP step, the residual is and two atoms are and . Which atom is chosen, and what is the correlation?Show answer
The correlations are and . The second atom has the larger absolute correlation, so OMP picks with correlation 2.2. Note that is not the atom with the larger first coordinate, which is why the dot product, not a single entry, decides the match.
QuestionWhy can OMP never pick the same atom twice?Show answer
After each step, the refit makes the residual orthogonal to every atom on the support. For a chosen atom we have , so its correlation is zero and it is never the largest. Plain matching pursuit lacks this property, which is why the orthogonal refit is essential.
QuestionUsing the coherence condition , what is the largest coherence allowed for exact recovery of a 4-sparse signal, and does the first worked example satisfy it for ?Show answer
For , the bound is , so the coherence must be below about 0.143. For the first worked example with , the bound is , and the coherence is . The condition fails, so the guarantee does not apply, which is consistent with OMP picking the wrong atom.
QuestionA sensor network measures a signal with 400 atoms and 100 measurements. The true signal has 3 nonzeros, but the operator runs OMP for 20 iterations. What goes wrong, and what stopping rule would you use?Show answer
After the three correct atoms are chosen, the residual is at the level of the measurement noise. Further iterations add atoms that correlate with noise, so the output gains spurious nonzeros and the fit to the true signal gets worse, even as the residual shrinks. A better rule is to stop when the residual norm drops below the expected noise level, or when the residual stops decreasing meaningfully, rather than running a fixed 20 steps.
Sources
- Matching pursuit (Wikipedia): https://en.wikipedia.org/wiki/Matching_pursuit
- Compressed sensing (Wikipedia): https://en.wikipedia.org/wiki/Compressed_sensing
- Tropp and Gilbert, "Signal recovery from random measurements via orthogonal matching pursuit," IEEE Transactions on Information Theory (2007): https://doi.org/10.1109/TIT.2007.909108