Cardinality minimization: the l_1-norm trick

  • Cardinality mimimization problem

  • The l_1-norm heuristic

  • Application: piece-wise constant fitting

Cardinality Minimization

Many problems in engineering can be cast as

 min_x : mbox{bf Card} (x) ~:~ x in mathbf{P},

where mathbf{P} is a polytope (or, more generally, a convex set), and mbox{bf card}(x) denotes the cardinality (number of non-zero elements) of the vector x. Such problems seek a ‘‘sparse’’ solution, one with many zeroes in it.

A related problem is a penalized version of the above, where we seek to trade-off an objective function against cardinality:

 min_x : f(x) + lambda mbox{bf Card} (x)  ~:~ x in mathbf{P},

where f is some “cost” function, and lambda>0 is a penalty parameter.

Cardinality minimization is a hard problem in general, but it appears in many areas.

The l_1-norm heuristic

The l_1-norm heuristic consists in replacing the (non-convex) cardinality function mbox{bf Card}(x) with a polyhedral (hence, convex) one, involving the l_1-norm. This heuristic leads to replace the problem at the top with

 min_x : |x|_1 ~:~ x in mathbf{P},

which is an LP (provided mathbf{P} is a polyhedron).

If mathbf{P} is described via affine inequalities, as mathbf{P} = { x ::: Ax le b}, with A a matrix and b a vector existing in the matlab workspace, then the following CVX snippet solves the above problem.

CVX implementation
cvx_begin
   variable x(n,1)
   minimize( norm(x,1) )
   subject to
       Ax <= b;
cvx_end

Applications

Piece-wise Constant Fitting

We observe a noisy time-series (encoded in a vector x) which is almost piece-wise constant. The goal in piece-wise constant fitting is to find what the constant levels are, as they have a biological interpretation.

Unfortunately, the signal is not exactly piece-wise constant, but a noisy version of such a signal. Thus, we seek to obtain an estimate of the signal, say hat{x}, such that hat{x} has as few changes in it as possible. We model the latter by minimizing the cardinality of the ‘‘difference’’ vector Dx, where D is the difference matrix

 D = left[ begin{array}{ccccc}-1 & 1 & 0 & ldots & 0  0 &-1 & 1 & ldots & 0  &&& ddots &  ldots & & 0 &-1 & 1 end{array} right].

We are led to the problem

 min_{hat{x}} : |x - hat{x}|_2^2 ~:~ mbox{bf Card} (Dx) le K,

where K is an estimate on the number of jumps in the signal. Here, objective function in the problem is a measure of the error between the noisy measurement and the estimate hat{x}.

The l_1-norm heuristic consists in replacing the top (hard) problem by

 min_{hat{x}} : |x - hat{x}|_2^2 ~:~ |Dx|_1 le K,
alt text 

Piece-wise constant fitting. Top panel: the true signal and its noisy version. Middle: l_1-constrained fitting, showing a good fit with the true (unknown) signal. Bottom: l_2-constrained fitting.