Group-Sparse Model Selection: Hardness and Relaxations

Luca Baldassarre, Nirav Bhan, Volkan Cevher, Anastasios Kyrillidis, Siddhartha Satpathi

I Introduction

Information in many natural and man-made signals can be exactly represented or well approximated by a sparse set of nonzero coefficients in an appropriate basis . Compressive sensing (CS) exploits this fact to recover signals from their compressive samples, which are dimensionality reducing, non-adaptive random measurements. According to the CS theory, the number of measurements for stable recovery is proportional to the signal sparsity, rather than to its Fourier bandwidth as dictated by the Shannon/Nyquist theorem . Unsurprisingly, the utility of sparse representations also goes well-beyond CS and permeates a lot of fundamental problems in signal processing, machine learning, and theoretical computer science.

Recent results in CS extend the simple sparsity idea to consider more sophisticated structured sparsity models, which describe the interdependency between the nonzero coefficients . There are several compelling reasons for such extensions: The structured sparsity models allow to significantly reduce the number of required measurements for perfect recovery in the noiseless case and be more stable in the presence of noise. Furthermore, they facilitate the interpretation of the signals in terms of the chosen structures, revealing information that could be used to better understand their properties.

An important class of structured sparsity models is based on groups of variables that should either be selected or discarded together . These structures naturally arise in applications such as neuroimaging , gene expression data , bioinformatics and computer vision . For example, in cancer research, the groups might represent genetic pathways that constitute cellular processes. Identifying which processes lead to the development of a tumor can allow biologists to directly target certain groups of genes instead of others . Incorrect identification of the active/inactive groups can thus have a rather dramatic effect on the speed at which cancer therapies are developed.

In this paper, we consider group-based sparsity models, denoted as G\mathfrak{G}. These structured sparsity models feature collections of groups of variables that could overlap arbitrarily, that is G={G1,…,GM}\mathfrak{G}=\{\mathcal{G}_{1},\ldots,\mathcal{G}_{M}\} where each Gj\mathcal{G}_{j} is a subset of the index set {1,…,N}\{1,\ldots,N\}, with NN being the dimensionality of the signal that we model. Arbitrary overlaps mean that we do not restrict the intersection between any two sets from G\mathfrak{G}.

where supp⁡(z)\operatorname{supp}({\bf z}) is the support of the vector z{\bf z}. We call such an approximation as G-group-sparse or in short group-sparse. The projection problem is a fundamental step in Model-based Iterative Hard-Thresholding algorithms for solving inverse problems by imposing group structures .

More importantly, we seek to also identify the G-group-support of the approximation x^\hat{{\bf x}}, that is the GG groups that constitute its support. We call this the group-sparse model selection problem. The G-group-support of x^\hat{{\bf x}} allows us to “interpret” the original signal and discover its properties so that we can, for example, target specific groups of genes instead of others or focus more precise imaging techniques on certain brain regions only . In this work, we study under which circumstances we can correctly and tractably identify the GG-group-support of the approximation of a given signal. In particular, we show that this problem is equivalent to an NP-hard combinatorial problem known as the weighted maximum coverage problem and we propose a novel polynomial time algorithm for finding its solutions for a certain class of group structures.

If the original signal is affected by noise, i.e., if instead of x{\bf x}, we measure z:=x+ε{\bf z}:={\bf x}+\boldsymbol{\varepsilon}, where ε\boldsymbol{\varepsilon} is some random noise, the GG-group support of z^\hat{\bf z} may not exactly correspond to the one of x^\hat{\bf x}. Although this is a paramount statistical issue, here we are solely concerned with the computational problem of finding the GG-group support of a given signal, irrespective of whether it is affected by noise or not, because any group-based interpretation would necessarily require such computation.

Previous work. Recent works in compressive sensing and machine learning with group sparsity have mainly focused on leveraging group structures for lowering the number of samples required for recovering signals . While these results have established the importance of group structures, many of these works have not fully addressed model selection.

For the special case of non-overlapping groups, dubbed the block-sparsity model, the problem of model selection does not present computational difficulties and features a well-understood theory . The first convex relaxations for group-sparse approximation considered only non-overlapping groups. Its extension to overlapping groups , however, selects supports defined as the complement of a union of groups (see also ), which is the opposite of what applications usually require, where groups of variables need to be selected together, instead of discarded.

For overlapping groups, Eldar et al. consider the union of subspaces framework and cast the model selection problem as a block-sparse model selection one by duplicating the variables that belong to overlaps between the groups. Their uniqueness condition [Prop. 1], however, is infeasible for any group structure with overlaps, because it requires that the subspaces intersect only at the origin, while two subspaces defined by two overlapping groups of variables intersect on a subspace of dimension equal to the number of elements in the overlap.

The recently proposed convex relaxations for group-sparse approximations select group-supports that consist of union of groups. However, the group-support recovery conditions in should be taken with care, because they are defined with respect to a particular subset of group-supports and are not general. As we numerically demonstrate in this paper, the group-supports recovered with these methods might be incorrect. Furthermore, the required consistency conditions in are unverifiable a priori. For instance, they require tuning parameters to be known beforehand to obtain the correct group-support.

Huang et al. use coding complexity schemes over sets to encode sparsity structures. They consider linear regression problems where the coding complexity of the support of the solution is constrained to be below a certain value. Inspired by Orthogonal Matching Pursuit, they then propose a greedy algorithm, named StructOMP, that leverages a block-based approximation to the coding complexity. A particular instance of coding schemes, namely graph sparsity, can be used to encode both group and hierarchical sparsity. Their method only returns an approximation to the original discrete problem, as we illustrate via some numerical experiments.

In this work, we take a completely discrete approach and do not rely on relaxations.

Contributions. This paper is an extended version of a prior submission to the IEEE International Symposium on Information Theory (ISIT), 2013. This version contains all the proofs that were previously omitted due to lack of space, refined explanations of the concepts, and provides the full description of the proposed dynamic programming algorithms.

In stark contrast to the existing literature, we take an explicitly discrete approach to identifying group-supports of signals given a budget constraint on the number of groups. This fresh perspective enables us to show that the group-sparse model selection problem is NP-hard: if we can solve the group model selection problem in general, then we can solve any weighted maximum coverage (WMC) problem instance in polynomial time. However, WMC is known to be NP-Hard . Given this connection, we can only hope to characterize a subset of instances which are tractable or find guaranteed and tractable approximations.

We present group structures that lead to computationally tractable problems via dynamic programming. We do so by leveraging a graph-based representation of the groups and exploiting properties of the induced graph. In particular, we present and describe a novel polynomial-time dynamic program that solves the WMC problem for a group structures whose induced graph is a tree or a forest. This result could indeed be of interest by itself.

We identify tractable discrete relaxations of the group-sparse model selection problem that lead to efficient algorithms. Specifically, we relax the constraint on the number of groups into a penalty term and show that if the remaining group constraints satisfy a property related to the concept of total unimodularity , then the relaxed problem can be efficiently solved using linear program solvers. Furthermore, if the graph induced by the group structure is a tree or a forest, we can solve the relaxed problem in linear time by the sum-product algorithm .

We extend the discrete model to incorporate an overall sparsity constraint and allowing to select individual elements from each group, leading to within-group sparsity. Furthermore, we discuss how this extension can be used to model hierarchical relationships between variables. We present a novel polynomial-time dynamic program that solves the hierarchical model selection problem exactly and discuss a tractable discrete relaxation.

We also interpret the implications of our results in the context of other group-based recovery frameworks. For instance, the convex approaches proposed in also relax the discrete constraint on the cardinality of the group support. However, they first need to decompose the approximation into vector atoms whose support consists only of one group and then penalize the norms of these atoms. It has been observed that these relaxations produce approximations that are group-sparse, but their group-support might include irrelevant groups. We concretely illustrate these cases via Pareto frontier examples on two different group structures.

Paper structure. The paper is organized as follows. In Section 2, we present definitions of group-sparsity and related concepts, while in Section III, we formally define the approximation and model-selection problems and connect them to the WMC problem. We present and analyze discrete relaxations of the WMC in Section IV and consider convex relaxations in Section V. In Section VI, we illustrate via a simple example the differences between the original problem and the relaxations. The generalized model is introduced and analyzed in Section VII, while numerical simulations are presented in Section VIII. We conclude the paper with some remarks in Section IX. The appendices contain the detailed descriptions of the dynamic programs.

II Basic Definitions

We start with the definition of totally unimodularity, a property of matrices that will turn out to be key for obtaining efficient relaxations of integer linear programs.

A totally unimodular matrix (TU matrix) is a matrix for which every square non-singular submatrix has determinant equal to −1-1 or 11.

We now define the main building block of group sparse model selection, the group structure.

A group structure G={G1,…,GM}\mathfrak{G}=\{\mathcal{G}_{1},\ldots,\mathcal{G}_{M}\} is a collection of index sets, named groups, with Gj⊆N\mathcal{G}_{j}\subseteq\mathcal{N} and ∣Gj∣=gj|\mathcal{G}_{j}|=g_{j} for 1≤j≤M1\leq j\leq M and ⋃G∈GG=N\bigcup_{\mathcal{G}\in\mathfrak{G}}\mathcal{G}=\mathcal{N}.

Another useful representation of a group structure is via an intersection graph (V,E)(\mathcal{V},\mathcal{E}) where the nodes V\mathcal{V} are the groups G∈G\mathcal{G}\in\mathfrak{G} and the edge set E\mathcal{E} contains eije_{ij} if Gi∩Gj≠∅\mathcal{G}_{i}\cap\mathcal{G}_{j}\neq\emptyset, that is an edge connects two groups that overlap. A sequence of connected nodes v1,v2,…,vnv_{1},v_{2},\ldots,v_{n}, is a cycle if v1=vnv_{1}=v_{n}.

In order to illustrate these concepts, consider the group structure G1\mathfrak{G}^{1} defined by the following groups, G1={1}\mathcal{G}_{1}=\{1\}, G2={2}\mathcal{G}_{2}=\{2\}, G3={1,2,3,4,5}\mathcal{G}_{3}=\{1,2,3,4,5\}, G4={4,6}\mathcal{G}_{4}=\{4,6\}, G5={3,5,7}\mathcal{G}_{5}=\{3,5,7\} and G6={6,7,8}\mathcal{G}_{6}=\{6,7,8\}. G1\mathfrak{G}^{1} can be represented by the variables-groups bipartite graph of Fig. 1 or by the intersection graph of Fig. 2, which is bipartite and contains cycles.

An important class of group structures is given by groups whose intersection graph is acyclic (i.e., a tree or a forest) and we call them acyclic group structures. A necessary, but not sufficient, condition for a group structure to have an acyclic intersection graph is that each element of the ground set occurs in at most two groups, i.e., the groups are at most pairwise overlapping. Note that a tree or a forest is a bipartite graph, where the two partitions contains the nodes that belong to alternate levels of the tree/forest. For example, consider G1={1,2,3}\mathcal{G}_{1}=\{1,2,3\}, G2={3,4,5}\mathcal{G}_{2}=\{3,4,5\}, G3={5,6,7}\mathcal{G}_{3}=\{5,6,7\}, which can be represented by the intersection graph in Fig. 3(Left). If G3\mathcal{G}_{3} were to include an element from G1\mathcal{G}_{1}, for example {2}\{2\}, we would have the cyclic graph of Fig. 3(Right). Note that G1\mathfrak{G}^{1} is pairwise overlapping, but not acyclic, since G3,G4,G5\mathcal{G}_{3},\mathcal{G}_{4},\mathcal{G}_{5} and G6\mathcal{G}_{6} form a cycle.

We anchor our analysis of the tractability of interpretability via selection of groups on covering arguments. Most of the definition we introduce here can be reformulated as variants of set covers on the support of a signal x{\mathbf{x}}, however we believe it is more natural in this context to talk about group covers of a signal x{\mathbf{x}} directly.

The binary vector ω\boldsymbol{\omega} indicates which groups are active and the constraint AGω≥ι(x)\mathbf{A}^{\mathfrak{G}}\boldsymbol{\omega}\geq\iota({\bf x}) makes sure that, for every non-zero component of x{\bf x}, there is at least one active group that covers it. We also say that S(x)\mathcal{S}({\bf x}) covers x{\bf x}. Note that the group cover is often not unique and S(x)=G\mathcal{S}({\bf x})=\mathfrak{G} is a group cover for any signal x{\bf x}. This observation leads us to consider more restrictive definitions of group covers.

A GG-group cover SG(x)⊆G\mathcal{S}^{G}({\bf x})\subseteq\mathfrak{G} is a group cover for x{\bf x} with at most GG elements,

It is not guaranteed that a GG-group cover always exists for any value of GG. Finding the smallest GG-group cover lead to the following definitions.

A signal x{\bf x} is GG-group sparse with respect to a group structure G\mathfrak{G} if ∥x∥G,0≤G\|{\bf x}\|_{\mathfrak{G},0}\leq G.

In other words, a signal is GG-group sparse if its support is contained in the union of at most GG groups from G\mathfrak{G}.

III Tractability of interpretations

Although real signals may not be exactly group-sparse, it is possible to give a group-based interpretation by finding a group-sparse approximation and identifying the groups that constitute its support. In this section, we establish the hardness of finding group-based interpretations of signals in general and characterize a class of group structures that lead to tractable interpretations. In particular, we present a polynomial time algorithm that finds the correct GG-group-support of the GG-group-sparse approximation of x{\bf x}, given a positive integer GG and the group structure G\mathfrak{G}.

We first define the GG-group sparse approximation x^\hat{{\bf x}} and then show that it can be easily obtained from its GG-group cover SG(x^)\mathcal{S}^{G}(\hat{\bf x}), which is the solution of the model selection problem. We then reformulate the model selection problem as the weighted maximum coverage problem. Finally, we present our main result, the polynomial time dynamic program for acyclic group structures.

If we already know the GG-group cover of the approximation SG(x^)\mathcal{S}^{G}(\hat{\bf x}), we can obtain x^\hat{\bf x} as x^I=xI\hat{\bf x}_{\mathcal{I}}={\bf x}_{\mathcal{I}} and x^Ic=0\hat{\bf x}_{\mathcal{I}^{c}}=0, where I=⋃G∈SG(x^)G\mathcal{I}=\bigcup_{\mathcal{G}\in\mathcal{S}^{G}(\hat{\bf x})}\mathcal{G} and Ic=N∖I\mathcal{I}^{c}=\mathcal{N}\setminus\mathcal{I}. Therefore, we can solve Problem 1 by solving the following discrete problem.

To show the connection between the two problems, we first reformulate Problem 1 as

The optimal solution is not changed if we introduce a constant, change sign of the objective and consider maximization instead of minimization

The internal maximization is achieved for x^\hat{\bf x} as x^I=xI\hat{\bf x}_{\mathcal{I}}={\bf x}_{\mathcal{I}} and x^Ic=0\hat{\bf x}_{\mathcal{I}^{c}}=0, so that we have, as desired,

The following reformulation of Problem 2 as a binary problem allows us to characterize its tractability.

The proof follows along the same lines as the proof in . Note that in (4), ω\boldsymbol{\omega} and y\bf y are binary variables that specify which groups and which variables are selected, respectively. The constraint AGω≥y\mathbf{A}^{\mathfrak{G}}\boldsymbol{\omega}\geq{\bf y} makes sure that for every selected variable at least one group is selected to cover it, while the constraint ∑j=1Mωj≤G\sum_{j=1}^{M}\omega_{j}\leq G restricts choosing at most GG groups. ∎

Problem (4) can produce all the instances of the weighted maximum coverage problem (WMC), where the weights for each element are given by xi2x_{i}^{2} (1≤i≤N1\leq i\leq N) and the index sets are given by the groups Gj∈G\mathcal{G}_{j}\in\mathfrak{G} (1≤j≤M1\leq j\leq M). Since WMC is in general NP-hard and given Lemma 1, the tractability of (3) directly depends on the hardness of (4), which leads to the following result.

The model selection problem (3) is in general NP-hard.

It is possible to approximate the solution of (4) using the greedy WMC algorithm . At each iteration, the algorithm selects the group that covers new variables with maximum combined weight until GG groups have been selected. However, we show next that for certain group structures we can find an exact solution.

Our main result is an algorithm for solving (4) for acyclic group structures. The proof is given in Appendix A.

Given an acyclic group structure G\mathfrak{G}, there exists a polynomial time dynamic programming algorithm that solves (4).

Sets that are included in one another can be excluded because choosing the larger set would be a strictly dominant strategy, making the smaller set redundant. However, the correctness of the dynamic program is unaffected even if such sets are present, as long as the intersection graph remains acyclic.

It is also possible to consider the case where each group Gi\mathcal{G}_{i} has a cost CiC_{i} and we are given a maximum group cost budget CC. The problem then becomes the Budgeted Maximum Coverage . However, this problem is NP-hard, even in the non-overlapping case, because it generalizes the knapsack problem. However, similarly to the pseudo-polynomial time algorithm for knapsack , we can easily devise a pseudo-polynomial time algorithm for the weighted group sparse problem, even for acyclic overlaps. The only condition is that the costs must be integers. The time complexity of the resulting algorithm is then polynomial in CC, the maximum group cost budget. The algorithm is almost the same as the one given in Appendix A: instead of keeping track of selecting gg groups, where gg varies from 11 to GG; we keep track of selecting groups with total weight equal to cc, where cc varies from 11 to CC.

IV Discrete relaxations

Relaxations are useful techniques that allow to obtain approximate, or even sometimes exact, solutions while being computationally less demanding. In our case, we relax the constraint on the number of groups in (4) into a regularization term with parameter λ>0\lambda>0, which amounts to paying a penalty of λ\lambda for each selected group. We then obtain the following binary linear program

In general, (6) is NP-hard, however, it is well known that if the constraint matrix C\mathbf{C} is Totally Unimodular (TU), then it can be solved in polynomial-time. While the concatenation of two TU matrices is not TU in general, the concatenation of the identity matrix with a TU matrix results in a TU matrix. Thus, due to its structure, C\mathbf{C} is TU if and only if AG\mathbf{A}^{\mathfrak{G}} is TU [28, Proposition 2.1].

The next lemma characterizes which group structures lead to totally unimodular constraints.

Group structures whose intersection graph is bipartite lead to constraint matrices AG\mathbf{A}^{\mathfrak{G}} that are TU.

We first use a result that establishes that if a matrix is TU, then its transpose is also TU [28, Proposition 2.1]. We then apply [28, Corollary 2.8] to AG\mathbf{A}^{\mathfrak{G}}, swapping the roles of rows and columns. Given a {0,1,−1}\{0,1,-1\} matrix whose columns can be partitioned into two sets, S1\mathcal{S}_{1} and S2\mathcal{S}_{2}, and with no more than two nonzero elements in each row, this corollary provides two sufficient conditions for it being totally unimodular:

If two nonzero entries in a row have the same sign, then the column of one is in S1\mathcal{S}_{1} and the other is in S2\mathcal{S}_{2}.

If two nonzero entries in a row have opposite signs, then their columns are both in S1\mathcal{S}_{1} or both in S2\mathcal{S}_{2}.

In our case, the columns of AG\mathbf{A}^{\mathfrak{G}}, which represent groups, can be partitioned in two sets, S1\mathcal{S}_{1} and S2\mathcal{S}_{2} because the intersection graph is bipartite. The two sets represents groups which have no common overlap so that each row of AG\mathbf{A}^{\mathfrak{G}} contains at most two nonzero entries, one in each set. Furthermore, the entries in AG\mathbf{A}^{\mathfrak{G}} are only or 11, so that condition 1) is satisfied and condition 2) does not apply. ∎

Acyclic group structures lead to totally unimodular constraints.

Acyclic group structures have an intersection graph which is a tree or a forest, which is bipartite. ∎

The worst case complexity for solving the linear program (6), via a primal-dual method , is O(N2(N+M)1.5)\mathcal{O}(N^{2}(N+M)^{1.5}), which is greater than the complexity of the dynamic program of Theorem 1. However, in practice, using an off-the-shelf LP solver may still be faster, because the empirical performance is usually much better than the worst case complexity.

Another way of solving the linear program for acyclic group structures is to reformulate it as an energy maximization problem over a tree, or forest. In particular, let ψi=∥xGi∥22\psi_{i}=\|{\mathbf{x}}_{\mathcal{G}_{i}}\|_{2}^{2} be the energy captured by group Gi\mathcal{G}_{i} and ψij=∥xGi∩Gj∥22\psi_{ij}=\|{\mathbf{x}}_{\mathcal{G}_{i}\cap\mathcal{G}_{j}}\|_{2}^{2} the energy that is double counted if both Gi\mathcal{G}_{i} and Gj\mathcal{G}_{j} are selected, which then needs to be subtracted from the total energy. Problem (5) can then be formulated as

This problem is equivalent to finding the most probable state of the binary variables ωi\omega_{i}, where their probabilities can be factored into node and edge potentials. These potentials can be computed in O(N)\mathcal{O}(N) time via a single sweep over the elements, then the most probable state can be exactly estimated by the max-sum algorithm in only O(M)\mathcal{O}(M) operations, by sending messages from the leaves to the root and then propagating other message from the root back to the leaves .

The next lemma establishes when the regularized solution coincides with the solution of (4).

If the value of the regularization parameter λ\lambda is such that the solution (ωλ,yλ)(\boldsymbol{\omega}^{\lambda},{\bf y}^{\lambda}) of (5) satisfies ∑jωjλ=G\sum_{j}\omega_{j}^{\lambda}=G, then (ωλ,yλ)(\boldsymbol{\omega}^{\lambda},{\bf y}^{\lambda}) is also a solution for (4).

This lemma is a direct consequence of Prop. 3 below. ∎

However, as we numerically show in Section VIII, given a value of GG it is not always possible to find a value of λ\lambda such that the solution of (5) is also a solution for (4). Let the set of points P={G,(f(G))}G=1M\mathcal{P}=\{G,(f(G))\}_{G=1}^{M}, where f(G)=∑i=1NyiGxi2f(G)=\sum_{i=1}^{N}y^{G}_{i}x_{i}^{2}, be the Pareto frontier of (4). We then have the following characterization of the solutions of the discrete relaxation.

The discrete relaxation (5) yields only the solutions that lie on the intersection between the Pareto frontier of (4), P,\mathcal{P}, and the boundary of the convex hull of P\mathcal{P}.

The scalarization of (7) yields the following discrete problem, with λ>0\lambda>0

whose solutions are the same as for (5). Therefore, the relationship between the solutions of (4) and (5) can be inferred by the relationship between the solutions of (7) and (8). It is known that the solutions of (8) are also Pareto optimal solutions of (7), but only the Pareto optimal solutions of (7) that admit a supporting hyperplane for the feasible objective values of (7) are also solutions of (8) [35, Section 4.7]. In other words, the solutions obtainable via scalarization belong to the intersection of the Pareto optimal solution set and the boundary of its convex hull. ∎

V Convex relaxations

One can in general use (9) to find a group-sparse approximation under the chosen group norm

VI Case study: discrete vs. convex interpretability

The following stylized example illustrates situations that can potentially be encountered in practice. In these cases, the group-support obtained by the convex relaxation will not coincide with the discrete definition of group-cover, while the dynamical programming algorithm of Theorem 1 is able to recover the correct group-cover.

Let N={1,…,11}\mathcal{N}=\{1,\ldots,11\} and let G={G1={1,…,5}, G2={4,…,8}, G3={7,…,11}}\mathfrak{G}=\{\mathcal{G}_{1}=\{1,\ldots,5\},~{}\mathcal{G}_{2}=\{4,\ldots,8\},~{}\mathcal{G}_{3}=\{7,\ldots,11\}\} be the acyclic group structure structure with 33 groups of equal cardinality. Its intersection graph is represented in Fig. 4. Consider the 22-group sparse signal x=[0 0 1 1 1 0 1 1 1 0 0]⊤{\bf x}=[0~{}0~{}1~{}1~{}1~{}0~{}1~{}1~{}1~{}0~{}0]^{\top}, with minimal group-cover M(x)={G1,G3}\mathcal{M}({\bf x})=\{\mathcal{G}_{1},\mathcal{G}_{3}\}.

The dynamic program of Theorem 1, with group budget G=2G=2, correctly identifies the groups G1\mathcal{G}_{1} and G3\mathcal{G}_{3}. The TU linear program (5), with 0<λ≤20<\lambda\leq 2, also yields the correct group-cover. Conversely, the decomposition obtained via (9) with unitary weights is unique, but is not group sparse. In fact, we have S(x)=S˘(x)=G\mathcal{S}({\bf x})=\breve{\mathcal{S}}({\bf x})=\mathfrak{G}. We can only obtain the correct group-cover if we use the weights [1 d 1][1~{}d~{}1] with d>23d>\frac{2}{\sqrt{3}}, that is knowing beforehand that G2\mathcal{G}_{2} is irrelevant.

This is an example where the correct minimal group-cover exists, but cannot be directly found by the Latent Group Lasso approach. There may also be cases where the minimal group-cover is not unique. We leave to future work, to investigate which of these minimal covers are obtained by the proposed dynamic program and characterize the behavior of relaxations.

VII Generalizations

In this section, we first present a generalization of the discrete approximation problem (4) by introducing an additional overall sparsity constraint. Secondly, we show how this generalization encompasses approximation with hierarchical constraints that can be solved exactly via dynamic programming. Finally, we show that the generalized problem can be relaxed into a linear binary problem and that hierarchical constraints lead to totally unimodular matrices for which there exists efficient polynomial time solvers.

In many applications, for example genome-wide association studies , it is desirable to find approximations that are not only group-sparse, but also sparse in the usual sense (see for an extension of the group lasso). To this end, we generalize our original problem (4) by introducing a sparsity constraint KK and allowing to individually select variables within a group. The generalized integer problem then becomes

The problem described above is a generalization of the well-known Weighted Maximum Coverage (WMC) problem. The latter does not have a constraint on the number of indices chosen, so we can simulate it by setting K=NK=N. WMC is also well-known to be NP-hard, so that our present problem is also NP-hard, but it turns out that it can be solved in polynomial time for the same group structures that allow to solve (4).

Given an acyclic groups structure G\mathfrak{G}, there exists a dynamic programming algorithm that solves (11) with complexity O(M2GK2)\mathcal{O}(M^{2}GK^{2}).

The dynamic program is described in Appendix A alongside the proof that it has a polynomial running time. ∎

VII-B Hierarchical constraints

The generalized model allows to deal with hierarchical structures, such as regular trees, frequently encountered in image processing (e.g. denoising using wavelet trees). In such cases, we often require to find KK-sparse approximations such that the selected variables form a rooted connected subtree of the original tree, see Fig. 5. Given a tree T\mathcal{T}, the rooted-connected approximation can be cast as the solution of the following discrete problem

where TK\mathcal{T}_{K} denotes all rooted and connected subtrees of the given tree T\mathcal{T} with at most KK nodes.

This type of constraint can be represented by a group structure, where for each node in the tree we define a group consisting of that node and all its ancestors. When a group is selected, we require that all its elements are selected as well. We impose an overall sparsity constraint KK, while discarding the group constraint GG.

For this particular problem, for which relaxed and greedy approximations have been proposed , in Appendix B, we present a dynamic program that runs in polynomial time.

The time complexity of our dynamic program on a general tree is O(NK2D)\mathcal{O}(NK^{2}D), where DD is the maximum number of children that a node in the tree can have.

While preparing the final version of this manuscript, independently proposed a similar dynamic program for tree projections on DD-regular trees with time complexity O(NKD)\mathcal{O}(NKD). Following their approach, we improved the time complexity of our algorithm to O(NKD)\mathcal{O}(NKD) for DD-regular trees. We also prove that its memory complexity is O(Nlog⁡DK)\mathcal{O}(N\log_{D}K). A computational comparison of the two methods, both implemented in Matlab, is provided in Section VIII, showing that our dynamic program can be up to 60×60\times faster, despite having similar worst-case time complexity.

The time complexity of our dynamic program on DD-regular trees is O(NK2D)\mathcal{O}(NK^{2}D).

The space complexity of our dynamic program on DD-regular trees is O(Nlog⁡DK)\mathcal{O}(N\log_{D}K).

The description of the algorithm and the proof of its complexity, for both general and DD-regular trees, can be found in Appendix B.

VII-C Additional discrete relaxations

By relaxing both the group budget and the sparsity budget in (11) into regularization terms, we obtain the following binary linear program

where w⊤=[x12,…,xN2,−λG1M⊤,−λK1N⊤]\mathbf{w}^{\top}=[x_{1}^{2},\ldots,x_{N}^{2},-\lambda_{G}\mathbf{1}_{M}^{\top},-\lambda_{K}\mathbf{1}_{N}^{\top}] and C=[IN, −AG, 0N]\mathbf{C}=[\mathbf{I}_{N},~{}-\mathbf{A}^{\mathfrak{G}},~{}\mathbf{0}_{N}] and λG,λK>0\lambda_{G},\lambda_{K}>0 are two regularization parameters that indirectly control the number of active groups and the number of selected elements. (13) can be solved in polynomial time if the constraint matrix C\mathbf{C} is totally unimodular. Due to its structure, by Proposition 2.1 in and that concatenating a matrix of zeros to a TU matrix preserves total unimodularity, C\mathbf{C} is totally unimodular if and only if AG\mathbf{A}^{\mathfrak{G}} is totally unimodular. The next results proves that the constraint matrix of hierarchical group structures is totally unimodular.

Hierarchical group structures lead to totally unimodular constraints.

We use the fact that a binary matrix is totally unimodular if there exists a permutation of its columns such that in each row the 11s appear consecutively, which is a combination of Corollary 2.10 and Proposition 2.1 in . For hierarchical group structures, such permutation is given by a depth-first ordering of the groups. In fact, a variable is included in the group that has it as the leaf and in all the groups that contain its descendants. Given a depth-first ordering of the groups, the groups that contain the descendants of a given node will be consecutive. ∎

The regularized hierarchical approximation problem, in particular

for λ≥0\lambda\geq 0, has already been addressed by Donoho as the “complexity penalized residual sum-of-squares” and linked to the CART algorithm, which can found a solution in O(N)\mathcal{O}(N) time. The condensing sort and select algorithm (CSSA) , with complexity O(Nlog⁡N)\mathcal{O}(N\log N), solves the problem where the indicator variable y\mathbf{y} is relaxed to be continuous in $andconstrainsand constrains\|\mathbf{y}\|_{1}tobesmallerthanagiventhresholdto be smaller than a given threshold\gamma,yieldingrootedconnectedapproximationsthatmighthavemorethan, yielding rooted connected approximations that might have more thanK$ elements.

VIII Pareto Frontier Examples

The purpose of these numerical simulations is to illustrate the limitations of relaxations and of greedy approaches for correctly estimating the GG-group cover of an approximation.

We consider the problem of finding a GG-group sparse approximation of the wavelet coefficients of a given image, in our case a view of the Earth from space, see left inset in Fig. 6. We consider a group structure defined over the 2D wavelet tree. The wavelet coefficients of a 2D image can naturally be organized on three regular quad-trees, corresponding to a multi-scale analysis with wavelets oriented vertically, horizontally and diagonally respectively . We define groups consisting of a node and its four children, therefore each group has 55 elements, apart from the topmost group that contains the scaled DC term and the first nodes of each of the three quad-trees. These groups overlap only pairwisely and their intersection graph is a tree itself, therefore leading to a totally unimodular constraint matrix. An example is given in the right inset in Fig. 7. For computational reasons, we resize the image to 16×1616\times 16 pixels and compute its Daubechies-4 wavelet coefficients. At this size, there are 6464 groups, but actually 5252 are sufficient to cover all the variables, since it is possible to discard the penultimate layer of groups while still covering the entire ground set.

Figures 6 and 7 show the Pareto frontier of the approximation error ∥x−x^∥22\|{\bf x}-\hat{\bf x}\|_{2}^{2} with respect to the group sparsity GG for the proposed dynamic program. We also report the approximation error for the solutions obtained via the totally unimodular linear relaxation (TU-relax) (6) and the latent group lasso formulation (Latent GL) (10) with p=2p=2, which we solved with the method proposed in . Fig. 7 shows the performance of StructOMP using the same group structure and of the greedy algorithm for solving the corresponding weighted maximum coverage problem.

We observe that there are points in the Pareto frontier of the dynamic program, for G=5,10,30,31,50G=5,10,30,31,50, that are not achievable by the TU relaxation, since they do not belong to its convex hull. Furthermore, the latent group lasso approach often does not yield the optimal selection of groups, leading to a greater approximation error for the same number of active groups and it needs to select all 6464 groups in order to achieve zero approximation error. It is interesting to notice that the greedy algorithm outperforms StructOMP (see inset of Fig. 7), but still does not achieve the optimal solutions of the dynamic program. Furthermore, StructOMP needs to select all 6464 groups for obtaining zero approximation error, while the greedy algorithm can do with one less, namely 6363.

VIII-B Hierarchical constraints

We now consider the problem of finding a KK-sparse approximation of a signal imposing hierarchical constraints. We generate a piecewise constant signal of length N=64N=64, to which we apply the Haar wavelet transformation, yielding a 2525-sparse vector of coefficients x{\bf x} that satisfies hierarchical constraints on a binary tree of depth 55, see Fig. 8(Left).

We compare the proposed dynamic program (DP) to the regularized totally unimodular linear program approach, two convex relaxations that use group-based norms and the StructOMP greedy approach . The first convex relaxation uses the Latent Group Lasso norm (9) with p=2p=2 as a penalty and with groups defined as all parent-child pairs in the tree. We call this approach Parent-Child. This formulation will not enforce all hierarchical constraints to be satisfied, but will only ‘favor’ them. Therefore, we also report the number of hierarchical constraint violations. The second convex relaxation considers a hierarchy of groups where Gj\mathcal{G}_{j} contains node jj and all its descendants. Hierarchical constraints are enforced by the group lasso penalty ΩGL(x)=∑G∈G∥xG∥p\Omega_{GL}({\bf x})=\sum_{\mathcal{G}\in\mathfrak{G}}\|{\bf x}_{\mathcal{G}}\|_{p}, where xG{\bf x}_{\mathcal{G}} is the restriction of x{\bf x} to G\mathcal{G}, and we assess p=2p=2 and p=∞p=\infty. We call this method Hierarchical Group Lasso. As shown in , solving min⁡x∥y−x∥22+λΩGL(x)\min_{\mathbf{x}}\|\mathbf{y}-{\mathbf{x}}\|_{2}^{2}+\lambda\Omega_{GL}({\mathbf{x}}), for p=∞p=\infty, is actually equivalent to solving the totally unimodular relaxation with the same regularization parameter. Once we determine the support of the solution, we assign to the components in the support the values of the corresponding components of the original signal. Finally, for the StructOMPWe used the code provided at http://ranger.uta.edu/~huang/R_StructuredSparsity.htm method, we define a block for each node in the tree. The block contains that node and all its ancestors up to the root. By finely varying the regularization parameters for these methods, we obtain solutions with different levels of sparsity.

In Figures 8(Right), we show the approximation error ∥x−x^∥22\|{\bf x}-\hat{\bf x}\|_{2}^{2} as a function of the solution sparsity KK for the methods. The values of the DP solutions form the discrete Pareto frontier of the optimization problem controlled by the parameter KK. Note that there are points in the Pareto frontier that do not lie on its convex hull, hence these solutions are not achievable by the TU linear relaxation. As expected, the Hierarchical Group LassoWe used the code provided at http://spams-devel.gforge.inria.fr/. with p=∞p=\infty obtains the same solutions as the TU linear relaxation, while with p=2p=2 it also misses the solutions for K=21K=21 and K=23K=23. The Parent-ChildWe used the algorithm proposed in . approach achieves more levels of sparsity (but still missing the solutions for K=2,13K=2,13 and 1515), although at the price of violating some of the hierarchical constraints, i.e., we count one violation when one node is selected but not its parent. The StructOMP approach yields only few of the solutions on the Pareto frontier, but without violating any constraints. These observations lead us to conclude that, in some cases, relaxations of the original discrete problem or other greedy approaches might not be able to find the correct group-based interpretation of a signal.

In Fig. 9, we report a computational comparison between our dynamic program and the one independently proposed by Cartis and Thompson . We consider the problem of finding the K=200K=200 sparse rooted connected tree approximation on a binary tree of a signal of length 2L2^{L}, with L=9,…,18L=9,\ldots,18, whose components are randomly and uniformly drawn from $.Despitethetwoalgorithmshavethesamecomputationalcomplexity,. Despite the two algorithms have the same computational complexity,\mathcal{O}(NKD)andarebothimplementedinMatlab,ourdynamicprogramisbetweenand are both implemented in Matlab, our dynamic program is between20andand60$ times faster.

IX Conclusions

Many applications benefit from group sparse representations. Unfortunately, our main result in this paper shows that finding a group-based interpretation of a signal is an integer optimization problem, which is in general NP-hard. To this end, we characterize group structures for which a dynamical programming algorithm can find a solution in polynomial time and also delineate discrete relaxations for special structures (i.e., totally unimodular constraints) that can obtain correct solutions.

Our examples and numerical simulations show the deficiencies of relaxations, both convex and discrete, and of greedy approaches. We observe that relaxations only recover group-covers that lie in the convex hull of the Pareto frontier determined by the solutions of the original integer problem for different values of the group budget GG (and sparsity budget KK for the generalized model). This, in turn, implies that convex and non-convex relaxations might miss some important groups or include spurious ones in the group-sparse model selection. We summarize our findings in Fig. 10.

There remain several interesting open questions which beg for answers. Firstly, there still lacks an intuitive understanding of under which circumstances the relaxations are able to yield the correct solutions. Secondly, our analysis implicitly assumes an orthogonal basis for the description of signals. In many machine learning and compressive sensing applications however, the structures in signals emerge only after representing them onto an overcomplete basis, e.g. shearlets or sparse coding techniques. Therefore, it would be interesting to explore to which extent our results can be generalized to the overcomplete setting.

Appendix A Dynamical programming for solving (11) for loopless pairwise overlapping groups

Here, we give the proof of Theorem 2. The proof of Theorem 1 follows along similar lines. We start by giving an intuitive understanding of the algorithm, followed by a formal description and proofs of correctness and complexity, both in time and space.

Problem (11) can be equivalently described by the following problem:

In this form, the problem described above is a generalization of the well-known Weighted Maximum Coverage (WMC) problem, which is NP-hard. In fact WMC is just a special case of SGSP with K=NK=N. Although this makes it intractable in general, we show that this problem has some interesting structure. This structure allows us to build a dynamic program which can obtain the exact solution in polynomial time, for certain special classes of groups. We believe that this algorithm may be of independent interest outside the information theory community.

A-A An intuitive take on the Dynamic Programming Approach

We first present an informal account of the ideas behind our method. The basic idea we use is dynamic programming, i.e., we build the solution to the global optimization problem from solutions to subproblems. In our case, the subproblems correspond to looking at a subset of the group structure, and solving the optimization problem for this case. What we could do is to start from a single group and keep adding more groups one at a time, updating the optimal solution at each step. One may naïvely hope that such an approach would lead to the global solution. Unfortunately, this basic intuitive approach fails, as we illustrate next through some examples.

Example-1: Consider the case of N=5N=5, with the weights being the vector $.Forthesakeofillustration,letthegroupstructurebe. For the sake of illustration, let the group structure be\mathfrak{G}=\{\mathcal{G}_{1},\mathcal{G}_{2}\},where, where\mathcal{G}_{1}=\{1,2\},\mathcal{G}_{2}=\{2,3,4\}$. We wish to find the optimal solutions for the cases:

The optimal solutions can be found simply by observation.

The optimal solution for K=2,G=1K=2,G=1, has weight 1515, and involves selecting group G2\mathcal{G}_{2}, and elements {2,4}\{2,4\}.

The optimal solution for K=3,G=2K=3,G=2, has weight 2020, and involves selecting both groups and elements {1,2,4}\{1,2,4\}.

Example-2: Consider the case of N=5N=5, with the weights being the vector $.Letthesetofgroupsbe. Let the set of groups be\mathfrak{G}=\{\mathcal{G}_{1},\mathcal{G}_{2},\mathcal{G}_{3}\},where, where\mathcal{G}_{1}=\{1,2\},,\mathcal{G}_{2}=\{2,3,4\},,\mathcal{G}_{3}=\{4,5\}.Wewishtofindtheoptimalsolutionforthecase:. We wish to find the optimal solution for the case:K=4,G=2.Onceagain,wecanseethattheoptimalsolutioninvolvesselectinggroups. Once again, we can see that the optimal solution involves selecting groups\mathcal{G}_{1}andand\mathcal{G}_{3},andelements, and elements\{1,2,4,5\},foratotalvalueof, for a total value of26$.

In the examples described above, the set of elements and their weights are the same. However, in the first example, any optimal solution for any meaningful values of the parameters G and K, involves G2\mathcal{G}_{2}. Yet, in the second example, we have a situation where the optimal selection does not involve G2\mathcal{G}_{2}, see Figure 11

A-A2 Boundary-cognizant DP

As we illustrated above, the simple DP approach does not work. When look at a subset of groups, some of which overlap with as yet unexplored groups, decisions regarding the overlapping groups are difficult to make. The reason is that the quality of a group in the view of the algorithm may decrease, if the high-weight elements in the group also happen to be contained in another overlapping group, which is seen in the future. While building partial solutions, we then need to consider both possibilities - an overlapping group is either included or excluded from the putative solution. We now introduce some notation which allows us to describe these ideas more concretely.

Our algorithm is heavily based on the intersection graph of the group structure. Thus, we will frequently refer to the groups as ‘nodes’ in our algorithm. Our approach involves exploring the nodes of the intersection graph one at a time and storing a list of optimal values from the explored nodes. These optimal values constitute the optimal weight of a gg-group, kk-element selection from the explored groups, for all 1≤g≤G1\leq g\leq G and for all 1≤k≤K1\leq k\leq K. Further, we need to store these optimal values for each possible selection of the overlapping groups, so that we do not make decisions concerning such groups at the current step. In terms of the intersection graph, these overlapping groups are simply those nodes which belong to our currently explored set, but are also adjacent to some node which is not in the explored set. We call such nodes boundary nodes. Since our algorithm explores the intersection graph keeping track of all possibilities at the boundary nodes, it may fittingly be called a boundary-cognizant Dynamic Program.

Although this trick of being boundary-cognizant helps us get the correct solution, it can be expensive. Suppose we have bb boundary nodes at a certain step of the algorithm. Then the table of optimal values we seek to store has size GK2bGK2^{b}, which is exponential in bb. For an arbitrary intersection graph, this factor can indeed be exponential; for example, a complete graph with MM nodes will always have M−1M-1 boundary nodes at the penultimate step. However, if we restrict the intersection graph to be a tree, then it turns out there is a way to explore the graph such that the number of boundary nodes in a graph with MM nodes is only O(log⁡M)O(\log M). This property allows our algorithm to run in polynomial time on such graphs.

A-B Optimal substructure

We expose the optimal substructure of this problem below by highlighting two key properties: Groups-elements dichotomy property and independence given the boundary property. These provide sufficient evidence that an optimal solution to our problem can be efficiently constructed from optimal solutions to subproblems, indicating the correctness of the dynamic programming approach. Further, we will use a slight generalization of property-2 in the proof of correctness of our algorithm.

Groups-elements dichotomy: Suppose we had access to an oracle who told us the set of GG groups that comprise the optimal solution to SGSP. Then we can easily recover the full solution using this information, by picking the KK largest-weight elements contained in the union of these GG groups.

Interestingly, the converse of the above is not true. If the oracle told us the list of KK elements contained in the optimal selection, but not the groups, the problem remains hard. Finding the GG groups that comprise the optimal solution is equivalent to finding a GG-group cover for these KK elements, given that such a cover exists. If we could solve this task in polynomial time, the same algorithm would also solve the NP-Hard Set Cover problem in polynomial time.The idea described here is not a formal reduction. It is possible that the additional structure possessed by the optimal solution would allow us to recover the groups in polynomial time. However, there seems to be no clear way to use this additional structure, so the only obvious way to recover the groups is to solve a set-cover problem, which is NP-hard.

In a certain sense, the above shows that the difficult part of finding the optimal solution is selecting the groups. However, this does not imply that the element sparsity constraint is insignificant. It is easy to create problem instances where even a small change in KK significantly changes the optimal selection.

Independence given the boundary: Let G\mathfrak{G} be the complete set of groups, and let S⊂G\mathcal{S}\subset\mathfrak{G} be a subset of these groups. Let B(S)\mathcal{B}(\mathcal{S}) be the boundary nodes of S\mathcal{S}, that is the nodes in S\mathcal{S} that are connected to nodes in its complement, Sc\mathcal{S}^{c}. Once again, we assume the existence of an oracle who knows the true solution. Suppose this oracle tells us the following information:

The number of groups in S\mathcal{S} which are included in the optimal solution. Call this quantity G1G_{1}.

The number of elements in the optimal solution, which occur in any of the groups in S\mathcal{S}. Call this quantity K1K_{1}.

The boundary nodes included in the optimal solution.

Then this information allows us to recover the optimal solution, by solving two independent optimization problems on the sets S\mathcal{S} and Sc\mathcal{S}^{c} respectively.

For ease of explanation, we refer to the set of boundary nodes included in the optimal selection as the set of ‘active boundary nodes’, BA(S)\mathcal{B}_{A}(\mathcal{S}). Note that BA(S)\mathcal{B}_{A}(\mathcal{S}) is known as it is given to us by the oracle. Further, we call the set of elements included in BA(S)\mathcal{B}_{A}(\mathcal{S}) the set of ‘active boundary elements’, or EA\mathcal{E}_{A}.

Recovery Method: In order to recover the global optimal solution, we need to recover the selection of groups and elements in S\mathcal{S} and Sc\mathcal{S}^{c} respectively.

We first describe the procedure for S\mathcal{S}. Consider all possible ways of choosing K1K_{1} elements contained in G1G_{1} groups from S\mathcal{S}, such that the set of chosen groups in B(S)\mathcal{B}(\mathcal{S}) exactly matches BA(S)\mathcal{B}_{A}(S). Among these choices, the choice which has the maximum total weight of chosen elements gives us the selections of groups and elements in S\mathcal{S}.

Proof: The proof of these two statements is straightforward. First, we formally show how to break the true optimal solution into two disjoint components. After this, we argue that the two components constitute optimal solutions to smaller optimization problems.

Let us denote the set of groups and elements in the global optimal solution by G∗\mathfrak{G}^{*} and E∗{\mathcal{E}}^{*}, respectively. We create two new group-element selections, roughly corresponding to S\mathcal{S} and Sc\mathcal{S}^{c}, which we shall denote by (G1,E1)({\mathfrak{G}}_{1},\mathcal{E}_{1}) and (G2,E2)({\mathfrak{G}}_{2},\mathcal{E}_{2}) respectively. These two components are constructed as follows:

The set of selected groups in S\mathcal{S} and Sc\mathcal{S}^{c} are already disjoint, so these are directly assigned to G1{\mathfrak{G}_{1}} and G2{\mathfrak{G}_{2}} respectively.

For any element in E{\cal E} which occurs only in (groups in) S\mathcal{S}, assign it to E1{\cal E}_{1}.

For any element in E{\cal E} which occurs only in Sc\mathcal{S}^{c}, assign it to E2{\cal E}_{2}.

For any element which occurs in S\mathcal{S} as well as Sc\mathcal{S}^{c} (and hence in B(S)\mathcal{B}(\mathcal{S})), first try to assign it to E1{\cal E}_{1}. That is, check if this element is contained in G1\mathfrak{G}_{1}, and if so assign the element to E1{\cal E}_{1}. If not, we assign it to E2{\cal E}_{2}.

G1\mathfrak{G}_{1} and G2\mathfrak{G}_{2} form a partition of G∗\mathfrak{G}^{*}, and similarly E1\mathcal{E}_{1} and E2\mathcal{E}_{2} form a partition of E∗\mathcal{E}^{*}.

(G1,E1)({\mathfrak{G}}_{1},\mathcal{E}_{1}), (G2,E2)({\mathfrak{G}}_{2},\mathcal{E}_{2}) represent valid group-element selections over the sets of groups S\mathcal{S} and Sc\mathcal{S}^{c} respectively (i.e. E1\mathcal{E}_{1} is contained in the union of groups in G1\mathfrak{G}_{1}, and similarly E2\mathcal{E}_{2} is contained in G2\mathfrak{G}_{2}.)

∣G1∣=G1|\mathfrak{G}_{1}|=G_{1}, ∣E1∣=K1|\mathcal{E}_{1}|=K_{1}, ∣G2∣=G2|\mathfrak{G}_{2}|=G_{2}, ∣E2∣=K2|\mathcal{E}_{2}|=K_{2}, where G1G_{1}, K1K_{1}, G2G_{2}, K2K_{2} are defined as above.

We are now ready to prove the correctness of the recovery method.

An identical argument shows that (G1,E1\mathfrak{G}_{1},\mathcal{E}_{1}) represents an optimal G1G_{1}-group, K1K_{1}-element selection over S\mathcal{S}, among all group-element selections for which the set of chosen nodes from B(S)\mathcal{B}(\mathcal{S}) equals exactly BA(S)\mathcal{B}_{A}(\mathcal{S}). This proves the correctness of our recovery method. ∎

A-C Overview of our Algorithm

Our algorithm explores the acyclic intersection graph one node at a time, storing the optimal solution among the visited nodes and eventually leading to the optimal solution for the entire graph. It is described by two rules: the Value Update Rule and the Graph Exploration Rule.

Graph Exploration Rule: This rule takes as input a given tree graph, and outputs an order of exploring the graph so as to minimize the number of encountered boundary nodes.

Value Update Rule: The Value Update Rule determines how to update the list of optimal values when we explore a new node.

We first describe the Value Update Rule. While doing so, we assume that the nodes of the graph have been labelled 1,2,…,M1,2,\dots,M in some suitable manner, and explore them in this order. In order to lay the foundation for describing the update rule, we will first define the table of optimal values maintained by our algorithm, and ensure that the given data is in suitable format.

A-D Table of optimal values

We describe the set of optimal solutions stored by our Table of optimal values. Abstractly, this table can be thought of as a mathematical function with 55 different parameters. These are described below:

Explored Set : S⊆G\mathcal{S}\subseteq\mathfrak{G} This is any subset of nodes of the intersection graph. It represents the set of nodes currently visited by our algorithm.

Group Count : g∈{1,2,…,G}g\in\{1,2,\dots,G\}. This is the maximum number of groups we are allowed to select.

Element Count : k∈{1,2,…,K}k\in\{1,2,\dots,K\}. This is the maximum number of elements we are allowed to select.

Boundary Indicator Vector : Ib∈{0,1}B\mathbf{I}_{\mathbf{b}}\in\{0,1\}^{B}. This is a binary vector of size BB. Given a boundary set vector, b\mathbf{b}, for each i∈{1,…,B}i\in\{1,\dots,B\}, the ii-th component of Ib\mathbf{I}_{\mathbf{b}} is either or 11, representing whether the group bi\mathbf{b}_{i} is selected or excluded in the optimal selection. We also allow Ib\mathbf{I}_{\mathbf{b}} to be an empty vector.

We now define our optimal values function as follows.

F(S,g,k,b,Ib)\bf F(\mathcal{S},g,k,\mathbf{b},\mathbf{I}_{\mathbf{b}}) represents the maximum weight obtainable by selecting at most kk elements contained in a union of at most gg groups from the set S\mathcal{S}, with the choice of selections among the set of boundary nodes b\mathbf{b} given by Ib\mathbf{I}_{\mathbf{b}}. This function is defined for the entire range of its arguments mentioned above.

Although the function is defined for all S⊆G\mathcal{S}\subseteq\mathfrak{G}, in practice we explore the nodes one at a time, in serial order. Thus, we only need to keep track of MM different sets of explored nodes, where the ii-th set, Si\mathcal{S}_{i}, consists of groups G1,G2,…,Gi\mathcal{G}_{1},\mathcal{G}_{2},\dots,\mathcal{G}_{i}, for all i∈{1,…,M}i\in\{1,\dots,M\}. Furthermore, we only see MM different sets of boundary nodes for a given intersection graph, B(Si)\mathcal{B}(\mathcal{S}_{i}). In certain intermediate steps we shall find it convenient to use in place of B(Si)\mathcal{B}(\mathcal{S}_{i}), a different set than the actual set of boundary nodes.

A-E Data Format and Notation

Without loss of generality, we can assume that each group has no more than KK elements. Further, we will assume that the indices in each group are specified in decreasing order of weights.

In case the above assumptions are not met a-priori, we can do some preprocessing on the given data. Since we know that each group consists of at most NN elements, we can pick the largest KK elements and then sort them in O(N+Klog⁡N)O(N+K\log N) time. This can be done by building a max-heap of all NN elements and then extracting the topmost element KK times. Since we need to do this for each one of the MM groups, this leads to a total complexity of O(MN+MKlog⁡N)O(MN+MK\log N).

While describing the complexity of our main algorithm, we will assume that the groups are already represented in the above canonical form. Hence, we will not consider the above term in our expression for time complexity.

Next, we formally define some notation that we use in our description of the value update rule.

Concatenation Operator: Given two vectors x{\mathbf{x}} and y\mathbf{y} of lengths mm and nn respectively, we define the vector ‘xx concatenated with yy’, written as x.y{\mathbf{x}}.\mathbf{y}, to be an m+nm+n-length vector which consists of entries of x{\mathbf{x}} followed by entries of y\mathbf{y}.

Best-k operator: We define a function H(S,k)H(\mathcal{S},k) to represent the optimal value for choosing kk elements from a set S\mathcal{S}. The set S\mathcal{S} could be a single group, a union of groups, or any well-defined collection of elements. As noted earlier, H(S,k)H(\mathcal{S},k) simply equals the sum of the kk largest weight elements in S\mathcal{S}.

A-F Value Update Rule

We shall now describe the Value Update Rule. This rule shows us how to find the optimal solution to SGSP, which is represented by the value: F(G,G,K,∅,∅)F(\mathfrak{G},G,K,\emptyset,\emptyset).

Base Case. We start with S0=∅\mathcal{S}_{0}={\emptyset}. For this case, all values of FF are set to : F(∅,g,k,∅,∅)=0 ∀g,kF(\emptyset,g,k,\emptyset,\emptyset)=0~{}\forall g,k.

Update. The update case describes how to recompute the list of optimal values when we explore a new node. We shall apply this rule a total of MM times, exploring one new node from the graph each time, and updating our table of values. At the end, we can simply read off the solution from the appropriate entry of the table.

Since we explore the nodes in serial order, at the ii-th step, our explored set will consist of nodes 1,2,…,i1,2,\dots,i. As mentioned earlier, we denote our explored set after the ii-th step as Si\mathcal{S}_{i}, and the boundary set vector at this time as bi\mathbf{b}_{i}. We use the notation Gj\mathcal{G}_{j} to refer to the jj-th group, which is also the jj-th node of the intersection graph as per our chosen ordering. At the end of the ii-th step, we assume that we have stored the values of FF for the explored set Si\mathcal{S}_{i} and boundary set vector bi\mathbf{b}_{i} for each possible value of parameters gg, kk, and the indicator variable Ibi\mathbf{I}_{\mathbf{b}_{i}}, in their respective ranges. Thus, the following values are available to us:

Our objective is to extend these values to the case when we have explored the i+1i+1-th node. In other words, defining Si+1≜Si∪{Gi+1}\mathcal{S}_{i+1}\triangleq\mathcal{S}_{i}\cup\{\mathcal{G}_{i+1}\}, we wish to obtain the following set of values:

where bi+1\mathbf{b}_{i+1} represents the boundary nodes at time i+1i+1 in vector form.

We now describe our method for obtaining these values. When we first consider node i+1i+1, we treat it as a new boundary node and compute the optimal values for it being included or excluded from the putative solution. After this, we test for boundary nodes that have fallen into the interior of the explored set. For these redundant boundary nodes, we no longer need to store two separate values for the node being included or excluded, so we condense these into a single value. Our update rule thus consists of 33 steps:

In this case, we are computing the optimal value for selecting kk elements contained in a union of gg groups among the first (i+1)(i+1) groups when the (i+1)(i+1)-th group is not selected, and the groups in Bi\mathcal{B}_{i} are selected as per the indicator variables. Since the (i+1)(i+1)-th group is not chosen, all our groups and elements must be chosen from among the first ii groups, with the same restrictions on the choice of boundary nodes. Hence, all optimal values for this case are equal to the corresponding values for Si\mathcal{S}_{i}.

for all 1≤g≤G1\leq g\leq G and 1≤k≤K1\leq k\leq K and all Ibi∈{0,1}Bi\mathbf{I}_{\mathbf{b}_{i}}\in\{0,1\}^{B_{i}}.

Case (a): The new node is included and does not overlap with any explored node.

for all 1≤g≤G1\leq g\leq G and 1≤k≤K1\leq k\leq K and all Ibi∈{0,1}Bi\mathbf{I}_{\mathbf{b}_{i}}\in\{0,1\}^{B_{i}}.

Case (b): The new node is included but overlaps with some explored nodes.

The update rule is the same as for case (a), but the elements in the region of overlap between the new node and the selected explored nodes must not be considered as being part of the new node. For this step, we need to know exactly which nodes have been chosen while computing an optimal value. This is the reason why we need to store separate values for each boundary node.

for all 1≤g≤G1\leq g\leq G and 1≤k≤K1\leq k\leq K and all IBi∈{0,1}BiI_{B_{i}}\in\{0,1\}^{B_{i}}, where

That is we “clean” Gi+1\mathcal{G}_{i+1} of the overlap with the currently selected boundary nodes.

After performing the above steps, the number of stored values will be doubled. We can reduce them: for each boundary node which has fallen into the interior of the explored nodes, we combine the optimal values for it being selected or excluded, into a single value by taking the larger of the two values. Each such operation reduces the number of stored values by half and we perform it after each value update. Unlike the earlier steps, this step may have to be performed multiple times in a single update.

The correctness of our algorithm relies on the correctness of the value update rule. Below, we argue for the correctness of this rule for each of its 33 steps.

Step 1: The correctness of this step is self-evident.

Step 2, case (a): Since this step is a special case of step 2, case (b), it is sufficient to prove correctness of the latter.

Step 2, case (b): We prove the correctness of this step using the optimal substructure property 2 described in section A-B.

Our task is to find the optimal selection of gg-groups and kk-elements from the set Si+1≜Si∪Gi+1\mathcal{S}_{i+1}\triangleq\mathcal{S}_{i}\cup\mathcal{G}_{i+1}, when Gi+1\mathcal{G}_{i+1} is selected, and nodes in bi\mathbf{b}_{i} are selected according to Ibi\mathbf{I}_{\mathbf{b}_{i}}. We now consider only the graph consisting of nodes in Si+1\mathcal{S}_{i+1}. With reference to the substructure property, choose the set S\mathcal{S} to be equal to Si\mathcal{S}_{i}. Critically, note that all groups in B(S)\mathcal{B}(\mathcal{S}) are contained in bi\mathbf{b}_{i}, and thus we store optimal values separately for these.

Although the substructure property 2 was derived on a graph with no additional information, it is equally well-applicable when certain groups (such as Gi+1\mathcal{G}_{i+1}, and groups in bi\mathbf{b}_{i}) are constrained to be selected or excluded in the optimal solution. This property had three preconditions, one of which was the knowledge of boundary nodes in the optimal solution. This is trivially true, since in this particular optimization problem, the selection of groups in bi\mathbf{b}_{i} is already fixed by Ibi\mathbf{I}_{\mathbf{b}_{i}}. Then, the property shows us that if we also know the number of groups and elements chosen from the two parts of the graph, we can recover the optimal solution over Si+1\mathcal{S}_{i+1} by solving two separate optimization problems over Si\mathcal{S}_{i} and Gi+1\mathcal{G}_{i+1} respectively.

Step 3: This is the condensation step. The correctness of this step follows from the interpretation of the objective function - F(S,g,k,b,Ib)F(\mathcal{S},g,k,\mathbf{b},\mathbf{I}_{\mathbf{b}}) represents the optimal values for gg-group kk-element selections, when the choices of groups in b\mathbf{b} are fixed by Ib\mathbf{I}_{\mathbf{b}}. Thus, for groups that are not in b\mathbf{b}, we need to consider both whether the node is included or excluded. Therefore, in order to remove a node from the set b\mathbf{b}, we simply take the maximum value of the two cases.

Running Time

The running time of our algorithm is determined by 2 steps - Value Update rule and the Graph Exploration algorithm. As we explain later, the exploration rule can be implemented independently and is computationally much faster, so the time complexity is determined by the value update rule. We analyze the complexity of each step of the update rule below.

Complexity of step 1: All optimal values for this case are simply the optimal values computed before the node is explored. Thus, the update in this case corresponds simply to a table-copying operation. In fact, this copying can be avoided entirely by some clever bookkeeping; all we need to do is remember where the appropriate values are stored in memory. Thus, this step is very inexpensive from a computational point of view.

Complexity of step 3: Since condensation removes an explored node from the boundary set forever, it will have to be performed at most MM times in the entire algorithm. Since the set of boundary nodes at each step is fully determined by the intersection graph and the exploration ordering, these can be precomputed without significant time cost. Hence, we assume these are available to us and ignore their complexity. Then the complexity of a single condensation step is determined only by the number of values that need to be condensed, and is given by O(GK2Bi′)\mathcal{O}(GK2^{B_{i}^{\prime}}), which also equals O(GK2Bi)\mathcal{O}(GK2^{B_{i}}).

Overall time complexity: Among the above, the most expensive case is step 2, case (b). The complexity of this step as obtained earlier equals O(GK22Bi+KBi2Bilog⁡K)\mathcal{O}(GK^{2}2^{B_{i}}+KB_{i}2^{B_{i}}\log K), for the i+1i+1-th value update. We need to perform this step MM times, with the parameter ii varying from to M−1M-1 in the above expression.

Let B∗B^{*} be the maximum number of boundary nodes encountered by the algorithm at any step, i.e., B∗=max⁡iBiB^{*}=\max_{i}B_{i}. Then the running time of our update algorithm is bounded by O(M(2B∗K2G+2B∗B∗Klog⁡K))\mathcal{O}(M(2^{B^{*}}K^{2}G+2^{B^{*}}{B^{*}}K\log K)). Our graph exploration rule allows us to explore the graph so that B∗B^{*} is logarithmic in MM, specifically B∗≤(log⁡2M+1)B^{*}\leq(\log_{2}M+1). Hence 2B∗=O(M)2^{B^{*}}=\mathcal{O}(M). Using this in our above expression, we see that the complexity becomes O(M2K2G+M2Klog⁡Mlog⁡K)\mathcal{O}(M^{2}K^{2}G+M^{2}K\log M\log K) which shows that our algorithm is polynomial time. If we ignore logarithmic terms, we can write the complexity more compactly as O(M2K2G)\mathcal{O}(M^{2}K^{2}G).

Space Complexity and Backtracking

We now look at the amount of space (memory) required by our algorithm. To account for this, we also need to describe how we will backtrack, i.e., how we find the optimal selection of groups and elements. Note that the method described above yields the optimal value for selecting KK elements from GG groups, but does not immediately tell us which groups are selected. We chose a backtracking method which is time-efficient, but involves storing a fair amount of data. Specifically, we store the optimal values obtained at each step of the value update rule prior to condensation, i.e., F(Si,g,k,bi−1.{Gi},Ibi−1.{0})F(\mathcal{S}_{i},g,k,\mathbf{b}_{i-1}.\{\mathcal{G}_{i}\},\mathbf{I}_{\mathbf{b}_{i-1}}.\{0\}) and F(Si,g,k,bi−1.{Gi},Ibi−1.{1})F(\mathcal{S}_{i},g,k,\mathbf{b}_{i-1}.\{\mathcal{G}_{i}\},\mathbf{I}_{\mathbf{b}_{i-1}}.\{1\}) for all 1≤g≤G1\leq g\leq G , 1≤k≤K1\leq k\leq K, Ibi−1∈{0,1}Bi−1\mathbf{I}_{\mathbf{b}_{i-1}}\in\{0,1\}^{B_{i-1}}, i∈{1,…,M}i\in\{1,\dots,M\}. Thus the number of values we shall need to store is at most MGK2B∗MGK2^{B^{*}}, which can be simplified to O(M2KG)\mathcal{O}(M^{2}KG) using 2B∗=O(M)2^{B^{*}}=\mathcal{O}(M) (due to our graph exploration algorithm).

Our algorithm for backtracking is as follows: We start from the MM-th node and work backwards, determining the number of elements selected from each group. For the MM-th group, we look at the optimal value for GG groups and KK elements, for the 2 cases when GM\mathcal{G}_{M} is selected or unselected. The value which is the larger of these two forms our optimal solution, and thus tells us whether or not GM\mathcal{G}_{M} is chosen in the optimal selection. If the optimal values stored at the M−1M-1-th step involve other boundary nodes besides node MM, we maximize over all selections of these boundary nodes, since we don’t care about any particular nodes being selected in the optimal solution. We also remember the assignment of the indicator variables which allows us to obtain the largest value of FF, since it tells us which nodes in bM−1\mathbf{b}_{M-1} are included in the optimal solution. If we find that GM\mathcal{G}_{M} is not chosen in the optimal selection, then we can ignore that group and simply find the optimal GG-group, KK-element selection on M−1M-1 groups.

It can be verified that the running time of the above algorithm is somewhat smaller than the update rule. Thus, the overall expression for time complexity is unchanged even when we account for backtracking.

A-G Graph Exploration Rule

We determine the order with which the nodes are picked by a value associated to each subtree of the graph, which we call the DD-value. In the following, we describe how it is computed, how it depends logarithmically on the number of nodes in the graph and how the number of boundary nodes is bounded by the DD-value.

The D-value of a rooted tree graph is a non-negative integer associated with the graph. We will define the D-value algorithmically later.

Computing DD-values: The procedure for computing the DD-values is also recursive. If the tree has only one node, D=1D=1. Now, assume the RR subtrees at a node QQ have values D1≥…≥DRD_{1}\geq\ldots\geq D_{R}. Then, D(Q)=max⁡(D1,D2+1)D(Q)=\max(D_{1},D_{2}+1). In case there is no second subtree, D(Q)=D1D(Q)=D_{1}. We then have the following bound on the DD-values.

The DD-value of a rooted tree graph is logarithmic in the number of nodes, i.e. D(G)≤log⁡2(M)+1D(G)\leq\log_{2}(M)+1.

Let DD be a positive integer and N(D)N(D) be the minimum number of nodes that a rooted tree must have in order to have DD-value of D. We prove by induction that

Base case: D=2D=2. A tree with only one node will have a DD-value of 1. So to have a DD-value of 2, we require a graph with at least 2 nodes. Hence (15) is satisfied.

Inductive case: D>2D>2. Let T\mathcal{T} be a smallest (i.e. minimum node) rooted tree graph whose DD-value is equal to DD. Spread out T\mathcal{T} in the form of root and subtrees. Let the subtrees be T1,T2,…,Tk\mathcal{T}_{1},\mathcal{T}_{2},\ldots,\mathcal{T}_{k}, with corresponding DD-values D1,D2,…,DkD_{1},D_{2},\ldots,D_{k}. Without loss of generality, assume that D1≥D2≥…≥DkD_{1}\geq D_{2}\geq\ldots\geq D_{k}. By definition, D(T)=max⁡(D1,D2+1)D(\mathcal{T})=\max(D_{1},D_{2}+1).

By our assumption, T\mathcal{T} is a minimum-node graph with DD-value equal to DD, hence we cannot have D1=D(G)=DD_{1}=D(G)=D, since that would give us a smaller rooted tree graph (T1\mathcal{T}_{1}) with a DD-value of DD. This means that D1<DD_{1}<D, and since D=max(D1,D2+1)D=max(D_{1},D_{2}+1), hence D2+1=DD_{2}+1=D, i.e. D2=D−1D_{2}=D-1. Since D1≥D2=D−1D_{1}\geq D_{2}=D-1 and D1<DD_{1}<D, then D1=D−1=D2D_{1}=D-1=D_{2}. Thus, the graph T\mathcal{T} has 2 subtrees (T1\mathcal{T}_{1} and T2\mathcal{T}_{2}), with DD-values of D−1D-1 each. By definition, any rooted subtree with a DD-value of D−1D-1 must have at least N(D−1)N(D-1) nodes. By our induction hypothesis, N(D−1)≥2D−2N(D-1)\geq 2^{D-2} . Therefore, T\mathcal{T} has at least 2×2D−2=2D−12\times 2^{D-2}=2^{D-1} nodes. But since T\mathcal{T} was the smallest rooted tree graph with DD-value of DD, this means that N(D)≥2D−1N(D)\geq 2^{D-1}, as required. ∎

We now link the number of boundary nodes visited by the algorithm to the DD-value of the intersection graph.

The total number of boundary nodes encountered by the graph exploration algorithm cannot exceed the DD-value of the graph.

Let T\mathcal{T} be the given rooted tree graph, with MM nodes. We shall consider the number of boundary nodes when there is a ghost node connected to the root node. The ghost node is a hypothetical node which is not really a part of the graph, but still makes adjacent explored nodes count as boundary nodes. The ghost node captures the fact when we are running the algorithm recursively on a subtree, there will be an additional (potentially unexplored) node connected to the root of the subtree, which may lead to the root being counted as a boundary node. Let B∗(T)B^{*}(\mathcal{T}) denote the maximum number of boundary nodes encountered on T\mathcal{T} when we pick nodes according to our algorithm, and let BG∗(T)B^{*}_{G}(\mathcal{T}) represent the same when we also have the ghost node. Clearly, BG∗(T)≥B∗(T)B^{*}_{G}(\mathcal{T})\geq B^{*}(\mathcal{T}), hence it is enough to prove the following:

We prove this by strong induction on MM.

Base Case. Suppose the rooted tree graph T\mathcal{T} has only 11 node. Then the maximum number of boundary nodes encountered is obviously 11, which is equal to the DD-value of the graph (by definition). Hence BG∗(T)≤D(T)B^{*}_{G}(\mathcal{T})\leq D(\mathcal{T}).

Inductive Case. When the graph T\mathcal{T} consists of MM nodes, M>1M>1, consider the graph to be spread out in the form of root and subtrees. Compute the DD-values for each rooted subtree, where w.l.o.g., D1≥D2≥…DkD_{1}\geq D_{2}\geq\ldots D_{k}. Let T1,T2,…,Tk\mathcal{T}_{1},\mathcal{T}_{2},\ldots,\mathcal{T}_{k} be the corresponding subtrees. By definition, our algorithm explores nodes in the sequence: T1,root,T2,T3,…Tk\mathcal{T}_{1},\text{root},\mathcal{T}_{2},\mathcal{T}_{3},\ldots\mathcal{T}_{k}.

Since each subtree has strictly fewer than MM nodes, each subtree satisfies (16) by the induction hypothesis. Also, notice that when exploring the subtree T1\mathcal{T}_{1} of T\mathcal{T}, the number of boundary nodes encountered is less than or equal to the number of boundary nodes encountered when exploring T1\mathcal{T}_{1} as a standalone rooted-tree-graph, with a ghost node connected to its root. By definition, this is exactly equal to BG∗(T1)B^{*}_{G}(\mathcal{T}_{1}), which by our induction hypothesis is bounded by D1D_{1}. Therefore, the number of boundary nodes encountered while exploring T1\mathcal{T}_{1} in T\mathcal{T} cannot exceed D1D_{1}. Once we are finished with T1\mathcal{T}_{1}, we pick the root, so the total number of boundary nodes is 11. We now proceed to pick T2\mathcal{T}_{2}. By a similar argument, the maximum number of boundary nodes in T2\mathcal{T}_{2} at any point cannot exceed the number of boundary nodes encountered while exploring T2\mathcal{T}_{2} as a standalone graph with attached ghost node. In addition, the root of T\mathcal{T} can contribute at most 1 additional boundary node (In fact, the ghost node for T\mathcal{T} ensures that the root, once picked, will always contribute an additional boundary node). Therefore, the total number of boundary nodes in T\mathcal{T} while exploring T2\mathcal{T}_{2} is at most D2+1D_{2}+1. Similar arguments hold for all other subtrees — the maximum number of boundary nodes while exploring the kk-th subtree will be at most Dk+1D_{k}+1, which is upper bounded by D2+1D_{2}+1.

Therefore, the maximum number of boundary nodes encountered at any step while exploring T\mathcal{T} is BG∗(T)≤max⁡(D1,D2+1)B_{G}^{*}(\mathcal{T})\leq\max(D_{1},D_{2}+1). By definition, D(T)=max⁡(D1,D2+1)D(\mathcal{T})=\max(D_{1},D_{2}+1). Therefore BG∗(T)≤D(T)B_{G}^{*}(\mathcal{T})\leq D(\mathcal{T}). ∎

Combining Lemmas 3 and 4, we have the following result.

The maximum number of boundary nodes at any step of the algorithm is logarithmic in the number of nodes, i.e., B≤log⁡2(M)+1B\leq\log_{2}(M)+1.

The previous lemma establishes the polynomial time complexity of the dynamic program for solving the generalized integer problem (11).

We shall now prove that the exploration rule itself requires minimal computation. This will justify our earlier claim that the running time is determined solely by the value update rule.

The running time of the graph exploration rule is O(M)\mathcal{O}(M) for an MM-node graph.

The exploration rule can be algorithmically run in two loops. In the first, we compute all DD-values of all the required subtrees in the graph. In the second loop, we find the exploration ordering using these DD-values. Note that the subtrees encountered by our recursive DD-value computing algorithm are exactly the same set of subtrees encountered by our exploration rule, which makes it possible to compute all the required DD-values in a single loop.

For computing DD-values at a particular node, we use the formula D=max⁡(D1,D2+1)D=\max(D_{1},D_{2}+1), where D1≥D2≥D3,D4,…,DkD_{1}\geq D_{2}\geq D_{3},D_{4},\dots,D_{k}. Thus, we need to find the largest and second largest DD-values among the subtrees. For a node with dd children, this takes O(d)\mathcal{O}(d) time. Since the values D1,D2,…,DkD_{1},D_{2},\dots,D_{k} are obtained recursively, this is the only computation which needs to be performed at the current node. Hence, the total time required is proportional to ∑v∈Vmax⁡(d(v),1)≤2M\sum_{v\in\mathcal{V}}\max(d(v),1)\leq 2M, where d(v)d(v) represents the number of children that node vv has. Hence, this loop runs in O(M)\mathcal{O}(M) time.

Obtaining the exploration order is similar. We only need to find the subtree with the largest DD-value at the current node, so that we can pick the subtrees in the right order. This takes O(d)\mathcal{O}(d) time for a node with dd children, and hence O(M)\mathcal{O}(M) time for all nodes. Since both the above steps are O(M)\mathcal{O}(M), the graph exploration rule itself runs in O(M)\mathcal{O}(M), i.e., linear time. ∎

The proposed dynamic program solves the Weighted Maximum Coverage problem with an additional constraint on element sparsity for acyclic group structures. Its time complexity is O(M2GK2)\mathcal{O}(M^{2}GK^{2}), where MM is the number of groups, GG is the group sparsity budget and KK is the element sparsity budget.

Appendix B Dynamical programming for solving the hierarchical signal approximation problem (12)

Here we describe the dynamic program for solving the hierarchical signal approximation problem (12) and show that its time complexity is O(NK2D)\mathcal{O}(NK^{2}D), for general trees with maximum degree DD and O(NKD)\mathcal{O}(NKD) for DD-regular trees. Furthermore, its space complexity for DD-regular trees is O(Nlog⁡DK)\mathcal{O}(N\log_{D}K).

Problem (12) can be equivalently rephrased as the following optimization problem.

Rooted-Connected Subtree Problem: Given a rooted tree T\mathcal{T} with each node having at most DD children, a non-negative real number (weight) assigned to every node and a positive integer KK, choose a subset of its nodes forming a rooted-connected subtree that maximizes the sum of weights of the chosen elements, such that the number of selected nodes does not exceed KK. In our case, (12), the weight of a node is the square of the value of the component of the signal associated to that node. The proposed algorithm leverages the optimal substructure of the problem.

B-B Optimal substructure

Suppose that a particular node X belongs to the optimal KK-node rooted-connected subtree. Consider the subtree TX,d\mathcal{T}_{X,d} obtained by choosing X, dd of its children (1≤d≤D1\leq d\leq D) and all descendants of these children. Consider the set of nodes S\mathcal{S} consisting of all the nodes of TX,d\mathcal{T}_{X,d} which are also present in the optimal KK-node rooted-connected subtree. Suppose there are LL nodes in S\mathcal{S}. Then the nodes in S\mathcal{S} form the optimal LL-node rooted-connected subtree at X, for the subgraph TX,d\mathcal{T}_{X,d}. See Fig. 13 for an example.

B-C Dynamic Programming method.

For every node X, we store the weight of the optimal kk-node rooted-connected subtree at X, using only the nodes in the dd rightmost children of X and their descendants, for each kk and dd such that 1≤k≤K1\leq k\leq K and 1≤d≤D1\leq d\leq D. We define a function F(X,k,d)F(X,k,d), to store these optimal values. We start from the leaf nodes and move upwards, for each node assessing all its subtrees from right to left, eventually covering the entire tree. At the end, the optimal value will be given by F(root,K,D)F(\text{root},K,D), that is the value of the best K-node rooted connected subtree of the root considering all its descendants.

Base Case. For every leaf node X and for all 1≤k≤K1\leq k\leq K and 1≤d≤D1\leq d\leq D, we set F(X,k,d)=Weight(X)F(X,k,d)=\text{Weight}(X).

Inductive Case. By induction, for every non-leaf node X, all the F-values are known for the descendants of X. Let X1,X2,…XdX_{1},X_{2},\ldots X_{d} be the dd children of X in the right-to-left order, where 1≤d≤D1\leq d\leq D. Then, we compute the F-values of X using the following update rules.

The optimal value for choosing a kk-node subtree rooted at XX, when only the rightmost child X1X_{1} is allowed, equals the weight of XX itself (since XX must be chosen), plus the optimal value for choosing a rooted connected subtree with k−1k-1 nodes from the rightmost child X1X_{1}.

For convenience, when a node has only dd children, where dd is strictly less than DD, we set F-values for cases involving more than dd children equal to the value for dd children.

B-D Running Time

Given a hierarchical group structure G\mathfrak{G}, the time complexity of the dynamic programming algorithm is O(NK2D)\mathcal{O}(NK^{2}D), where DD is maximum number of children of a node in the tree.

The main cost of the dynamic program is evaluating the second value update rule. Let XiX_{i} be the i-th node in the tree, did_{i} the number of its children Xi,1,…,Xi,diX_{i,1},\ldots,X_{i,d_{i}}. Let also KiK_{i} be the cardinality of the tree that has XiX_{i} as root and Ki,jK_{i,j} be the cardinality of the tree that has Xi,jX_{i,j} as root for 1≤i≤N1\leq i\leq N and 1≤j≤di1\leq j\leq d_{i}. Given XiX_{i}, evaluating F(Xi,k,j)F(X_{i},k,j) for 1≤k≤min⁡(K,Ki)1\leq k\leq\min(K,K_{i}) and 1≤j≤di1\leq j\leq d_{i} requires min⁡(k,Ki,j)\min(k,K_{i,j}) operations. Therefore, overall we need to compute

values, each of which requires a simple operation. ∎

By leveraging the special structure of DD-regular trees, it is possible to prove that the complexity of the dynamic program is linear in KK.

The time complexity of the dynamic program for DD-regular trees is O(KDN)\mathcal{O}(KDN).

Let j′j^{\prime} be such that K≤DJ−jK\leq D^{J-j} for all j<j′j<j^{\prime}. We then have j′=J−⌊log⁡DK⌋j^{\prime}=J-\lfloor\log_{D}K\rfloor and min⁡(K,DJ−j)=K\min(K,D^{J-j})=K for j<j′j<j^{\prime} and min⁡(K,DJ−j)=DJ−j\min(K,D^{J-j})=D^{J-j} for j≥j′j\geq j^{\prime}. Hence we can break (17) into

For DD-regular trees (with D≥3D\geq 3), we have N=DJ−1D−1≈DJD−1N=\dfrac{D^{J}-1}{D-1}\approx\dfrac{D^{J}}{D-1} , so that the time complexity will be O(KDN)\mathcal{O}(KDN). When D=2D=2, we can follow the same steps to show that the complexity is O(KD2N)\mathcal{O}(KD^{2}N). But for small values of DD, O(ND2K)=O(NDK)\mathcal{O}(ND^{2}K)=\mathcal{O}(NDK). Hence we can say that the overall complexity is O(NDK)\mathcal{O}(NDK). ∎

B-E Space Complexity

The memory complexity of the dynamic program for D-regular trees is O(Nlog⁡DK)\mathcal{O}(N\log_{D}K) for our implementation.

Let j′j^{\prime} be such that K≤DJ−jK\leq D^{J-j} for all j<j′j<j^{\prime}. We then have j′=J−⌊log⁡DK⌋j^{\prime}=J-\lfloor\log_{D}K\rfloor and min⁡(K,DJ−j)=K\min(K,D^{J-j})=K for j<j′j<j^{\prime} and min⁡(K,DJ−j)=DJ−j\min(K,D^{J-j})=D^{J-j} for j≥j′j\geq j^{\prime}.

Acknowledgements

We would like to sincerely thank the anonymous reviewers for their detailed and constructive observations and criticisms. We also thank Nikhil Rao for providing the code for block signal recovery with the Latent Group Lasso approach.

References