1 Introduction

In recent years, a new class of approximation strategies based on compressive sensing (CS) has been shown to be able to substantially lessen the curse of dimensionality in the context of approximation of multivariate functions from pointwise data, with applications to the uncertainty quantification of partial differential equations with random inputs. Based on random sampling from orthogonal polynomial systems and on weighted 1 minimization, these techniques are able to accurately recover a sparse approximation to a function of interest from a small-sized datasets of pointwise samples. In this paper, we show the potential of weighted greedy techniques as an alternative to convex minimization programs based on weighted 1 minimization in this context.

The contribution of this paper is twofold. First, we propose a weighted orthogonal matching pursuit (WOMP) algorithm based on a rigorous derivation of the corresponding greedy index selection strategy. Second, we numerically show that WOMP is a promising alternative to convex recovery programs based on weighted 1 minimization, thanks to its ability to compute sparse approximations with an accuracy comparable to those computed via weighted 1 minimization, but with a considerably lower computational cost when the target sparsity level (and, hence, the number of WOMP iterations) is small enough. It is also worth observing here that WOMP computes approximations that are exactly sparse, as opposed to approaches based on weighted 1 minimization, which provide compressible approximations in general.

Brief Literature Review

Various approaches for multivariate function approximation based on CS with applications to uncertainty quantification can be found in [1, 3,4,5,6, 11,12,13, 17]. An overview of greedy methods for sparse recovery in CS and, in particular of OMP, can be found in [7, Chapter 3.2]. For a general review on greedy algorithms, we refer the reader to [15] and references therein. Some numerical experiments on a weighted variant of OMP have been performed in the context of CS methods for uncertainty quantification in [4]. Weighted variants of OMP have also been considered in [10, 16], but the weighted procedure is tailored for specific signal processing applications and the term “weighted” does not refer to the weighted sparsity setting of [14] employed here. To the authors’ knowledge, the weighted variant of OMP considered in this paper seems to have been proposed here for the first time.

Organization of the Paper

In Sect. 2 we describe the setting of sparse multivariate function approximation in orthonormal systems via random sampling and weighted 1 minimization. Then, in Sect. 3 we formally derive a strategy for the greedy selection in the weighted sparsity setting and present the WOMP algorithm. Finally, we numerically show the effectiveness of the proposed technique in Sect. 4 and give our conclusions in Sect. 5.

2 Sparse Multivariate Function Approximation

We start by briefly introducing the framework of sparse multivariate function approximation from pointwise samples and refer the reader to [3] for further details.

Our aim is to approximate a function defined over a high-dimensional domain

$$\displaystyle \begin{aligned} f : D \to \mathbb{C}, \quad \text{with } D=(-1,1)^d,\end{aligned} $$

where d ≫ 1, from a dataset of pointwise samples f(t 1), …, f(t m). Let ν be a probability measure on D and let \(\{\phi _j\}_{j \in \mathbb {N}_0^d}\) be an orthonormal basis for the Hilbert space \(L^2_\nu (D)\). In this paper, we will consider \(\{\phi _j\}_{j \in \mathbb {N}_0^d}\) to be a tensorized family of Legendre or Chebyshev orthogonal polynomials, with ν being the uniform or the Chebyshev measure on D, respectively. Assuming that \(f \in L^2_\nu (D) \cap L^\infty (D)\), we consider the series expansion

$$\displaystyle \begin{aligned} f = \sum_{j \in \mathbb{N}_0^d} x_j \phi_j.\end{aligned} $$

Then, we choose a finite set of multi-indices \(\Lambda \subseteq \mathbb {N}_0^d\) with | Λ| = N and obtain the truncated series expansion

$$\displaystyle \begin{aligned} f_\Lambda = \sum_{j \in \Lambda} x_j \phi_j. \end{aligned}$$

In practice, a convenient choice for Λ is the hyperbolic cross of order s, i.e.

$$\displaystyle \begin{aligned} \Lambda := \left\{j \in \mathbb{N}^d_0 : \prod_{k = 1}^d (j_k+1) \leq s \right\}, \end{aligned}$$

due to the moderate growth of N with respect to d. Now, assuming we collect m ≪ N pointwise samples independently distributed according to ν, namely,

$$\displaystyle \begin{aligned} f(t_1), \ldots, f(t_m),\quad \text{with} \quad t_1,\ldots,t_m \stackrel{\text{i.i.d.}}{\sim} \nu, \end{aligned}$$

the approximation problem can be recasted as a linear system

$$\displaystyle \begin{aligned} A x_\Lambda = y + e, \end{aligned} $$
(1)

with \(x_\Lambda = (x_j)_{j \in \Lambda } \in \mathbb {C}^N\), and where the sensing matrix \(A \in \mathbb {C}^{m \times N}\) and the measurement vector \(y \in \mathbb {C}^m\) are defined as

$$\displaystyle \begin{aligned} A_{ij} := \frac{1}{\sqrt{m}}\phi_j(t_i), \quad y_i := \frac{1}{\sqrt{m}}f(t_i), \quad \forall i \in[m], \; \forall j \in [N], \end{aligned} $$
(2)

with [k]:= {1, …, k} for every \(k \in \mathbb {N}\). The vector \(e \in \mathbb {C}^m\) accounts for the truncation error introduced by Λ and satisfies ∥e2 ≤ η, where η > 0 is an a priori upper bound to the truncation L (D)-error, namely \(\|f-f_{\Lambda }\|{ }_{L^\infty (D)} \leq \eta \). A sparse approximation to the vector can be then computed by means of weighted 1 minimization.

Given weights \(w \in \mathbb {R}^N\) with w > 0 (where the inequality is read componentwise), recall that the weighted 1 norm of a vector \(z \in \mathbb {C}^N\) is defined as ∥z1,w:=∑j ∈ [N]|z j|w j. We can compute an approximation \(\hat {x}_\Lambda \) to x Λ by solving the weighted quadratically-constrained basis pursuit (WQCBP) program

$$\displaystyle \begin{aligned} \hat{x}_\Lambda \in \arg\min_{z \in \mathbb{C}^N} \|z\|{}_{1,w}, \quad \text{s.t.} \quad \|A z-y\|{}_{2} \leq \eta, \end{aligned} $$
(3)

where the weights \(w \in \mathbb {R}^N\) are defined as

$$\displaystyle \begin{aligned} w_j = \|\phi_j\|{}_{L^\infty(D)}. \end{aligned} $$
(4)

The effectiveness of this particular choice of w is supported by theoretical results and it has been validated from the numerical viewpoint (see [1, 3]). The resulting approximation \(\hat {f}_\Lambda \) to f is finally defined as

$$\displaystyle \begin{aligned} \hat{f}_\Lambda := \sum_{j \in \Lambda} (\hat{x}_\Lambda)_j \phi_j. \end{aligned}$$

In this setting, stable and robust recovery guarantees in high probability can be shown for the approximation errors \(\|f-f_\Lambda \|{ }_{L^2_\nu (D)}\) and \(\|f-f_\Lambda \|{ }_{L^\infty _\nu (D)}\) under a sufficient condition on the number of samples of the form \( m \gtrsim s^\gamma \cdot \operatorname {\mathrm {polylog}}(s,d), \) with γ = 2 or \(\gamma = \log (3)/\log (2)\) for tensorized Legendre or Chebyshev polynomials, respectively, hence lessening the curse of dimensionality to a substantial extent (see [3] and references therein). We also note in passing that decoders such as the weighted LASSO or the weighted square-root LASSO can be considered as alternatives to (3) for weighted 1 minimization (see [2]).

3 Weighted Orthogonal Matching Pursuit

In this paper, we consider greedy sparse recovery strategies to find sparse approximate solutions to (1), as alternatives to the WQCBP optimization program (3). With this aim, we propose a variation of the OMP algorithm to the weighted setting.

Before introducing weighted OMP (WOMP) in Algorithm 1, let us recall the rationale behind the greedy index selection rule of OMP (corresponding to Algorithm 1 with λ = 0 and w = 1). For a detailed introduction to OMP, we refer the reader to [7, Section 3.2]. Given a support set S ⊆ [N], OMP solves the least-squares problem

$$\displaystyle \begin{aligned} \min_{z \in \mathbb{C}^N} G_0(z) \text{ s.t. } \operatorname{\mathrm{supp}}(z) \subseteq S, \end{aligned}$$

where \(G_0(z) := \|y-Az\|{ }_2^2\). In OMP, the support S is iteratively enlarged by one index at the time. Namely, we consider the update S ∪{j}, where the index j ∈ [N] is selected in a greedy fashion. In particular, assuming that A has 2-normalized columns, it is possible to show that (see [7, Lemma 3.3])

$$\displaystyle \begin{aligned} \min_{t \in \mathbb{C}} G_0(x + t e_j) = G_0(x) - |(A^*(y-Ax))_j|{}^2. \end{aligned} $$
(5)

This leads to the greedy index selection rule operated by OMP, which prescribes the selection of an index j ∈ [N] that maximizes the quantity |(A (yAx))j|2. We will use this simple intuition to extend OMP to the weighted case by replacing the function G 0 with a suitable function G λ that takes into account the data-fidelity term and the weighted sparsity prior at the same time.

Let us recall that, given a set of weights \(w \in \mathbb {R}^N\) with w > 0, the weighted 0 norm of a vector \(z \in \mathbb {C}^N\) is defined as the quantity (see [14])Footnote 1

$$\displaystyle \begin{aligned} \|z\|{}_{0,w} := \sum_{j \in \operatorname{\mathrm{supp}}(z)} w_j^2. \end{aligned}$$

Notice that when w = 1, then ∥⋅∥0,w = ∥⋅∥0 is the standard 0 norm. Given λ ≥ 0, we define the function

$$\displaystyle \begin{aligned} G_\lambda(z) := \|y-Az\|{}_2^2 + \lambda \|z\|{}_{0,w}. \end{aligned} $$
(6)

The tradeoff between the data-fidelity constraint and the weighted sparsity prior is balanced via the choice of the regularization parameter λ. Applying the same rationale employed in OMP for the greedy index selection and replacing G 0 with G λ leads to Algorithm 1, which corresponds to OMP when λ = 0 and w = 1.

Algorithm 1 Weighted orthogonal matching pursuit (WOMP)

Inputs:

  • \(A\in \mathbb {C}^{m \times N}\): sampling matrix, with 2-normalized columns;

  • \(y \in \mathbb {C}^m\): vector of samples;

  • \(w \in \mathbb {R}^N\): weights;

  • λ ≥ 0: regularization parameter;

  • \(K \in \mathbb {N}\): number of iterations.

Procedure:

  1. 1.

    Let \(\hat {x}_0 = 0\) and S 0 = ∅;

  2. 2.

    For k = 1, …, K:

    1. a.

      Find \(\displaystyle j_k \in \arg \max _{j \in [N]} \varDelta _\lambda (x_{k-1},S_{k-1},j)\), with Δ λ as in (7);

    2. b.

      Define S k = S k−1 ∪{j k};

    3. c.

      Compute \(\displaystyle \hat {x}_{k} \in \arg \min _{v \in \mathbb {C}^{N}} \|A v - y\|{ }_2 \text{ s.t. } \operatorname {\mathrm {supp}}(v) \subseteq S_k\).

Output:

  • \(\hat {x}_K \in \mathbb {C}^N\): approximate solution to Az = y.

Remark 1

The 2-normalization of the columns of A is a necessary condition to apply Algorithm 1. If A does not satisfy this hypothesis, is suffices to apply WOMP to the normalized system \(\widetilde {A}z = y\), where \(\widetilde {A} = AM^{-1}\) and M is the matrix containing the 2 norms of the columns of A on the main diagonal and zeroes elsewhere. The approximate solution \(\hat {x}_K\) to \(\widetilde {A}z = y\) computed via WOMP is then rescaled as \(M \hat {x}_K\), which approximately solves Az = y.

The following proposition justifies the weighted variant of OMP considered in Algorithm 1. In order to minimize G λ as much as possible, at each iteration, WOMP selects the index j that maximizes the quantity Δ λ(x, S, j) defined in (7). The following proposition makes the role of the quantity Δ λ(x, S, j) transparent, generalizing relation (5) to the weighted case, under suitable conditions on A and x that are verified at each iteration of Algorithm 1.

Proposition 1

Let λ ≥ 0, S ⊆ [N], \(A \in \mathbb {C}^{m \times N}\) with ℓ 2 -normalized columns, and \(x \in \mathbb {C}^N\) satisfying

$$\displaystyle \begin{aligned} x \in \arg \min_{z \in \mathbb{C}^N} \|y-Az\|{}_2 \; \mathit{\text{ s.t. }} \operatorname{\mathrm{supp}}(z) \subseteq S. \end{aligned}$$

Then, for every j ∈ [N], the following holds:

$$\displaystyle \begin{aligned} \min_{t \in \mathbb{C}} G_\lambda(x+te_j) = G_\lambda(x) - \varDelta_\lambda(x,S,j), \end{aligned}$$

where G λ is defined as in (6), \(\varDelta _\lambda : \mathbb {C}^N \times 2^{[N]} \times [N] \to \mathbb {R}\) is defined by

$$\displaystyle \begin{aligned} \varDelta_\lambda(x,S,j) := \begin{cases} \max\left\{ |(A^*(y-Ax))_j|{}^2 - \lambda w_j^2, \; 0\right\} & \mathit{\text{if }} j \notin S \\ \max\left\{\lambda w_j^2 - |x_j|{}^2, \; 0\right\} & \mathit{\text{if }} j \in S \mathit{\text{ and }} x_j \neq 0\\ 0 & \mathit{\text{if }} j \in S \mathit{\text{ and }} x_j = 0. \end{cases} \end{aligned} $$
(7)

Proof

Throughout the proof, we will denote the residual as r:= y − Ax.

Let us first assume jS. In this case, we compute

$$\displaystyle \begin{aligned} G_\lambda(x+te_j) & = \|y-A(x+te_j)\|{}_2^2 + \lambda \|x+te_j\|{}_{0,w} \\ & = \|r\|{}_2^2 + \underbrace{|t|{}^2 - 2 \operatorname{\mathrm{Re}}(\bar{t}(A^*r)_j) + \lambda (1-\delta_{t,0}) w_j^2}_{=: h(t)}+ \lambda \|x\|{}_{0,w}, \end{aligned} $$

where δ x,y is the Kronecker delta function. In particular, we have

$$\displaystyle \begin{aligned} h(t) = \begin{cases} 0 & \text{if } t = 0\\ |t|{}^2 - 2 \operatorname{\mathrm{Re}}(\bar{t}(A^*r)_j) + \lambda w_j^2 &\text{if } t \in \mathbb{C} \setminus \{0\}. \end{cases} \end{aligned}$$

Now, if (A r)j = 0, then h(t) is minimized for t = 0 and \(\min _{t \in \mathbb {C}}G(x+te_j) = G(x)\). On the other hand, if (A r)j ≠ 0, by arguing similarly to [7, Lemma 3.3], we see that

$$\displaystyle \begin{aligned} \min_{t \in \mathbb{C} \setminus\{0\}} h(t) = -|(A^*r)_j|{}^2 + \lambda w_j^2, \end{aligned}$$

where the minimum is realized for some \(t \in \mathbb {C}\) with |t| = |(A r)j|≠ 0. In summary,

$$\displaystyle \begin{aligned} \min_{t \in \mathbb{C}} h(t) = \min\left\{-|(A^*r)_j|{}^2 + \lambda w_j^2, 0 \right\} = -\max\left\{|(A^*r)_j|{}^2 - \lambda w_j^2, 0\right\}, \end{aligned} $$

which concludes the case jS.

Now, assume j ∈ S. Since the vector \(x_S = x|{ }_{S}\in \mathbb {C}^{|S|}\) is a least-squares solution to A S z = y, it satisfies \(A_S^*(y-A_S x_S) = 0\) and, in particular, (A r)j = 0. (Here, \(A_S \in \mathbb {C}^{m \times |S|}\) denotes the submatrix of A corresponding to the columns in S). Therefore, arguing similarly as before, we have

$$\displaystyle \begin{aligned} G(x+te_j) = \|r\|{}_2^2 + \underbrace{|t|{}^2 + \lambda (1-\delta_{t,-x_j})w_j^2}_{=:\ell(t)} + \lambda \|x-x_je_j\|{}_{0,w}. \end{aligned}$$

Considering only the terms depending on t, it is not difficult to see that

$$\displaystyle \begin{aligned} \min_{t \in \mathbb{C}} \ell(t) = \min\{|x_j|{}^2,\lambda w_j^2\}. \end{aligned}$$

As a consequence, for every j ∈ S, we obtain

$$\displaystyle \begin{aligned} \min_{t \in \mathbb{C}} G(x+te_j) & = \|r\|{}_2^2 + \lambda \|x-x_je_j\|{}_{0,w} + \min\{|x_j|{}^2,\lambda w_j^2\}\\ & = G(x) + \min\{|x_j|{}^2,\lambda w_j^2\} - \lambda(1-\delta_{x_j,0})w_j^2. \end{aligned} $$

The results above combined with simple algebraic manipulations lead to the desired result. □

4 Numerical Results

In this section, we show the effectiveness of WOMP (Algorithm 1) in the sparse multivariate function approximation setting described in Sect. 2. In particular, we choose the weights w as in (4). We consider the function

$$\displaystyle \begin{aligned} f(t) = \ln\left(d+1+\sum_{k = 1}^d t_k\right), \quad \text{with } d = 10. \end{aligned} $$
(8)

We let \(\{\phi _j\}_{j \in \mathbb {N}_0^d}\) be the Legendre and Chebyshev bases and ν be the respective orthogonality measure. In Figs. 1 and 2 we show the relative \(L^2_\nu (D)\)-error of the approximate solution \(\hat {x}_K\) computed via WOMP as a function of iteration K, for different values of the regularization parameter λ in order to solve the linear system Az = y, where A and y are defined by (2) and where the 2-normalization of the columns of A is taken into account according to Remark 1. We consider λ = 0 (corresponding to OMP) and λ = 10k, with k = 3, 3.5, 4, 4.5, 5. Here, Λ is the hyperbolic cross of order s = 10, corresponding to N = | Λ| = 571. Moreover, we consider m = 60 and m = 80. The results are averaged over 25 runs and the \(L^2_\nu (D)\)-error is computed with respect to a reference solution approximated via least squares and using 20N = 11, 420 random i.i.d. samples according to ν. We compare the WOMP accuracy with the accuracy obtained via the QCBP program (3) with η = 0 and WQCBP with tolerance parameter η = 10−8. To solve these two programs we use CVX Version 1.2, a package for specifying and solving convex programs [8, 9]. In CVX, we use the solver ‘mosek’ and we set CVX precision to ‘high’.

Fig. 1
figure 1

Plot of the mean relative \(L^2_\nu (D)\)-error as a function of the number of iterations K of WOMP (Algorithm 1) for different values of the regularization parameter λ for the approximation of the function f defined in (8) and using Legendre polynomials. The accuracy of WOMP is compared with those of QCBP and WQCBP

Fig. 2
figure 2

The same experiment as in Fig. 1, with Chebyshev polynomials

Figures 1 and 2 show the benefits of using weights as compared to the unweighted OMP approach, when the parameter λ is tuned appropriately. A good choice of λ for the setting considered here seem to be between 10−4.5 and 10−3.5. We also observe that WOMP is able to reach similar level of accuracy as WQCBP. An interesting feature of WOMP with respect to OMP is its better stability. We observe than after the m-th iteration, the OMP accuracy starts getting substantially worse. This can be explained by the fact that when K approaches N, OMP tends to destroy sparsity by fitting the data too much. This phenomenon is not observed in WOMP, thanks to its ability to keep the support of \(\hat {x}_k\) small via the explicit enforcement of the weighted sparsity prior (see Fig. 3).

Fig. 3
figure 3

Plot of the support size of \(\hat {x}_K\) as a function of the number of iterations K for WOMP in the same setting as in Figs. 1 and 2, with Legendre (left) and Chebyshev (right) polynomials. The larger the regularization parameter λ, the sparser solution (in the left plot, the curves relative to λ = 10−4.5 and λ = 10−4 overlap. In the right plot, the same happens for λ = 10−4 and λ = 10−3.5)

We show the better computational efficiency of WOMP with respect to the convex minimization programs QCBP and WQCBP solved via CVX by tracking the runtimes for the different approaches. In Table 1 we show the running times for the different recovery strategies.

Table 1 Comparison of the computing times for WQCBP and K = 25 iterations of WOMP

The running times for WOMP are referred to K = 25 iterations, sufficient to reach the best accuracy for every value of λ as shown in Figs. 1 and 2. Moreover, the computational times for WOMP take into account the 2-normalization of the columns of A (see Remark 1). WOMP consistently outperforms convex minimization, being more than ten times faster in all cases. We note that in this comparison a key role is played by the parameter K or, equivalently, by the sparsity of the solution. Indeed, in this case, considering a larger value of K would result is a slower performance of WOMP, but it would not improve the accuracy of the WOMP solution (see Figs. 1 and 2).

5 Conclusions

We have considered a greedy recovery strategy for high-dimensional function approximation from a small set of pointwise samples. In particular, we have proposed a generalization of the OMP algorithm to the setting of weighted sparsity (Algorithm 1). The corresponding greedy selection strategy is derived in Proposition 1.

Numerical experiments show that WOMP is an effective strategy for high-dimensional approximation, able to reach the same accuracy level of WQCBP while being considerably faster when the target sparsity level is small enough. A key role is played by the regularization parameter λ, which may be difficult to tune due to its sensitivity to the parameters of the problem (m, s, and d), and on the polynomial basis employed. In other applications, where explicit formulas for the weights as (4) are not available, there might also be a nontrivial interplay between λ and w. In summary, despite the promising nature of the numerical experiments illustrated in this paper, a more extensive numerical investigation is needed in order to study the sensitivity of WOMP with respect to λ. Moreover, a theoretical analysis of the WOMP approach might highlight practical recipe for the choice of this parameter, similarly to [2]. This type of analysis may also help identifying the sparsity regime where WOMP outperforms weighted 1 minimization, which, in turn, could be formulated in terms of suitable assumptions on the regularity of f. These questions are beyond the scope of this paper and will be object of future work.