WorksMathematics
A generalized lasso formulation of weighted and regularized (nearly-)isotonic regression on graphs
Abstract
In this paper we study a regularized version of nearly-isotonic regression with respect to a general partial order. In this estimator the sum of squares is weighted, with some of the weights allowed to be zero, and an additional quadratic penalty is imposed. The only assumption we make is that the quadratic part of the objective function is strictly convex, and we show that this assumption is mild. First, we show that for all sufficiently large values of the penalty parameter the estimator coincides with the regularized isotonic regression, in which the penalty is replaced by the isotonic constraint. Further, we prove that the resulting problem can be written as a generalized lasso problem with a design matrix of full column rank and with the penalty matrix unchanged. Next, we derive the dual problem, which is a quadratic program with box constraints, and write it in a sparse form that can be solved by standard quadratic programming solvers for sparse problems.
Introduction
In the area of constrained inference the basic and simplest problem is isotonic regression, i.e. the -projection of a given vector of data points onto the cone of non-decreasing vectors in ,
A general introduction can be found in [14]. The nearly-isotonic regression, introduced in [20] and studied in detail in [11], is the less restrictive version
where , in which the constraint is replaced by a penalty on its violations. Its combination with the fused lasso and the extension to a general partial order were studied in [12], where in particular the dual of the problem was shown to be a quadratic program with box constraints.
The subject of penalized estimation starts with the -penalisation, i.e. the lasso [18], and the -penalisation, i.e. ridge regression [9]. The -penalisation of the successive differences of the coefficients gives the fusion approximator [13], and its combination with the lasso is the fused lasso [19]. These estimators were studied and solved for a general graph in [4, 8, 21]. In [21] they appear as special cases of the generalized lasso, in which the -penalty is imposed on for a general penalty matrix , and trend filtering on graphs [22] is another example. The lasso with linear constraints on the coefficients, called the constrained lasso, and its relation to the generalized lasso were studied in [5]. There the constraint matrices are assumed to have full row rank, and for isotonic regression this holds only if the graph of the partial order is a tree, which is not the case, for example, for the bimonotone order on a grid. Next, the statistical properties of isotonic regression in general dimensions were studied in [3, 7], and algorithms for it can be found, for example, in [2, 16]. Several regularized versions of isotonic regression have been proposed. Generalizations of nearly-isotonic regression in the one-dimensional case were studied in [23], where a dynamic programming algorithm is proposed, and in [6], where the squares of the positive parts of the differences and a lasso penalty are added to the penalty in (2).
In this paper we study the nearly-isotonic regression with respect to a general partial order in the following modified form: the sum of squares is weighted, with some of the weights possibly equal to zero, and a quadratic penalty is added. This modification is motivated by [1], where the authors study least squares estimation under bimonotonicity constraints for the data observed on an incomplete grid. There the weights are the numbers of observations at the grid points, and they are equal to zero at the empty cells. In this case the problem is not strictly convex, and the authors add a small quadratic penalty, which they call light regularization. The quadratic penalty is also the one of the smoothed monotonic regression of [17] in the one-dimensional case. The main result of the paper is that the modified problem can be written as a generalized lasso problem in the sense of [21], with the same penalty matrix and with a design matrix of full column rank, and can therefore be solved by the algorithms developed for the generalized lasso. We also derive the dual problem.
Notation
We start with basic definitions of partial order and isotonic regression. Let be some index set. A binary relation on is called partial order if
it is reflexive, i.e. for all ,
it is transitive, i.e. , and imply ,
it is antisymmetric, i.e. , and imply .
Further, a vector indexed by is called isotonic with respect to the partial order on if implies . We denote the set of all isotonic vectors in with respect to by . This set is a closed convex cone in , and it is also called the isotonic cone. Next, the isotonic regression of a vector indexed by the partially ordered index set is given by
which for the natural order on is (1).
For any partial order relation on there exists a directed graph , with and the minimal set of edges with , such that is isotonic with respect to if and only if whenever contains a chain of edges from to . We label the vertices by and the edges by , and let be the oriented incidence matrix of ,
so that is the vector of the differences of along the edges of . Therefore, the isotonic cone is
where the inequality is meant coordinatewise. Further, for we write
For the natural order on the edges join consecutive indices, and is the penalty in (2). For the bimonotone order on a grid, introduced in [1], the edges join horizontally and vertically adjacent grid points.
General statement of the problem
Let be a signal indexed by , let be a diagonal matrix with nonnegative weights on the diagonal, not all equal to zero, let be a given matrix with columns and rows, and let . We consider the estimator
under the assumption that
is strictly convex.
Theorem 2 and Propositions 3 and 6 below hold with replaced by , since their proofs do not use the structure of .
The structure of (5) is that of the “incomplete layout with light regularization” in Setting 2b of [1]. There, the observations of a bimonotone regression function are reduced to a rectangular grid: is the number of observations at the grid point and their average, and the least squares criterion becomes
When the layout is incomplete, i.e. some grid points have no observations and , this function is not strictly convex, and the least squares fit is not uniquely determined at the empty cells. For this reason the authors consider the minimisation of
over the bimonotone cone, where is a convex quadratic function chosen so that the sum is strictly convex, and is small, its role being only to make the Hessian well conditioned.
The authors discuss two choices of , the Tychonov regularisation with a reference value and the sum of squared differences along the edges of the grid,
They prefer the latter, because it interpolates more smoothly into the empty cells. In the notation of (5) the latter penalty is with
and their requirement on is the assumption (6). In Lemma 4 below we verify (6) for this choice. Problem (5) is thus the nearly-isotonic relaxation of the problem of [1], in which the isotonic constraint is replaced by the penalty, and the bimonotone order is replaced by an arbitrary partial order. On the chain graph, with unit weights and with the constraint kept, the same quadratic part gives the smoothed monotonic regression of [17] with equal penalty parameters.
Organisation of the paper
The rest of the paper is organised as follows. In Section 2 we relate the estimator to the constrained estimator in which the penalty is replaced by the constraint . In Section 3 we show that (5) is a generalized lasso problem. Section 4 contains the dual problem. In Section 5 we verify assumption (6) for the penalty (7). Section 6 is devoted to the computational aspects. The paper closes with a discussion in Section 7.
Relation to regularized isotonic regression
In this section we compare the estimator (5) with the estimator obtained when the penalty in (5) is removed and the isotonic constraint is imposed instead,
For the grid and this is the estimator of [1], and for the chain it is the smoothed monotonic regression of [17]. For nearly-isotonic regression, i.e. for and , the property that the estimator coincides with isotonic regression for all sufficiently large is mentioned in [11] and [20]. The same holds for the estimator (5). Under (6) the objective functions in (5) and (8) are strictly convex and coercive, so both problems have unique solutions. Further, the objective function in (5) is the exact penalty function of the problem (8) with the penalty parameter , and the constraints in (8) are linear. Therefore, by the classical exact penalty result, see [10] and the references therein, there exists such that for all , in particular, for nearly-isotonic regression with respect to a general partial order.
Thus, the estimator (5) is the regularized isotonic regression (8) for all sufficiently large values of , and the results of the following sections apply to the estimator (8) as well.
Solution via the generalized lasso
First, we rewrite the objective function in (5).
Lemma 1. For a fixed data vector indexed by the objective function in (5) can be written as
where
and is the vector whose all elements are equal to one. Further, the assumption (6) holds if and only if is positive definite.
Proof. The function in (6) is a quadratic function with constant Hessian , and a quadratic function is strictly convex if and only if its Hessian is positive definite. This gives the last statement of the lemma.
For (9), since is symmetric, , and . Together these give . For one has . Therefore,
which finishes the proof.
Next, we provide the solution to the problem (5).
Theorem 2. Assume (6) holds, let and be as in (10), let , and let
Then the solution to the problem (5) is given by
That is, the problem (5) is the generalized lasso problem with the data vector , the design matrix , the penalty matrix and the penalty parameter . Moreover, has full column rank and the solution (12) is unique.
Proof. First, note that
Next, from Lemma 1 it follows that
Therefore, the problems (5) and (12) have the same solutions, since the last two terms do not depend on . Lastly, by Lemma 1 the matrix is positive definite, so is , which means that has full column rank and the objective function in (12) is strictly convex and coercive. Therefore, the solution to (12) exists and is unique.
The pair , in (10) is not the only possible choice. As the proof shows, the statement of Theorem 2 holds for any and such that
For example, (13) holds for the square matrix and the vector given by
Finally, for nearly-isotonic regression, i.e. for and , (13) holds for
and (12) becomes the relation
between nearly-isotonic regression and the fusion approximator, proved in [12].
The dual problem
For a fixed we can also solve the problem (5) numerically through its dual, which is a quadratic program with box constraints.
Proposition 3. Assume (6) holds. The solution to (5) is given by
where
and
with for .
Proof. First, following [21], we write the problem (5) in the following way
Further, the Lagrangian is given by
where is a dual variable. Note that
and, since is positive definite,
Next, the dual function is given by
and, therefore, the dual problem is
which is equivalent to (15). Lastly, since the objective function is finite and convex on and the constraint is affine and feasible, strong duality holds, and taking first derivative of the Lagrangian with respect to we get the following relation between and
If does not have full row rank, the minimiser in (15) need not be unique. However, the objective function in (15) is a strictly convex function of , therefore, is unique, and (13) does not depend on the choice of . Note also that is the solution to (5) for , so (13) represents the estimator as the quadratic smoother minus a correction determined by the dual problem. For nearly-isotonic regression we have and , and Proposition 3 becomes Theorem 1 of [12] without the fusion penalty.
The strict convexity assumption
In this section we verify the assumption (6) for the penalty (6), i.e. for .
Lemma 4. Let the undirected graph underlying be connected, and let with . Then the assumption (6) holds if and only if for at least one .
Proof. With we have , and by Lemma 1 the assumption (6) holds if and only if is positive definite. Since is diagonal and , for every we have
and both summands are nonnegative, because and .
First, let for some . By (4), if and only if for every edge , and since the undirected graph underlying is connected, this holds if and only if for some , where is the vector of ones. Now let . If , the second summand in (16) is strictly positive. If , then with , and the first summand in (16) equals . Hence, for all , i.e. is positive definite.
Second, let for all . Then for we have , because every row of contains exactly one and one , and therefore by (16). Hence is not positive definite.
Therefore, for a connected graph the standing assumption that not all weights are equal to zero is necessary and sufficient. In particular, for the bimonotone grid, which is connected, the assumption (6) holds for every incomplete layout with at least one observation and for every . Note that without the quadratic penalty, i.e. for , the Hessian of the quadratic part of (5) is , which is singular as soon as for some .
If the graph is not connected, then for all terms in (5) are sums over the connected components, because no edge joins two different components. Therefore, the problem (5) splits into independent problems, one for each component, and Lemma 4 can be applied to each of them.
Corollary 5. Let with . Then the assumption (6) holds if and only if every connected component of the undirected graph underlying contains a vertex with .
Proof. Let be the connected components of the undirected graph underlying . Since no edge joins two different components, after a permutation of the vertices the matrix is block diagonal with the blocks , , where is the diagonal matrix of the weights , , and is the incidence matrix of the subgraph of with the vertex set . Therefore, is positive definite if and only if every is positive definite, and the statement follows from Lemma 4 applied to each component.
Finally, the Tychonov penalty of [1] shrinks the estimator towards the reference value , and for it is not of the form . Nevertheless, the corresponding problem
reduces to (5). Indeed, let and . Then
where the last equality holds because . Therefore, the solution is
where is the solution to (5) with the data vector and . For this choice of the matrix is positive definite for any weights, so the assumption (6) always holds.
Computational aspects
In this section we discuss the computation of the estimator (5). We do not provide a simulation study, because the algorithms below are well established, and their performance has been studied extensively, see [12] for the nearly-isotonic case, and also [15], [21].
First, by Theorem 2 the estimator is the solution to the generalized lasso problem (11). Therefore, we can use the algorithm of [21] for the problem (5), for an arbitrary partial order, and the condition of full column rank of the design matrix, required there, is satisfied automatically. Note, that the data vector depends on , therefore, the path of [21] in the lasso parameter with fixed is not the path of (5) in . Further, among all pairs which satisfy (12), the choice (10) is preferable in computations, because the design matrix in (10) is sparse whenever is sparse, while is dense in general.
Second, the estimator can be computed through the dual problem (15). However, the matrix in (14) is dense in general, even if is sparse. To avoid computing , we keep as a variable in the dual problem.
Proposition 6. Assume (6) holds, and let be a solution of
Then .
Proof. The constraint gives , and then . Therefore, is a solution to (15) and , which is equal to by Proposition 3.
The problem (18) contains only the matrices and . Every row of the incidence matrix has two nonzero elements, and is sparse whenever is sparse. In particular, for the penalty (7) the matrix has at most nonzero elements, so it is sparse when the number of edges is of the order of , as for the chain and for the grid. In this case (18) can be solved by quadratic programming solvers for sparse problems, for example by OSQP [15], as it was done for the nearly-isotonic case in [12].
Lastly, if the constrained estimator (8) is of interest, then, by § 2, it can be obtained from (5) with a sufficiently large value of .
Conclusion and discussion
In this paper we studied the nearly-isotonic regression with respect to a general partial order, with a weighted sum of squares, where some of the weights can be equal to zero, and with an additional quadratic penalty. In our opinion, the main result of the paper is Theorem 2, where we proved that this problem can be written as a generalized lasso problem with a design matrix of full column rank and the same penalty matrix. Therefore, the estimator can be computed by the algorithms developed for the generalized lasso. Further, we derived the dual problem and wrote it as a sparse quadratic program, which can be solved by standard solvers for sparse problems. Also, we showed that for a sufficiently large penalty parameter the estimator coincides with the regularized isotonic regression.
One of the possible directions is to study the degrees of freedom of the estimator. In Theorem 2 of [21], for a design matrix of full column rank and Gaussian data with a covariance matrix proportional to the identity matrix, an unbiased estimate of the degrees of freedom of the fitted values of the generalized lasso is derived. In our Theorem 2 the design matrix has full column rank, but the fitted values are not the estimate of interest, and the data vector depends on . Moreover, even for Gaussian observations with a covariance matrix proportional to the identity matrix, the covariance matrix of is not of this form. Therefore, the result of [21] does not apply directly, and it is interesting to derive the degrees of freedom of the estimator itself, in the spirit of Theorem 6 in [12].
Another direction is to develop a path algorithm with respect to . Since the data vector in Theorem 2 depends on , the path algorithm of [21] does not give it directly. In particular, it is interesting to find the smallest value of in § 2, for which the estimator coincides with the regularized isotonic regression.
References
- [1]Beran, R. and Dümbgen, L. (2010). Least squares and shrinkage estimation under bi-monotonicity constraints. Stat. Comput. 20 177–189.
- [2]Best, M. J. and Chakravarti, N. (1990). Active set algorithms for isotonic regression; a unifying framework. Math. Program. 47 425–439.DOI
- [3]Deng, H. and Zhang, C.-H. (2020). Isotonic regression in multi-dimensional spaces and graphs. Ann. Statist. 48 3672–3698.arxiv.org/abs/1812.08944
- [4]Friedman, J., Hastie, T., Höfling, H. and Tibshirani, R. (2007). Pathwise coordinate optimization. Ann. Appl. Stat. 1 302–332.DOI
- [5]Gaines, B. R., Kim, J. and Zhou, H. (2018). Algorithms for fitting the constrained lasso. J. Comput. Graph. Statist. 27 861–871.arxiv.org/abs/1611.01511
- [6]Gómez, A., He, Z. and Pang, J.-S. (2023). Linear-step solvability of some folded concave and singly-parametric sparse optimization problems. Math. Program. 198 1339–1380.DOI
- [7]Han, Q., Wang, T., Chatterjee, S. and Samworth, R. J. (2019). Isotonic regression in general dimensions. Ann. Statist. 47 2440–2471.
- [8]Hoefing, H. (2010). A path algorithm for the fused lasso signal approximator. J. Comput. Graph. Statist. 19 984–1006.
- [9]Hoerl, A. E. and Kennard, R. W. (1970). Ridge regression: biased estimation for nonorthogonal problems. Technometrics 12 55–67.
- [10]Mangasarian, O. L. (1985). Sufficiency of exact penalty minimization. SIAM J. Control Optim. 23 30–37.
- [11]Minami, K. (2020). Estimating piecewise monotone signals. Electron. J. Stat. 14 1508–1576.arxiv.org/abs/1905.01840
- [12]Pastukhov, V. (2024). Fused lasso nearly-isotonic signal approximation in general dimensions. Stat. Comput. 34 Paper No. 120.arxiv.org/abs/2210.09519
- [13]Rinaldo, A. (2009). Properties and refinements of the fused lasso. Ann. Statist. 37 2922–2952.DOI
- [14]Robertson, T., Wright, F. T. and Dykstra, R. L. (1988). Order Restricted Statistical Inference. Wiley, New York.
- [15]Stellato, B., Banjac, G., Goulart, P., Bemporad, A. and Boyd, S. (2020). OSQP: an operator splitting solver for quadratic programs. Math. Program. Comput. 12 637–672.
- [16]Stout, Q. F. (2013). Isotonic regression via partitioning. Algorithmica 66 93–112.DOI
- [17]Sysoev, O. and Burdakov, O. (2019). A smoothed monotonic regression via L₂ regularization. Knowl. Inf. Syst. 59 197–218.DOI
- [18]Tibshirani, R. (1996). Regression shrinkage and selection via the lasso. J. R. Stat. Soc. Ser. B 58 267–288.
- [19]Tibshirani, R., Saunders, M., Rosset, S., Zhu, J. and Knight, K. (2005). Sparsity and smoothness via the fused lasso. J. R. Stat. Soc. Ser. B 67 91–108.
- [20]Tibshirani, R. J., Höfling, H. and Tibshirani, R. (2011). Nearly-isotonic regression. Technometrics 53 54–61.DOI
- [21]Tibshirani, R. J. and Taylor, J. (2011). The solution path of the generalized lasso. Ann. Statist. 39 1335–1371.DOI
- [22]Wang, Y.-X., Sharpnack, J., Smola, A. J. and Tibshirani, R. J. (2016). Trend filtering on graphs. J. Mach. Learn. Res. 17 Paper No. 105.
- [23]Yu, Z., Chen, X. and Li, X. (2023). A dynamic programming approach for generalized nearly isotonic optimization. Math. Program. Comput. 15 195–225.arxiv.org/abs/2011.03305