The “η-trick” or the effectiveness of reweighted least-squares
Optimizing a quadratic function is often considered “easy” as it is equivalent to solving a linear system, for which many algorithms exist. Thus, reformulating a non-quadratic optimization problem into a sequence of quadratic problems is a natural idea.
While the standard generic way is Newton method, which is adapted to smooth (at least twice-differentiable) functions, another quite generic way is to use what I have been calling within my lab the “η-trick”.
This can be applied to non-smooth functions, and the simplest version is based on this simple identity:
We thus obtain a variational formulation of as the minimum over of a quadratic function in , as shown below for four values of .

Application to Lasso / basis pursuit
The most classical application is the Lasso problem (as proposed in [3, 4]):
With the variational formulation above applied to each , we get
The key aspect of the variational formulation as a minimization problem is that we obtain a joint minimization problem in the variables , for which we can consider alternating optimization (i.e., alternating between minimizing with respect to and minimizing with respect to ). The optimum with respect to is obtained as , and the optimization with respect to is also simple because of the overall linear/quadratic dependence. The gradient with respect to is equal to
Another nice aspect of the variational formulation above is that it is jointly convex in and hence traditional optimization algorithms are globally convergent.
This formulation as a “min-min” problem should be contrasted with the classical variational formulation of the -norm as a maximum, that is, , which would lead to a “min-max” problem (which leads also to a suite of interpretations and algorithms, but this is for another post).
There is another classical formulation for the squared -norm through

The -ball in green can be obtained as the union of properly scaled ellipsoids with principal axes parallel to the coordinate axes (like the two depicted in pink). For any point on the boundary of the -ball, the enclosed ellipsoid can be made to contain the point.
While the η-trick is most easy for the -norm, it applies to many other situations which I describe below.
Extension to “subquadratic” norms
Given the representation of the -norm as a quadratic function, one may wonder if this can be extended to other norms. In order to preserve the homogeneity of a norm defined on , a natural generalization is a representation in the form
Given that a minimum of linear functions is concave, we see that a necessary condition for the existence of such a parameterization is that is a concave function of . It turns out that this is also a sufficient condition, and that the function can be obtained from using Fenchel conjugacy (see [1, Section 1.4.2]).
Examples include various group norms of the forms , where is a set of subsets of and is the -norm of the subvector obtained from by only keeping the components whose indices are in (this form of “group penalty” is common in structured sparsity [1, Section 1.3] where one wants to force of lot of zeros in , but also wants to encourage some specific patterns in the set of non-zero components). Thus, for all of these, one can derive simple estimation algorithms with a sequence of least-squares problems (there is another connection with multiple kernel learning [1, Section 1.5], see future posts).
Extensions to all norms
This trick can in fact be extended to all norms, but this requires a non-diagonal Hessian for the quadratic term, where now becomes a symmetric positive semi-definite matrix :
For example, for the -ball below, the ellipsoid has axes which are not parallel anymore to the coordinate axes).

We can also consider the total variation penalty of the form where the ’s are positive weights. It is commonly used to encourage piecewise constant vectors . The η-trick can be applied to all terms [7]. This leads to algorithms solving Laplacian systems for which particularly efficient randomized methods are available (see, e.g., [8]).
Extension to spectral norms
When dealing with a spectral norm on a matrix , that is a norm that depends only on the singular values of , then one has a specific representation. For example, for the nuclear norm , which is equal to the sum of singular values of and encourages matrices with low-rank:
Extensions to non-convex penalties
As mentioned above, a necessary condition for a variational representation of a function as a minimum of quadratic functions with diagonal Hessians is the concavity in (the vector composed of squares of the components of ). Other functions beyond norms or squared norms can be considered, such as the following non-convex penalty:
The minimizer above can be obtained in closed form as , and thus the same alternating optimization algorithm can be used. Moreover, the geometric interpretation in terms of enclosing ellipsoids for level sets of still holds but this is not anymore a convex set. See below for the unit ball of .

This leads to reweighted least-squares algorithms when using those penalties, again based on alternating minimization with respect to and [4, 6]. A key difference with the convex case is that the optimization problem is not jointly convex in anymore, and it typically only converges to a local optimum. Note here that reweighted- algorithms (that use a sequence of weighted -regularized problems) are also commonly used, see [2, Section 5.3].
Beyond regularization penalties
While I focused primarily on regularizers, can we apply this to the loss as well? Using the same recipe, “concavity in the squared arguments”, we get naturally new representations, which can be used in particular for optimization purposes.
A notable one is for the logistic function used within logistic regression, which can be written as , with the function being convex in (which can be shown by computing the second-order derivative). This leads to the representation [9]
As shown below, the quadratic upper-bound can be contrasted with (a) the second-order Taylor expansion (thus with matching first two derivatives), which is not an upper-bound (and thus may not lead to global convergence when used for optimization, that is, when Newton method is used), and (b) the upper-bound obtained from the uniform bound on the second-derivative, which is weaker in particular for large values of (and corresponds to using the traditional notion of smoothness of the objective function).

Variational formulation for the logistic function (in red for a single value of ), compared to other approximations which are tight at the same .
Now, you can go ahead and use the η-trick within your optimization problems. But it goes beyond and it pops out in other areas in machine learning, in particular for multiple kernel learning, super-Gaussian distributions and convex relaxations of combinatorial penalties. These will be the topics of future posts.
References
[1] Francis Bach, Rodolphe Jenatton, Julien Mairal, Guillaume Obozinski. Optimization with sparsity-inducing penalties. Foundations and Trends in Machine Learning, 4(1):1-106, 2012. [2] Julien Mairal, Francis Bach, Jean Ponce. Sparse Modeling for Image and Vision Processing. Foundations and Trends in Computer Vision, 8(2-3):85-283, 2014. [3] Yves Grandvalet and Stéphane Canu. Outcomes of the equivalence of adaptive ridge with least absolute shrinkage. Advances in Neural Information Processing Systems (NIPS), 1999. [4] Ingrid Daubechies, Ronald DeVore, Massimo Fornasier, and C. Sinan Güntürk. Iteratively reweighted least squares minimization for sparse recovery. Communications on Pure and Applied Mathematics, 63(1):1–38, 2010. [5] Andreas Argyriou, Theodoros Evgeniou, and Massimiliano Pontil. Multi-task feature learning. Advances in Neural Information Processing Systems (NIPS), 2007. [6] Rodolphe Jenatton, Guillaume Obozinski, and Francis Bach. Structured sparse principal component analysis. Proceedings of the International Conference on Artificial Intelligence and Statistics (AISTATS), 2010. [7] Philipp Grohs, and Markus Sprecher. Total variation regularization on Riemannian manifolds by iteratively reweighted minimization. Information and Inference, 4: 353-378, 2016. [8] Rasmus Kyng, and Sushant Sachdeva. Approximate Gaussian elimination for Laplacians-fast, sparse, and simple. Annual Symposium on Foundations of Computer Science (FOCS), 2016. [9] Tommi S. Jaakkola and Michael I. Jordan. Bayesian parameter estimation via variational methods. Statistics and Computing, 10(1):25-37, 2000. [10] Julien Mairal, Francis Bach, Jean Ponce, and Guillermo Sapiro. Online learning for matrix factorization and sparse coding.Journal of Machine Learning Research, 11:10-60, 2010.