Statistics

copy to come from copywriter for review

143

Monographs on Statistics and Applied Probability 143

S
t
a
t
i
s
t
i
c
a
l

L
e
a
r
n
i
n
g
w
i
t
h
S
p
a
r
s
i
t
y

H
a
s
t
i
e
•

T

i

b
s
h
i
r
a
n

i

•
W
a
n
w

i

r
i
g
h
t

K25103

w w w . c r c p r e s s . c o m

Statistical Learning 
with Sparsity
The Lasso and 
Generalizations

Trevor Hastie 
Robert Tibshirani 
Martin Wainwright

K25103_cover.indd   1

2/24/15   1:35 PM

 
 
 
 
 
 
 
To our parents:

Valerie and Patrick Hastie

Vera and Sami Tibshirani

Patricia and John Wainwright

and to our families:

Samantha, Timothy, and Lynda

Charlie, Ryan, Jess, Julie, and Cheryl

Haruko and Hana

Contents

Preface

1 Introduction

2 The Lasso for Linear Models

Introduction

2.1
2.2 The Lasso Estimator
2.3 Cross-Validation and Inference
2.4 Computation of the Lasso Solution

Single Predictor: Soft Thresholding

2.4.1
2.4.2 Multiple Predictors: Cyclic Coordinate Descent
Soft-Thresholding and Orthogonal Bases
2.4.3

2.5 Degrees of Freedom
2.6 Uniqueness of the Lasso Solutions
2.7 A Glimpse at the Theory
2.8 The Nonnegative Garrote
2.9
2.10 Some Perspective
Exercises

‘q Penalties and Bayes Estimates

3 Generalized Linear Models

3.1
Introduction
3.2 Logistic Regression

3.2.1 Example: Document Classiﬁcation
3.2.2 Algorithms

3.3 Multiclass Logistic Regression

3.3.1 Example: Handwritten Digits
3.3.2 Algorithms
3.3.3 Grouped-Lasso Multinomial
3.4 Log-Linear Models and the Poisson GLM
3.4.1 Example: Distribution Smoothing

3.5 Cox Proportional Hazards Models

3.5.1 Cross-Validation
3.5.2 Pre-Validation
3.6 Support Vector Machines

3.6.1 Logistic Regression with Separable Data

ix

xv

1

7
7
8
13
14
15
16
17
17
19
20
20
22
23
24

29
29
31
32
35
36
37
39
39
40
40
42
43
45
46
49

x

3.7 Computational Details and glmnet
Bibliographic Notes
Exercises

4 Generalizations of the Lasso Penalty

4.1
Introduction
4.2 The Elastic Net
4.3 The Group Lasso

4.3.1 Computation for the Group Lasso
4.3.2
Sparse Group Lasso
4.3.3 The Overlap Group Lasso

4.4 Sparse Additive Models and the Group Lasso
4.4.1 Additive Models and Backﬁtting
4.4.2
4.4.3 Approaches Using Optimization and the Group Lasso
4.4.4 Multiple Penalization for Sparse Additive Models

Sparse Additive Models and Backﬁtting

4.5 The Fused Lasso

4.5.1 Fitting the Fused Lasso

4.5.1.1 Reparametrization
4.5.1.2 A Path Algorithm
4.5.1.3 A Dual Path Algorithm
4.5.1.4 Dynamic Programming for the Fused Lasso

4.5.2 Trend Filtering
4.5.3 Nearly Isotonic Regression

4.6 Nonconvex Penalties
Bibliographic Notes
Exercises

5 Optimization Methods
Introduction

5.1
5.2 Convex Optimality Conditions

5.2.1 Optimality for Diﬀerentiable Problems
5.2.2 Nondiﬀerentiable Functions and Subgradients

5.3 Gradient Descent

5.3.1 Unconstrained Gradient Descent
5.3.2 Projected Gradient Methods
5.3.3 Proximal Gradient Methods
5.3.4 Accelerated Gradient Methods

5.4 Coordinate Descent

Separability and Coordinate Descent

5.4.1
5.4.2 Linear Regression and the Lasso
5.4.3 Logistic Regression and Generalized Linear Models

5.5 A Simulation Study
5.6 Least Angle Regression
5.7 Alternating Direction Method of Multipliers

50
52
53

55
55
56
58
62
64
65
69
69
70
72
74
76
77
78
79
79
80
81
83
84
86
88

95
95
95
95
98
100
101
102
103
107
109
110
112
115
117
118
121

5.8 Minorization-Maximization Algorithms
5.9 Biconvexity and Alternating Minimization
5.10 Screening Rules
Bibliographic Notes
Appendix
Exercises

6 Statistical Inference

6.1 The Bayesian Lasso
6.2 The Bootstrap
6.3 Post-Selection Inference for the Lasso

6.3.1 The Covariance Test
6.3.2 A General Scheme for Post-Selection Inference
6.3.2.1 Fixed-λ Inference for the Lasso
6.3.2.2 The Spacing Test for LAR

6.3.3 What Hypothesis Is Being Tested?
6.3.4 Back to Forward Stepwise Regression
Inference via a Debiased Lasso

6.4
6.5 Other Proposals for Post-Selection Inference
Bibliographic Notes
Exercises

xi

123
124
127
131
132
134

139
139
142
147
147
150
154
156
157
158
158
160
161
162

Introduction

7.1
7.2 The Singular Value Decomposition
7.3 Missing Data and Matrix Completion

7.3.1 The Netﬂix Movie Challenge
7.3.2 Matrix Completion Using Nuclear Norm
7.3.3 Theoretical Results for Matrix Completion
7.3.4 Maximum Margin Factorization and Related Methods

7 Matrix Decompositions, Approximations, and Completion 167
167
169
169
170
174
177
181
184
185
187
190
195
196

7.4 Reduced-Rank Regression
7.5 A General Matrix Regression Framework
7.6 Penalized Matrix Decomposition
7.7 Additive Matrix Decomposition
Bibliographic Notes
Exercises

8 Sparse Multivariate Methods

Introduction

8.1
8.2 Sparse Principal Components Analysis
Some Background
Sparse Principal Components
8.2.2.1
Sparsity from Maximum Variance
8.2.2.2 Methods Based on Reconstruction

8.2.1
8.2.2

8.2.3 Higher-Rank Solutions

201
201
202
202
204
204
206
207

xii

Illustrative Application of Sparse PCA

8.2.3.1
Sparse PCA via Fantope Projection
Sparse Autoencoders and Deep Learning
Some Theory for Sparse PCA

8.2.4
8.2.5
8.2.6

8.3 Sparse Canonical Correlation Analysis

8.3.1 Example: Netﬂix Movie Rating Data

8.4 Sparse Linear Discriminant Analysis

8.4.1 Normal Theory and Bayes’ Rule
8.4.2 Nearest Shrunken Centroids
8.4.3 Fisher’s Linear Discriminant Analysis

8.4.3.1 Example: Simulated Data with Five Classes

8.4.4 Optimal Scoring

8.4.4.1 Example: Face Silhouettes

8.5 Sparse Clustering

8.5.1

Some Background on Clustering
8.5.1.1 Example: Simulated Data with Six Classes
Sparse Hierarchical Clustering
Sparse K-Means Clustering

8.5.2
8.5.3
8.5.4 Convex Clustering

Bibliographic Notes
Exercises

9 Graphs and Model Selection

Introduction

9.1
9.2 Basics of Graphical Models

9.2.1 Factorization and Markov Properties

9.2.1.1 Factorization Property
9.2.1.2 Markov Property
9.2.1.3 Equivalence of Factorization and Markov

Properties

9.2.2

Some Examples
9.2.2.1 Discrete Graphical Models
9.2.2.2 Gaussian Graphical Models

9.3 Graph Selection via Penalized Likelihood

9.3.1 Global Likelihoods for Gaussian Models
9.3.2 Graphical Lasso Algorithm
9.3.3 Exploiting Block-Diagonal Structure
9.3.4 Theoretical Guarantees for the Graphical Lasso
9.3.5 Global Likelihood for Discrete Models

9.4 Graph Selection via Conditional Inference

9.4.1 Neighborhood-Based Likelihood for Gaussians
9.4.2 Neighborhood-Based Likelihood for Discrete Models
9.4.3 Pseudo-Likelihood for Mixed Models

9.5 Graphical Models with Hidden Variables
Bibliographic Notes

209
210
210
212
213
215
217
217
218
221
222
225
226
227
227
228
228
230
231
232
234

241
241
241
241
242
243

243
244
244
245
246
247
248
251
252
253
254
255
256
259
261
261

Exercises

10 Signal Approximation and Compressed Sensing

10.1 Introduction
10.2 Signals and Sparse Representations

10.2.1 Orthogonal Bases
10.2.2 Approximation in Orthogonal Bases
10.2.3 Reconstruction in Overcomplete Bases

10.3 Random Projection and Approximation

10.3.1 Johnson–Lindenstrauss Approximation
10.3.2 Compressed Sensing

10.4 Equivalence between ‘0 and ‘1 Recovery
10.4.1 Restricted Nullspace Property
10.4.2 Suﬃcient Conditions for Restricted Nullspace
10.4.3 Proofs

10.4.3.1 Proof of Theorem 10.1
10.4.3.2 Proof of Proposition 10.1

Bibliographic Notes
Exercises

11 Theoretical Results for the Lasso

11.1 Introduction

11.1.1 Types of Loss Functions
11.1.2 Types of Sparsity Models

11.2 Bounds on Lasso ‘2-Error

11.2.1 Strong Convexity in the Classical Setting
11.2.2 Restricted Eigenvalues for Regression
11.2.3 A Basic Consistency Result

11.3 Bounds on Prediction Error
11.4 Support Recovery in Linear Regression

11.4.1 Variable-Selection Consistency for the Lasso

11.4.1.1 Some Numerical Studies

11.4.2 Proof of Theorem 11.3

11.5 Beyond the Basic Lasso
Bibliographic Notes
Exercises

Bibliography

Author Index

Index

xiii

263

269
269
269
269
271
274
276
277
278
280
281
282
284
284
284
285
286

289
289
289
290
291
291
293
294
299
301
301
303
305
309
311
312

315

337

343

Preface

In this monograph, we have attempted to summarize the actively developing
ﬁeld of statistical learning with sparsity. A sparse statistical model is one
having only a small number of nonzero parameters or weights. It represents a
classic case of “less is more”: a sparse model can be much easier to estimate
and interpret than a dense model. In this age of big data, the number of
features measured on a person or object can be large, and might be larger
than the number of observations. The sparsity assumption allows us to tackle
such problems and extract useful and reproducible patterns from big datasets.
The ideas described here represent the work of an entire community of
researchers in statistics and machine learning, and we thank everyone for
their continuing contributions to this exciting area. We particularly thank our
colleagues at Stanford, Berkeley and elsewhere; our collaborators, and our
past and current students working in this area. These include Alekh Agarwal,
Arash Amini, Francis Bach, Jacob Bien, Stephen Boyd, Andreas Buja, Em-
manuel Candes, Alexandra Chouldechova, David Donoho, John Duchi, Brad
Efron, Will Fithian, Jerome Friedman, Max G’Sell, Iain Johnstone, Michael
Jordan, Ping Li, Po-Ling Loh, Michael Lim, Jason Lee, Richard Lockhart,
Rahul Mazumder, Balasubramanian Narashimhan, Sahand Negahban, Guil-
laume Obozinski, Mee-Young Park, Junyang Qian, Garvesh Raskutti, Pradeep
Ravikumar, Saharon Rosset, Prasad Santhanam, Noah Simon, Dennis Sun,
Yukai Sun, Jonathan Taylor, Ryan Tibshirani,1 Stefan Wager, Daniela Wit-
ten, Bin Yu, Yuchen Zhang, Ji Zhou, and Hui Zou. We also thank our editor
John Kimmel for his advice and support.

Stanford University
and
University of California, Berkeley

Trevor Hastie
Robert Tibshirani
Martin Wainwright

1Some of the bibliographic references,

for example in Chapters 4 and 6, are to
Tibshirani2, R.J., rather than Tibshirani, R.; the former is Ryan Tibshirani, the latter
is Robert (son and father).

xv

Chapter 1

Introduction

“I never keep a scorecard or the batting averages. I hate statistics. What
I got to know, I keep in my head.”

This is a quote from baseball pitcher Dizzy Dean, who played in the major
leagues from 1930 to 1947.

How the world has changed in the 75 or so years since that time! Now large
quantities of data are collected and mined in nearly every area of science, en-
tertainment, business, and industry. Medical scientists study the genomes of
patients to choose the best treatments, to learn the underlying causes of their
disease. Online movie and book stores study customer ratings to recommend
or sell them new movies or books. Social networks mine information about
members and their friends to try to enhance their online experience. And
yes, most major league baseball teams have statisticians who collect and ana-
lyze detailed information on batters and pitchers to help team managers and
players make better decisions.

Thus the world is awash with data. But as Rutherford D. Roger (and

others) has said:

“We are drowning in information and starving for knowledge.”

There is a crucial need to sort through this mass of information, and pare
it down to its bare essentials. For this process to be successful, we need to
hope that the world is not as complex as it might be. For example, we hope
that not all of the 30, 000 or so genes in the human body are directly involved
in the process that leads to the development of cancer. Or that the ratings
by a customer on perhaps 50 or 100 diﬀerent movies are enough to give us a
good idea of their tastes. Or that the success of a left-handed pitcher against
left-handed batters will be fairly consistent for diﬀerent batters.

This points to an underlying assumption of simplicity. One form of sim-
plicity is sparsity, the central theme of this book. Loosely speaking, a sparse
statistical model is one in which only a relatively small number of parameters
(or predictors) play an important role. In this book we study methods that
exploit sparsity to help recover the underlying signal in a set of data.

The leading example is linear regression, in which we observe N obser-
vations of an outcome variable yi and p associated predictor variables (or
features) xi = (xi1, . . . xip)T . The goal is to predict the outcome from the

1

2

INTRODUCTION

predictors, both for actual prediction with future data and also to discover
which predictors play an important role. A linear regression model assumes
that

yi = β0 +

p
X

j=1

xijβj + ei,

(1.1)

where β0 and β = (β1, β2, . . . βp) are unknown parameters and ei is an error
term. The method of least squares provides estimates of the parameters by
minimization of the least-squares objective function

minimize
β0,β

N
X

i=1

(yi

β0

−

−

p
X

j=1

xijβj)2.

(1.2)

Typically all of the least-squares estimates from (1.2) will be nonzero. This
will make interpretation of the ﬁnal model challenging if p is large. In fact, if
p > N , the least-squares estimates are not unique. There is an inﬁnite set of
solutions that make the objective function equal to zero, and these solutions
almost surely overﬁt the data as well.

Thus there is a need to constrain, or regularize the estimation process. In
the lasso or ‘1-regularized regression, we estimate the parameters by solving
the problem

minimize
β0,β

N
X

(yi

i=1

β0

−

−

p
X

j=1

xijβj)2 subject to

β

k

1
k

≤

t

(1.3)

1 = Pp
k

β
k

where
is the ‘1 norm of β, and t is a user-speciﬁed parameter.
We can think of t as a budget on the total ‘1 norm of the parameter vector,
and the lasso ﬁnds the best ﬁt within this budget.

j=1 |

βj

|

Why do we use the ‘1 norm? Why not use the ‘2 norm or any ‘q norm? It
turns out that the ‘1 norm is special. If the budget t is small enough, the lasso
yields sparse solution vectors, having only some coordinates that are nonzero.
This does not occur for ‘q norms with q > 1; for q < 1, the solutions are
sparse but the problem is not convex and this makes the minimization very
challenging computationally. The value q = 1 is the smallest value that yields
a convex problem. Convexity greatly simpliﬁes the computation, as does the
sparsity assumption itself. They allow for scalable algorithms that can handle
problems with even millions of parameters.

Thus the advantages of sparsity are interpretation of the ﬁtted model and
computational convenience. But a third advantage has emerged in the last
few years from some deep mathematical analyses of this area. This has been
termed the “bet on sparsity” principle:

Use a procedure that does well in sparse problems, since no procedure
does well in dense problems.

STATISTICAL LEARNING WITH SPARSITY

3

(cid:29)

We can think of this in terms of the amount of information N/p per param-
eter. If p
N and the true model is not sparse, then the number of samples N
is too small to allow for accurate estimation of the parameters. But if the true
model is sparse, so that only k < N parameters are actually nonzero in the
true underlying model, then it turns out that we can estimate the parameters
eﬀectively, using the lasso and related methods that we discuss in this book.
This may come as somewhat of a surprise, because we are able to do this even
though we are not told which k of the p parameters are actually nonzero. Of
course we cannot do as well as we could if we had that information, but it
turns out that we can still do reasonably well.

Figure 1.1 15-class gene expression cancer data: estimated nonzero feature weights
from a lasso-regularized multinomial classiﬁer. Shown are the 254 genes (out of 4718)
with at least one nonzero weight among the 15 classes. The genes (unlabelled) run
from top to bottom. Line segments pointing to the right indicate positive weights,
and to the left, negative weights. We see that only a handful of genes are needed to
characterize each class.

For all of these reasons, the area of sparse statistical modelling is exciting—
for data analysts, computer scientists, and theorists—and practically useful.
Figure 1.1 shows an example. The data consists of quantitative gene expression
measurements of 4718 genes on samples from 349 cancer patients. The cancers
have been categorized into 15 diﬀerent types such as “Bladder,” “Breast”,

BladderBreastCNSColonKidneyLiverLungLymphNormalOvaryPancreasProstateSoftStomachTestis4

INTRODUCTION

“CNS,” etc. The goal is to build a classiﬁer to predict cancer class based on
some or all of the 4718 features. We want the classiﬁer to have a low error rate
on independent samples and would prefer that it depend only on a subset of
the genes, to aid in our understanding of the underlying biology.

For this purpose we applied a lasso-regularized multinomial classiﬁer to
these data, as described in Chapter 3. This produces a set of 4718 weights or
coeﬃcients for each of the 15 classes, for discriminating each class from the
rest. Because of the ‘1 penalty, only some of these weights may be nonzero
(depending on the choice of the regularization parameter). We used cross-
validation to estimate the optimal choice of regularization parameter, and
display the resulting weights in Figure 1.1. Only 254 genes have at least one
nonzero weight, and these are displayed in the ﬁgure. The cross-validated
error rate for this classiﬁer is about 10%, so the procedure correctly predicts
the class of about 90% of the samples. By comparison, a standard support
vector classiﬁer had a slightly higher error rate (13%) using all of the features.
Using sparsity, the lasso procedure has dramatically reduced the number of
features without sacriﬁcing accuracy. Sparsity has also brought computational
eﬃciency: although there are potentially 4718
70, 000 parameters to
estimate, the entire calculation for Figure 1.1 was done on a standard laptop
computer in less than a minute. For this computation we used the glmnet
procedure described in Chapters 3 and 5.

15

×

≈

Figure 1.2 shows another example taken from an article by Cand`es and
Wakin (2008) in the ﬁeld of compressed sensing. On the left is a megapixel
image. In order to reduce the amount of space needed to store the image,
we represent it in a wavelet basis, whose coeﬃcients are shown in the middle
panel. The largest 25, 000 coeﬃcients are then retained and the rest zeroed
out, yielding the excellent reconstruction in the right image. This all works
because of sparsity: although the image seems complex, in the wavelet basis it
is simple and hence only a relatively small number of coeﬃcients are nonzero.
The original image can be perfectly recovered from just 96, 000 incoherent
measurements. Compressed sensing is a powerful tool for image analysis, and
is described in Chapter 10.

In this book we have tried to summarize the hot and rapidly evolving ﬁeld
of sparse statistical modelling. In Chapter 2 we describe and illustrate the
lasso for linear regression, and a simple coordinate descent algorithm for its
computation. Chapter 3 covers the application of ‘1 penalties to generalized
linear models such as multinomial and survival models, as well as support
vector machines. Generalized penalties such as the elastic net and group lasso
are discussed in Chapter 4. Chapter 5 reviews numerical methods for opti-
mization, with an emphasis on ﬁrst-order methods that are useful for the
large-scale problems that are discussed in this book. In Chapter 6, we dis-
cuss methods for statistical inference for ﬁtted (lasso) models, including the
bootstrap, Bayesian methods and some more recently developed approaches.
Sparse matrix decomposition is the topic of Chapter 7, and we apply these
methods in the context of sparse multivariate analysis in Chapter 8. Graph-

STATISTICAL LEARNING WITH SPARSITY

5

Figure 1.2 (a) Original megapixel image with pixel values in the range [0, 255]
and (b) its wavelet transform coeﬃcients (arranged in random order for enhanced
visibility). Relatively few wavelet coeﬃcients capture most of the signal energy; many
such images are highly compressible. (c) The reconstruction obtained by zeroing out
all the coeﬃcients in the wavelet expansion but the 25, 000 largest (pixel values are
thresholded to the range [0, 255]). The diﬀerences from the original picture are hardly
noticeable.

ical models and their selection are discussed in Chapter 9 while compressed
sensing is the topic of Chapter 10. Finally, a survey of theoretical results for
the lasso is given in Chapter 11.

We note that both supervised and unsupervised learning problems are dis-
cussed in this book, the former in Chapters 2, 3, 4, and 10, and the latter in
Chapters 7 and 8.

Notation

∈

We have adopted a notation to reduce mathematical clutter. Vectors are col-
Rp is a column vector, and its transpose
umn vectors by default; hence β
βT is a row vector. All vectors are lower case and non-bold, except N -vectors
which are bold, where N is the sample size. For example xj might be the
N -vector of observed values for the jth variable, and y the response N -vector.
p matrix of observed
All matrices are bold; hence X might represent the N
Rp to
predictors, and Θ a p
∈
represent the vector of p features for observation i (i.e., xT
is the ith row of
i
X), while xk is the kth column of X, without ambiguity.

p precision matrix. This allows us to use xi

×

×

theory tells us that, if f(t)actually has very low band-width, then a small number of (uniform) samples will suf-fice for recovery. As we will see in the remainder of thisarticle, signal recovery can actually be made possible for amuch broader class of signal models.INCOHERENCE AND THE SENSING OF SPARSE SIGNALSThis section presents the two fundamental premises underlyingCS: sparsity and incoherence.SPARSITYMany natural signals have concise representations whenexpressed in a convenient basis. Consider, for example, theimage in Figure 1(a) and its wavelet transform in (b).Although nearly all the image pixels have nonzero values, thewavelet coefficients offer a concise summary: most coeffi-cients are small, and the relatively few large coefficients cap-ture most of the information.Mathematically speaking, we have a vector f∈Rn(such asthe n-pixel image in Figure 1) which we expand in an orthonor-mal basis (such as a wavelet basis) (cid:2)=[ψ1ψ2···ψn]as follows:f(t)=n(cid:2)i=1xiψi(t),(2)where xis the coefficient sequence of f, xi=(cid:3)f,ψi(cid:4). It will beconvenient to express fas (cid:2)x(where (cid:2)is the n×nmatrixwith ψ1,...,ψnas columns). The implication of sparsity isnow clear: when a signal has a sparse expansion, one can dis-card the small coefficients without much perceptual loss.Formally, consider fS(t)obtained by keeping only the termscorresponding to the Slargest values of (xi)in the expansion(2). By definition, fS:=(cid:2)xS, where here and below, xSis thevector of coefficients (xi)with all but the largest Sset to zero.This vector is sparse in a strict sense since all but a few of itsentries are zero; we will call S-sparsesuch objects with at most Snonzeroentries. Since (cid:2)is an orthonormalbasis (or “orthobasis”), we have(cid:5)f−fS(cid:5)(cid:4)2=(cid:5)x−xS(cid:5)(cid:4)2,and if xissparse or compressiblein the sensethat the sorted magnitudes of the (xi)decay quickly, then xis well approxi-mated by xSand, therefore, the error(cid:5)f−fS(cid:5)(cid:4)2is small. In plain terms,one can “throw away” a large fractionof the coefficients without much loss.Figure 1(c) shows an example wherethe perceptual loss is hardly noticeablefrom a megapixel image to its approxi-mation obtained by throwing away97.5% of the coefficients.This principle is, of course, whatunderlies most modern lossy coderssuch as JPEG-2000 [4] and manyothers, since a simple method for data compression would be tocompute xfrom fand then (adaptively) encode the locationsand values of the Ssignificant coefficients. Such a processrequires knowledge of all the ncoefficients x, as the locationsof the significant pieces of information may not be known inadvance (they are signal dependent); in our example, they tendto be clustered around edges in the image. More generally,sparsity is a fundamental modeling tool which permits efficientfundamental signal processing; e.g., accurate statistical estima-tion and classification, efficient data compression, and so on.This article is about a more surprising and far-reaching impli-cation, however, which is that sparsity has significant bearingson the acquisition process itself. Sparsity determines how effi-ciently one can acquire signals nonadaptively.INCOHERENT SAMPLINGSuppose we are given a pair ((cid:5),(cid:2))of orthobases of Rn. The firstbasis (cid:5)is used for sensing the object fas in (1) and the second isused to represent f. The restriction to pairs of orthobases is notessential and will merely simplify our treatment.DEFINITION 1The coherence between the sensing basis (cid:5)and the representa-tion basis (cid:2)isμ((cid:5),(cid:2))=√n·max1≤k,j≤n|(cid:3)ϕk,ψj(cid:4)|.(3)In plain English, the coherence measures the largest correlationbetween any two elements of (cid:5)and (cid:2); see also [5]. If (cid:5)and (cid:2)contain correlated elements, the coherence is large. Otherwise,it is small. As for how large and how small, it follows from linearalgebra that μ((cid:5),(cid:2))∈[1,√n].Compressive sampling is mainly concerned with low coher-ence pairs, and we now give examples of such pairs. In our firstexample, (cid:5)is the canonical or spike basis ϕk(t)=δ(t−k)and[FIG1](a) Original megapixel image with pixel values in the range [0,255] and (b) itswavelet transform coefficients (arranged in random order for enhanced visibility).Relatively few wavelet coefficients capture most of the signal energy; many such imagesare highly compressible. (c) The reconstruction obtained by zeroing out all the coefficientsin the wavelet expansion but the 25,000 largest (pixel values are thresholded to the range[0,255]). The difference with the original picture is hardly noticeable. As we describe in“Undersampling and Sparse Signal Recovery,” this image can be perfectly recovered fromjust 96,000 incoherent measurements.(a)(b)−10246810−0.500.51.52WaveletCoefficients× 1041(c)× 105IEEE SIGNAL PROCESSING MAGAZINE[23]MARCH 2008Chapter 2

The Lasso for Linear Models

In this chapter, we introduce the lasso estimator for linear regression. We
describe the basic lasso method, and outline a simple approach for its im-
plementation. We relate the lasso to ridge regression, and also view it as a
Bayesian estimator.

2.1 Introduction

N
In the linear regression setting, we are given N samples
i=1, where
each xi = (xi1, . . . , xip) is a p-dimensional vector of features or predictors, and
each yi
R is the associated response variable. Our goal is to approximate
the response variable yi using a linear combination of the predictors

(xi, yi)
}
{

∈

η(xi) = β0 +

p
X

j=1

xijβj.

(2.1)

The model
(β1, . . . , βp)

is parametrized by the vector of regression weights β =
Rp and an intercept (or “bias”) term β0

R.

The usual “least-squares” estimator for the pair (β0, β) is based on mini-

∈

∈

mizing squared-error loss:

minimize
β0,β






1
2N

N
X

i=1

(cid:0)yi

β0

−

−

p
X

j=1

(cid:1)2

xijβj






.

(2.2)

There are two reasons why we might consider an alternative to the least-
squares estimate. The ﬁrst reason is prediction accuracy: the least-squares
estimate often has low bias but large variance, and prediction accuracy can
sometimes be improved by shrinking the values of the regression coeﬃcients,
or setting some coeﬃcients to zero. By doing so, we introduce some bias but
reduce the variance of the predicted values, and hence may improve the overall
prediction accuracy (as measured in terms of the mean-squared error). The
second reason is for the purposes of interpretation. With a large number of
predictors, we often would like to identify a smaller subset of these predictors
that exhibit the strongest eﬀects.

7

8

THE LASSO FOR LINEAR MODELS

This chapter is devoted to discussion of the lasso, a method that combines
the least-squares loss (2.2) with an ‘1-constraint, or bound on the sum of the
absolute values of the coeﬃcients. Relative to the least-squares solution, this
constraint has the eﬀect of shrinking the coeﬃcients, and even setting some
to zero.1 In this way it provides an automatic way for doing model selection
in linear regression. Moreover, unlike some other criteria for model selection,
the resulting optimization problem is convex, and can be solved eﬃciently for
large problems.

2.2 The Lasso Estimator

Given a collection of N predictor-response pairs
the solution ( bβ0, bβ) to the optimization problem

(xi, yi)
}

{

N
i=1, the lasso ﬁnds

minimize
β0,β






1
2N

N
X

i=1

(yi

β0

−

−

p
X

j=1

xijβj)2






subject to

p
X

j=1

βj

|

| ≤

t.

(2.3)

β

βj

The constraint Pp
t can be written more compactly as the ‘1-norm
constraint
t. Furthermore, (2.3) is often represented using matrix-
vector notation. Let y = (y1, . . . , yN ) denote the N -vector of responses, and
Rp in its ith row, then the optimization
X be an N
problem (2.3) can be re-expressed as

p matrix with xi

j=1 |
≤

| ≤

1
k

×

∈

k

minimize
β0,β

(cid:26) 1

y

2N k
−
subject to

(cid:27)

β01

Xβ

2
2
k

−

(2.4)

β

1
k

t,

≤

k
where 1 is the vector of N ones, and
2 denotes the usual Euclidean norm
k · k
on vectors. The bound t is a kind of “budget”: it limits the sum of the abso-
lute values of the parameter estimates. Since a shrunken parameter estimate
corresponds to a more heavily-constrained model, this budget limits how well
we can ﬁt the data. It must be speciﬁed by an external procedure such as
cross-validation, which we discuss later in the chapter.

Typically, we ﬁrst standardize the predictors X so that each column is
ij = 1). Without

i=1 xij = 0) and has unit variance ( 1
N

centered ( 1
N

i=1 x2

PN

PN

1A lasso is a long rope with a noose at one end, used to catch horses and cattle. In
a ﬁgurative sense, the method “lassos” the coeﬃcients of the model. In the original lasso
paper (Tibshirani 1996), the name “lasso” was also introduced as an acronym for “Least
Absolute Selection and Shrinkage Operator.”
Pronunciation: in the US “lasso” tends to be pronounced “lass-oh” (oh as in goat), while in
the UK “lass-oo.” In the OED (2nd edition, 1965): “lasso is pronounced l˘asoo by those who
use it, and by most English people too.”

THE LASSO ESTIMATOR

9

standardization, the lasso solutions would depend on the units (e.g., feet ver-
sus meters) used to measure the predictors. On the other hand, we typically
would not standardize if the features were measured in the same units. For
convenience, we also assume that the outcome values yi have been centered,
meaning that 1
i=1 yi = 0. These centering conditions are convenient, since
N
they mean that we can omit the intercept term β0 in the lasso optimization.
Given an optimal lasso solution bβ on the centered data, we can recover the
optimal solutions for the uncentered data: bβ is the same, and the intercept bβ0
is given by

PN

bβ0 = ¯y

p
X

j=1

−

¯xj bβj,

where ¯y and
intercept β0 from the lasso for the remainder of this chapter.

p
1 are the original means.2 For this reason, we omit the
}

¯xj
{

It is often convenient to rewrite the lasso problem in the so-called La-

grangian form

minimize
β∈Rp

(cid:26) 1

2N k

y

Xβ

2
2 + λ
k

k

β

1

k

−

(cid:27)

,

(2.5)

≥

for some λ
0. By Lagrangian duality, there is a one-to-one correspondence
between the constrained problem (2.3) and the Lagrangian form (2.5): for
each value of t in the range where the constraint
t is active, there is
a corresponding value of λ that yields the same solution from the Lagrangian
form (2.5). Conversely, the solution bβλ to problem (2.5) solves the bound
problem with t =

1
k

≤

β

k

We note that in many descriptions of the lasso, the factor 1/2N appearing
in (2.3) and (2.5) is replaced by 1/2 or simply 1. Although this makes no
diﬀerence in (2.3), and corresponds to a simple reparametrization of λ in
(2.5), this kind of standardization makes λ values comparable for diﬀerent
sample sizes (useful for cross-validation).

bβλ
k

k

1.

The theory of convex analysis tells us that necessary and suﬃcient condi-

tions for a solution to problem (2.5) take the form

1
N h

xj, y

−

Xβ

i

−

+ λsj = 0, j = 1, . . . , p.

(2.6)

−

= 0 and some
Here each sj is an unknown quantity equal to sign(βj) if βj
value lying in [
1, 1] otherwise—that is, it is a subgradient for the absolute
value function (see Chapter 5 for details). In other words, the solutions ˆβ
to problem (2.5) are the same as solutions ( ˆβ, ˆs) to (2.6). This system is a
form of the so-called Karush–Kuhn–Tucker (KKT) conditions for problem
(2.5). Expressing a problem in subgradient form can be useful for designing

2This is typically only true for linear regression with squared-error loss; it’s not true, for

example, for lasso logistic regression.

6
10

THE LASSO FOR LINEAR MODELS

algorithms for ﬁnding its solutions. More details are given in Exercises (2.3)
and (2.4).

As an example of the lasso, let us consider the data given in Table 2.1, taken
from Thomas (1990). The outcome is the total overall reported crime rate per

Table 2.1 Crime data: Crime rate and ﬁve predictors, for N = 50 U.S. cities.

city
1
2
3
4
5
...
50

funding
40
32
57
31
67
...
66

hs
74
72
70
71
72
...
67

not-hs
11
11
18
11
9
...
26

college
31
43
16
25
29
...
18

college4
20
18
16
19
24

crime rate
478
494
643
341
773

16

940

one million residents in 50 U.S cities. There are ﬁve predictors: annual police
funding in dollars per resident, percent of people 25 years and older with four
years of high school, percent of 16- to 19-year olds not in high school and not
high school graduates, percent of 18- to 24-year olds in college, and percent
of people 25 years and older with at least four years of college. This small
example is for illustration only, but helps to demonstrate the nature of the
lasso solutions. Typically the lasso is most useful for much larger problems,
N .
including “wide” data for which p

The left panel of Figure 2.1 shows the result of applying the lasso with
the bound t varying from zero on the left, all the way to a large value on
the right, where it has no eﬀect. The horizontal axis has been scaled so that
the maximal bound, corresponding to the least-squares estimates ˜β, is one.
We see that for much of the range of the bound, many of the estimates are
exactly zero and hence the corresponding predictor(s) would be excluded from
the model. Why does the lasso have this model selection property? It is due
t. To understand this
to the geometry that underlies the ‘1 constraint
better, the right panel shows the estimates from ridge regression, a technique
that predates the lasso. It solves a criterion very similar to (2.3):

≤

β

k

k

1

(cid:29)

minimize
β0,β






1
2N

N
X

i=1

(yi

β0

−

−

p
X

j=1

xijβj)2






subject to

p
X

j=1

β2
j ≤

t2.

(2.7)

The ridge proﬁles in the right panel have roughly the same shape as the lasso
proﬁles, but are not equal to zero except at the left end. Figure 2.2 contrasts
the two constraints used in the lasso and ridge regression. The residual sum

THE LASSO ESTIMATOR

11

Figure 2.1 Left: Coeﬃcient path for the lasso, plotted versus the ‘1 norm of the
coeﬃcient vector, relative to the norm of the unrestricted least-squares estimate ˜β.
Right: Same for ridge regression, plotted against the relative ‘2 norm.

Figure 2.2 Estimation picture for the lasso (left) and ridge regression (right). The
2 ≤ t2, respectively,
solid blue areas are the constraint regions |β1|+|β2| ≤ t and β2
while the red ellipses are the contours of the residual-sum-of-squares function. The
point bβ depicts the usual (unconstrained) least-squares estimate.

1 +β2

0.00.20.40.60.81.0−50510Coefficientshscollegecollege4not−hsfundingLasso0.00.20.40.60.81.0−50510Coefficientshscollegecollege4not−hsfundingRidge Regressionkˆβk1/k˜βk1kˆβk2/k˜βk2β^β^2..β1β2β1β12

THE LASSO FOR LINEAR MODELS

Table 2.2 Results from analysis of the crime data. Left panel shows the least-squares
estimates, standard errors, and their ratio (Z-score). Middle and right panels show
the corresponding results for the lasso, and the least-squares estimates applied to the
subset of predictors chosen by the lasso.

funding
hs
not-hs
college
college4

LS coef
10.98
-6.09
5.48
0.38
5.50

SE
3.08
6.54
10.05
4.42
13.75

Z
3.6
-0.9
0.5
0.1
0.4

Lasso
8.84
-1.41
3.12
0.0
0.0

SE
3.55
3.73
5.05
-
-

Z
2.5
-0.4
0.6
-
-

LS
11.29
-4.76
3.44
0.0
0.0

SE
2.90
4.53
7.83
-
-

Z
3.9
-1.1
0.4
-
-

of squares has elliptical contours, centered at the full least-squares estimates.
The constraint region for ridge regression is the disk β2
t2, while that
1 + β2
for lasso is the diamond
t. Both methods ﬁnd the ﬁrst point where
+
the elliptical contours hit the constraint region. Unlike the disk, the diamond
has corners; if the solution occurs at a corner, then it has one parameter
βj equal to zero. When p > 2, the diamond becomes a rhomboid, and has
many corners, ﬂat edges, and faces; there are many more opportunities for
the estimated parameters to be zero (see Figure 4.2 on page 58.)

β1
|

β2
|

2 ≤

| ≤

|

We use the term sparse for a model with few nonzero coeﬃcients. Hence a
key property of the ‘1-constraint is its ability to yield sparse solutions. This
idea can be applied in many diﬀerent statistical models, and is the central
theme of this book.

Table 2.2 shows the results of applying three ﬁtting procedures to the
crime data. The lasso bound t was chosen by cross-validation, as described
in Section 2.3. The left panel corresponds to the full least-squares ﬁt, while
the middle panel shows the lasso ﬁt. On the right, we have applied least-
squares estimation to the subset of three predictors with nonzero coeﬃcients
in the lasso. The standard errors for the least-squares estimates come from the
usual formulas. No such simple formula exists for the lasso, so we have used
the bootstrap to obtain the estimate of standard errors in the middle panel
(see Exercise 2.6; Chapter 6 discusses some promising new approaches for
post-selection inference). Overall it appears that funding has a large eﬀect,
probably indicating that police resources have been focused on higher crime
areas. The other predictors have small to moderate eﬀects.

Note that the lasso sets two of the ﬁve coeﬃcients to zero, and tends to
shrink the coeﬃcients of the others toward zero relative to the full least-squares
estimate. In turn, the least-squares ﬁt on the subset of the three predictors
tends to expand the lasso estimates away from zero. The nonzero estimates
from the lasso tend to be biased toward zero, so the debiasing in the right
panel can often improve the prediction error of the model. This two-stage
process is also known as the relaxed lasso (Meinshausen 2007).

CROSS-VALIDATION AND INFERENCE

13

2.3 Cross-Validation and Inference

The bound t in the lasso criterion (2.3) controls the complexity of the model;
larger values of t free up more parameters and allow the model to adapt
more closely to the training data. Conversely, smaller values of t restrict the
parameters more, leading to sparser, more interpretable models that ﬁt the
data less closely. Forgetting about interpretability, we can ask for the value
of t that gives the most accurate model for predicting independent test data
from the same population. Such accuracy is called the generalization ability of
the model. A value of t that is too small can prevent the lasso from capturing
the main signal in the data, while too large a value can lead to overﬁtting.
In this latter case, the model adapts to the noise as well as the signal that is
present in the training data. In both cases, the prediction error on a test set
will be inﬂated. There is usually an intermediate value of t that strikes a good
balance between these two extremes, and in the process, produces a model
with some coeﬃcients equal to zero.

−

In order to estimate this best value for t, we can create artiﬁcial training
and test sets by splitting up the given dataset at random, and estimating
performance on the test data, using a procedure known as cross-validation.
In more detail, we ﬁrst randomly divide the full dataset into some number of
groups K > 1. Typical choices of K might be 5 or 10, and sometimes N . We
ﬁx one group as the test set, and designate the remaining K
1 groups as
the training set. We then apply the lasso to the training data for a range of
diﬀerent t values, and we use each ﬁtted model to predict the responses in the
test set, recording the mean-squared prediction errors for each value of t. This
process is repeated a total of K times, with each of the K groups getting the
chance to play the role of the test data, with the remaining K
1 groups used
as training data. In this way, we obtain K diﬀerent estimates of the prediction
error over a range of values of t. These K estimates of prediction error are
averaged for each value of t, thereby producing a cross-validation error curve.
Figure 2.3 shows the cross-validation error curve for the crime-data ex-
ample, obtained using K = 10 splits. We plot the estimated mean-squared
˜β
prediction error versus the relative bound ˜t =
1, where the esti-
k
mate bβ(t) correspond to the lasso solution for bound t and ˜β is the ordinary
least-squares solution. The error bars in Figure 2.3 indicate plus and minus
one standard error in the cross-validated estimates of the prediction error. A
vertical dashed line is drawn at the position of the minimum (˜t = 0.56) while
a dotted line is drawn at the “one-standard-error rule” choice (˜t = 0.03). This
is the smallest value of t yielding a CV error no more than one standard error
above its minimum value. The number of nonzero coeﬃcients in each model is
shown along the top. Hence the model that minimizes the CV error has three
predictors, while the one-standard-error-rule model has just one.

bβ(t)
k
k

1/
k

−

We note that the cross-validation process above focused on the bound
parameter t. One can just as well carry out cross-validation in the Lagrangian

14

THE LASSO FOR LINEAR MODELS

Figure 2.3 Cross-validated estimate of mean-squared prediction error, as a function
of the relative ‘1 bound ˜t = kbβ(t)k1/k ˜βk1. Here bβ(t) is the lasso estimate correspond-
ing to the ‘1 bound t and ˜β is the ordinary least-squares solution. Included are the
location of the minimum, pointwise standard-error bands, and the “one-standard-
error” location. The standard errors are large since the sample size N is only 50.

form (2.5), focusing on the parameter λ. The two methods will give similar but
not identical results, since the mapping between t and λ is data-dependent.

2.4 Computation of the Lasso Solution

The lasso problem is a convex program, speciﬁcally a quadratic program (QP)
with a convex constraint. As such, there are many sophisticated QP meth-
ods for solving the lasso. However there is a particularly simple and eﬀective
computational algorithm, that gives insight into how the lasso works. For
convenience, we rewrite the criterion in Lagrangian form:

minimize
β∈Rp






1
2N

N
X

i=1

(yi

−

p
X

j=1

xijβj)2 + λ

p
X

j=1

βj

|




|


.

(2.8)

P

As before, we will assume that both yi and the features xij have been stan-
dardized so that 1
ij = 1. In this
N
case, the intercept term β0 can be omitted. The Lagrangian form is especially
convenient for numerical computation of the solution by a simple procedure
known as coordinate descent.

i xij = 0, and 1
N

i yi = 0, 1
N

i x2

P

P

0.00.20.40.60.81.05e+047e+049e+04Relative BoundCV Mean−Squared Error011112233334455COMPUTATION OF THE LASSO SOLUTION

15

Figure 2.4 Soft thresholding function Sλ(x) = sign(x) (|x| − λ)+ is shown in blue
(broken lines), along with the 45◦ line in black.

2.4.1 Single Predictor: Soft Thresholding

N
Let’s ﬁrst consider a single predictor setting, based on samples
i=1
(for convenience we have renamed zi to be one the xij). The problem then is
to solve

(zi, yi)
}
{

minimize
β

(

1
2N

N
X

i=1

)

(yi

−

ziβ)2 + λ

.

β
|

|

(2.9)

The standard approach to this univariate minimization problem would be to
take the gradient (ﬁrst derivative) with respect to β, and set it to zero. There
is a complication, however, because the absolute value function
does not
have a derivative at β = 0. However we can proceed by direct inspection of
the function (2.9), and ﬁnd that

β

|

|






bβ =

z, y

z, y

1
N h
0
1
N h

i −

λ if 1
if 1
+ λ if 1

z, y

i
z, y

z, y

N h
N |h
N h

>

i| ≤
<

i

i
(Exercise 2.2), which we can write succinctly as
(cid:1).

z, y

λ
S
Here the soft-thresholding operator

(cid:0) 1
N h

bβ =

i

λ(x) = sign(x) (cid:0)
S

x
|

| −

λ(cid:1)

+

λ,

λ,

λ.

−

(2.10)

(2.11)

(2.12)

x
|

translates its argument x toward zero by the amount λ, and sets it to zero
λ.3 See Figure 2.4 for an illustration. Notice that for standardized
if
| ≤
P
data with 1
i = 1, (2.11) is just a soft-thresholded version of the usual
N
least-squares estimate ˜β = 1
. One can also derive these results using
i
the notion of subgradients (Exercise 2.3).

i z2

z, y

N h

3t+ denotes the positive part of t ∈ R, equal to t if t > 0 and 0 otherwise.

λSλ(x)x(0,0)16

THE LASSO FOR LINEAR MODELS

2.4.2 Multiple Predictors: Cyclic Coordinate Descent

Using this intuition from the univariate case, we can now develop a simple
coordinatewise scheme for solving the full lasso problem (2.5). More precisely,
we repeatedly cycle through the predictors in some ﬁxed (but arbitrary) order
(say j = 1, 2, . . . , p), where at the jth step, we update the coeﬃcient βj by
minimizing the objective function in this coordinate while holding ﬁxed all
other coeﬃcients

at their current values.

= j

Writing the objective in (2.5) as

bβk, k
{

}

1
2N

N
X

i=1

(yi

−

X

k6=j

xikβk

−

xijβj)2 + λ

X

k6=j

βk
|

|

+ λ

,

βj
|

|

(2.13)

we see that solution for each βj can be expressed succinctly in terms of the
partial residual r(j)
k6=j xik bβk, which removes from the outcome the
current ﬁt from all but the jth predictor. In terms of this partial residual, the
jth coeﬃcient is updated as

i = yi

P

−

bβj =

λ
S

(cid:16) 1

N h

xj, r(j)

(cid:17)

.

i

Equivalently, the update can be written as

(cid:16)

bβj

λ
← S

bβj + 1

xj, r

N h

(cid:17)
i

,

(2.14)

(2.15)

Pp

−

where ri = yi
j=1 xij bβj are the full residuals (Exercise 2.4). The overall
algorithm operates by applying this soft-thresholding update (2.14) repeatedly
in a cyclical manner, updating the coordinates of bβ (and hence the residual
vectors) along the way.

Why does this algorithm work? The criterion (2.5) is a convex function of
β and so has no local minima. The algorithm just described corresponds to
the method of cyclical coordinate descent, which minimizes this convex objec-
tive along each coordinate at a time. Under relatively mild conditions (which
apply here), such coordinate-wise minimization schemes applied to a convex
function converge to a global optimum. It is important to note that some
conditions are required, because there are instances, involving nonseparable
penalty functions, in which coordinate descent schemes can become “jammed.”
Further details are in given in Chapter 5.

Note that the choice λ = 0 in (2.5) delivers the solution to the ordinary
least-squares problem. From the update (2.14), we see that the algorithm
does a univariate regression of the partial residual onto each predictor, cycling
through the predictors until convergence. When the data matrix X is of full
rank, this point of convergence is the least-squares solution. However, it is not
a particularly eﬃcient method for computing it.

In practice, one is often interested in ﬁnding the lasso solution not just for
a single ﬁxed value of λ, but rather the entire path of solutions over a range

6
DEGREES OF FREEDOM

17

of possible λ values (as in Figure 2.1). A reasonable method for doing so is to
begin with a value of λ just large enough so that the only optimal solution is
the all-zeroes vector. As shown in Exercise 2.1, this value is equal to λmax =
. Then we decrease λ by a small amount and run coordinate
maxj
descent until convergence. Decreasing λ again and using the previous solution
as a “warm start,” we then run coordinate descent until convergence. In this
way we can eﬃciently compute the solutions over a grid of λ values. We refer
to this method as pathwise coordinate descent.

1
N h

xj, y

i|

|

Coordinate descent is especially fast for the lasso because the coordinate-
wise minimizers are explicitly available (Equation (2.14)), and thus an iter-
ative search along each coordinate is not needed. Secondly, it exploits the
sparsity of the problem: for large enough values of λ most coeﬃcients will be
zero and will not be moved from zero. In Section 5.4, we discuss computational
hedges for guessing the active set, which speed up the algorithm dramatically.

Homotopy methods are another class of techniques for solving the lasso.
They produce the entire path of solutions in a sequential fashion, starting at
zero. This path is actually piecewise linear, as can be seen in Figure 2.1 (as a
function of t or λ). The least angle regression (LARS) algorithm is a homotopy
method that eﬃciently constructs the piecewise linear path, and is described
in Chapter 5.

2.4.3 Soft-Thresholding and Orthogonal Bases

The soft-thresholding operator plays a central role in the lasso and also in
signal denoising. To see this, notice that the coordinate minimization scheme
above takes an especially simple form if the predictors are orthogonal, mean-
ing that 1
= k. In this case, the update (2.14) sim-
xj, xk
pliﬁes dramatically, since 1
so that bβj is simply the
i
soft-thresholded version of the univariate least-squares estimate of y regressed
against xj. Thus, in the special case of an orthogonal design, the lasso has an
explicit closed-form solution, and no iterations are required.

= 0 for each j

xj, r(j)

xj, y

= 1

N h

N h

N h

i

i

Wavelets are a popular form of orthogonal bases, used for smoothing and
compression of signals and images. In wavelet smoothing one represents the
data in a wavelet basis, and then denoises by soft-thresholding the wavelet
coeﬃcients. We discuss this further in Section 2.10 and in Chapter 10.

2.5 Degrees of Freedom

Suppose we have p predictors, and ﬁt a linear regression model using only a
subset of k of these predictors. Then if these k predictors were chosen without
regard to the response variable, the ﬁtting procedure “spends” k degrees of
freedom. This is a loose way of saying that the standard test statistic for testing
the hypothesis that all k coeﬃcients are zero has a Chi-squared distribution
with k degrees of freedom (with the error variance σ2 assumed to be known)

6
18

THE LASSO FOR LINEAR MODELS

However if the k predictors were chosen using knowledge of the response
variable, for example to yield the smallest training error among all subsets of
size k, then we would expect that the ﬁtting procedure spends more than k
degrees of freedom. We call such a ﬁtting procedure adaptive, and clearly the
lasso is an example of one.

Similarly, a forward-stepwise procedure in which we sequentially add the
predictor that most decreases the training error is adaptive, and we would
expect that the resulting model uses more than k degrees of freedom after k
steps. For these reasons and in general, one cannot simply count as degrees
of freedom the number of nonzero coeﬃcients in the ﬁtted model. However, it
turns out that for the lasso, one can count degrees of freedom by the number
of nonzero coeﬃcients, as we now describe.

First we need to deﬁne precisely what we mean by the degrees of freedom
of an adaptively ﬁtted model. Suppose we have an additive-error model, with

yi = f (xi) + (cid:15)i, i = 1, . . . , N,

(2.16)

for some unknown f and with the errors (cid:15)i iid (0, σ2). If the N sample pre-
dictions are denoted by by, then we deﬁne

df(by) : =

1
σ2

N
X

i=1

Cov (cid:0)

(cid:1).

byi, yi

(2.17)

yi
{

The covariance here is taken over the randomness in the response vari-
N
i=1 with the predictors held ﬁxed. Thus, the degrees of freedom
ables
}
corresponds to the total amount of self-inﬂuence that each response measure-
ment has on its prediction. The more the model ﬁts—that is, adapts—to the
data, the larger the degrees of freedom. In the case of a ﬁxed linear model,
using k predictors chosen independently of the response variable, it is easy
to show that df(by) = k (Exercise 2.7). However, under adaptive ﬁtting, it is
typically the case that the degrees of freedom is larger than k.

Somewhat miraculously, one can show that for the lasso, with a ﬁxed
penalty parameter λ, the number of nonzero coeﬃcients kλ is an unbiased esti-
mate of the degrees of freedom4 (Zou, Hastie and Tibshirani 2007, Tibshirani2
and Taylor 2012). As discussed earlier, a variable-selection method like
forward-stepwise regression uses more than k degrees of freedom after k steps.
Given the apparent similarity between forward-stepwise regression and the
lasso, how can the lasso have this simple degrees of freedom property? The
reason is that the lasso not only selects predictors (which inﬂates the degrees
of freedom), but also shrinks their coeﬃcients toward zero, relative to the
usual least-squares estimates. This shrinkage turns out to be just the right

4An even stronger statement holds for the LAR path, where the degrees of freedom after
k steps is exactly k, under some conditions on X. The LAR path relates closely to the lasso,
and is described in Section 5.6.

UNIQUENESS OF THE LASSO SOLUTIONS

19

amount to bring the degrees of freedom down to k. This result is useful be-
cause it gives us a qualitative measure of the amount of ﬁtting that we have
done at any point along the lasso path.

In the general setting, a proof of this result is quite diﬃcult. In the special
case of an orthogonal design, it is relatively easy to prove, using the fact
that the lasso estimates are simply soft-thresholded versions of the univariate
regression coeﬃcients for the orthogonal design. We explore the details of this
argument in Exercise 2.8. This idea is taken one step further in Section 6.3.1
where we describe the covariance test for testing the signiﬁcance of predictors
in the context of the lasso.

2.6 Uniqueness of the Lasso Solutions

≤

≥

We ﬁrst note that the theory of convex duality can be used to show that when
the columns of X are in general position, then for λ > 0 the solution to the
N , although then the
lasso problem (2.5) is unique. This holds even when p
number of nonzero coeﬃcients in any lasso solution is at most N (Rosset, Zhu
and Hastie 2004, Tibshirani2 2013). Now when the predictor matrix X is not of
full column rank, the least squares ﬁtted values are unique, but the parameter
N
estimates themselves are not. The non-full-rank case can occur when p
due to collinearity, and always occurs when p > N . In the latter scenario,
there are an inﬁnite number of solutions bβ that yield a perfect ﬁt with zero
training error. Now consider the lasso problem in Lagrange form (2.5) for
λ > 0. As shown in Exercise 2.5, the ﬁtted values X bβ are unique. But it
turns out that the solution bβ may not be unique. Consider a simple example
with two predictors x1 and x2 and response y, and suppose the lasso solution
coeﬃcients bβ at λ are ( bβ1, bβ2). If we now include a third predictor x3 = x2
[0, 1], the vector
into the mix, an identical copy of the second, then for any α
˜β(α) = ( bβ1, α
bβ2) produces an identical ﬁt, and has ‘1 norm
·
˜β(α)
1. Consequently, for this model (in which we might have either
bβ
1 =
k
k
k
p

N or p > N ), there is an inﬁnite family of solutions.
In general, when λ > 0, one can show that if the columns of the model
matrix X are in general position, then the lasso solutions are unique. To be
p
precise, we say the columns
j=1 are in general position if any aﬃne sub-
}
RN of dimension k < N contains at most k + 1 elements of the
space L
set
, excluding antipodal pairs of points (that is, points
x2, . . .
diﬀering only by a sign ﬂip). We note that the data in the example in the
previous paragraph are not in general position. If the X data are drawn from
a continuous probability distribution, then with probability one the data are
in general position and hence the lasso solutions will be unique. As a re-
sult, non-uniqueness of the lasso solutions can only occur with discrete-valued
data, such as those arising from dummy-value coding of categorical predic-
tors. These results have appeared in various forms in the literature, with a
summary given by Tibshirani2 (2013).

bβ2, (1

⊂
x1,

xj
{

{±

xp

α)

−

≤

±

±

∈

k

}

·

We note that numerical algorithms for computing solutions to the lasso will

20

THE LASSO FOR LINEAR MODELS

typically yield valid solutions in the non-unique case. However, the particular
solution that they deliver can depend on the speciﬁcs of the algorithm. For
example with coordinate descent, the choice of starting values can aﬀect the
ﬁnal solution.

2.7 A Glimpse at the Theory

There is a large body of theoretical work on the behavior of the lasso. It is
largely focused on the mean-squared-error consistency of the lasso, and recov-
ery of the nonzero support set of the true regression parameters, sometimes
called sparsistency. For MSE consistency, if β∗ and ˆβ are the true and lasso-
estimated parameters, it can be shown that as p, n

→ ∞
plog(p)/N

X( ˆβ
k

β∗)
k

2
2/N

C

β∗

1
k

−

≤

· k
with high probability (Greenshtein and Ritov 2004, B¨uhlmann and van de
1 = o(pN/ log(p)) then the lasso is
Geer 2011, Chapter 6). Thus if
k
consistent for prediction. This means that the true parameter vector must
be sparse relative to the ratio N/ log(p). The result only assumes that the
design X is ﬁxed and has no other conditions on X. Consistent recovery of
the nonzero support set requires more stringent assumptions on the level of
cross-correlation between the predictors inside and outside of the support set.
Details are given in Chapter 11.

β∗
k

(2.18)

2.8 The Nonnegative Garrote

The nonnegative garrote (Breiman 1995)5 is a two-stage procedure, with a
close relationship to the lasso.6 Given an initial estimate of the regression
coeﬃcients ˜β
Rp, we then solve the optimization problem

∈

minimize
c∈Rp




N
X



i=1

(cid:0)yi

p
X

j=1

−

cjxij

˜βj

(cid:1)2






(2.19)

subject to c

0 and

c
1
k

k

≤

t,

(cid:23)

where c
bβj = ˆcj
c
procedure, using a penalty λ
k
the nonnegativity constraints.

0 means the vector has nonnegative coordinates. Finally, we set
(cid:23)
˜βj, j = 1, . . . , p. There is an equivalent Lagrangian form for this
·
0, plus

1 for some regularization weight λ
k

In the original paper (Breiman 1995), the initial ˜β was chosen to
be the ordinary-least-squares (OLS) estimate. Of course, when p > N ,
these estimates are not unique; since that time, other authors (Yuan and

≥

5A garrote is a device used for execution by strangulation or by breaking the neck. It is
a Spanish word, and is alternately spelled garrotte or garotte. We are using the spelling in
the original paper of Breiman (1995).

6Breiman’s paper was the inspiration for Tibshirani’s 1996 lasso paper.

THE NONNEGATIVE GARROTE

21

Lin 2007b, Zou 2006) have shown that the nonnegative garrote has attrac-
tive properties when we use other initial estimators such as the lasso, ridge
regression or the elastic net.

Figure 2.5 Comparison of the shrinkage behavior of the lasso and the nonnegative
garrote for a single variable. Since their λs are on diﬀerent scales, we used 2 for the
lasso and 7 for the garrote to make them somewhat comparable. The garrote shrinks
smaller values of β more severely than lasso, and the opposite for larger values.

The nature of the nonnegative garrote solutions can be seen when the
columns of X are orthogonal. Assuming that t is in the range where the
equality constraint
1 = t can be satisﬁed, the solutions have the explicit
k
form

c
k

!

bcj =

1

−

λ
˜β2
j

, j = 1, . . . , p,

(2.20)

+

ˆc
k
k

1 = t. Hence if the coeﬃcient ˜βj is large, the
where λ is chosen so that
shrinkage factor will be close to 1 (no shrinkage), but if it is small the estimate
will be shrunk toward zero. Figure 2.5 compares the shrinkage behavior of the
lasso and nonnegative garrote. The latter exhibits the shrinkage behavior of
the nonconvex penalties (next section and Section 4.6). There is also a close
relationship between the nonnegative garrote and the adaptive lasso, discussed
in Section 4.6; see Exercise 4.26.

Following this, Yuan and Lin (2007b) and Zou (2006) have shown that the
nonnegative garrote is path-consistent under less stringent conditions than the
lasso. This holds if the initial estimates are √N -consistent, for example those
based on least squares (when p < N ), the lasso, or the elastic net. “Path-
consistent” means that the solution path contains the true model somewhere
in its path indexed by t or λ. On the other hand, the convergence of the
parameter estimates from the nonnegative garrote tends to be slower than
that of the initial estimate.

(0,0)βLassoGarrote 
22

THE LASSO FOR LINEAR MODELS

Table 2.3 Estimators of βj from (2.21) in the
case of an orthonormal model matrix X.

q Estimator

Formula

0 Best subset

1 Lasso

2 Ridge

˜βj
˜βj
> √2λ]
I[
|
|
·
˜βj
sign( ˜βj)(
|
˜βj/(1 + λ)

| −

λ)+

2.9 ‘q Penalties and Bayes Estimates

For a ﬁxed real number q

minimize
β∈Rp






0, consider the criterion

≥

1
2N

N
X

i=1

(yi

−

p
X

j=1

xijβj)2 + λ

p
X

j=1

βj

|

q
|






.

(2.21)

βj

This is the lasso for q = 1 and ridge regression for q = 2. For q = 0, the term
Pp
q counts the number of nonzero elements in β, and so solving (2.21)
amounts to best-subset selection. Figure 2.6 displays the constraint regions
corresponding to these penalties for the case of two predictors (p = 2). Both

j=1 |

|

Figure 2.6 Constraint regions Pp
the constraint region is nonconvex.

j=1 |βj|q ≤ 1 for diﬀerent values of q. For q < 1,

the lasso and ridge regression versions of (2.21) amount to solving convex
programs, and so scale well to large problems. Best subset selection leads to
a nonconvex and combinatorial optimization problem, and is typically not
feasible with more than say p = 50 predictors.

In the special case of an orthonormal model matrix X, all three proce-
dures have explicit solutions. Each method applies a simple coordinate-wise
transformation to the least-squares estimate ˜β, as detailed in Table 2.9. Ridge
regression does a proportional shrinkage. The lasso translates each coeﬃcient
by a constant factor λ and truncates at zero, otherwise known as soft thresh-
olding. Best-subset selection applies the hard thresholding operator: it leaves
the coeﬃcient alone if it is bigger than √2λ, and otherwise sets it to zero.

The lasso is special in that the choice q = 1 is the smallest value of q
(closest to best-subset) that leads to a convex constraint region and hence a

q=4q=2q=1q=0.5q=0.1SOME PERSPECTIVE

23

convex optimization problem. In this sense, it is the closest convex relaxation
of the best-subset selection problem.

|

βj
|

There is also a Bayesian view of these estimators. Thinking of

q as
proportional to the negative log-prior density for βj, the constraint contours
represented in Figure 2.6 have the same shape as the equi-contours of the prior
distribution of the parameters. Notice that for q
1, the prior concentrates
more mass in the coordinate directions. The prior corresponding to the q = 1
case is an independent double exponential (or Laplace) distribution for each
parameter, with joint density (1/2τ ) exp(
1)/τ ) and τ = 1/λ. This means
that the lasso estimate is the Bayesian MAP (maximum aposteriori) estimator
using a Laplacian prior, as opposed to the mean of the posterior distribution,
which is not sparse. Similarly, if we sample from the posterior distribution
corresponding to the Laplace prior, we do not obtain sparse vectors. In order
to obtain sparse vectors via posterior sampling, one needs to start with a prior
distribution that puts a point mass at zero. Bayesian approaches to the lasso
are explored in Section 6.1.

−k

≤

β

k

2.10 Some Perspective

The lasso uses an ‘1-penalty, and such penalties are now widely used in statis-
tics, machine learning, engineering, ﬁnance, and other ﬁelds. The lasso was
proposed by Tibshirani (1996), and was directly inspired by the nonnegative
garrote of Breiman (1995). Soft thresholding was popularized earlier in the
context of wavelet ﬁltering by Donoho and Johnstone (1994); this is a popular
alternative to Fourier ﬁltering in signal processing, being both “local in time
and frequency.” Since wavelet bases are orthonormal, wavelet ﬁltering corre-
sponds to the lasso in the orthogonal X case (Section 2.4.1). Around the same
time as the advent of the lasso, Chen, Donoho and Saunders (1998) proposed
the closely related basis pursuit method, which extends the ideas of wavelet ﬁl-
tering to search for a sparse representation of a signal in over-complete bases
using an ‘1-penalty. These are unions of orthonormal frames and hence no
longer completely mutually orthonormal.

Taking a broader perspective, ‘1-regularization has a pretty lengthy his-
tory. For example Donoho and Stark (1989) discussed ‘1-based recovery in
detail, and provided some guarantees for incoherent bases. Even earlier (and
mentioned in Donoho and Stark (1989)) there are related works from the
1980s in the geosciences community, for example Oldenburg, Scheuer and
Levy (1983) and Santosa and Symes (1986). In the signal processing world,
Alliney and Ruzinsky (1994) investigated some algorithmic issues associated
with ‘1 regularization. And there surely are many other authors who have
proposed similar ideas, such as Fuchs (2000). Rish and Grabarnik (2014) pro-
vide a modern introduction to sparse methods for machine learning and signal
processing.

In the last 10–15 years, it has become clear that the ‘1-penalty has a

number of good properties, which can be summarized as follows:

24

THE LASSO FOR LINEAR MODELS

Interpretation of the ﬁnal model: The ‘1-penalty provides a natural way to

encourage or enforce sparsity and simplicity in the solution.

Statistical eﬃciency: In the book The Elements of Statistical Learning
(Hastie, Tibshirani and Friedman 2009), the authors discuss an informal
“bet-on-sparsity principle.” Assume that the underlying true signal is sparse
and we use an ‘1 penalty to try to recover it. If our assumption is correct,
we can do a good job in recovering the true signal. Note that sparsity can
hold in the given bases (set of features) or a transformation of the features
(e.g., a wavelet bases). But if we are wrong—the underlying truth is not
sparse in the chosen bases—then the ‘1 penalty will not work well. However
in that instance, no method can do well, relative to the Bayes error. There
is now a large body of theoretical support for these loose statements: see
Chapter 11 for some results.

Computational eﬃciency: ‘1-based penalties are convex and this fact and the
assumed sparsity can lead to signiﬁcant computational advantages. If we
have 100 observations and one million features, and we have to estimate
one million nonzero parameters, then the computation is very challenging.
However, if we apply the lasso, then at most 100 parameters can be nonzero
in the solution, and this makes the computation much easier. More details
are given in Chapter 5.7

In the remainder of this book, we describe many of the exciting develop-

ments in this ﬁeld.

Exercises

Ex. 2.1 Show that the smallest value of λ such that the regression coeﬃcients
estimated by the lasso are all equal to zero is given by

λmax = max

j

|

1
N h

xj, y

.
i|

Ex. 2.2 Show that the soft-threshold estimator (2.12) yields the solution to
the single predictor lasso problem (2.9). (Do not make use of subgradients).

Ex. 2.3 Soft thresholding and subgradients. Since (2.9) is a convex function, it
is guaranteed to have a subgradient (see Chapter 5 for more details), and any
optimal solution must satisfy the subgradient equation

1
N

−

N
X

(yi

i=1

−

ziβ)zi + λs = 0,

where s is a subgradient of

β

.
|

|

(2.22)

For the absolute value function, subgradients take the form s
ing that s = sign(β) when β

sign(β), mean-
∈
1, +1] when β = 0. The general

= 0 and s

[

∈

−

7Ridge regression also enjoys a similar eﬃciency in the p (cid:29) N case.

6
EXERCISES

25

theory of convex optimization, as discussed in Chapter 5, guarantees that any
pair ( bβ, bs) that is a solution to the zero subgradient Equation (2.22) with
bs
sign( bβ) deﬁnes an optimal solution to the original minimization prob-
lem (2.9).

∈

Solve Equation (2.22) and hence arrive at solutions (2.10) and (2.11).

Ex. 2.4 Show that the subgradient equations for Problem (2.5) take the form
given in (2.6). Hence derive expressions for coordinate descent steps (2.14)
and (2.15).

Ex. 2.5 Uniqueness of ﬁtted values from the lasso. For some λ
that we have two lasso solutions bβ, bγ with common optimal value c∗.
(a) Show that it must be the case that X bβ = Xbγ, meaning that the two
solutions must yield the same predicted values. (Hint: If not, then use the
2
strict convexity of the function f (u) =
2 and convexity of the ‘1-
norm to establish a contradiction.)

0, suppose

y
k

−

≥

u

k

(b) If λ > 0, show that we must have
(Tibshirani2 2013).

1 =
bβ
k
k

kbγ

1.
k

Ex. 2.6 Here we use the bootstrap as the basis for inference with the lasso.

(a) For the crime data, apply the bootstrap to estimate the standard errors
of the estimated lasso coeﬃcients, as in the middle section of Table 2.2. Use
the nonparametric bootstrap, sampling features and outcome values (xi, yi)
with replacement from the observed data. Keep the bound t ﬁxed at its
estimated value from the original lasso ﬁt. Estimate as well the probability
that an estimated coeﬃcient is zero.

(b) Repeat part (a), but now re-estimate ˆλ for each bootstrap replication.

Compare the results to those in part (a).

Ex. 2.7 Consider a ﬁxed linear model based on k predictors and ﬁt by least
squares. Show that its degrees of freedom (2.17) is equal to k.

j xijβj + (cid:15)i where (cid:15)i

Ex. 2.8 Degrees of freedom for lasso in the orthogonal case. Suppose that
yi = β0 + P
N (0, σ2), with the xij ﬁxed (non-random).
Assume that the features are centered and also assume they are uncorrelated,
so that P
i xijxik = 0 for all j, k. Stein’s lemma (Stein 1981) states that for
<
Y

g0(Y )
N (µ, σ2) and all absolutely continuous functions g such that E
|
|

∼

∼
,

∞

E(g(Y )(Y

−

µ)) = σ2

E(g0(Y )).

(2.23)

Use this to show that the degrees of freedom (2.17) for the lasso in the or-
thogonal case is equal to k, the number of nonzero estimated coeﬃcients in
the solution.

26

THE LASSO FOR LINEAR MODELS

Ex. 2.9 Derive the solutions (2.20) to the nonnegative garrote criterion (2.19).

Ex. 2.10 Robust regression view of lasso. Consider a robust version of the
standard linear regression problem, in which we wish to protect ourselves
against perturbations of the features. In order to do so, we consider the min-
max criterion

minimize
β

max
∆∈U

(cid:26) 1

2N k

y

−

(X + ∆)β

(cid:27)

,

2
2

k

(2.24)

where the allowable perturbations ∆ : = (δ1, . . . , δp) belong to the subset of
RN ×p

o
.

n

: =

(δ1, δ2, . . . δp)

δj

2
k

cj for all j = 1, 2, . . . , p

(2.25)

U

| k

≤
Hence each feature value xij can be perturbed by a maximum amount cj, with
the ‘2-norm of the overall perturbation vector for that feature bounded by cj.
The perturbations for diﬀerent features also act independently of one another.
We seek the coeﬃcients that minimize squared error under the “worst” allow-
able perturbation of the features. We assume that both y and the columns of
X have been standardized, and have not included an intercept.
Show that the solution to this problem is equivalent to






min
β∈Rp

1
2N k

y

Xβ

2
2 +
k

−

p
X

j=1

cj

βj

|




|


.

(2.26)

In the special case cj = λ for all j = 1, 2, . . . , p, we thus obtain the lasso,
so that it can be viewed as a method for guarding against uncertainty in the
measured predictor values, with more uncertainty leading to a greater amount
of shrinkage. (See Xu, Caramanis and Mannor (2010) for further details.)

Ex. 2.11 Robust regression and constrained optimization. This exercise doesn’t
involve the lasso itself, but rather a related use of the ‘1-norm in regression.
We consider the model

yi =

p
X

j=1

xijβj + γi + (cid:15)i

N (0, σ2) and γi, i = 1, 2, . . . , N are unknown constants.

Let γ = (γ1, γ2, . . . , γN ) and consider minimization of

with (cid:15)i

∼

minimize
β∈Rp,γ∈RN

1
2

N
X

i=1

(yi

−

p
X

j=1

xijβj

−

γi)2 + λ

N
X
1 |

γi

.
|

(2.27)

The idea is that for each i, γi allows yi to be an outlier; setting γi = 0 means
that the observation is not deemed an outlier. The penalty term eﬀectively
limits the number of outliers.

EXERCISES

(a) Show this problem is jointly convex in β and γ.

(b) Consider Huber’s loss function

ρ(t; λ) =

(

λ
t
|
t2/2

| −

λ2/2

if
if

t
|
t
|

> λ
λ.

|
| ≤

27

(2.28)

λ but linear
This is a tapered squared-error loss; it is quadratic for
outside of that range, to reduce the eﬀect of outliers on the estimation of β.
With the scale parameter σ ﬁxed at one, Huber’s robust regression method
solves

| ≤

t
|

minimize
β∈Rp

N
X

i=1

ρ(yi

−

p
X

j=1

xijβj; λ).

(2.29)

Show that problems (2.27) and (2.29) have the same solutions bβ. (Antoniadis
2007, Gannaz 2007, She and Owen 2011).

Chapter 3

Generalized Linear Models

In Chapter 2, we focused exclusively on linear regression models ﬁt by least
squares. Such linear models are suitable when the response variable is quan-
titative, and ideally when the error distribution is Gaussian. However, other
types of response arise in practice. For instance, binary variables can be used
to indicate the presence or absence of some attribute (e.g., “cancerous” versus
“normal” cells in a biological assay, or “clicked” versus “not clicked” in web
browsing analysis); here the binomial distribution is more appropriate. Some-
times the response occurs as counts (e.g., number of arrivals in a queue, or
number of photons detected); here the Poisson distribution might be called
for. In this chapter, we discuss generalizations of simple linear models and the
lasso that are suitable for such applications.

3.1 Introduction

With a binary response coded in the form Y
is often used: it models the log-likelihood ratio as the linear combination

, the linear logistic model
0, 1
}

∈ {

log

Pr(Y = 1
Pr(Y = 0

X = x)
X = x)

|
|

= β0 + βT x,

(3.1)

where X = (X1, X2, . . . Xp) is a vector of predictors, β0
term, and β
mation yields an expression for the conditional probability

R is an intercept
Rp is a vector of regression coeﬃcients. Inverting this transfor-

∈

∈

Pr(Y = 1

|

X = x) =

eβ0+βT x
1 + eβ0+βT x

.

(3.2)

By inspection, without any restriction on the parameters (β0, β), the model
speciﬁes probabilities lying in (0, 1). We typically ﬁt logistic models by maxi-
mizing the binomial log-likelihood of the data.

The logit transformation (3.1) of the conditional probabilities is an exam-
ple of a link function. In general, a link function is a transformation of the
conditional mean E[Y
X = x]—in this case, the conditional probability that
Y = 1—to a more natural scale on which the parameters can be ﬁt without
constraints. As another example, if the response Y represents counts, taking

|

29

30

GENERALIZED LINEAR MODELS

values in
positive. A natural choice is the log-linear model

, then we need to ensure that the conditional mean is
0, 1, 2, . . .
}
{

log E[Y

|

X = x] = β0 + βT x,

(3.3)

with its log link function. Here we ﬁt the parameters by maximizing the Pois-
son log-likelihood of the data.

The models (3.1) and (3.3) are both special cases of generalized linear mod-
els (McCullagh and Nelder 1989). These models describe the response variable
using a member of the exponential family, which includes the Bernoulli, Pois-
son, and Gaussian as particular cases. A transformed version of the response
X = x] is then approximated by a linear model. In detail, if we
mean E[Y
use µ(x) = E[Y
X = x] to denote the conditional mean of Y given X = x,
then a GLM is based on a model of the form

|

|

g(cid:2)µ(x)(cid:3) = β0 + βT x
}
|

{z
η(x)

,

(3.4)

→

R is a strictly monotonic link function. For example, for a bi-
where g : R
, the logistic regression model is based on the choices
0, 1
nary response Y
}
µ)(cid:1). When the
X = x] and g(µ) = logit(µ) = log (cid:0)µ/(1
µ(x) = Pr[Y = 1
response variable is modeled as a Gaussian, the choices µ(x) = β0 + βT x
and g(µ) = µ recover the standard linear model, as discussed in the previous
chapter.

∈ {
|

−

Generalized linear models can also be used to model the multicategory
responses that occur in many problems, including handwritten digit classiﬁ-
cation, speech-recognition, document classiﬁcation, and cancer classiﬁcation.
The multinomial replaces the binomial distribution here, and we use a sym-
metric log-linear representation:

Pr[Y = k

|

X = x] =

eβ0k+βT
k x
‘=1 eβ0‘+βT
‘ x

PK

.

(3.5)

Here there are K coeﬃcients for each variable (one per class).

In this chapter, we discuss approaches to ﬁtting generalized linear models
that are based on maximizing the likelihood, or equivalently minimizing the
negative log-likelihood along with an ‘1-penalty

minimize
β0,β

(cid:26)

1
N L

−

(β0, β; y, X) + λ
k

β

1

k

(cid:27)

.

(3.6)

Here y is the N -vector of outcomes and X is the N
p matrix of predictors,
varies according to the GLM. In
and the speciﬁc form the log-likelihood
the special case of Gaussian responses and the standard linear model, we have
2
2 + c, where c is a constant independent
k
L
of (β0, β), so that the optimization problem (3.6) corresponds to the ordinary
linear least-squares lasso.

(β0, β; y, X) = 1

y
2σ2 k

β01

Xβ

×

−

−

L

LOGISTIC REGRESSION

31

Similar forms of ‘1-regularization are also useful for related models. With
survival models, the response is the time to failure (death), with possible
censoring if subjects are lost to followup. In this context, a popular choice is
the Cox proportional hazards model, which takes the form

x) = h0(t)eβT x.

h(t

|

(3.7)

7→

x) is the hazard function for an individual with covariates x:
h(t
Here t
the value h(t
x) corresponds to the instantaneous probability of failure at
time Y = t, given survival up to time t. The function h0 speciﬁes the baseline
hazard, corresponding to x = 0.

|
|

As another example, the support-vector machine (SVM) is a popular clas-
siﬁer in the machine-learning community. Here the goal is to predict a two-
,1 in the simplest case using a linear classiﬁcation
class response y
1, +1
}
boundary of the form f (x) = β0 + βT x, with the predicted class given by
sign(f (x)). Thus, the correctness of a given decision can be determined by
checking whether or not the margin yf (x) is positive. The traditional soft-
margin linear SVM is ﬁt by solving the optimization problem2

∈ {−

minimize
β0,β






1
N

N
X

i=1

[1
|

yif (xi)]+
−
}
{z
φ(yif (xi))

β

+λ
k

2
2
k






.

(3.8)

The ﬁrst term, known as hinge loss, is designed to penalize the negative mar-
gins that represent incorrect classiﬁcations. In general, an optimal solution
Rp to the standard linear SVM (3.8) is not sparse, since the
vector β
quadratic penalty has no sparsity-enforcing properties. However, replacing
the quadratic penalty by the ‘1-norm
1 leads to an ‘1 linear SVM, which
does produce sparse solutions.

β
k

∈

k

In the following sections, we discuss each of these models in more detail.
In each case, we provide examples of their applications, discuss some of the
issues that arise, as well as computational approaches for ﬁtting the models.

3.2 Logistic Regression

Logistic regression has been popular in biomedical research for half a century,
and has recently gained popularity for modeling a wider range of data. In the
high-dimensional setting, in which the number of features p is larger than the
sample size, it cannot be used without modiﬁcation. When p > N , any linear
model is over-parametrized, and regularization is needed to achieve a stable
ﬁt. Such high-dimensional models arise in various applications. For example,
document classiﬁcation problems can involve binary features (presence versus

1For SVMs, it is convenient to code the binary response via the sign function.
2This is not the most standard way to introduce the support vector machine. We discuss

this topic in more detail in Section 3.6.

32

GENERALIZED LINEAR MODELS

absence) over a predeﬁned dictionary of p = 20, 000 or more words and tokens.
Another example is genome-wide association studies (GWAS), where we have
genotype measurements at p = 500, 000 or more “SNPs,” and the response is
typically the presence/absence of a disease. A SNP (pronounced “snip”) is a
single-nucleotide polymorphism, and is typically represented as a three-level
factor with possible values
, where “A” refers to the wild-type,
}
and “a” the mutation.

AA, Aa, aa
{

When the response is binary, it is typically coded as 0/1. Attention then

focuses on estimating the conditional probability Pr(Y = 1
|
X = x]. Given the logistic model (3.1), the negative log likelihood with ‘1-
regularization takes the form

X = x) = E[Y

|

1
N

N
X

i=1

−

yi log Pr(Y = 1
{

|

xi) + (1

−

yi) log Pr(Y = 0

xi)

β

+ λ
k

1
k

}

|

=

1
N

−

N
X

i=1

n

yi(β0 + βT xi)

−

log(1 + eβ0+βT xi)

o

β

+ λ
k

1.
k

(3.9)

In the machine-learning community, it is more common to code the response
values; when using
Y in terms of sign variables
sign variables, the penalized (negative) log-likelihood has the form

rather than

1, +1
}

0, 1
{

{−

}

1
N

N
X

i=1

log(1 + e−yif (xi ;β0,β)) + λ
β
k

k

1,

(3.10)

where f (xi ; β0, β) : = β0 + βT xi. For a given covariate-response pair (x, y),
the product yf (x) is referred to as the margin: a positive margin means a
correct classiﬁcation, whereas a negative margin means an incorrect classiﬁ-
cation. From the form of the log-likelihood (3.10), we see that maximizing
the likelihood amounts to minimizing a loss function monotone decreasing
in the margins. We discuss the interplay of the margin and the penalty in
Section 3.6.1.

3.2.1 Example: Document Classiﬁcation

We illustrate ‘1-regularized logistic regression in a domain where it has gained
popularity, namely document classiﬁcation using the 20-Newsgroups corpus
(Lang 1995). We use the particular feature set and class deﬁnition deﬁned
by Koh, Kim and Boyd (2007).3 There are N = 11, 314 documents and p =
777, 811 features, with 52% in the positive class. Only 0.05% of the features
are nonzero for any given document.

3The positive class consists of the 10 groups with names of the form sci.*, comp.* and
misc.forsale, and the rest are the negative class. The feature set consists of trigrams, with
message headers skipped, no stoplist, and features with less than two documents omitted.

LOGISTIC REGRESSION

33

Figure 3.1 Coeﬃcient paths for an ‘1-regularized logistic regression for a document-
classiﬁcation task—the “NewsGroup” data. There are 11K documents roughly divided
into two classes, and 0.78M features. Only 0.05% of the features are nonzero. The
coeﬃcients are plotted as a function of the fraction of null deviance explained.

Figure 3.1 shows the coeﬃcient proﬁle, computed using the R package
glmnet. Although the solutions were computed at 100 values of λ, uniformly
spaced on the log scale, we have indexed the solutions by the fraction of
deviance explained 4 on the training data:

D2

λ =

Devnull

Devλ

−
Devnull

.

(3.11)

Here the deviance Devλ is deﬁned as minus twice the diﬀerence in the log-
likelihood for a model ﬁt with parameter λ and the “saturated” model (having
by = yi). Devnull is the null deviance computed at the constant (mean) model.
Since for these data the classes are separable, the range of λ is chosen so as not
to get too close to the saturated ﬁt (where the coeﬃcients would be undeﬁned;
see the next section).

The maximum number of nonzero coeﬃcients in any of these models can
be shown to be min(N, p), which is equal 11, 314 in this case. In Figure 3.1, the
largest model actually had only 5, 277 coeﬃcients since glmnet did not go to
the very end of the solution path. Although it might seem more natural to plot
against the log(λ) sequence, or perhaps
1, there are problems with both
k
N setting. The former quantity is data and problem dependent,
in the p

ˆβ(λ)
k

(cid:29)

4the name D2 is by analogy with R2, the fraction of variance explained in regression.

0.00.20.40.60.8−4−202Fraction Deviance ExplainedCoefficients0662461061317634

GENERALIZED LINEAR MODELS

Figure 3.2 Lasso (‘1)-penalized logistic regression. Tenfold cross-validation curves
for the Newsgroup data are shown in red, along with pointwise standard-error bands
(not visible). The left plot shows misclassiﬁcation error; the right plot shows deviance.
Also shown in blue is the training error for each of these measures. The number of
nonzero coeﬃcients in each model is shown along the top of each plot.

and gives no indication of the amount of overﬁtting, whereas for the latter
measure, the graph would be dominated by the less interesting right-hand
side, in which the coeﬃcients and hence their norm explode.

Figure 3.2 shows the results of tenfold cross-validation for these data, as
well as training error. These are also indexed by the fraction of deviance
explained on the training data. Figure 3.3 shows the analogous results to those
in Figure 3.2, for ridge regression. The cross-validated error rates are about
the same as for the lasso. The number of nonzero coeﬃcients in every model
is p = 777, 811 compared to a maximum of 5, 277 in Figure 3.2. However the
rank of the ridge regression ﬁtted values is actually min(N, p) which equals
11, 314 in this case, not much diﬀerent from that of the lasso ﬁt. Nonetheless,
ridge regression might be more costly from a computational viewpoint. We
produced the cross-validation results in Figure 3.3 using the glmnet package;
for ridge the tenfold cross-validation took 8.3 minutes, while for lasso under
one minute. A diﬀerent approach would be to use the kernel trick (Hastie and
Tibshirani 2004, for example), but this requires a singular value or similar
11, 314 matrix.
decomposition of an 11, 314

For this example, using the package glmnet, we ﬁt the regularization path
in Figure 3.1 at 100 values of λ in 5 secs on a 2.6 GHz Macbook Pro. In ex-
amples like this with so many features, dramatic speedups can be achieved by
screening the features. For example, the ﬁrst feature to enter the regulariza-
, where y is the vector of binary
tion path achieves λmax = maxj

xj, y

¯p

×

|h

−

i|

0.00.20.40.60.80.00.10.20.30.40.5Fraction Deviance ExplainedMisclassification Error0728951693527561785350210−fold CVTrain0.00.20.40.60.80.00.20.40.60.81.01.21.4Fraction Deviance ExplainedBinomial Deviance07289516935275617853502LOGISTIC REGRESSION

35

Figure 3.3 Ridge (‘2)-penalized logistic regression: tenfold cross validation curves
for the Newsgroup data are shown in red, along with pointwise standard-error bands.
The left plot shows misclassiﬁcation error; the right plot shows deviance. Also shown
in blue is the training error for each of these measures.

outcomes, and ¯p = 0.52 1 is a vector of the overall mean. This is the entry
value for λ; that is the smallest value for which all coeﬃcients are zero. When
computing the solution path from λmax down to a slightly lower value λ1, we
can screen out the vast majority of variables for which this inner-product is
substantially lower than λ1. Once we have computed the solution with the
much smaller subset, we can check if any those screened were omitted in er-
ror. This can be repeated as we move down the path, using inner-products
with the current residuals. This “strong-rule” screening is implemented in
the glmnet package that we used for the computations in the above example.
We discuss strong rules and other computational speedups in more detail in
Section 5.10.

3.2.2 Algorithms

Two-class logistic regression is a popular generalization of linear regression,
and as a consequence much eﬀort has gone into ﬁtting lasso-penalized logistic
models. The objective (3.9) is convex and the likelihood part is diﬀerentiable,
so in principle ﬁnding a solution is a standard task in convex optimization
(Koh et al. 2007).

Coordinate descent is both attractive and eﬃcient for this problem, and in
the bibliographic notes we give a partial account of the large volume of research
on this approach; see also Sections 2.4.2 and 5.4. The glmnet package uses
a proximal-Newton iterative approach, which repeatedly approximates the
negative log-likelihood by a quadratic function (Lee, Sun and Saunders 2014).

0.30.40.50.60.70.80.90.000.020.040.060.080.100.12Fraction Deviance ExplainedMisclassification Error10−fold CVTrain0.30.40.50.60.70.80.90.20.40.60.81.0Fraction Deviance ExplainedBinomial Deviance36
In detail, with the current estimate ( ˜β0, ˜β), we form the quadratic function

GENERALIZED LINEAR MODELS

Q(β0, β) =

1
2N

N
X

i=1

wi(zi

β0

−

−

βT xi)2 + C( ˜β0, ˜β),

(3.12)

where C denotes a constant independent of (β0, β), and

zi = ˜β0 + ˜βT xi +

yi
−
˜p(xi)(1

˜p(xi)

˜p(xi))

−

,

and wi = ˜p(xi)(1

˜p(xi)),

(3.13)

−

with ˜p(xi) being the current estimate for Pr(Y = 1
X = xi). Each outer loop
then amounts to a weighted lasso regression. By using warm starts on a ﬁne
grid of values for λ, typically only a few outer-loop iterations are required,
because locally the quadratic approximation is very good. We discuss some of
the features of glmnet in Sections 3.7 and 5.4.2.

|

3.3 Multiclass Logistic Regression

Some classiﬁcation and discrimination problems have K > 2 output classes. In
(cid:1) classiﬁers (“one versus
machine learning a popular approach is to build all (cid:0)K
one” or OvO), and then classify to the class that wins the most competitions.
Another approach is “one versus all” (OvA) which treats all but one class as
the negative examples. Both of these methods can be put on ﬁrm theoretical
grounds, but also have limitations. OvO can be computationally wasteful,
and OvA can suﬀer from certain masking eﬀects (Hastie et al. 2009, Chapter
4). With multiclass logistic regression, a more natural approach is available.
We use the multinomial likelihood and represent the probabilities using the
log-linear representation

2

Pr(Y = k

|

X = x) =

eβ0k+βT
k x
‘=1 eβ0‘+βT
‘ x

PK

.

(3.14)

This model is over speciﬁed, since we can add the linear term γ0 + γT x
to the linear model for each class, and the probabilities are unchanged. For
this reason, it is customary to set one of the class models to zero—often the
last class—leading to a model with K
1 linear functions to estimate (each a
−
contrast with the last class). The model ﬁt by maximum-likelihood is invariant
to the choice of this base class, and the parameter estimates are equivariant
(the solution for one base can be obtained from the solution for another).
Here we prefer the redundant but symmetric approach (3.14), because

•

we regularize the coeﬃcients, and the regularized solutions are not equiv-
ariant under base changes, and

•
For observations

the regularization automatically eliminates the redundancy (details below).
N
i=1, we can write the regularized form of the negative
}

(xi, yi

{

MULTICLASS LOGISTIC REGRESSION

log-likelihood as

1
N

−

N
X

i=1

log Pr(Y = yi

xi;

β0, βk
{

}

|

K
k=1) + λ

K
X

k=1

βk
k

k

1.

37

(3.15)

Denote by R the N
K indicator response matrix with elements rik =
I(yi = k). Then we can write the log-likelihood part of the objective (3.15)
in the more explicit form

×

1
N

N
X

i=1

wi

" K
X

k=1

rik(β0k + βT

k xi)

( K
X

k=1

log

−

eβ0k+βT

k xi

)#

.

(3.16)

We have included a weight wi per observation, where the setting wi = 1/N
is the default. This form allows for grouped response data: at each value xi
we have a collection of ni multicategory responses, with rik in category k.
Alternatively, the rows of R can be a vector of class proportions, and we can
provide wi = ni as the observation weights.

As mentioned, the model probabilities and hence the log-likelihood are in-
variant under a constant shift in the K coeﬃcients for each variable xj—in
K
k=1 produce exactly the same probabil-
other words
}
ities. It is therefore up to the penalty in the criterion (3.15) to resolve the
K
choice of cj. Clearly, for any candidate set
k=1, the optimal cj should
}
satisfy

K
k=1 and
}

βkj + cj
{

˜βkj
{

βkj

{

cj = arg min

c∈R

( K
X

k=1

)

˜βkj

|

c
|

−

.

(3.17)

Consequently, as shown in Exercise 3.3, for each j = 1, . . . , p, the maximizer of
the objective (3.17) is given by the median of
. Since the inter-
}
K
cepts
k=1 are not penalized, we do need to resolve their indeterminacy;
}
in the glmnet package, they are constrained to sum to zero.

˜β1j, . . . , ˜βKj
{

β0k

{

3.3.1 Example: Handwritten Digits

As an illustration, we consider the US post-oﬃce handwritten digits
data (Le Cun, Boser, Denker, Henderson, Howard, Hubbard and Jackel 1990).
There are N = 7291 training images of the digits
, each digitized
to a 16
16 gray-scale image. Using the p = 256 pixels as features, we ﬁt a
10-class lasso multinomial model. Figure 3.4 shows the training and test mis-
classiﬁcation error as a function of the sequence of λ values used. In Figure 3.5
we display the coeﬃcients as images (on average about 25% are nonzero). Some
of these can be identiﬁed as appropriate contrast functionals for highlighting
each digit.

0, 1, . . . , 9
}
{

×

38

GENERALIZED LINEAR MODELS

Figure 3.4 Training and test misclassiﬁcation errors of a multinomial lasso model
ﬁt to the zip code data, plotted as a function of log(λ). The minimum test error
here is around 0.086, while the minimum training error is 0. We highlight the value
λ = 0.001, where we examine the individual class coeﬃcients in Figure 3.5.

Figure 3.5 Coeﬃcients of the multinomial lasso, displayed as images for each digit
class. The gray background image is the average training example for that class.
Superimposed in two colors (yellow for positive, blue for negative) are the nonzero
coeﬃcients for each class. We notice that they are nonzero in diﬀerent places, and
create discriminant scores for each class. Not all of these are interpretable.

5e−055e−045e−035e−020.00.10.20.30.4Misclassification ErrortraintestMultinomial Lasso on Zip Code Datalog(λ)0123456789MULTICLASS LOGISTIC REGRESSION

39

3.3.2 Algorithms

Although one could tackle this problem with standard convex-optimization
software, we have found coordinate-descent to be particularly eﬀective
(Friedman, Hastie, Simon and Tibshirani 2015). In the two-class case, there
is an outer Newton loop and an inner weighted least-squares step. The outer
loop can be seen as making a quadratic approximation to the log-likelihood,
centered at the current estimates ( ˜β0k, ˜βk
K
k=1. Here we do the same, except
}
we hold all but one class’s parameters ﬁxed when making this approxima-
tion. In detail, when updating the parameters (β0‘, β‘), we form the quadratic
function

Q‘(β0‘, β‘) =

1
2N

−

N
X

i=1

wi‘ (zi‘

β0‘

−

−

‘ xi)2 + C(
βT

˜β0k, ˜βk
{

K
k=1),
}

(3.18)

where C denotes a constant independent of (β0‘, β‘), and

zi‘ = ˜β0‘ + ˜βT

‘ xi +

yi‘
−
˜p‘(xi)(1

˜p‘(xi)

˜p‘(xi))

−
the current estimate for

,

and wi‘ = ˜p‘(xi)(1

˜p‘(xi))

−

|

is

the conditional probability
where ˜p‘(xi)
Pr(Y = ‘
xi). Our approach is similar to the two-class case, except now we
have to cycle over the classes as well in the outer loop. For each value of λ, we
create an outer loop which cycles over ‘
and computes the par-
tial quadratic approximation Q‘ about the current parameters ( ˜β0, ˜β). Then
we use coordinate descent to solve the weighted lasso problem problem

1, . . . , K

∈ {

}

minimize
(β0‘,β‘)∈Rp+1 {

β‘
Q(β0‘, β‘) + λ
k

1

k

}

.

(3.19)

3.3.3 Grouped-Lasso Multinomial

As can be seen in Figure 3.5, the lasso penalty will select diﬀerent variables for
diﬀerent classes. This can mean that although individual coeﬃcient vectors
are sparse, the overall model may not be. In this example, on average there
are 25% of the coeﬃcients nonzero per class, while overall 81% of the variables
are used.

An alternative approach is to use a grouped-lasso penalty (see Section 4.3)
for the set of coeﬃcients βj = (β1j, β2j, . . . , βKj), and hence replace the cri-
terion (3.15) with the regularized objective

1
N

−

N
X

i=1

log Pr(Y = yi

X = xi;

|

βj
{

p
j=1) + λ
}

p
X

j=1

βj

2.
k

k

(3.20)

It is important that this criterion involves the sum of the ordinary ‘2-norms
2, as opposed to the squared ‘2-norms. In this way, it amounts to im-
k · k
posing a block ‘1/‘2 constraint on the overall collection of coeﬃcients: the

40

GENERALIZED LINEAR MODELS

sum of the ‘2-norms over the groups. The eﬀect of this group penalty is to
select all the coeﬃcients for a particular variable to be in or out of the model.
When included, they are all nonzero in general, and as shown in Exercise 3.6,
they will automatically satisfy the constraint PK
k=1 βkj = 0. Criterion (3.20)
is convex, so standard methods can be used to ﬁnd the optimum. As before,
coordinate descent techniques are one reasonable choice, in this case block
coordinate descent on each vector βj, holding all the others ﬁxed; see Exer-
cise 3.7 for the details. The group lasso and variants are discussed in more
detail in Chapter 4.3.

3.4 Log-Linear Models and the Poisson GLM

When the response variable Y is nonnegative and represents a count, its mean
will be positive and the Poisson likelihood is often used for inference. In this
case we typically use the log-linear model (3.3) to enforce the positivity. We
assume that for each X = x, the response Y follows a Poisson distribution
with mean µ satisfying

log µ(x) = β0 + βT x.

The ‘1-penalized negative log-likelihood is given by

1
N

−

N
X

i=1

n

yi(β0 + βT xi)

eβ0+βT xi

o

−

β
+ λ
k

k

1.

(3.21)

(3.22)

As with other GLMs, we can ﬁt this model by iteratively reweighted least
squares, which amounts to ﬁtting a weighted lasso regression at each outer
iteration. Typically, we do not penalize the intercept β0. It is easy to see that
this enforces the constraint that the average ﬁtted value is equal to the mean
response—namely, that 1
N

i=1 ˆµi = ¯y, where ˆµi : = eˆη(xi) = ebβ0+bβT xi .

Poisson models are often used to model rates, such as death rates. If the
length Ti of the observation window is diﬀerent for each observation, then the
Xi = xi) = Tiµ(xi) where µ(xi) is the rate per unit time
mean count is E(yi
interval. In this case, our model takes the form

PN

|

log(E(Y

|

X = x, T )) = log(T ) + β0 + βT x.

(3.23)

The terms log(Ti) for each observation require no ﬁtting, and are called an
oﬀset. Oﬀsets play a role in the following example as well.

3.4.1 Example: Distribution Smoothing

The Poisson model is a useful tool for estimating distributions. The fol-
lowing example was brought to our attention by Yoram Singer (Singer and
N
k=1 from an
Dubiner 2011). Suppose that we have a sample of N counts

yk
{

}

LOG-LINEAR MODELS AND THE POISSON GLM
N -cell multinomial distribution, and let rk = yk/ PN
‘=1 y‘ be the correspond-
ing vector of proportions. For example, in large-scale web applications, these
counts might represent the number of people in each county in the USA that
visited a particular website during a given week. This vector could be sparse,
depending on the speciﬁcs, so there is a desire to regularize toward a broader,
N
more stable distribution u =
k=1 (for example, the same demographic,
except measured over a year). Singer and Dubiner (2011) posed the following
problem

uk

41

{

}

minimize
q∈RN , qk≥0

N
X

k=1

qk log

(cid:19)

(cid:18) qk
uk

such that

q
k

−

r

∞
k

≤

δ and PN

k=1 qk = 1.

(3.24)
In words, we ﬁnd the distribution, within a δ tolerance in the ‘∞-norm from
the observed distribution, that is as close as possible to the nominal distri-
bution u in terms of Kullback–Leibler (KL) divergence. It can be shown (see

Figure 3.6 Estimating distributions via the Poisson. In the left panel, the solid
black curve is the parent distribution u, here represented as a discretization of a one-
dimensional distribution f (x) into 100 cells. The blue points represent the observed
distribution, and the orange points represent the distribution recovered by the model.
While the observed distribution may have many zero counts, the modeled distribution
has the same support as u. The right plot shows the N = 100 diﬀerences |ˆqk − rk|,
which are constrained to be less than δ = 0.001, which is the horizontal orange line.

Exercise 3.4) that the Lagrange-dual to the optimization problem (3.24) has
the form

maximize
β0,α

( N
X

k=1

[rk log qk(β0, αk)

qk(β0, αk)]

δ

α
k

k

1

−

−

)

,

(3.25)

where qk(β0, αk) : = ukeβ0+αk . This is equivalent to ﬁtting a Poisson GLM
with oﬀset log(uk), individual parameter αk per observation, and the ex-
tremely sparse design matrix X = IN ×N . Consequently, it can be ﬁt very
eﬃciently using sparse-matrix methods (see Section 3.7 below). Figure 3.6

−6−4−202460.000.010.020.030.04X−6−4−202465e−075e−065e−055e−04XDifferencesf(x)42

GENERALIZED LINEAR MODELS

shows a simulation example, where the distribution uk is a discretized contin-
uous distribution (mixture of Gaussians). There are N = 100 cells, and a total
of PN
k=1 yk = 1000 observations distributed to these cells. As discussed above,
the presence of the unpenalized β0 ensures that PN
k=1 rk = 1 (see
also Exercise 3.5). Although we only show one solution in Figure 3.6, the path
gives solutions ˆqk(δ) that vary smoothly between the background distribution
uk and the observed distribution rk.

k=1 ˆqk = PN

3.5 Cox Proportional Hazards Models

In medical studies, the outcome of interest after treatment is often time to
death or time to recurrence of the disease. Patients are followed after their
treatment, and some drop out because they move away, or perhaps die from
an independent cause. Such outcomes are called right censored. Denoting by
T the underlying survival time, for each patient we observe the quantity
Y = min(T, C) where C is a censoring time. Interest tends to focus on the
survivor function S(t) : = Pr(T > t), the probability of surviving beyond a
certain time t.

Figure 3.7 The black curves are the Kaplan–Meier estimates of S(t) for the Lym-
phoma data. In the left plot, we segment the data based on the predictions from
the Cox proportional hazards lasso model, selected by cross-validation. Although the
tuning parameter is chosen by cross-validation, the predictions are based on the full
training set, and are overly optimistic. The right panel uses prevalidation to build
a prediction on the entire dataset, with this training-set bias removed. Although the
separation is not as strong, it is still signiﬁcant. The spikes indicate censoring times.
The p-value in the right panel comes from the log-rank test.

The black curves in Figure 3.7 show estimates of S(t) for a population of
N = 240 Lymphoma patients (Alizadeh et al. 2000). Each of the spikes in the

051015200.00.20.40.60.81.0Kaplan−Meier Estimates (naive)TimeSurvival ProbabilityPred > 0Pred<=0Overall051015200.00.20.40.60.81.0Kaplan−Meier Estimates (prevalidated)TimeSurvival Probabilityp=0.00012COX PROPORTIONAL HAZARDS MODELS

43

plot indicates a censoring point, meaning a time at which a patient was lost for
follow-ups. Although survival curves are useful summaries of such data, when
incorporating covariates it is more common to model the hazard function, a
monotone transformation of S. More speciﬁcally, the hazard at time t is given
by

h(t) = lim
δ→0

Pr(Y

∈

(t, t + δ)
δ

|

Y

t)

≥

=

f (t)
S(t)

,

(3.26)

and corresponds to the instantaneous probability of death at time t, given
survival up till t.

We now discuss Cox’s proportional hazards model that was used to produce
the blue and orange survival curves in Figure 3.7. The proportional hazards
model (CPH) is based on the hazard function

h(t; x) = h0(t)eβT x,

(3.27)

where h0(t) is a baseline hazard (the hazard for an individual with x = 0).

We have data of the form (xi, yi, δi), where δi is binary-valued indicator of
whether yi is a death time or censoring time. For the lymphoma data, there
are p = 7399 variables, each a measure of gene expression. Of the N = 240
samples, a total of 102 samples are right censored. Here we ﬁt an ‘1-penalized
CPH by solving

minimize
β



−

X

"

log

{i |δi=1}

eβT xi

#

P

j∈Ri

eβT xj






,

β

+ λ
k

1
k

(3.28)

where for each i = 1, . . . , N , Ri is the risk set of individuals who are alive
and in the study at time yi. The ﬁrst term is the log of the partial likelihood,
corresponding to the conditional probability in the risk set of the observed
death. Note that the baseline hazard does not play a role, an attractive feature
of this approach. Here we have assumed that there are no ties, that is, the
survival times are all unique. Modiﬁcation of the partial likelihood is needed
in the event of ties.

Figure 3.8 shows the coeﬃcients obtained in ﬁtting the model (3.28) to the
0, meaning
Lymphoma data. Since p
that some parameters would diverge to
, and the log partial likelihood
would approach 0. We see evidence of this undesirable behavior as λ gets
small.

N , the model would “saturate” as λ

±∞

(cid:29)

↓

The computations for the Cox model are similar to those for the multino-
mial model but slightly more complex. Simon, Friedman, Hastie and Tibshi-
rani (2011) give details for an algorithm based on coordinate-descent.

3.5.1 Cross-Validation

All the models in this chapter require a choice of λ, and we typically use
fold cross-validation where K equal to 5 or 10, as in Figure 3.2. For the
K

−

44

GENERALIZED LINEAR MODELS

Figure 3.8 The ‘1-regularized coeﬃcient path for the Cox model ﬁt to the Lym-
phoma data. Since p (cid:29) N , the plot has a trumpet shape near the end, corresponding
to a saturated model with partial likelihood equal to one. The right-hand plot zooms
in on the area of interest, a fairly heavily regularized solution with 31 nonzero coef-
ﬁcients.

Cox model, we compute the cross-validated deviance, which is minus twice
the log partial likelihood. An issue arises in computing the deviance, since if
N/K is small, there will not be suﬃcient observations to compute the risk
sets. Here we use a trick due to van Houwelingen et al. (2006). When fold k
is left out, we compute the coeﬃcients bβ−k(λ), and then compute

k
λ : = Dev[ bβ−k(λ)]
dDev

Dev−k[ bβ−k(λ)].

−

(3.29)

The ﬁrst term on the right uses all N samples in computing the deviance,
k
while the second term omits the fold-k samples. Finally DevCV
k=1 dDev
λ
is obtained by subtraction. The point is that each of these terms has suﬃcient
data to compute the deviance, and in the standard cases (that is, any of the
other generalized linear models), the estimate would be precisely the deviance
on the left-out set.

λ = PK

The deviance in Figure 3.9 was computed in this fashion; we zoom in on
the right-hand section. We see that the minimum is achieved at 31 nonzero
coeﬃcients. Figure 3.7 shows the eﬀect of the chosen model. We compute
ˆβ(λmin) for each observation, and then create two groups by thresh-
ˆη(xi) = xT
i
olding these scores at zero. The two colored survival curves in the left-hand
plot show the diﬀerence in survival for the two groups thus formed. They are
well separated, which suggests we have derived a powerful signature. However,
these scores are biased: we are evaluating their performance on the same data
for which they were computed.

−6−5−4−3−2−4−2024Coefficients2192021881261531−2.8−2.6−2.4−2.2−2.0−1.8−1.6−0.4−0.20.00.20.4Coefficients15Zoomed in31log(λ)log(λ)COX PROPORTIONAL HAZARDS MODELS

45

Figure 3.9 Cross-validated deviance for the lymphoma data, computed by subtrac-
tions, as described in the text. The right-hand plot zooms in on the area of interest.
The dotted vertical line on the left corresponds to the minimum, and the model we
chose in this case; the one on the right corresponds to the rightmost point on the
curve (simplest model) within one standard error of the minimum. This is a basis
for a more conservative approach to selection. The number of nonzero coeﬃcients is
shown along the top of each plot.

3.5.2 Pre-Validation

In Figure 3.7, we used a variant of cross-validation, known as pre-validation
(Tibshirani and Efron 2002), in order to obtain a fair evaluation of the model.
Cross-validation leaves out data in order to obtain a reasonably unbiased
estimate of the error rate of a model. But the error rate is not a very inter-
pretable measure in some settings such as survival modelling. The method of
pre-validation is similar to cross-validation, but instead produces a new set of
“unbiased data” that mimics the performance of the model applied to inde-
pendent data. The pre-validated data can then be analyzed and displayed. In
computing the score ˆη(xi)(k) for the observations in fold k, we use the coeﬃ-
cient vector bβ(−k) computed with those observations omitted.5 Doing this for
N
i=1. The
all K folds, we obtain the “pre-validated” dataset
key aspect of this pre-validated data is that each score ˆη(xi)(k) is derived in-
dependently of its response value (yi, δi). Hence we can essentially treat these
scores as if they were derived from a dataset completely separate from the
N
i=1. In the right-hand panel of Figure 3.7, we have
“test data”
}
split the pre-validated scores into two groups and plotted the corresponding

(ˆη(xi)(k), yi, δi)
}

(xi, yi, δi)
{

{

5Strictly speaking λ should be chosen each time as well, but we did not do that here.

−6−5−4−3−250100150Partial Likelihood Deviance23021821221620418613568257−2.8−2.6−2.4−2.2−2.0−1.8−1.611.011.512.012.513.0Partial Likelihood Deviance114937555412820147430Zoomed inlog(λ)log(λ)46

GENERALIZED LINEAR MODELS

survival curves. Although the curves are not as spread out as in the left-hand
plot, they are still signiﬁcantly diﬀerent.

3.6 Support Vector Machines

We now turn to a method for binary classiﬁcation known as the support vector
machine (SVM). The idea is shown in Figure 3.10. The decision boundary is
the solid line in the middle of the yellow slab. The margin is the half-width of
the yellow slab. Ideally, all of the blue data points should lie above the slab
on the right, and the red points should lie below it on the left. However in the
picture, three red points and two blue points lie on the wrong side of their
margin. These correspond to the “errors” ξi. The SVM decision boundary is
chosen to maximize the margin, subject to a ﬁxed budget on the total error
PN
i=1 ξi. The idea is that a decision boundary achieving the largest margin
has more space between the classes and will generalize better to test data.
This leads to the optimization problem

maximize
β0, β, {ξi}N
1

M subject to yi (β0 + βT xi)
}

|

{z
f (xi; β0, β)

M (1

ξi)

i,

∀

−

≥

(3.30)

and ξi

0

i,

∀

≥

N
X

i=1

C, and

ξi

≤

2 = 1.

β
k

k

(3.31)

(See Section 3.6.1 for an explanation of this particular form.)

This problem involves a linear cost function subject to convex constraints,
and many eﬃcient algorithms have been designed for its solution. It can be
shown to be equivalent to the penalized form (3.8) previously speciﬁed on
page 31, which we restate here:

minimize
β0,β

(

1
N

N
X

[1

i=1

yif (x ; β0, β)]+ + λ
k

β

−

2
2
k

)

.

(3.32)

Decreasing λ has a similar eﬀect to decreasing C.6 The linear SVM can be
generalized using a kernel to create nonlinear boundaries; it involves replacing
the squared ‘2-norm in the objective (3.32) by the squared Hilbert norm de-
ﬁned by a symmetric bivariate kernel. Details on this extension can be found
elsewhere—for instance, see Hastie et al. (2009), Section 5.8.

Since the criterion (3.32) involves a quadratic penalty, the estimated coef-
ﬁcient vector will not be sparse. However, because the hinge loss function is
piecewise linear, it introduces a diﬀerent kind of sparsity. It can be shown via
the dual formulation of the SVM that the solution ˆβ has the form

ˆβ =

N
X

i=1

ˆαiyixi;

(3.33)

6Solutions to (3.32) do not have k ˆβk2 = 1, but since a linear classiﬁer is scale invariant,

the solution coeﬃcients can be rescaled.

SUPPORT VECTOR MACHINES

47

j are on the wrong side of their margin by an amount ξ∗

Figure 3.10 Support vector classiﬁer: The decision boundary is the solid line, while
broken lines bound the shaded maximal margin of width 2M = 2/kβk2. The points
labelled ξ∗
j = M ξj; points
on the correct side have ξ∗
j = 0. The margin is maximized subject to a total budget
i=1 ξi ≤ C. Hence PN
PN
i=1 ξ∗
j is the total distance of points on the wrong side of
their margin.

each observation i
and only a subset
nonzero weights.

1, . . . , N

is associated with a nonnegative weight ˆαi,
∈ {
λ, referred to as the support set, will be associated with
V

}

SVMs are popular in high-dimensional classiﬁcation problems with p

N ,
(pN 2) for both linear and nonlinear kernels. Ad-
since the computations are
ditional eﬃciencies can be realized for linear SVMs, using stochastic subgradi-
ent methods (Shalev-Shwartz, Singer and Srebro 2007). They are not, however,
sparse in the features. Replacing the ‘2 penalty in the objective (3.32) with an
‘1 penalty promotes such sparsity, and yields the ‘1-regularized linear SVM :

(cid:29)

O

minimize
β0,β

(

1
N

N
X

i=1

[1

yif (xi; β0, β)]+ + λ
k

β

1

k

−

)

.

(3.34)

The optimization problem (3.34) is a linear program with many con-
straints (Zhu, Rosset, Hastie and Tibshirani 2004, Wang, Zhu and Zou 2006),
and eﬃcient algorithms can be complex (Exercise 3.9). The solution paths (in
ﬁne detail) can have many jumps, and show many discontinuities. For this
t)+
reason, some authors prefer to replace the usual hinge loss φhin = (1

−

•••••••••••••••••••••••marginξ∗1ξ∗1ξ∗1ξ∗2ξ∗2ξ∗2ξ∗3ξ∗3ξ∗4ξ∗4ξ∗4ξ∗5M=1kβk2M=1kβk2β0+βTx=048

GENERALIZED LINEAR MODELS

Figure 3.11 A comparison of the coeﬃcient paths for the ‘1-regularized SVM versus
logistic regression on two examples. In the left we have the South African heart
disease data (N = 462 and p = 9), and on the right the Leukemia data (N = 38
and p = 6087). The dashed lines are the SVM coeﬃcients, the solid lines logistic
regression. The similarity is striking in the left example, and strong in the right.

with squared hinge loss φsqh(t) = (1
(see Exercise 3.8).

−

t)2

+, which is diﬀerentiable everywhere

The SVM loss function shares many similarities with the binomial
loss (Hastie et al. 2009, Section 12.3), and their solutions are not too dif-
ferent. Figure 3.11 compares their ‘1 regularization paths on two examples,
and supports this claim. In the left-hand plot, they are virtually identical.
In the right-hand plot, for more than half of the path, the training data are
separated by the solution. As we proceed to the end of the path, the logistic
coeﬃcients become less stable than those of the SVM, and can account for
the bigger discrepancies.

The support vector machine, on the other hand, is designed for ﬁnding
maximal-margin solutions for separable data, and its coeﬃcients do not blow
up at the least-regularized end of the path. However, in terms of the ‘1 penalty,
this is at the nonsparse end of the path. In light of this, we do not recommend
the ‘1 regularized linear SVM as a variable selector, because the corresponding
logistic regression problem (3.6) gives very similar solutions when the penalty
is active, and the algorithms are more stable.

0.00.51.01.52.02.5−0.20.00.20.40.6SA Heart Disease    p < NL1 normCoefficientsHinge Loss versus Binomial with L1 Regularization01234560.00.51.01.5Leukemia   p >> NL1 normCoefficientsSUPPORT VECTOR MACHINES

49

3.6.1 Logistic Regression with Separable Data

It is a well-known fact that without a penalty on the coeﬃcients, the linear
logistic regression model fails when the two classes are linearly separable (Ex-
ercise 3.1); the maximum-likelihood estimates for the coeﬃcients are inﬁnite.
The problem in this case is that the likelihood is trying to make the probabil-
ities all 1s and 0s, and inspection of (3.2) shows that this cannot be achieved
with ﬁnite parameters. Once we penalize the criterion as in (3.6) the problem
goes away, for as long as λ > 0, very large coeﬃcients will not be tolerated.

(cid:28)

With wide data (N

p), the classes are almost always separable, unless
there are exact ties in covariate space for the two classes. Figure 3.1 shows the
logistic-regression coeﬃcient path for a wide-data situation; notice how the
coeﬃcients start to fan out near the end of the path. One has to take care at
this end of the path, and not allow λ to get too small. In many situations, this
end represents the overﬁt situation, which is not of primary interest. It appears
not to be the case in this example, as can be seen in the cross-validation plots
in Figure 3.2.

The ends of the path have special meaning in the machine-learning com-
munity, since we will see they amount to maximal-margin classiﬁers. Before
giving the details, we review some geometry associated with linear classiﬁca-
associated with a
x
tion. Consider the boundary
{
f (x ; β0, β) = β0 + βT x. The Euclidean distance from
linear classiﬁer f (x)
a point x0 to the boundary is given by

f (x) = 0

Rp

: =

≡

∈

B

}

|

dist2(x0,

) : = inf

z
z∈B k

B

−

x0

k

2 = |

f (x0)
|
β
k

2
k

(3.35)

(Exercise 3.2). Consequently, for a given predictor-response pair (x, y), the
quantity y f (x)
is the signed Euclidean distance to the boundary: it will be
kβk2
negative if the sign of y disagrees with that of f (x). For separable data, the
optimal separating hyperplane f ∗(x) = 0 solves the optimization problem

M ∗

2 = max
β0,β

(cid:26)

min
i∈{1,...,N }

yif (xi ; β0, β)
β
k

k

2

(cid:27)

.

(3.36)

In words, it maximizes the Euclidean distance of the closest sample to the
boundary.

Rosset et al. (2004) establish an interesting connection between this op-
timal separating hyperplane and a certain limiting case of ridge-regularized
logistic regression. In particular, suppose that we replace the ‘1-penalty in the
objective (3.10) with a squared ‘2-penalty, and solve the problem

minimize
β0,β

(

1
N

N
X

i=1

log(1 + e−yif (xi ;β0,β)) + λ

)

;

2
2

β
k

k

(3.37)

let ( ˜β0(λ), ˜β(λ)) be the optimal solution, specifying a particular linear classi-
ﬁer. We then consider the behavior of this linear classiﬁer as the regularization

50

GENERALIZED LINEAR MODELS

weight λ vanishes: in particular, it can be shown (Rosset et al. 2004) that

(cid:26)

lim
λ→0

min
i∈{1,...,N }

yif (xi; ˜β0(λ), ˜β(λ))
˜β(λ)
k

2

(cid:27)

= M ∗
2 .

(3.38)

k
Thus, the end of the ‘2-regularized logistic regression path corresponds to the
SVM solution. In particular, if ( ˘β0, ˘β) solves the SVM objective (3.30) with
C = 0, then

lim
λ→0

˜β(λ)
˜β(λ)
k

= ˘β.

(3.39)

2
k
How does this translate to the setting of ‘1-regularized models? Matters get
a little more complicated, since we move into the territory of general projec-
tions and dual norms (Mangasarian 1999). The analog of the ‘2-distance (3.35)
is the quantity

dist∞(x0,

) : = inf

z
z∈B k

B

−

x0

∞ = |
k

f (x0)
|
β
k

1
k

,

(3.40)

For a given λ
0, let ( bβ0(λ), bβ(λ)) denote an optimal solution to the ‘1-
regularized logistic regression objective (3.10). Then as λ decreases toward
zero, we have

≥

"

lim
λ→0

min
i∈{1,...,N }

yif (xi; bβ0(λ), bβ(λ))
bβ(λ)
1
k

#

= M ∗

∞,

(3.41)

k
so that the worst-case margin of the ‘1-regularized logistic regression converges
to the ‘1-regularized version of the support vector machine, which maximizes
the ‘∞ margin (3.40).

In summary, then, we can make the following observations:

•

•

•

At the end of the path, where the solution is most dense, the logistic re-
gression solution coincides with the SVM solution.

The SVM approach leads to a more stable numerical method for computing
the solution in this region.

In contrast, logistic regression is most useful in the sparser part of the
solution path.

3.7 Computational Details and glmnet

Most of the examples in this chapter were ﬁt using the R package glmnet
(Friedman et al. 2015). Here we detail some of the options and features in
glmnet. Although these are speciﬁc to this package, they also would be natural
requirements in any other similar software.

COMPUTATIONAL DETAILS AND GLMNET

51

Family: The family option allows one to pick the loss-function and the asso-
ciated model. As of version 1.7, these are gaussian, binomial, multinomial
(grouped or not), poisson, and cox. The gaussian family allows for multiple
responses (multitask learning), in which case a group lasso is used to select
coeﬃcients for each variable, as in the grouped multinomial. Associated with
each family is a deviance measure, the analog of the residual sum-of-squares
for Gaussian errors. Denote by ˆµλ the N -vector of ﬁtted mean values when
the parameter is λ, and ˜µ the unrestricted or saturated ﬁt. Then

Devλ

.
= 2[‘(y, ˜µ)

‘(y, ˆµλ)].

−

(3.42)

Here ‘(y, µ) is the log-likelihood of the model µ, a sum of N terms. The null
deviance is Devnull = Dev∞; typically this means ˆµ∞ = ¯y1, or in the case of
the cox family ˆµ∞ = 0. Glmnet reports D2, the fraction of deviance explained,
as deﬁned in (3.11) on page 33.

Penalties: For all models, the glmnet algorithm admits a range of elastic-net
penalties ranging from ‘2 to ‘1. The general form of the penalized optimization
problem is

minimize
β0,β



−

1
N

‘(y; β0, β) + λ

p
X

j=1

(cid:8)(1

γj

α)β2

j + α

βj
|

|

−




(cid:9)



.

(3.43)

This family of penalties is speciﬁed by three sets of real-valued parameters:

•

•

•

The parameter λ determines the overall complexity of the model. By de-
fault, the glmnet algorithm generates a sequence of 100 values for λ that
cover the whole path (on the log scale), with care taken at the lower end
for saturated ﬁts.

∈

[0, 1] provides a mix between ridge regression
The elastic-net parameter α
and the lasso. Although one can select α via cross-validation, we typically
try a course grid of around three to ﬁve values of α.
For each j = 1, 2, . . . , p, the quantity γj
0 is a penalty modiﬁer. When
γj = 0, the jth variable is always included; when γj = inf it is always
excluded. Typically γj = 1 (the default), and all variables are treated as
equals.

≥

Coeﬃcient bounds: With coordinate descent, it is very easy to allow for upper
and lower bounds on each coeﬃcient in the model. For example, we might ask
for a nonnegative lasso. In this case, if a coeﬃcient exceeds an upper or lower
bound during the coordinate-descent cycle, it is simply set to the bound.

Oﬀset: All the models allow for an oﬀset term. This is a real valued number
oi for each observation, that gets added to the linear predictor, and is not
associated with any parameter:

η(xi) = oi + β0 + βT xi.

(3.44)

52

GENERALIZED LINEAR MODELS

The oﬀset has many uses. Sometimes we have a previously-ﬁt model h(z)
(where z might include or coincide with x), and we wish to see if augmenting
it with a linear model oﬀers improvement. We would supply oi = h(zi) for
each observation.

For Poisson models the oﬀset allows us to model rates rather than mean
counts, if the observation period diﬀers for each observation. Suppose we ob-
serve a count Y over period t, then E[Y
T = t, X = x] = tµ(x), where µ(x)
is the rate per unit time. Using the log link, we would supply oi = log(ti) for
each observation. See Section 3.4.1 for an example.

|

Matrix input and weights: Binomial and multinomial responses are typically
supplied as a 2 or K-level factor. As an alternative glmnet allows the response
to be supplied in matrix form. This allows for grouped data, where at each
xi we see a multinomial sample. In this case the rows of the N
K response
matrix represent counts in each category. Alternatively the rows can be pro-
portions summing to one. For the latter case, supplying an observation weight
equal to the total count for each observation is equivalent to the ﬁrst form.
Trivially an indicator response matrix is equivalent to supplying the data as
a factor, in ungrouped form.

×

∈

Sparse model matrices X: Often when p
N is very large, there are many
(cid:29)
zeros in the input matrix X. For example, in document models, each feature
Rp might count the number of times each word in a very large
vector xi
dictionary occurs in a document. Such vectors and matrices can be stored
eﬃciently by only storing the nonzero values, and then row and column indices
of where they occur. Coordinate descent is ideally suited to capitalize on
such sparsity, since it handles the variables one-at-a-time, and the principal
operation is an inner-product. For example, in Section 3.4.1, the model-matrix
N identity matrix. Even with N = 106,
X = I is the extremely sparse N
the program can compute the relaxation path at 100 values of δ in only 27
seconds.

×

Bibliographic Notes

Generalized linear models were proposed as a comprehensive class of models
by Nelder and Wedderburn (1972); see the book by McCullagh and Nelder
(1989) for a thorough account. Application of the lasso to logistic regression
was proposed in Tibshirani (1996); coordinate descent methods for logistic,
multinomial, and Poisson regression were developed in Friedman, Hastie, Hoe-
ﬂing and Tibshirani (2007), Friedman, Hastie and Tibshirani (2010b), Wu and
Lange (2008), and Wu, Chen, Hastie, Sobel and Lange (2009). Pre-validation
was proposed by Tibshirani and Efron (2002). Boser, Guyon and Vapnik
(1992) described the support vector machine, with a thorough treatment in
Vapnik (1996).

EXERCISES

Exercises

53

Ex. 3.1 Consider a linear logistic regression model with separable data, mean-
ing that the data can be correctly separated into two classes by a hyperplane.
Show that the likelihood estimates are unbounded, and that the log-likelihood
objective reaches its maximal value of zero. Are the ﬁtted probabilities well-
deﬁned?

Ex. 3.2 For a response variable y
and a linear classiﬁcation func-
tion f (x) = β0 + βT x, suppose that we classify according to sign(f (x)). Show
that the signed Euclidean distance of the point x with label y to the decision
boundary is given by

∈ {−

1, +1

}

1
β
k

k

y f (x).

2

(3.45)

Ex. 3.3 Here we show that for the multinomial model, the penalty used auto-
matically imposes a normalization on the parameter estimates. We solve this
problem for a general elastic-net penalty (Section 4.2). For some parameter
α

[0, 1] consider the problem

∈

cj(α) = arg min

t∈R

( K
X

‘=1

(cid:20) 1
2

(1

−

α)(βj‘

−

t)2 + α

(cid:21))

βj‘
|

t

|

−

.

(3.46)

PK
Let ¯βj = 1
K
(For simplicity, assume that ¯βj

˜βj). Show that

‘=1 βj‘ be the sample mean, and let ˜βj be a sample median.

≤
cj(α)

¯βj

≤

˜βj

≤

for all α

[0, 1]

∈

(3.47)

with the lower inequality achieved if α = 0, and the upper inequality achieved
if α = 1.

Ex. 3.4 Derive the Lagrange dual (3.25) of the maximum-entropy prob-
lem (3.24). Note that positivity is automatically enforced, since the log func-
tion in the objective (3.24) serves as a barrier. (Hint: It may help to intro-
duce additional variables wi = pi
ri, and now minimize the criterion (3.24)
N
with respect to both
i=1, subject to the additional constraints that
}
ri.)
wi = pi

pi, wi
{

−

−

Ex. 3.5 Recall the dual (3.25) of the maximum entropy problem, and the
associated example motivating it. Suppose that for each cell, we also measure
the value xk corresponding to the mid-cell ordinate on the continuous domain
x. Consider the model

qk = ukeβ0+PM

m=1

βmxm

k +αk ,

(3.48)

and suppose that we ﬁt it using the penalized log-likelihood (3.25) without
penalizing any of the coeﬃcients. Show that for the estimated distribution
N
ˆq =
k=1, the moments of X up to order M match those of the empirical
}
distribution r =

ˆqk
{

rk

N
k=1.
}

{

54

GENERALIZED LINEAR MODELS

Ex. 3.6 Consider the group-lasso-regularized version of multinomial regres-
sion (3.20). Suppose that for a particular value of λ, the coeﬃcient bβkj is
not equal to 0. Show that bβ‘j
(1, . . . , K), and moreover that
PK

= 0 for all ‘

∈

‘=1 bβ‘j = 0.

Ex. 3.7 This problem also applies to the group-lasso-regularized form of multi-
nomial regression (3.20). Suppose that for a particular value of λ, and the
ﬁtted probabilities are ˆπi = (ˆπi1, . . . , ˆπiK)T . Similarly let ri = (ri1, . . . , riK)T
be the observed proportions. Suppose we consider including an additional
variable (vector) Z with observed values zi, and wish to update the ﬁt. Let
g = PN
2 < λ, then the coeﬃcients of Z are
g
k
k
zero, and the model remains unchanged.

ˆπi). Show that if

i=1 zi(ri

−

Ex. 3.8 The squared hinge loss function φsqh(t) : = (1
margin-based loss function φ(y f (x)) for binary classiﬁcation problems.
(a) Show that φsqh is diﬀerentiable everywhere.
1, +1
(b) Suppose Y
}
R that minimizes (for each x

with Pr(Y = +1) = π

f : Rp

∈ {−

−

(0, 1). Find the function

t)2

+ can be used as a

→

∈
Rp) the criterion
(cid:0)Y f (x)(cid:1)(cid:3)

∈
(cid:2)φsqh

(3.49)

minimize
f

EY

(c) Repeat part (b) using the usual hinge loss φhin(t) = (1

t)+.

−

Ex. 3.9 Given binary responses yi
SVM problem

1, +1

∈ {−

, consider the ‘1-regularized
}

( bβ0, bβ) = arg min

β0, β




N
X



i=1

1

{

−

yif (xi ; β0, β)

}+ + λ

p
X

j=1

βj
|




|


,

(3.50)

where f (x ; β0, β) : = β0 + βT x. In this exercise, we compare solutions of this
problem to those of weighted ‘2-regularized SVM problem: given nonnegative
weights

wj
{

p
j=1, we solve
}



N
X

( ˜β0, ˜β) = arg min

β0, β



i=1

1

{

−

yif (xi ; β0, β)

}+ +

λ
2

p
X

j=1

wjβ2
j






.

(3.51)

(a) Show that if we solve the problem (3.51) with wj = 1/

( bβ0, bβ).

, then ( ˜β0, ˜β) =

bβj
|

|

(b) For a given weight sequence

) for all j = 1, . . . , p,
show how to solve the criterion (3.51) using a regular unweighted SVM
solver. What do you do if wj =

for some subset of indices?

wj
{

(0,

∞

∈

}

p
j=1 with wj

(c) In light of the preceding parts, suggest an iterative algorithm for the

∞

problem (3.50) using a regular SVM solver.

6
Chapter 4

Generalizations of the Lasso Penalty

4.1 Introduction

In the previous chapter, we considered some generalizations of the lasso ob-
tained by varying the loss function. In this chapter, we turn to some useful
variations of the basic lasso ‘1-penalty itself, which expand the scope of the
basic model. They all inherit the two essential features of the standard lasso,
namely the shrinkage and selection of variables, or groups of variables.

Such generalized penalties arise in a wide variety of settings. For instance,
in microarray studies, we often ﬁnd groups of correlated features, such as genes
that operate in the same biological pathway. Empirically, the lasso sometimes
does not perform well with highly correlated variables. By combining a squared
‘2-penalty with the ‘1-penalty, we obtain the elastic net, another penalized
method that deals better with such correlated groups, and tends to select the
correlated features (or not) together. In other applications, features may be
structurally grouped. Examples include the dummy variables that are used
to code a multilevel categorical predictor, or sets of coeﬃcients in a multiple
regression problem. In such settings, it is natural to select or omit all the
coeﬃcients within a group together. The group lasso and the overlap group
lasso achieve these eﬀects by using sums of (un-squared) ‘2 penalties. Another
kind of structural grouping arises from an underlying index set such as time;
our parameters might each have an associated time stamp. We might then ask
for time-neighboring coeﬃcients to be the same or similar. The fused lasso is
a method naturally tailored to such situations.

Finally, a variety of nonparametric smoothing methods operate implic-
itly with large groups of variables. For example, each term in an additive
smoothing-spline model has an associated cubic-spline basis. The grouped
lasso extends naturally to these situations as well; the COSSO and the SPAM
families are examples of such nonparametric models. In summary, all these
variants deal with diﬀerent kinds of groupings of the features in natural ways,
and it is the goal of this chapter to explore them in some more detail.

55

56

GENERALIZATIONS OF THE LASSO PENALTY

4.2 The Elastic Net

The lasso does not handle highly correlated variables very well; the coeﬃcient
paths tend to be erratic and can sometimes show wild behavior. Consider a
simple but extreme example, where the coeﬃcient for a variable Xj with a
particular value for λ is bβj > 0. If we augment our data with an identical
copy Xj0 = Xj, then they can share this coeﬃcient in inﬁnitely many ways—
any ˜βj + ˜βj0 = ˆβj with both pieces positive—and the loss and ‘1 penalty
are indiﬀerent. So the coeﬃcients for this pair are not deﬁned. A quadratic
penalty, on the other hand, will divide ˆβj exactly equally between these two
twins (see Exercise 4.1). In practice, we are unlikely to have an identical

Figure 4.1 Six variables, highly correlated in groups of three. The lasso estimates
(α = 1), as shown in the left panel, exhibit somewhat erratic behavior as the regu-
larization parameter λ is varied. In the right panel, the elastic net with (α = 0.3)
includes all the variables, and the correlated groups are pulled together.

pair of variables, but often we do have groups of very correlated variables. In
microarray studies, groups of genes in the same biological pathway tend to be
expressed (or not) together, and hence measures of their expression tend to
be strongly correlated. The left panel of Figure 4.1 shows the lasso coeﬃcient
path for such a situation. There are two sets of three variables, with pairwise
correlations around 0.97 in each group. With a sample size of N = 100, the
data were simulated as follows:

Z1, Z2

N (0, 1) independent,

Z1

∼
Y = 3
−
Xj = Z1 + ξj/5, with ξj
Xj = Z2 + ξj/5, with ξj

·

∼

∼

1.5Z2 + 2ε, with ε

N (0, 1),

∼

N (0, 1) for j = 1, 2, 3, and

(4.1)

N (0, 1) for j = 4, 5, 6.

As shown in the left panel of Figure 4.1, the lasso coeﬃcients do not reﬂect
the relative importance of the individual variables.

01234−1.5−0.50.00.51.01.50225501234−1.5−0.50.00.51.01.503666kˆβk1kˆβk1CoeﬃcientsˆβjCoeﬃcientsˆβjα=1.0α=0.3THE ELASTIC NET

57

The elastic net makes a compromise between the ridge and the lasso penal-

ties (Zou and Hastie 2005); it solves the convex program

minimize
(β0,β)∈R×Rp

(

1
2

N
X

i=1

(yi

β0

−

−

i β)2 + λ
xT

h 1
2 (1

β

α)
k

2
2 + α
k

β
k

1

k

−

)
i

, (4.2)

where α
[0, 1] is a parameter that can be varied. By construction, the
penalty applied to an individual coeﬃcient (disregarding the regularization
weight λ > 0) is given by

∈

1
2

(1

−

α)β2

j + α

.

βj
|

|

(4.3)

When α = 1, it reduces to the ‘1-norm or lasso penalty, and with α = 0, it
reduces to the squared ‘2-norm, corresponding to the ridge penalty.1

Returning to Figure 4.1, the right-hand panel shows the elastic-net coeﬃ-
cient path with α = 0.3. We see that in contrast to the lasso paths in the left
panel, the coeﬃcients are selected approximately together in their groups, and
also approximately share their values equally. Of course, this example is ide-
alized, and in practice the group structure will not be so cleanly evident. But
by adding some component of the ridge penalty to the ‘1-penalty, the elastic
net automatically controls for strong within-group correlations. Moreover, for
any α < 1 and λ > 0, the elastic-net problem (4.2) is strictly convex: a unique
solution exists irrespective of the correlations or duplications in the Xj.

Figure 4.2 compares the constraint region for the elastic net (left image) to
that of the lasso (right image) when there are three variables. We see that the
elastic-net ball shares attributes of the ‘2 ball and the ‘1 ball: the sharp corners
and edges encourage selection, and the curved contours encourage sharing of
coeﬃcients. See Exercise 4.2 for further exploration of these properties.

The elastic net has an additional tuning parameter α that has to be de-
termined. In practice, it can be viewed as a higher-level parameter, and can
be set on subjective grounds. Alternatively, one can include a (coarse) grid of
values of α in a cross-validation scheme.

The elastic-net problem (4.2) is convex in the pair (β0, β)

Rp, and
a variety of diﬀerent algorithms can be used to solve it. Coordinate descent is
particularly eﬀective, and the updates are a simple extension of those for the
lasso in Chapter 2. We have included an unpenalized intercept in the model,
which can be dispensed with at the onset; we simply center the covariates
xij, and then the optimal intercept is bβ0 = ¯y = 1
j=1 yj. Having solved for
N
the optimal bβ0, it remains to compute the optimal vector bβ = ( bβ1, . . . , bβp). It
can be veriﬁed (Exercise 4.3) that the coordinate descent update for the jth

PN

×

R

∈

1The 1

2 in the quadratic part of the elastic-net penalty (4.3) leads to a more intuitive

soft-thresholding operator in the optimization.

58

GENERALIZATIONS OF THE LASSO PENALTY

3, compared to the
Figure 4.2 The elastic-net ball with α = 0.7 (left panel) in R
‘1 ball (right panel). The curved contours encourage strongly correlated variables to
share coeﬃcients (see Exercise 4.2 for details).

coeﬃcient takes the form

λα
bβj = S
PN
i=1 x2

(cid:0) PN

i=1 rijxij

ij + λ(1

−

(cid:1)

,

α)

(4.4)

(cid:0)z(cid:1) : = sign(z) (z
P

µ)+ is the soft-thresholding operator, and

where
µ
S
rij : = yi
k6=j xik bβk is the partial residual. We cycle over the up-
dates (4.4) until convergence. Friedman et al. (2015) give more details, and
provide an eﬃcient implementation of the elastic net penalty for a variety of
loss functions.

bβ0

−

−

−

4.3 The Group Lasso

There are many regression problems in which the covariates have a natural
group structure, and it is desirable to have all coeﬃcients within a group
become nonzero (or zero) simultaneously. The various forms of group lasso
penalty are designed for such situations. A leading example is when we have
qualitative factors among our predictors. We typically code their levels using a
set of dummy variables or contrasts, and would want to include or exclude this
group of variables together. We ﬁrst deﬁne the group lasso and then develop
this and other motivating examples.

Consider a linear regression model involving J groups of covariates, where
Rpj represents the covariates in group j.
R based on the collection of
Z)

for j = 1, . . . , J, the vector Zj
Our goal is to predict a real-valued response Y
covariates (Z1, . . . , ZJ ). A linear model for the regression function E(Y

∈

∈

|

β2β1β31β1β2β31THE GROUP LASSO
takes the form θ0 + PJ
regression coeﬃcients.2

j=1 Z T

j θj, where θj

Rpj represents a group of pj

∈

59

Given a collection of N samples

solves the convex problem

N
i=1, the group lasso
(yi, zi1, zi,2, . . . , zi,J )
}
{

minimize
θ0∈R,θj ∈Rpj






1
2

N
X

i=1

(cid:0)yi

θ0

−

−

J
X

j=1

(cid:1)2

zT
ijθj

+ λ

J
X

j=1

θj

k

2
k






,

(4.5)

where

θj
k

2 is the Euclidean norm of the vector θj.
k

This is a group generalization of the lasso, with the properties:

0, either the entire vector ˆθj will be zero, or all its

depending on λ
elements will be nonzero;3
when pj = 1, then we have
2 =
θj
k
k
the optimization problem (4.5) reduces to the ordinary lasso.

θj
|

≥

, so if all the groups are singletons,
|

•

•

Figure 4.3 compares the constraint region for the group lasso (left image) to
that of the lasso (right image) when there are three variables. We see that the
group lasso ball shares attributes of both the ‘2 and ‘1 balls.

Figure 4.3 The group lasso ball (left panel) in R
panel). In this case, there are two groups with coeﬃcients θ1 = (β1, β2) ∈ R
θ2 = β3 ∈ R

3, compared to the ‘1 ball (right
2 and

1.

In the formulation (4.5), all groups are equally penalized, a choice which
leads larger groups to be more likely to be selected. In their original pro-
posal, Yuan and Lin (2006) recommended weighting the penalties for each
group according to their size, by a factor √pj. In their case, the group ma-
trices Zj were orthonormal; for general matrices one can argue for a factor

2To avoid confusion, we use Zj and θj to represent groups of variables and their coeﬃ-

cients, rather than the Xj and βj we have used for scalars.

3Nonzero for generic problems, although special structure could result in some coeﬃcients

in a group being zero, just as they can for linear or ridge regression.

β1β3β21β1β2β3160

GENERALIZATIONS OF THE LASSO PENALTY

k

F (Exercise 4.5). These choices are somewhat subjective, and are easily
Zj
k
accommodated; for simplicity, we omit this modiﬁcation in our presentation.
We now turn to some examples to illustrate applications of the group

lasso (4.5).

Example 4.1. Regression with multilevel factors. When a predictor variable
in a linear regression is a multilevel factor, we typically include a separate
coeﬃcient for each level of the factor. Take the simple case of one continuous
predictor X and a three-level factor G with levels g1, g2, and g3. Our linear
model for the mean is

E(Y

|

X, G) = Xβ +

3
X

k=1

θk Ik[G],

(4.6)

where Ik[G] is a 0-1 valued indicator function for the event
. The
}
model (4.6) corresponds to a linear regression in X with diﬀerent intercepts
θk depending on the level of G.

G = gk
{

By introducing a vector Z = (Z1, Z2, Z3) of three dummy variables with

Zk = Ik[G], we can write this model as a standard linear regression

E(Y

X, G) = E(Y

X, Z) = Xβ + Z T θ,

|

|
where θ = (θ1, θ2, θ3). In this case Z is a group variable that represents the
single factor G. If the variable G—as coded by the vector Z—has no predictive
power, then the full vector θ = (θ1, θ2, θ3) should be zero. On the other hand,
when G is useful for prediction, then at least generically, we expect that all
coeﬃcients of θ are likely to be nonzero. More generally we can have a number
of such single and group variables, and so have models of the form

(4.7)

E(Y

|

X, G1, . . . , GJ ) = β0 + X T β +

J
X

j=1

Z T

j θj.

(4.8)

When selecting variables for such a model we would typically want to include
or exclude groups at a time, rather than individual coeﬃcients, and the group
lasso is designed to enforce such behavior.

With unpenalized linear regression with factors, one has to worry about
aliasing; in the example here, the dummy variables in a set add to one, which is
aliased with the intercept term. One would then use contrasts to code factors
that enforce, for example, that the coeﬃcients in a group sum to zero. With
the group lasso this is not a concern, because of the ‘2 penalties. We use the
symmetric full representation as above, because the penalty term ensures that
the coeﬃcients in a group sum to zero (see Exercise 4.4).

♦
Variables can be grouped for other reasons. For example, in gene-expression
arrays, we might have a set of highly correlated genes from the same biological
pathway. Selecting the group amounts to selecting a pathway. Figure 4.4 shows
the coeﬃcient path for a group-lasso ﬁt to some genomic data for splice-site

THE GROUP LASSO

61

detection (Meier, van de Geer and B¨uhlmann 2008, Section 5). The data arise
from human DNA, and each observation consists of seven bases with values
7. Some of the observations are at exon-intron boundaries (splice
A, G, C, T
{
}
sites), and others not, coded in a binary response; see Burge and Karlin (1977)
for further details about these data. The regression problem is to predict the
binary response Y using the seven four-level factors Gj as predictors, and we
use a training sample of 5610 observations in each class.

Figure 4.4 Coeﬃcient proﬁles from the group lasso, ﬁt to splice-site detection data.
The coeﬃcients come in groups of four, corresponding to the nucleotides A, G, C, T .
The vertical lines indicate when a group enters. On the right-hand side we label some
of the variables; for example, “Pos6” and the level “c”. The coeﬃcients in a group
have the same color, and they always average zero.

Example 4.2. Multivariate regression. Sometimes we are interested in predict-
Rp of predic-
ing a multivariate response Y
∈
∈
N
i=1,
(yi, xi)
tors (also known as multitask learning). Given N observations
}
{
RN ×p be matrices with yi and xi, respectively, as
we let Y
their ith row. If we assume a linear model for the full collection of data, then
it can be written in the form

RK on the basis of a vector X

RN ×K and X

∈

∈

Y = XΘ + E

(4.9)

where Θ

Rp×K is a matrix of coeﬃcients, and E

RN ×K a matrix of errors.
One way to understand the model (4.9) is as a coupled collection of K
standard regression problems in Rp, each sharing the same covariates, in which

∈

∈

Group LassoCoefficients0.160.140.120.10.080.060.040.020−0.10.00.10.2taaaccPos7Pos2Pos5Pos4Pos3Pos6λ62

GENERALIZATIONS OF THE LASSO PENALTY

∈

∈

the kth column θk
Rp of Θ is the coeﬃcient vector for the kth problem. Thus,
in principle, we could ﬁt a separate regression coeﬃcient vector θk for each
of the K diﬀerent problems, using the lasso in the case of a sparse linear
model. In many applications, the diﬀerent components of the response vector
RK are strongly related, so that one would expect that the underlying
Y
regression vectors would also be related. For instance, in collaborative ﬁltering
applications, the diﬀerent components of Y might represent a given user’s
preference scores for diﬀerent categories of objects, such as books, movies,
music, and so on, all of which are closely related. For this reason, it is natural—
and often leads to better prediction performance—to solve the K regression
problems jointly, imposing some type of group structure on the coeﬃcients.
In another example, each response might be the daily return of an equity
in a particular market sector; hence we have multiple equities, and all being
predicted by the same market signals.

⊂ {

1, 2, . . . , p

As one example, in the setting of sparsity, we might posit that there is
of the covariates that are relevant for
an unknown subset S
prediction, and this same subset is preserved across all K components of the
response variable. In this case, it would be natural to consider a group lasso
RK, j = 1, . . . , p
θ0
penalty, in which the p groups are deﬁned by the rows
j ∈
}
{
Rp×K. Using this penalty, we then solve the
of the full coeﬃcient matrix Θ
∈
regularized least-squares problem

}

minimize
Θ∈Rp×K






1
2 k

Y

XΘ
k

−

2
F + λ





p
X

j=1

θ0
jk

k

2










,

(4.10)

where
the general group lasso (4.5), in which J = p, and pj = K for all groups j.

F denotes the Frobenius norm.4 This problem is a special case of

k · k

♦

4.3.1 Computation for the Group Lasso

Turning to computational issues associated with the group lasso, let us rewrite
the relevant optimization problem (4.5) in a more compact matrix-vector no-
tation:

minimize
(θ1,...,θJ )






1
2 k

y

−

J
X

j=1

Zjθj

2
2 + λ

k

J
X

j=1

θj

k

2

k






.

(4.11)

For simplicity we ignore the intercept θ0, since in practice we can center all
the variables and the response, and it goes away. For this problem, the zero
subgradient equations (see Section 5.2.2 take the form

ZT

j (y

−

J
X

‘=1

−

Z‘ bθ‘) + λbsj = 0,

for j = 1,

J,

· · ·

(4.12)

4The Frobenius norm of a matrix is simply the ‘2-norm applied to its entries.

THE GROUP LASSO

63

2

k

∈

bθj

kbsj

Rpj is an element of the subdiﬀerential of the norm
2 evaluated
where bsj
k · k
= 0, then we
at bθj. As veriﬁed in Exercise 5.5 on page 135, whenever bθj
2, whereas when bθj = 0, then bsj is any vector
necessarily have bsj = bθj/
k
1. One method for solving the zero subgradient equations is by
with
≤
holding ﬁxed all block vectors
, and then solving for bθj. Doing so
= j
}
amounts to performing block coordinate descent on the group lasso objective
function. Since the problem is convex, and the penalty is block separable,
it is guaranteed to converge to an optimal solution (Tseng 1993). With all
bθk, k
{

ﬁxed, we write

bθk, k
{

= j

}

k

ZT

j (rj

−

−

Zj bθj) + λbsj = 0,

(4.13)

P

where rj = y
satisﬁed by the subgradient bsj, we must have bθj = 0 if
otherwise the minimizer bθj must satisfy

k6=j Zk bθk is the jth partial residual. From the conditions
2 < λ, and
k

j rj

ZT

−

k

!−1
I

ZT

bθj =

j Zj +

λ
bθj
k
This update is similar to the solution of a ridge regression problem, except that
the underlying penalty parameter depends on
2. Unfortunately, Equa-
tion (4.14) does not have a closed-form solution for bθj unless Zj is orthonor-
mal. In this special case, we have the simple update

(4.14)

j rj.

ZT

2
k

bθj

k

k

bθj =

1

λ
ZT
j rj

−

k

!

2
k

+

ZT

j rj,

(4.15)

where (t)+ : = max
further details.

0, t
}

{

is the positive part function. See Exercise 4.6 for

Although the original authors (Yuan and Lin 2006) and many others since
have made the orthonormality assumption, it has implications that are not
always reasonable (Simon and Tibshirani 2012). Exercise 4.8 explores the im-
pact of this assumption on the dummy coding used here for factors. In the
general (nonorthonormal case) one has to solve (4.14) using iterative methods,
and it reduces to a very simple one-dimensional search (Exercise 4.7).

An alternative approach is to apply the composite gradient methods of
Section 5.3.3 to this problem. Doing so leads to an algorithm that is also
iterative within each block; at each iteration the block-optimization problem
is approximated by an easier problem, for which an update such as (4.15) is
possible. In detail, the updates take the form

ω

bθj

←

←

θj + ν
(cid:18)

1

−

j (rj
(cid:19)

ZT
·
νλ
ω
k

k

2

+

Zj bθj), and

−
ω,

(4.16a)

(4.16b)

where ν is a step-size parameter. See Exercise 4.9 for details of this derivation.

6
6
6
 
 
64

GENERALIZATIONS OF THE LASSO PENALTY

4.3.2 Sparse Group Lasso

When a group is included in a group-lasso ﬁt, all the coeﬃcients in that group
are nonzero. This is a consequence of the ‘2 norm. Sometimes we would like
sparsity both with respect to which groups are selected, and which coeﬃcients
are nonzero within a group. For example, although a biological pathway may
be implicated in the progression of a particular type of cancer, not all genes
in the pathway need be active. The sparse group lasso is designed to achieve
such within-group sparsity.

In order to achieve within-group sparsity, we augment the basic group

lasso (4.11) with an additional ‘1-penalty, leading to the convex program

minimize
{θj ∈Rpj }J
j=1






1
2 k

y

−

J
X

j=1

Zjθj

2
2 + λ
k

J
X

j=1

(cid:2)(1

α)

θj
k

2 + α
k

k

θj

1

k

−



(cid:3)


,

(4.17)

∈

[0, 1]. Much like the elastic net of Section 4.2, the parameter α
with α
creates a bridge between the group lasso (α = 0) and the lasso (α = 1).
Figure 4.5 contrasts the group lasso constraint region with that of the sparse
group lasso for the case of three variables. Note that in the two horizontal
axes, the constraint region resembles that of the elastic net.

3, compared to the sparse group-
Figure 4.5 The group lasso ball (left panel) in R
lasso ball with α = 0.5 (right panel). Depicted are two groups with coeﬃcients θ1 =
(β1, β2) ∈ R

2 and θ2 = β3 ∈ R

1.

Since the optimization problem (4.17) is convex, its optima are speciﬁed
by zero subgradient equations, similar to (4.13) for the group lasso. More
precisely, any optimal solution must satisfy the condition

ZT

j (y

−

−

J
X

‘=1

Z‘ bθ‘) + λ(1

α)

· bsj + λαbtj = 0, for j = 1,

−

· · ·

, J,

(4.18)

where bsj

∈

Rpj belongs to the subdiﬀerential of the Euclidean norm at bθj,

β1β3β21β3β2β11THE GROUP LASSO

65

and btj
∈
we have each btjk

∈

Rpj belongs to the subdiﬀerential of the ‘1-norm at bθj; in particular,

sign(θjk) as with the usual lasso.

We once again solve these equations via block-wise coordinate descent,
although the solution is a bit more complex than before. As in Equation (4.13),
with rj the partial residual in the jth coordinate, it can be seen that bθj = 0
if and only if the equation

ZT

j rj = λ(1

α)bsj + λα btj

−

(4.19)

has a solution with
1 and btjk
this condition is easily checked, and we ﬁnd that (Exercise 4.12)

1, 1] for k = 1, . . . , pj. Fortunately,

kbsj

≤

−

∈

k

2

[

bθj = 0

if and only if

(cid:0)ZT
j rj
(4.20)
(cid:1) is the soft-thresholding operator applied here component-
where
wise to its vector argument ZT
j rj. Notice the similarity with the conditions
for the group lasso (4.13), except here we use the soft-thresholded gradient

λ(1

α),

kS

≤

−

λα

λα

S

k

(cid:0)

(cid:1)

2

·

(cid:0)ZT

j rj

(cid:1). Likewise, if ZT

λα

S

j Zj = I, then as shown in Exercise 4.13, we have

bθj =

1

λ(1

α)
−
(cid:0)ZT
(cid:1)
j rj

−

λα

kS

!

2
k

+

(cid:0)ZT

j rj

(cid:1).

λα

S

(4.21)

In the general case when the Zj are not orthonormal and we have checked
that bθj

= 0, ﬁnding bθj amounts to solving the subproblem

minimize
θj ∈Rpj

(cid:26) 1
2 k

rj

Zjθj

k

−

2
2 + λ(1

α)

θj
k

2 + λα
k

θj
k

1
k

−

(cid:27)

.

(4.22)

Here we can again use generalized gradient descent (Section (5.3.3)) to produce
a simple iterative algorithm to solve each block, as in Equation (4.16a). The
algorithm would iterate until convergence the sequence

ω

θj

←

←

θj + ν

1

−

ZT

j (rj

·
νλ(1

−
α)

Zjθj), and
!

−
(cid:0)ω(cid:1)

λα

S

2
k

+

λα

kS

(cid:0)ω(cid:1),

(4.23a)

(4.23b)

where ν is the step size. See Exercise 4.10 for the details.

4.3.3 The Overlap Group Lasso

Sometimes variables can belong to more than one group: for example, genes
can belong to more than one biological pathway. The overlap group lasso is a
modiﬁcation that allows variables to contribute to more than one group.

To gain some intuition, consider the case of p = 5 variables partitioned

into two groups, say of the form

Z1 = (X1, X2, X3), and Z2 = (X3, X4, X5).

(4.24)

 
6
 
66

GENERALIZATIONS OF THE LASSO PENALTY

Here X3 belongs to both groups. The overlap group lasso simply replicates
a variable in whatever group it appears, and then ﬁts the ordinary group
lasso as before. In this particular example, the variable X3 is replicated, and
we ﬁt coeﬃcient vectors θ1 = (θ11, θ12, θ13) and θ2 = (θ21, θ22, θ23) using the
group lasso (4.5), using a group penalty
2. In terms of the original
variables, the coeﬃcient bβ3 of X3 is given by the sum bβ3 = bθ13 + bθ21. As
a consequence, the coeﬃcient bβ3 can be nonzero if either (or both) of the
coeﬃcients bθ13 or bθ21 are nonzero. Hence, all else being equal, the variable X3
has a better chance of being included in the model than the other variables,
by virtue of belonging to two groups.

2 +
k

θ1
k

θ2
k

k

Rather than replicate variables, it is tempting to simply replicate the coef-
ﬁcients in the group-lasso penalty. For instance, for the given grouping above,
with X = (X1, . . . , X5), and β = (β1, . . . , β5), suppose that we deﬁne

θ1 = (β1, β2, β3),

and θ2 = (β3, β4, β5),

(4.25)

k

2 +

θ1
k

θ2
k

and then apply the group-lasso penalty
2 as before. However, this
k
approach has a major drawback. Whenever bθ1 = 0 in any optimal solution,
then we must necessarily have bβ3 = 0 in both groups. Consequently, in this
,
particular example, the only possible sets of nonzero coeﬃcients are
1, 2
{
}
are not con-
4, 5
{
}
sidered as possibilities, since if either group appears, then both groups must
appear.5 As a second practical point, the penalty in this approach is not sep-
arable, and hence coordinate-descent algorithms may fail to converge to an
optimal solution (see Section 5.4 for more details).

; the original groups

1, 2, 3, 4, 5
}

1, 2, 3
}
{

3, 4, 5
}

, and

and

{

{

Jacob, Obozinski and Vert (2009) recognized this problem, and hence pro-
posed the replicated variable approach (4.24) or overlap group lasso. For our
motivating example, the possible sets of nonzero coeﬃcients for the overlap
. In general, the sets of pos-
1, 2, 3, 4, 5
group lasso are
}
{
sible nonzero coeﬃcients always correspond to groups, or the unions of groups.
They also deﬁned an implicit penalty on the original variables that yields the
replicated variable approach as its solution, which we now describe.

1, 2, 3
}
{

3, 4, 5
{

, and
}

,

∈

Denote by νj

Rp a vector which is zero everywhere except in those
Rp be the
positions corresponding to the members of group j, and let
⊆
subspace of such possible vectors. In terms of the original variables, X =
, Xp), the coeﬃcient vector is given by the sum β = PJ
j=1 νj, and
(X1,
hence the overlap group lasso solves the problem

j
V

· · ·

minimize
νj ∈Vj j=1,...,J






1
2

(cid:13)
(cid:13)y

−

X(cid:0)

J
X

j=1

νj

(cid:1)(cid:13)
2
2 + λ
(cid:13)

J
X

j=1

νj

k

2
k






.

(4.26)

This optimization problem can be re-cast in the terms of the original β vari-

5More generally, the replicated-variable approach always yields solutions in which the
sets of zero coeﬃcients are unions of groups, so that the sets of nonzeros must be the
intersections of complements of groups.

THE GROUP LASSO

ables by deﬁning a suitable penalty function. With

ΩV (β) : =

inf
νj ∈Vj
β=PJ

j=1

νj

J
X

j=1

2,

νj
k

k

67

(4.27)

it can then be shown (Jacob et al. 2009) that solving problem (4.26) is equiv-
alent to solving

minimize
β∈Rp

(cid:26) 1
2 k

y

Xβ

2
2 + λ ΩV (β)
k

−

(cid:27)

.

(4.28)

This equivalence is intuitively obvious, and underscores the mechanism un-
derlying this penalty; the contributions to the coeﬃcient for a variable are
distributed among the groups to which it belongs in a norm-eﬃcient manner.
Figure 4.6 contrasts the group lasso constraint region with that of the
overlap group lasso when there are three variables. There are two rings corre-
sponding to the two groups, with X2 in both groups.

3, compared to the overlap-group-
Figure 4.6 The group-lasso ball (left panel) in R
lasso ball (right panel). Depicted are two groups in both. In the left panel the groups
are {X1, X2} and X3; in the right panel the groups are {X1, X2} and {X2, X3}.
There are two rings corresponding to the two groups in the right panel. When β2 is
close to zero, the penalty on the other two variables is much like the lasso. When β2
is far from zero, the penalty on the other two variables “softens” and resembles the
‘2 penalty.

Example 4.3. Interactions and hierarchy. The overlap-group lasso can also be
used to enforce hierarchy when selecting interactions in linear models. What
this means is that interactions are allowed in the model only in the presence
of both of their main eﬀects. Suppose Z1 represents the p1 dummy variables
for the p1 levels of factor G1; likewise Z2 the p2 dummy variables for G2. A
linear model with Z1 and Z2 is a main-eﬀects model. Now let Z1:2 = Z1 ? Z2,

β1β3β21β1β3β2168

GENERALIZATIONS OF THE LASSO PENALTY

×

a p1
p2 vector of dummy variables (the vector of all pairwise products).
Lim and Hastie (2014) consider the following formulation for a pair of such
categorical variables6

minimize
µ,α, ˜α






y

1
2

(cid:13)
(cid:13)
(cid:13)
(cid:13)
(cid:13)
(cid:13)
(cid:18)

µ1

−

−

Z1α1

−

Z2α2

−

[Z1 Z2 Z1:2]





˜α1
˜α2
α1:2





(cid:13)
2
(cid:13)
(cid:13)
(cid:13)
(cid:13)
(cid:13)
2
(cid:19)(cid:27)

q

p2

˜α1

2
2 + p1
k

˜α2
k

2
2 +
k

α1:2
k

k

2
2
k

(4.29)

+λ

α1
k

2 +
k

α2
k

2 +
k

subject to the constraints

p1
X

i=1
p1
X

i=1

αi

1 = 0,

p2
X

j=1

αj

2 = 0,

p1
X

˜αi

1 = 0,

p2
X

j=1

˜αj

2 = 0,

(4.30)

αij

1:2 = 0 for ﬁxed j,

αij

1:2 = 0 for ﬁxed i.

(4.31)

i=1
p2
X

j=1

The summation constraints are standard in hierarchical ANOVA formulations.
Notice that the main eﬀect matrices Z1 and Z2 each have two diﬀerent coeﬃ-
cient vectors αj and ˜αj, creating an overlap in the penalties, and their ultimate
coeﬃcient is the sum θj = αj + ˜αj. The pp2
2
2 term
results in estimates that satisfy strong hierarchy, because either b˜α1 = b˜α2 =
bα1:2 = 0 or all are nonzero, i.e., interactions are always present with both
main eﬀects. They show that the solution to the above constrained problem
(4.29)–(4.31) is equivalent to the solution to the simpler unconstrained prob-
lem

2
2 + p1
k

α1:2
k

2
2 +
k

˜α2
k

˜α1

k

k

minimize
µ,β

(cid:26) 1

y

µ1

−

−

Z1β1

−

2 k

Z2β2

Z1:2β1:2

−
+λ (

2
2
k
2 +

β1
k

k

β2
k

2 +

k

β1:2
k

2)
}
k

(4.32)

(Exercise 4.14). In other words, a linear model in Z1:2 is the full interaction
model (i.e., interactions with main eﬀects implicitly included). A group lasso
in Z1, Z2, and Z1:2 will hence result in a hierarchical model; whenever Z1:2 is
in the model, the pair of main eﬀects is implicitly included. In this case the
variables do not strictly overlap, but their subspaces do. A diﬀerent approach
to the estimation of hierarchical interactions is the hierNet proposal of Bien,
Taylor and Tibshirani (2013).

♦

6This extends naturally to more than two pairs, as well as other loss functions, e.g.,

logistic regression, as well as interactions between factors and quantitative variables.

SPARSE ADDITIVE MODELS AND THE GROUP LASSO

69

4.4 Sparse Additive Models and the Group Lasso

|

∈

∈

R, and a vector of predic-
Suppose we have a zero-mean response variable Y
RJ , and that we are interested in estimating the regression function
tors X
f (x) = E(Y
X = x). It is well-known that nonparametric regression suﬀers
from the curse of dimensionality, so that approximations are essential. Addi-
tive models are one such approximation, and eﬀectively reduce the estimation
problem to that of many one-dimensional problems. When J is very large, this
may not be suﬃcient; the class of sparse additive models limits these approxi-
mations further, by encouraging many of the components to be zero. Methods
for estimating sparse additive models are closely related to the group lasso.

4.4.1 Additive Models and Backﬁtting

We begin by introducing some background on the class of additive models,
which are based on approximating the regression function by sums of the form

f (x) = f (x1, . . . , xJ )

≈

J
X

fj(xj),

j=1
fj

j, j = 1, . . . , J,

∈ F

(4.33)

j are a ﬁxed set of univariate function classes. Typically, each

where the
j
F
is assumed to be a subset of L2(Pj) where Pj is the distribution of covariate
Xj, and equipped with the usual squared L2(Pj) norm
j (Xj)].

2 : = E[f 2
2

F

In the population setting, the best additive approximation to the regression

fj
k

k

function E(Y

|

X = x), as measured in the L2(P) sense, solves the problem

minimize
fj ∈Fj , j=1,...,J

(cid:2)(cid:0)Y
E

J
X

j=1

−

fj(Xj)(cid:1)2(cid:3).

(4.34)

The optimal solution ( ˜f1, . . . , ˜fJ ) is characterized by the backﬁtting equations,
namely

˜fj(xj) = E

(cid:2)Y

X

k6=j

−

˜fk(Xk)

|

Xj = xj

(cid:3), for j = 1, . . . , J.

(4.35)

k6=j

P

−
Given data

More compactly, this update can be written in the form ˜fj =
j
P
is the conditional-expectation operator in the jth coordinate, and the quantity
Rj : = Y

j(Rj), where

˜fk(Xk) is the jth partial residual.
(xi, yi)
{

N
i=1, a natural approach is to replace the population
}
j, and
j with empirical versions, such as scatterplot smoothers
operator
then solve a data-based version version of the updates (4.35) by coordinate
descent or backﬁtting (Hastie and Tibshirani 1990). Hence we repeatedly cycle
over the coordinates j = 1, . . . , J, and update each function estimate bfj using

P

P

S

70

GENERALIZATIONS OF THE LASSO PENALTY

the smooth of the partial residuals

bfj

j(y

← S

X

k6=j

−

bfk), j = 1, . . . , J,

(4.36)

until the ﬁtted functions bfj stabilize. In (4.36) bfk is the ﬁtted function ˆfk eval-
uated at the N sample values (x1k, . . . , xN k). The operator
j represents an
algorithm that takes a response vector r, smooths it against the vector xj, and
returns the function bfj. Although
j will have its own tuning parameters and
bells and whistles, for the moment we regard it as a black-box that estimates
a conditional expectation using data.

S

S

4.4.2 Sparse Additive Models and Backﬁtting

An extension of the basic additive model is the notion of a sparse additive
such that
model, in which we assume that there is a subset S
the regression function f (x) = E(Y
X = x) satisﬁes an approximation of the
form f (x)
j∈S fj(xj). Ravikumar, Liu, Laﬀerty and Wasserman (2009)
proposed a natural extension of the backﬁtting equations, motivated by a
sparse analog of the population level problem (4.34). For a given sparsity level
, the best k-sparse approximation to the regression function is
k
∈ {
}
given by

1, 2, . . . , J

1, . . . , J

⊂ {

P

≈

}

|

minimize
|S|=k
fj ∈Fj ,j=1,...,J

(cid:16)

E

Y

X

j∈S

−

(cid:17)2

fj(Xj)

.

(4.37)

Unfortunately, this criterion is nonconvex and computationally intractable,
due to combinatorial number—namely (cid:0)J
(cid:1)—of possible subsets of size k.
Suppose that instead we measure the sparsity of an additive approxima-
tion f = PJ
2 =
fj
2, where we recall that
k
k
q
j (Xj)] is the L2(Pj) norm applied to component j. For a given regu-
larization parameter λ
0, this relaxed notion deﬁnes an alternative type of
best sparse approximation, namely one that minimizes the penalized criterion

j=1 fj via the sum PJ

E[f 2

j=1 k

fj
k

≥

k

minimize
fj ∈Fj , j=1,...,J






(cid:16)

E

Y

−

J
X

j=1

(cid:17)2

fj(Xj)

+ λ

J
X

j=1

fj
k

2
k






.

(4.38)

Since this objective is a convex functional of (f1, . . . , fJ ), Lagrangian duality
ensures that it has an equivalent representation involving an explicit constraint
on the norm PJ

2. See Exercise 4.15.

fj

Ravikumar et al. (2009) show that any optimal solution ( ˜f1, . . . , ˜fJ ) to the
penalized problem (4.38) is characterized by the sparse backﬁtting equations

j=1 k

k

(cid:18)
1

˜fj =

λ
j(Rj)

kP

−

(cid:19)

+ P

2
k

j(Rj),

(4.39)

SPARSE ADDITIVE MODELS AND THE GROUP LASSO

71

where the residual Rj and the conditional expectation operator
ﬁned in the text after the ordinary backﬁtting equations (4.35).
In parallel with our earlier development, given data

N
1 , these
population-level updates suggest the natural data-driven analog, in which we
replace the population operator
j, and then
perform the updates

j with the scatterplot smoother

j were de-

P

(xi, yi)
}
{

P

S

efj =

(cid:0)y

j
S

−

X

(cid:1),

bfk

k6=j

(cid:18)

and

bfj =

1

λ
˜f
k
k

−

(cid:19)

2

+

efj,

(4.40)

for j = 1, . . . , J, again iterating until convergence. Figure 4.7 illustrates the
performance of the SPAM updates (4.40) on some air-pollution data. We use
smoothing-splines, with a ﬁxed degree of freedom df = 5 for each coordi-
nate (Hastie and Tibshirani 1990).

Figure 4.7 A sequence of three SPAM models ﬁt to some air-pollution data. The
response is the log of ozone concentration, and there are three predictors: radiation,
temperature, and wind speed. Smoothing splines were used in the additive model ﬁts,
each with df = 5 The three curves in each plot correspond to λ = 0 (black curves),
λ = 2 (orange curves), and λ = 4 (red curves). We see that while the shrinkage
leaves the functions of temp relatively untouched, it has a more dramatic eﬀect on
rad and wind.

We can make a more direct connection with the grouped lasso if the
smoothing method for variable Xj is a projection on to a set of basis functions.
Consider

) =

fj(
·

ψj‘(
·

)βj‘,

(4.41)

pj
X

‘=1

ψj‘
{

where the
with a collection of knots along the range of Xj. Let Ψj be the N
matrix of evaluations of the ψj‘, and assume that ΨT

pj
1 are a family of basis functions in Xj, such as cubic splines
pj
j Ψj = Ipj . Then for

×

}

050150250−1.0−0.50.00.51.0radf(rad)60708090−1.0−0.50.00.51.0tempf(temp)5101520−1.0−0.50.00.51.0windf(wind)log(ozone) ~ s(rad) + s(temp) + s(wind)72

GENERALIZATIONS OF THE LASSO PENALTY

any coeﬃcient vector θj = (βj1, . . . , βjpj )T and corresponding ﬁtted vector
fj = Ψjθj, we have
2. In this case it is easy to show that the
updates (4.40) are equivalent to those for a group lasso with predictor matrix
(cid:3) and a corresponding block vector of coeﬃcients
Ψ : = (cid:2)Ψ1 Ψ2
θ : = (cid:2)θ1

(cid:3) (see Exercise 4.16 for more details).

2 =
k

· · ·
θJ

fj
k

ΨJ

θ2

θj

k

k

· · ·

4.4.3 Approaches Using Optimization and the Group Lasso

Although the population-level sparse backﬁtting equations (4.39) do solve an
optimization problem, in general, the empirical versions (4.40) do not, but
rather are motivated by analogy to the population version. We now discuss
the Component Selection and Smoothing Operator or COSSO for short, which
does solve a data-deﬁned optimization problem. The COSSO method (Lin and
Zhang 2003) is a predecessor to the SPAM method, and operates in the world
of reproducing kernel Hilbert spaces, with a special case being the smoothing
spline model.

We begin by recalling the traditional form of an additive smoothing-spline

model, obtained from the optimization of a penalized objective function:

minimize
fj ∈Hj , j=1,...,J






1
N

N
X

(yi

i=1

J
X

j=1

−

fj(xij))2 + λ

J
X

j=1

1
γj k

fj

2
Hj

k






.

(4.42)

k

Hj

fj
k

Here
Typically, the Hilbert space
in which context the parameter λ
and the parameters γj
roughness norm for a cubic smoothing spline on [0, 1] is

is an appropriate Hilbert-space norm for the jth coordinate.
j is chosen to enforce some type of smoothness,
0 corresponds to overall smoothness,
0 are coordinate speciﬁc modiﬁers. For example, a

H

≥

≥

2
H : =

g
k

k

(cid:18)Z 1

0

(cid:19)2

g(t)dt

+

(cid:19)2

g0(t)dt

(cid:18)Z 1

0

+

Z 1

0

g00(t)2dt.

(4.43)

When this particular Hilbert norm is used in the objective function (4.42),
each component bfj of the optimal solution is a cubic spline with knots at the
unique sample values of Xj. The solution can be computed by the backﬁtting
updates (4.36), where each
j is a type of cubic spline smoother with penalty
λ/γj.

S

Instead of the classical formulation (4.42), the COSSO method is based on

the objective function

minimize
fj ∈Hj , j=1,...,J






1
N

N
X

(yi

i=1

J
X

j=1

−

fj(xij))2 + τ

J
X

j=1

fj
k

Hj
k






.

(4.44)

As before, the penalties are norms rather than squared norms, and as such
result in coordinate selection for suﬃciently large τ . Note that, unlike the

SPARSE ADDITIVE MODELS AND THE GROUP LASSO

73

usual penalty for a cubic smoothing spline, the norm in (4.43) includes a
linear component; this ensures that the entire function is zero when the term
is selected out of the model, rather than just its nonlinear component. Despite
the similarity with the additive spline problem (4.38), the structure of the
penalty
Hj means that the solution is not quite as simple as the sparse
backﬁtting equations (4.40).

fj
k

k

H

Equipped with the norm (4.43), the space

j of cubic splines is a particular
instance of a reproducing-kernel Hilbert space (RKHS) on the unit interval
[0, 1]. Any such space is characterized by a symmetric positive deﬁnite kernel
R with the so-called reproducing property. In
function
×
, x) is a
[0, 1], the function
particular, we are guaranteed for each x
j. Here
Hj = f (x) for all f
member of

j, and moreover that

j : [0, 1]

∈
, x), f

[0, 1]

→

R

R

H

j.

H

,
h·

) = PN

Hj denotes the inner product on the Hilbert space
·i
Using the reproducing property, it can be shown (Exercise 4.17) that the
jth coordinate function bfj in any optimal COSSO solution can be written in
the form bfj(
, xij), for a suitably chosen weight vector bθj
j(
·
∈
·
T
RN . Moreover, it can be shown that bfj has Hilbert norm
j Rj bθj,
RN ×N is a Gram matrix deﬁned by the kernel—in particular,
where Rj
∈
with entries (Rj)ii0 =
j(xij, xi0j). Consequently, the COSSO problem (4.44)
can be rewritten as a more general version of the group lasso: in particular, it
is equivalent to the optimization problem

i=1 bθij

2
Hj
k

bfj
k

= bθ

R

R

j(
·
∈ H

(
·

hR

i

minimize
θj ∈RN , j=1,...,J






1
N k

y

−

J
X

j=1

Rjθj

2
2 + τ
k

J
X

q

j=1

θT
j Rjθj






,

(4.45)

as veriﬁed in Exercise 4.17.

We are now back in a parametric setting, and the solution is a more general
version of the group lasso (4.14). It can be shown that any optimal solution
(bθ1, . . . , bθJ ) is speciﬁed by the ﬁxed point equations

bθj =


0


Rj +


τ

q
j Rjbθj
bθ

T

q

rT
j Rjrj < τ

if



−1

I



rj

otherwise,

(4.46)

P

−

k6=j Rkbθk corresponds to the jth partial residual. Although
where rj : = y
bθj appears in both sides of the Equation (4.46), it can be solved with a one-
time SVD of Rj and a simple one-dimensional search; see Exercise 4.7 for the
details.

Lin and Zhang (2003) propose an alternative approach, based on intro-
RJ of auxiliary variables, and then considering the joint

ducing a vector γ

∈

74

GENERALIZATIONS OF THE LASSO PENALTY

optimization problem

minimize
γ≥0
fj ∈Hj , j=1,...J






1
N

N
X

i=1

(yi

−

J
X

j=1

fj(xij))2 +

J
X

j=1

1
γj k

fj

2
Hj
k

+ λ

J
X

j=1

γj






.

(4.47)

As shown in Exercise 4.18, if we set λ = τ 4/4 in the lifted problem (4.47), then
the bθ component of any optimal solution coincides with an optimal solution
of the original COSSO (4.44).

The reformulation (4.47) is useful, because it naturally leads to a conve-

nient algorithm that alternates between two steps:

•

•

For γj ﬁxed, the problem is a version of our earlier objective (4.42), and
results in an additive-spline ﬁt.

With the ﬁtted additive spline ﬁxed, updating the vector of coeﬃcients
γ = (γ1, . . . , γJ ) amounts to a nonnegative lasso problem. More precisely,
RN , where fj =
for each j = 1, . . . , J, deﬁne the vector gj = Rjθj/γj
Rjθj is the ﬁtted vector for the jth function using the current value of γj.
Then we update the vector γ = (γ1, . . . , γJ ) by solving

∈

(cid:26) 1

N k

min
γ≥0

y

Gγ

2
2 + λ
k

γ
k

1

k

−

(cid:27)

,

(4.48)

. These updates
where G is the N
}
are a slightly diﬀerent form than that given in Lin and Zhang (2003); full
details are mapped out in Exercise 4.19.

gj, j = 1, . . . , J
{

J matrix with columns

×

When applied with the cubic smoothing-spline norm (4.43), the COSSO is
aimed at setting component functions fj to zero. There are many extensions
to this basic idea. For instance, given a univariate function g, we might instead
represent each univariate function in the form g(t) = α0 +α1t+h(t), and focus
the penalty on departures from linearity using the norm

2
H : =

h
k
k

Z 1

0

h00(t)2dt,

(4.49)

In this setting, a variant of COSSO can select between nonlinear and linear
forms for each component function.

We discuss penalties for additive models further in Section 4.4.4, in par-

ticular the beneﬁts of using more than one penalty in this context.

4.4.4 Multiple Penalization for Sparse Additive Models

As we have seen thus far, there are multiple ways of enforcing sparsity for a
nonparametric problem. Some methods, such as the SPAM back-ﬁtting pro-

SPARSE ADDITIVE MODELS AND THE GROUP LASSO

75

cedure, are based on a combination of the ‘1-norm with the empirical L2-
norm—namely, the quantity

f
k

N,1 : =
k

J
X

j=1

fj

N ,
k

k

(4.50)

PN

fj

N : = 1
2
N
k

j (xij) is the squared empirical L2-norm for the
where
univariate function fj.7 Other methods, such as the COSSO method, enforce
sparsity using a combination of the ‘1-norm with the Hilbert norm

i=1 f 2

k

f
k

H,1 : =
k

J
X

j=1

fj
k

Hj .
k

(4.51)

Which of these two diﬀerent regularizers is to be preferred for enforcing spar-
sity in the nonparametric setting?

Instead of focusing on only one regularizer, one might consider the more

general family of estimators




1
N

N
X

J
X

(yi

−

min
fj ∈Hj
j=1,...,J

fj(xij))2 + λH

J
X

J
X

fj

Hj + λN
k

k

fj

k

N
k




,



i=1

j=1

j=1

j=1


(4.52)
parametrized by the pair of nonnegative regularization weights (λH, λN ). If we
set λN = 0, then the optimization problem (4.52) reduces to the COSSO esti-
mator, whereas for λH = 0, we obtain a method closely related to the SPAM
estimator. For any nonnegative (λH, λN ), the optimization problem (4.52)
is convex. When the underlying univariate Hilbert spaces
j are described
by a reproducing kernel, then the problem (4.52) can be re-formulated as a
second-order cone program, and is closely related to the group lasso. When-
ever the Hilbert space
j, then the
jth coordinate function bfj in any optimal solution again takes the form
) = PN
RN . This fact allows
bfj(
·
us to reduce the solution of the inﬁnite-dimensional problem (4.52) to the
simpler problem

, xij) for a vector of weights bθj
·

j is deﬁned by a reproducing kernel

i=1 bθij

j(

R

R

H

H

∈






1
y
N k

−

J
X

j=1

Rjθj

k

2
2 + λH

J
X

j=1

min
θj ∈RN
j=1,...,J

q

θT
j Rjθj + λN

J
X

q

j=1

θT
j R2

j θj






.

(4.53)

As before, for each coordinate j
kernel Gram matrix, with entries [Rj]ii0 =
more details on this reduction.

∈ {

1, . . . , J

RN ×N is the
, the matrix Rj
}
j(xij, xi0j). See Exercise 4.20 for
R

∈

7kfj kN,1 is the same as the kfj k2 used in Section 4.4.2; here we are using a more gener-

alizable notation.

76

GENERALIZATIONS OF THE LASSO PENALTY

Figure 4.8 Fused lasso applied to CGH data. Each spike represents the copy number
of a gene in a tumor sample, relative to that of a control (on the log base-2 scale).
The piecewise-constant green curve is the fused lasso estimate.

The optimization problem (4.53) is an instance of a second-order cone
program, and can be solved eﬃciently by a variant of the methods previously
described. But why it is useful to impose two forms of regularization? As
shown by Raskutti, Wainwright and Yu (2012), the combination of these two
regularizers yields an estimator that is minimax-optimal, in that its conver-
gence rate—as a function of sample size, problem dimension, and sparsity—is
the fastest possible.

4.5 The Fused Lasso

Consider the gray spikes in Figure 4.8, the results of a comparative genomic
hybridization (CGH) experiment. Each of these represents the (log base 2) rel-
ative copy number of a gene in a cancer sample relative to a control sample;
these copy numbers are plotted against the chromosome order of the gene.
These data are very noisy, so that some kind of smoothing is essential. Bio-
logical considerations dictate that it is typically segments of a chromosome—
rather than individual genes—that are replicated, Consequently, we might ex-
pect that the underlying vector of true copy numbers to be piecewise-constant
over contiguous regions of a chromosome. The fused lasso signal approximator
exploits such structure within a signal, and is the solution of the following
optimization problem

minimize
θ∈RN

(

1
2

N
X

i=1

(yi

−

θi)2 + λ1

N
X

i=1

+ λ2

θi
|

|

N
X

i=2

)

θi

|

−

θi−1

|

.

(4.54)

02004006008001000−2024Genome orderlog2 ratioTHE FUSED LASSO

77

The ﬁrst penalty is the familiar ‘1-norm, and serves to shrink the θi toward
zero. Since the observation index i orders the data (in this case along the
chromosome), the second penalty encourages neighboring coeﬃcients θi to be
similar, and will cause some to be identical (also known as total-variation de-
noising). Notice that (4.54) does not include a constant term θ0; the coeﬃcient
θi represents the response yi directly, and for these kinds of problems zero is
a natural origin. (See Exercise 4.21 for further exploration of this intercept
issue.) The green curve in Figure 4.8 is ﬁt to these data using the fused lasso.
There are more general forms of the fused lasso; we mention two here.

•

•

We can generalize the notion of neighbors from a linear ordering to more
general neighborhoods, for examples adjacent pixels in an image. This leads
to a penalty of the form

λ2

X
i∼i0 |

θi

θi0

,
|

−

(4.55)

where we sum over all neighboring pairs i

i0.

∼

In (4.54) every observation is associated with a coeﬃcient. More generally
we can solve

minimize
(β0,β)∈R×Rp






1
2

N
X

i=1

(yi

β0

−

−

p
X

j=1

xijβj)2

+λ1

p
X

j=1

+ λ2

βj
|

|

p
X

j=2

βj

|

−

βj−1




|


.

(4.56)

Here the covariates xij and their coeﬃcients βj are indexed along some
sequence j for which neighborhood clumping makes sense; (4.54) is clearly
a special case.

4.5.1 Fitting the Fused Lasso

Problem (4.54) and its relatives are all convex optimization problems, and
so all have well-deﬁned solutions. As in other problems of this kind, here we
seek eﬃcient path algorithms for ﬁnding solutions for a range of values for
the tuning parameters. Although coordinate descent is one of our favorite
algorithms for lasso-like problems, it need not work for the fused lasso (4.54),
because the diﬀerence penalty is not a separable function of the coordinates.
Consequently, coordinate descent can become “stuck” at a nonoptimal point as
illustrated in Figure 5.8 on page 111. This separability condition is discussed
in more detail in Section 5.4.

We begin by considering the structure of the optimal solution bθ(λ1, λ2) of
the fused lasso problem (4.54) as a function of the two regularization param-
eters λ1 and λ2. The following result due to Friedman et al. (2007) provides
some useful insight into the behavior of this optimum:

78

GENERALIZATIONS OF THE LASSO PENALTY

Lemma 4.1. For any λ0

1 > λ1, we have

bθi(λ0

1, λ2) =

Sλ0
is the soft-thresholding operator

1−λ1

where

S

One important special case of Lemma 4.1 is the equality

(cid:0)z(cid:1) : = sign(z)(

λ
S

z
|

| −

λ)+.

(cid:0)

bθi(λ1, λ2)(cid:1) for each i = 1, . . . , N ,

(4.57)

bθi(λ1, λ2) =

λ1

S

(cid:0)

bθi(0, λ2)(cid:1) for each i = 1, . . . , N .

(4.58)

Consequently, if we solve the fused lasso with λ1 = 0, all other solutions
can be obtained immediately by soft thresholding. This useful reduction also
applies to the more general versions of the fused lasso (4.55). On the basis of
Lemma 4.1, it suﬃces to focus our attention on solving the problem8

minimize
θ∈RN

(

1
2

N
X

(yi

i=1

−

θi)2 + λ

N
X

i=2

θi

|

−

θi−1

|

)

.

(4.59)

We consider several approaches to solving (4.59).

4.5.1.1 Reparametrization

One simple approach is to reparametrize problem (4.59) so that the penalty
is additive. In detail, suppose that we consider a linear transformation of the
form γ = Mθ for an invertible matrix M

RN ×N such that

∈

γ1 = θ1, and γi = θi

θi−1 for i = 2, . . . , N .

−
In these transformed coordinates, the problem (4.59) is equivalent to the or-
dinary lasso problem

(4.60)

minimize
γ∈RN

(cid:26) 1
2 k

y

Xγ

2 + λ
k

k

γ

1

k

−

(cid:27)

, with X = M−1.

(4.61)

In principle, the reparametrize problem (4.61) can be solved using any eﬃ-
cient algorithm for the lasso, including coordinate descent, projected gradient
descent or the LARS procedure. However, X is a lower-triangular matrix with
all nonzero entries equal to 1, and hence has large correlations among the
“variables.” Neither coordinate-descent nor LARS performs well under these
circumstances (see Exercise 4.22). So despite the fact that reparametrization
appears to solve the problem, it is not recommended, and more eﬃcient algo-
rithms exist, as we now discuss.

8Here we have adopted the notation λ (as opposed to λ2) for the regularization param-

eter, since we now have only one penalty.

THE FUSED LASSO

4.5.1.2 A Path Algorithm

79

The one-dimensional fused lasso (4.59) has an interesting property, namely
that as the regularization parameter λ increases, pieces of the optimal solution
can only be joined together, not split apart. More precisely, letting bθ(λ) denote
the optimal solution to the convex program (4.59) as a function of λ, we have:

Lemma 4.2. Monotone fusion. Suppose that for some value of λ and some
, the optimal solution satisﬁes bθi(λ) = bθi+1(λ). Then
1
index i
}
for all λ0 > λ, we also have bθi(λ0) = bθi+1(λ0).

1, . . . , N

∈ {

−

Friedman et al. (2007) observed that this fact greatly simpliﬁes the con-
struction of the fused lasso solution path. One starts with λ = 0, for which
there are no fused groups, and then computes the smallest value of λ that
causes a fused group to form. The parameter estimates for this group are then
fused together (i.e., constrained to be equal) for the remainder of the path.
Along the way, a simple formula is available for the estimate within each fused
(N ) operations.
group, so that the resulting procedure is quite fast, requiring
However, we note that the monotone-fusion property in Lemma 4.2 is special
to the one-dimensional fused lasso (4.59). For example, it does not hold for the
general fused lasso (4.56) with a model matrix X, nor for the two-dimensional
fused lasso (4.55). See Friedman et al. (2007) and Hoeﬂing (2010) for more
details on this approach.

O

4.5.1.3 A Dual Path Algorithm

Tibshirani2 and Taylor (2011) take a diﬀerent approach, and develop path
algorithms for the convex duals of fused lasso problems. Here we illustrate
their approach on the problem (4.59), but note that their methodology applies
to the general problem (4.56) as well.

We begin by observing that problem (4.59) can be written in an equivalent

lifted form

minimize
(θ,z)∈RN ×RN −1

(cid:26) 1
2 k

y

θ

2
2 + λ
k
k

z

2
k

−

(cid:27)

subject to Dθ = z,

(4.62)

where we have introduced a vector z
is a (N
associated with the lifted problem, namely

RN −1 of auxiliary variables, and D
N matrix of ﬁrst diﬀerences. Now consider the Lagrangian

1)

×

−

∈

L(θ, z; u) : =

z
k
RN −1 is a vector of Lagrange multipliers. A straightforward com-

(4.63)

z),

−

−

y

θ

k

k

+ uT (Dθ

2
2 + λ

where u
putation shows that the Lagrangian dual function

∈

takes form

1
2 k

(u) : =

Q

inf
(θ,z)∈RN ×RN −1

L(θ, z; u) =

(

y

1
2 k
−
−∞

−

Q
DT u

2

k

if
u
∞
≤
k
k
otherwise.

λ,

(4.64)

80

GENERALIZATIONS OF THE LASSO PENALTY

The Lagrangian dual problem is to maximize
(u), and given an optimal
solution bu = bu(λ), we can recover an optimal solution bθ = bθ(λ) to the original
bu. See Exercise 4.23 for the details of these
problem by setting bθ = y
duality calculations.

DT

Q

−

Figure 4.9 The dual path algorithm in action on a small example. The left panel
shows the progress of bu(λ), while the right panel shows bθ(λ). We see that in the
dual coordinates, as a parameter hits the boundary, an unfusing occurs in the primal
coordinates.

When the regularization parameter λ is suﬃciently large, the dual max-
(u), reduces to an

imization, or equivalently the problem of minimizing
unrestricted linear regression problem, with optimal solution

−Q

u∗ : = (DDT )−1Dy.

(4.65)

The restrictions kick in when λ decreases to the critical
∞.
k
Tibshirani2 and Taylor (2011) show that as we decrease λ, once elements
buj(λ) of the optimal solution hit the bound λ, then they are guaranteed to
never leave the bound. This property leads to a very straightforward path
algorithm, similar in spirit to LARS in Section 5.6; see Figure 4.9 for an illus-
tration of the dual path algorithm in action. Exercise 4.23 explores some of
the details.

level

u∗
k

4.5.1.4 Dynamic Programming for the Fused Lasso

Dynamic programming is a computational method for solving diﬃcult prob-
lems by breaking them down into simpler subproblems. In the case of the
one-dimensional fused lasso, the linear ordering of the variables means that

0.00.51.01.5−1.5−1.0−0.50.00.51.01.5λDual Coordinates0.00.51.01.5−1.0−0.50.00.51.01.5λPrimal CoordinatesTHE FUSED LASSO

81

ﬁxing any variable breaks down the problem into two separate subproblems
to the left and right of the ﬁxed variable. In the “forward pass,” we move from
left to right, ﬁxing one variable and solving for the variable to its left, as a
function of this ﬁxed variable. When we reach the right end, a backward pass
then gives the complete solution.

Johnson (2013) proposed this dynamic programming approach to the fused
lasso. In more detail, we begin by separating oﬀ terms in (4.59) that depend
on θ1, and rewrite the objective function (4.59) in the form

f (θ) =

1
2
|

(y1

−

θ1)2 + λ
|
{z
g(θ1,θ2)

θ2

−

+

θ1
|
}

(

1
2

N
X

(yi

i=2

−

θi)2 + λ

)

θi
|

−

θi−1

|

.

N
X

i=3

(4.66)

This decomposition shows the subproblem to be solved in the ﬁrst step of
the forward pass: we compute bθ1(θ2) : = arg minθ1∈R g(θ1, θ2), We have thus
eliminated the ﬁrst variable, and can now focus on the reduced objective
function f2 : RN −1

R given by

→
f2(θ2, . . . θN ) = f (bθ1(θ2), θ2, . . . θN ).

(4.67)

We can then iterate the procedure, maximizing over θ2 to obtain bθ2(θ3), and so
on until we obtain bθN . Then we back-substitute to obtain bθN −1 = bθN −1(bθN ),
and so on for the sequences bθN −2, . . . , bθ2, bθ1.

If each parameter θi can take only one of K distinct values, then each of the
minimizers bθj(θj+1) can be easily computed and stored as a K
K matrix.
In the continuous case, the functions to be minimized are piecewise linear
and quadratic, and care must be taken to compute and store the relevant
information in an eﬃcient manner; see Johnson (2013) for the details. The
resulting algorithm is the fastest that we are aware of, requiring just
(N )
operations, and considerably faster than the path algorithm described above.
Interestingly, if we change the ‘1 diﬀerence penalty to an ‘0, this approach
can still be applied, despite the fact that the problem is no longer convex.
Exercise 4.24 asks the reader to implement the discrete case.

O

×

4.5.2 Trend Filtering

The ﬁrst-order absolute diﬀerence penalty in the fused lasso can be generalized
to use a higher-order diﬀerence, leading to the problem

minimize
θ∈RN

(

1
2

N
X

i=1

(yi

−

θi)2 + λ

D(k+1)θ

· k

)

.

1
k

(4.68)

This is known as trend ﬁltering. Here D(k+1)
(N

is a matrix of dimension
N that computes discrete diﬀerences of order k + 1. The fused

1)

k

−

−

×

82

GENERALIZATIONS OF THE LASSO PENALTY

lasso uses ﬁrst-order diﬀerences (k = 0), while higher-order diﬀerences en-
courage higher-order smoothness. In general, trend ﬁltering of order k results
in solutions that are piecewise polynomials of degree k. Linear trend ﬁlter-
ing (k = 1) is especially attractive, leading to piecewise-linear solutions. The

Figure 4.10 A piecewise-linear function ﬁt to some air-pollution data using trend
ﬁltering. For comparison, a smoothing spline with the same degrees of freedom is
included.

knots in the solution need not be speciﬁed but fall out of the convex optimiza-
tion procedure. Kim, Koh, Boyd and Gorinevsky (2009) propose an eﬃcient
interior point algorithm for this problem. Tibshirani2 (2014) proves that the
trend ﬁltering estimate adapts to the local level of smoothness much better
than smoothing splines, and displays a surprising similarity to locally-adaptive
regression splines. Further, he shows that the estimate converges to the true
underlying function at the minimax rate for functions whose kth derivative is of
bounded variation (a property not shared by linear estimators such as smooth-
ing splines). Furthermore, Tibshirani2 and Taylor (2011) show that a solution
with m knots has estimated degrees of freedom given by df = m + k + 1.9

Figure 4.10 shows a piecewise-linear function ﬁt by trend ﬁltering to some
air-pollution data. As a comparison, we include the ﬁt of a smoothing spline,
with the same eﬀective df = 4. While the ﬁts are similar, it appears that trend
ﬁltering has found natural changepoints in the data.

In (4.68) it is assumed that the observations occur at evenly spaced posi-
tions. The penalty can be modiﬁed (Tibshirani2 2014) to accommodate arbi-
trary (ordered) positions xi as follows:

minimize
θ∈RN

(

1
2

N
X

(yi

i=1

−

θi)2 + λ

N −2
X

·

i=1

(cid:12)
(cid:12)
(cid:12)
(cid:12)

θi+2
xi+2

−
−

θi+1
xi+1 −

θi+1
xi+1

)
(cid:12)
(cid:12)
(cid:12)
(cid:12)

θi
xi

−
−

(4.69)

9This is an unbiased estimate of the degrees of freedom; see Section 2.5.

6070809020406080100TemperatureOzoneSmoothing SplineTrend FilterTHE FUSED LASSO

83

Figure 4.11 Near isotonic ﬁt to global-warming data, showing annual temperature
anomalies. The value of λ was chosen by cross-validation, and the ﬁt appears to
support the evidence of nonmonotone behavior seen in the data.

It compares the empirical slopes for adjacent pairs, and encourages them to
be the same. This is the penalty that was used in Figure 4.10, since the
Temperature values are not uniformly spaced.

4.5.3 Nearly Isotonic Regression

Tibshirani2, Hoeﬂing and Tibshirani (2011) suggest a simple modiﬁcation of
the one-dimensional fused lasso that encourages the solution to be monotone.
It is based on a relaxation of isotonic regression. In the classical form of iso-
RN by solving the constrained minimization
tonic regression, we estimate θ
problem

∈

minimize
θ∈RN

( N
X

(yi

i=1

)

θi)2

−

subject to θ1

θ2

≤

≤

. . .

≤

θN .

(4.70)

The resulting solution gives the best monotone (nondecreasing) ﬁt to the
data. Monotone nonincreasing solutions can be obtaining by ﬁrst ﬂipping the
signs of the data. There is a unique solution to problem (4.70), and it can be
obtained using the pool adjacent violators algorithm (Barlow, Bartholomew,
Bremner and Brunk 1972), or PAVA for short.

Nearly isotonic regression is a natural relaxation, in which we introduce a

regularization parameter λ

minimize
θ∈RN

(

1
2

≥
N
X

i=1

0, and instead solve the penalized problem

(yi

θi)2 + λ

−

N −1
X

i=1

(θi

−

)

θi+1)+

.

(4.71)

The penalty term penalizes adjacent pairs that violate the monotonicity prop-
erty, that is, having θi > θi+1. When λ = 0, the solution interpolates the data,

1850190019502000−0.6−0.4−0.20.00.20.4YearTemperature AnomaliesNear IsotonicIsotonic84

GENERALIZATIONS OF THE LASSO PENALTY

→ ∞

and letting λ
, we recover the solution to the classical isotonic regres-
sion problem (4.70). Intermediate value of λ yield nonmonotone solutions that
trade oﬀ monotonicity with goodness-of-ﬁt; this trade-oﬀ allows one to assess
the validity of the monotonicity assumption for the given data sequence. Fig-
ure 4.11 illustrates the method on data on annual temperature anomalies from
1856 to 1999, relative to the 1961–1990 mean. The solution to the nearly iso-
tonic problem (4.71) can be obtained from a simple modiﬁcation of the path
algorithm discussed previously, a procedure that is analogous to the PAVA
algorithm for problem (4.70); see Tibshirani2 et al. (2011) for details.

4.6 Nonconvex Penalties

3 for q = 2 (left), q = 1 (middle), and q = 0.8
Figure 4.12 The ‘q unit balls in R
(right). For q < 1 the constraint regions are nonconvex. Smaller q will correspond
to fewer nonzero coeﬃcients, and less shrinkage. The nonconvexity leads to combi-
natorially hard optimization problems.

By moving from an ‘2 penalty to ‘1, we have seen that for the same
eﬀective df the lasso selects a subset of variables to have nonzero coeﬃcients,
and shrinks their coeﬃcients less. When p is large and the number of relevant
variables is small, this may not be enough; in order to reduce the set of chosen
variables suﬃciently, lasso may end up over-shrinking the retained variables.
For this reason there has been interest in nonconvex penalties.

q

≤

≤

∈ {

The natural choice might be the ‘q penalty, for 0

1, with the
limiting ‘0 corresponding to best-subset selection. Figure 4.12 compares the
. The spiky nonconvex nature of the ball on
2, 1, 0.8
‘q unit balls for q
}
the right implies edges and coordinate axes will be favored in selection under
such constraints. Unfortunately, along with nonconvexity comes combinatorial
computational complexity; even the simplest case of ‘0 can be solved exactly
40 or less. For this and related statistical reasons alternative
only for p
nonconvex penalties have been proposed. These include the SCAD (Fan and
Li 2001, smoothly clipped absolute deviation) and MC+ (Zhang 2010, mini-
max concave) penalties. Figure 4.13 shows four members of the MC+ penalty
family in R1, indexed by the nonconvexity parameter γ
); this family

(0,

≈

∈

∞

β1β3β21β1β2β31β3β1β21NONCONVEX PENALTIES

85

Figure 4.13 Left: The MC+ family of nonconvex sparsity penalties, indexed by
a sparsity parameter γ ∈ (1, ∞). Right: piecewise-linear and continuous threshold
functions associated with MC+ (only the north-east quadrant is shown), making this
penalty family suitable for coordinate descent algorithms.

) and best-subset (γ = 1+). The penalty
bridges the gap between lasso (γ =
functions are piecewise quadratic (see Exercise 4.25), and importantly the cor-
responding threshold functions are piecewise linear and continuous. In detail,
for squared-error loss we pose the (nonconvex) optimization problem

∞

minimize
β∈Rp






1
2 k

y

Xβ

2
2 +
k

−

p
X

j=1

Pλ,γ(βj)






,

with the MC+ penalty on each coordinate deﬁned by

Pλ,γ(θ) : =

Z |θ|

(cid:18)

0

x
λγ

1

−

(cid:19)

dx.

+

(4.72)

(4.73)

With coordinate descent in mind, we consider solving a one-dimensional ver-
sion of (4.72) (in standardized form)

minimize
β∈R1

(

1
2

(β

−

˜β)2 + λ

Z |β|

0

(cid:19)

(cid:18)
1

x
λγ

−

+

)

dx

.

(4.74)

The solution is unique10 for γ > 1 and is given by

λ,γ( ˜β) =
S






0
(cid:16) | ˜β|−λ
1− 1
γ

sign( ˜β)
˜β

(cid:17)

if

˜β
λ
| ≤
|
˜β
if λ <
|
| ≤
˜β
> λγ
|
|

if

λγ

(4.75)

10Despite the nonconvexity, there is a unique solution in R

1; this is not necessarily the

case for the p-dimensional problem (4.72).

−4−202401234MC+ Penalty0123401234MC+ Threshold Functionββγ=∞lassoγ=3γ=1.7γ=1+subset86
GENERALIZATIONS OF THE LASSO PENALTY
The right panel in Figure 4.13 shows examples of (4.75). Large values of ˜β are
left alone, small values are set to zero, and intermediate values are shrunk. As γ
gets smaller, the intermediate zone gets narrower, until eventually it becomes
the hard-thresholding function of best subset (orange curve in ﬁgure). By
contrast, the threshold functions for the ‘q family (q < 1) are discontinuous
in ˜β.

Mazumder, Friedman and Hastie (2011) exploit the continuity of

λ,γ (in
both λ and γ) in a coordinate-descent scheme for ﬁtting solution paths for
the entire MC+ family. Starting with the lasso solution, their R package
sparsenet (Mazumder, Hastie and Friedman 2012) moves down a sequence
in γ toward sparser models, and for each ﬁts a regularization path in λ. Al-
though it cannot claim to solve the nonconvex problem (4.72), this approach
is both very fast and appears to ﬁnd good solutions.

S

Zou (2006) proposed the adaptive lasso as a means for ﬁtting models

sparser than lasso. Using a pilot estimate ˜β, the adaptive lasso solves

minimize
β∈Rp






1
2 k

y

Xβ

k

−

2
2 + λ

p
X

j=1

wj

βj

|




|


,

(4.76)

−

˜βj
ν. The adaptive lasso penalty can be seen as an approxima-
where wj = 1/
|
|
tion to the ‘q penalties with q = 1
ν. One advantage of the adaptive lasso
is that given the pilot estimates, the criterion (4.76) is convex in β. Further-
more, if the pilot estimates are √N consistent, Zou (2006) showed that the
method recovers the true model under more general conditions than does the
lasso. If p < N one can use the least-squares solutions as the pilot estimates.
When p
N , the least-squares estimates are not deﬁned, but the univariate
regression coeﬃcients can be used for the pilot estimates and result in good
recovery properties under certain conditions (Huang, Ma and Zhang 2008).
Exercise 4.26 explores the close connections between the adaptive lasso and
the nonnegative garrote of Section 2.8.

≥

We end this section by mentioning a practical alternative to nonconvex op-
timization for sparse model-path building. Forward-stepwise methods (Hastie
et al. 2009, Chapter 3) are very eﬃcient, and are hard to beat in terms of ﬁnd-
ing good, sparse subsets of variables. Forward stepwise is a greedy algorithm—
at each step ﬁxing the identity of the terms already in the model, and ﬁnding
the best variable to include among those remaining. The theoretical properties
of forward-stepwise model paths are less well understood, partly because of
the algorithmic deﬁnition of the procedure, as opposed to being a solution to
an optimization problem.

Bibliographic Notes

The elastic net was proposed by Zou and Hastie (2005), who also distinguished
between the naive version, similar to the one presented here, and a debiased

BIBLIOGRAPHIC NOTES

87

version that attempts to undo the biasing eﬀect of the ridge shrinkage. Fried-
man et al. (2015) build a system of coordinate-descent algorithms for ﬁtting
elastic-net penalized generalized linear models, implemented in the R package
glmnet. Yuan and Lin (2006) introduced the group lasso, and their paper has
stimulated much research. Meier et al. (2008) extended the group lasso to logis-
tic regression problems, whereas Zhao, Rocha and Yu (2009) describe a more
general family of structured penalties, including the group lasso as a special
case. A line of theoretical work has sought to understand when the group lasso
estimator has lower statistical error than the ordinary lasso. Huang and Zhang
(2010) and Lounici, Pontil, Tsybakov and van de Geer (2009) establish error
bounds for the group lasso, which show how it outperforms the ordinary lasso
in certain settings. Negahban, Ravikumar, Wainwright and Yu (2012) provide
a general framework for analysis of M -estimators, including the group lasso
as a particular case as well as more general structured penalties. Obozinski,
Wainwright and Jordan (2011) characterize multivariate regression problems
for which the group lasso does (or does not) yield better variable selection
performance than the ordinary lasso.

The overlap group lasso was introduced by Jacob et al. (2009), and the
sparse group lasso by Puig, Wiesel and Hero (2009) and Simon, Friedman,
Hastie and Tibshirani (2013). Various algorithms have been developed for
solving the group and overlap group lassos, as well as a variety of structured
generalizations; see Bach, Jenatton, Mairal and Obozinski (2012) for a good
review.

Additive models were proposed by Stone (1985) as a means of side-stepping
the curse of dimensionality in nonparametric regression; see Hastie and Tib-
shirani (1990) for further background on (generalized) additive models. The
COSSO model was developed by Lin and Zhang (2003) in the context of
reproducing kernel Hilbert spaces, and ANOVA spline decompositions. The
books by Wahba (1990) and Gu (2002) provide further background on splines
and RKHSs. Ravikumar et al. (2009) followed up with the SPAM model,
which is somewhat simpler and more general, and established certain forms
of high-dimensional consistency for their estimator. Meier, van de Geer and
B¨uhlmann (2009) studied a related family of estimators, based on explicit
penalization with the empirical L2-norm, corresponding to the doubly penal-
ized estimator with λH = 0. Koltchinski and Yuan (2008, 2010) analyzed the
COSSO estimator, as well as the doubly penalized estimator (4.52). Raskutti
et al. (2009, 2012) derived minimax bounds for sparse additive models, and
also show that the doubly penalized estimator (4.52) can achieve these bounds
for various RKHS families, including splines as a special case.

The fused lasso was introduced by Tibshirani, Saunders, Rosset, Zhu and
Knight (2005). Various algorithms have been proposed for versions of the
fused lasso, including the methods of Hoeﬂing (2010), Johnson (2013), and
Tibshirani2 and Taylor (2011).

The MC+ threshold function was ﬁrst described in Gao and Bruce (1997)
in the context of wavelet shrinkage. There has been a lot of activity in non-

88

GENERALIZATIONS OF THE LASSO PENALTY

convex penalties for sparse modeling. Zou and Li (2008) develop local linear
approximation algorithms for tackling the nonconvex optimization problems.
These and other approaches are discussed in Mazumder et al. (2011).

Exercises

Ex. 4.1 Suppose we have two identical variables X1 = X2, and a response
Y , and we perform a ridge regression (see (2.7) in Section 2.2) with penalty
λ > 0. Characterize the coeﬃcient estimates bβj(λ).

Ex. 4.2 Consider a slightly noisy version of the identical twins example in
the beginning of Section 4.2, where the two variables are strongly positively
correlated. Draw a schematic of the contours of the loss function and the
penalty function, and demonstrate why the elastic net encourages coeﬃcient
sharing more than does the lasso.

Ex. 4.3 Consider the elastic-net problem (4.2).

(a) Show how to simplify the calculation of bβ0 by centering each of the pre-
dictors, leading to bβ0 = ¯y (for all values of λ). How does one convert back
to the estimate of bβ0 for uncentered predictors?

(b) Verify the soft-thesholding expression (4.4) for the update of bβj by coor-

dinate descent.

Ex. 4.4 Consider the solution to the group lasso problem (4.5) when some of
the variables are factors. Show that when there is an intercept in the model,
the optimal coeﬃcients for each factor sum to zero.

Ex. 4.5 This exercise investigates the penalty modiﬁer for the group lasso.
Consider the entry criterion
2 < λ for the group lasso (Section 4.3.1).
k
Suppose rj is i.i.d noise with mean 0 and covariance σ2I—a null situation.
Show that

ZT
k

j rj

2 = σ2
2
k
Hence argue that to make comparisons fair among the penalty terms in the
group lasso, one should replace λ PJ

2 in Equation (4.5) with

(4.77)

Z
k

j rj

E
k

ZT

2
F .

θj

k

j=1 k

k

λ

J
X

j=1

τj

θj
k

2,
k

(4.78)

where τj =
√pj.

Zj

k

k

F . Show that when Zj is orthonormal, this results in τj =

Ex. 4.6 Show that under the orthonormality condition ZT
date (4.15) solves the ﬁxed point Equation (4.13).

j Zj = I, the up-

EXERCISES

89

Ex. 4.7 Consider the block-wise solution vector (4.14) for the group lasso. If
ˆθj
is known, we can write the solution in closed form. Let Zj = UDVT
k
Rpj . Show that
be the singular value decomposition of Zj. Let r∗ = UT rj
φ =

solves

∈

k

ˆθj
k

k

pj
X

‘=1

2d2
‘

r∗
‘
‘ φ + λ)2 = 1,
(d2

(4.79)

where d‘ is the ‘th diagonal element of D. Show how to use a golden search
strategy to solve for φ. Write an R function to implement this algorithm, along
with the golden search.

Ex. 4.8 Discuss the impact of the normalization ZT
j Zj = I in the context of a
matrix of dummy variables representing a factor with pj levels. Does the use
of contrasts rather than dummy variables alleviate the situation?

Ex. 4.9 Using the approach outlined in Section 5.3.3, derive the generalized
gradient update (4.16a) for the group lasso. Write a R function to implement
this algorithm (for a single group). Include an option to implement Nesterov
acceleration.

Ex. 4.10 Using the approach outlined in Section 5.3.3, derive the generalized
gradient update (4.23) for the sparse group lasso.

Ex. 4.11 Run a series of examples of increasing dimension to compare the
performance of your algorithms in Exercises 4.7 and 4.9. Make sure they are
producing the same solutions. Compare their computational speed—for in-
stance, the command system.time() can be used in R.

Ex. 4.12 Consider the condition (4.19) for ˆθj to be zero for the sparse group
lasso. Deﬁne

J(t) =

=

1

λ(1
−
2.
s
k
k

ZT

j rj

α) k

λα

t
k

2

·

−

Now solve

min
t:tk∈[−1,1]

J(t),

and show that this leads to the condition ˆθj = 0 if and only if
with ˆg2 =

j rj).

λα(ZT
S

Ex. 4.13 Show that if ZT

j Zj = I, then (4.21) solves (4.12).

(4.80)

(4.81)

ˆgj

k

2

k

≤

λ(1

α)

−

90

GENERALIZATIONS OF THE LASSO PENALTY

Ex. 4.14 Consider the hierarchical interaction formulation in Example 4.3, and
the optimization problem (4.29)–(4.31).
(a) Give an argument why the multipliers p1 and p2 make sense in the third

penalty.

(b) Suppose we augment the third matrix in (4.29) with a vector of ones
[1 Z1 Z2 Z1:2], and augment the parameter vector with ˜µ. We now replace
the third group penalty term with

q

p1p2 ˜µ2 + p2

˜α1
k

k

2
2 + p1

˜α2

2
2 +
k

α1:2
k

k

2
2.

k

Show that for any λ > 0, b˜µ = 0.

(c) Show that the solution to (4.29)–(4.31) is equivalent to the solution to
(4.32) for any λ > 0. Show how to map the solution to the latter to the
solution to the former.

Ex. 4.15 Consider a criterion for sparse additive models:

minimize
β∈RJ , {fj ∈Fj }J
1

subject to

J
X

βjfj(Xj))2

E(Y

−

j=1
2 = 1
fj
k
k
J
X

βj

| ≤

|

j=1

j
∀

t.

(4.82)

Although evocative, this criterion is not convex, but rather biconvex in β and
J
1 . Show that one can absorb the βj into fj and that solving (4.82) is
fj
{
equivalent to solving the convex (4.38):

}

minimize
fj ∈Fj , j=1,...,J






(Ravikumar et al. 2009)

h(cid:16)

Y

E

J
X

j=1

−

(cid:17)2i

fj(Xj)

+ λ

J
X

j=1

fj
k

2

k






.

Ex. 4.16 The SPAM backﬁtting equations (4.40) are in terms of function
updates, where ˆfj is a ﬁtted function returned by a smoothing operator
j,
and the N -vector form fj is fj evaluated at the N samples values of Xj.
Suppose that the smoothing operator

j ﬁts a linear expansion of the form

S

S

) =

fj(
·

pj
X

‘=1

βj‘ ψj‘(
·

),

(4.83)

where θj = (cid:2)βj1 βj2

· · ·

βjpj

(cid:3) is the coeﬃcient vector.

EXERCISES

91

(a) Suppose that the basis matrices are orthonormal: ΨT

j Ψj = Ipj . Show that
the SPAM backﬁtting equations are equivalent to the ordinary group-lasso
estimating equations in terms of the parameters θj.

(b) What changes if Ψj is not orthonormal?

(
·

, xi), i = 1, . . . , N

Ex. 4.17 In this exercise, we show that any optimal solution to the COSSO
0, the linear span of the kernel functions
problem (4.44) is a member of
has a de-
0,

{R
composition of the form g + h, where g
meaning that
0.
(a) For a function of the form f = g + h as above, show that the term
f (xi))2 depends only on g. (Hint: The kernel reproducing prop-

. We use the fact that any function f
}

0 and h is orthogonal to

H for all f0

h, f0
h

∈ H

∈ H

∈ H

PN

H

H

i

i=1(y

1
N
erty could be useful here.)

−

(b) Show that the penalty term is only increased by including a component

h

= 0. Conclude that any optimal solution bf must belong to

0.

H

Ex. 4.18 Verify that the solutions for fj in (4.47) with λ = τ 4/4 coincide with
the solutions in (4.44).

Ex. 4.19 Consider the additive model criterion (4.42), and assume associated
j, leading to a data criterion
with each function fj is a reproducing kernel

R






(cid:13)
(cid:13)y

−

J
X

j=1

minimize
θj ∈RN
j=1,...J

Rjθj

(cid:13)
2
(cid:13)

+ λ

J
X

j=1

1
γj

θT
j Rjθj






(4.84)

(The 1/N has been absorbed into λ).
(a) Deﬁne ˜Rj = γjRj and ˜θj = θj/γj. In this new parametrization, show

that the estimating equations for ˜θj are

˜Rj(y

f+) + λ ˜Rj

˜θj = 0, j = 1, . . . , J,

(4.85)

where f+ = PJ

−

−
j=1 fj, and fj = ˜Rj

˜θj.

(b) Show that these can be rewritten as

where rj = y

(c) Deﬁne ˜R+ = PJ

j=1

−

˜θj = ( ˜Rj + λI)−1rj,
˜fj = ˜Rj( ˜Rj + λI)−1rj,

and

f+ + fj.

˜Rj = PJ

j=1 γjRj. Show that

f+ = ˜R+( ˜R+ + λI)−1y = ˜R+c
c = ( ˜R+ + λI)−1y.

Compare with the previous item.

(4.86a)

(4.86b)

(4.87a)

(4.87b)

6
GENERALIZATIONS OF THE LASSO PENALTY

92
(d) Show that ˜θj = c

eters ˜θj in this representation, their estimates are all the same.

∀

j. So even though there are J N -dimensional param-

This shows that given γj, fj = γjRjc = γjgj, and justiﬁes the second
step (4.46) in the alternating algorithm for ﬁtting the COSSO model (see
Section 4.4).

Ex. 4.20 Show that any optimal solution to the doubly regularized estima-
, xij), where the optimal weights
(
i=1 bθij
tor (4.52) takes the form bfj(
·
(bθj, j = 1, . . . , J) are obtained by solving the convex program (4.53).

) = PN
·

R

Ex. 4.21 Consider the fused lasso problem (4.56). Characterize bβ0. Show that if
we center the predictors and the response by subtracting their sample means,
we can omit the term β0 and the estimates bβj are unaﬀected. Now consider a
version of the fused-lasso signal approximator (4.54) with a constant term θ0
included:

minimize
θ0,θ

N
X

(yi

i=1

θ0

−

−

θi)2 + λ1

N
X

i=1

+ λ2

θi

|

|

N
X

i=2

θi
|

−

θi−1

.
|

(4.88)

Characterize ˆθ0, and show that median(ˆθi) = 0.

Ex. 4.22 Consider the matrix M corresponding to the linear transforma-
tion (4.60).
(a) Show that its inverse M−1 is lower triangular with all ones on and below

the diagonal.

(b) Explore the pairwise correlations between the columns of such a matrix

for the CGH data of Figure 4.8.

(c) Using glmnet with maxdf=200, and type="naive", ﬁt model (4.61), and
show that the ﬁtted values correspond to the parameters of interest. Com-
pare the performance of lars for the same task. Using a soft-thresholding
post-processor, try to match Figure 4.8.

Ex. 4.23 Derive the dual optimization problem (4.64) in Section 4.5.1.3. Sup-
pose the kth element of ˆu(λ) has reached the bound at λ = λk, and let the
set B hold their indices, and s a vector of their signs. Show that the solution
to (4.64) at λk also solves

minimize
u−B

1
2 k

y

−

λkDT

Bs

DT

−Bu−B

2,
k

−

(4.89)

with solution ˆuB(λ) = λs and ˆu−B(λ) = (D−BDT
Bs) and
λ = λk. By deﬁnition each of the elements of ˆu−B(λ) has absolute value less
than λk. Show that the solution is piecewise-linear in λ < λk, and remains
the solution until the next element of ˆu−B(λ) hits the boundary. Show that
one can determine exactly for which element and value of λ this will be.

−B)−1D−B(y

λDT

−

EXERCISES

93

Ex. 4.24 Here we use dynamic programming to ﬁt the fused lasso.

(a) Implement the dynamic programming approach to the fused lasso, in the

simple case where each βi can take one of K distinct values.

(b) Do the same as in (a), replacing the ‘1 diﬀerence penalty with an ‘0

diﬀerence penalty. Compare the two procedures on the CGH data.

Ex. 4.25 Derive the threshold function (4.75) for the uni-dimensional MC+
criterion (4.74) in Section 4.6.

Ex. 4.26 Show that with ν = 1 in (4.76), the adaptive-lasso solutions are
similar to those of the nonnegative garrote (2.19). In particular, if we constrain
the adaptive lasso solutions to have the same sign as the pilot estimates,
then they are the same as the solutions to the garrote with a suitably chosen
regularization parameter.

Chapter 5

Optimization Methods

5.1 Introduction

In this chapter, we present an overview of some basic optimization concepts
and algorithms for convex problems, with an emphasis on aspects of particular
relevance to regularized estimators such as the lasso. At the algorithmic level,
we focus primarily on ﬁrst-order methods, since they are especially useful for
large-scale optimization problems. We begin with an overview of some basic
optimality theory for convex programs, and then move on to consider various
types of iterative algorithms. Although we limit our focus mainly to convex
problems, we do touch upon algorithms for biconvex problems later in the
chapter.

5.2 Convex Optimality Conditions

An important class of optimization problems involves convex cost functions
and convex constraints. A set
and all
∈ C
s)β0 also belong to
scalars s
∈
R is convex means that for any two vectors β, β0 in
. A function f : Rp
C
the domain of f and any scalar s

C ⊆
[0, 1], all vectors of the form β(s) = sβ + (1

Rp is convex if for all β, β0

(0, 1), we have

→

−

∈

f (β(s)) = f (sβ + (1

s)β0)

−

≤

sf (β) + (1

s)f (β0).

−

(5.1)

In geometric terms, this inequality implies that the chord joining the f (β) and
f (β0) lies above the graph of f , as illustrated in Figure 5.1(a). This inequality
guarantees that a convex function cannot have any local minima that are not
also globally minimal, as illustrated Figure 5.1(b).

5.2.1 Optimality for Diﬀerentiable Problems

Consider the constrained optimization problem

minimize
β∈Rp

f (β)

such that β

,

∈ C

(5.2)

where f : Rp
Rp
is a convex constraint set. When the cost function f is diﬀerentiable, then a

R is a convex objective function to be minimized, and

C ⊂

→

95

96

OPTIMIZATION METHODS

(a)

(b)

Figure 5.1 (a) For a convex function, the line sf (β) + (1 − s)f (β) always lies
above the function value f (sβ + (1 − s)β). (b) A nonconvex function that violates the
inequality (5.1). Without convexity, there may be local minima that are not globally
minima, as shown by the point β0.

necessary and suﬃcient condition for a vector β∗
is that

∈ C

to be a global optimum

f (β∗), β

h∇

β∗

−

i ≥

0

for all β
we have

∈ C

. The suﬃciency of this condition is easy to see; for any β

f (β)

(i)

≥

f (β∗) +

f (β∗), β

h∇

β∗

−

(ii)

i

≥

f (β∗),

(5.3)

,

∈ C

(5.4)

where inequality (i) follows from the convexity of f , 1 and inequality (ii) follows
= Rp so that the
from the optimality condition (5.3). As a special case, when
problem (5.2) is actually unconstrained, then the ﬁrst-order condition (5.3)
reduces to the classical zero-gradient condition

C
f (β∗) = 0.

Frequently, it is the case that the constraint set

can be described in
terms of the sublevel sets of some convex constraint functions. For any convex
function g : Rp
R, it follows from the deﬁnition (5.1) that the sublevel set
Rp
is a convex set. On this basis, the convex optimization
0
g(β)
β
{
}
∈
problem

→
≤

C

|

∇

minimize
β∈Rp

f (β)

such that gj(β)

≤

0 for j = 1, . . . , m,

(5.5)

1Inequality (i) is an equivalent deﬁnition of convexity for a diﬀerentiable function f ; the
ﬁrst-order Taylor approximation centered at any point ˜β ∈ C gives a tangent lower bound
to f .

f(β)f(β′)f(sβ+(1−s)β′)sf(β)+(1−s)f(β′)ββ′β(s)ββ′β(s)CONVEX OPTIMALITY CONDITIONS

97

where gj, j = 1, . . . , m are convex functions that express constraints to be
satisﬁed, is an instance of the general program (5.2). We let f ∗ denote the
optimal value of the optimization problem (5.5).

An important function associated with the problem (5.5) is the Lagrangian

L : Rp

Rm

+ →

×

R, deﬁned by

L(β; λ) = f (β) +

m
X

j=1

λjgj(β).

(5.6)

The nonnegative weights λ
0 are known as Lagrange multipliers; the pur-
pose of the multiplier λj is to impose a penalty whenever the constraint
0 is violated. Indeed, if we allow the multipliers to be chosen op-
gj(β)
timally, then we recover the original program (5.5), since

≤

≥

L(β; λ) =

sup
λ≥0

(

f (β)
+

∞

if gj(β)
≤
otherwise,

0 for all j = 1, . . . , m, and

(5.7)

and thus f ∗ = inf β∈Rp supλ≥0 L(β; λ). See Exercise 5.2 for further details on
this equivalence.

For convex programs, the Lagrangian allows for the constrained prob-
lem (5.5) to be solved by reduction to an equivalent unconstrained problem.
, the theory
More speciﬁcally, under some technical conditions on f and
}
of Lagrange duality guarantees that there exists an optimal vector λ∗
0
of Lagrange multipliers such that f ∗ = minβ∈Rp L(β; λ∗). As a result, any
optimum β∗ of the problem (5.5), in addition to satisfying the feasibility con-
straints gj(β∗)
0, must also be a zero-gradient point of the Lagrangian, and
hence satisfy the equation

gj
{

≥

≤

0 =

∇

βL(β∗; λ∗) =

f (β∗) +

∇

m
X

j=1

gj(β∗).

λ∗
j ∇

(5.8)

−

∇

λ∗

f (β∗) =

When there is only a single constraint function g, this condition reduces to
g(β∗), and has an intuitive geometric interpretation, as shown
∇
in Figure 5.2. In particular, at the optimal solution β∗, the normal vector
f (β∗) to the contour line of f points in the opposite direction to the normal
∇
vector to the constraint curve g(β) = 0. Equivalently, the normal vector to
the contour f lies at right angles to the tangent vector of the constraint.
Consequently, if we start at the optimum β∗ and travel along the tangent at
g(β) = 0, we cannot decrease the value of f (β) up to ﬁrst order.

In general, the Karush–Kuhn–Tucker conditions relate the optimal La-
0, also known as the dual vector, to the optimal

grange multiplier vector λ∗
primal vector β∗
(a) Primal feasibility: gj(β∗)
(b) Complementary slackness: λ∗

Rp:

≥

≤

∈

0 for all j = 1, . . . , m.
j gj(β∗) = 0 for all j = 1, . . . , m.

98

OPTIMIZATION METHODS

Figure 5.2 Illustration of the method of Lagrange multipliers. We are minimizing
a function f subject to a single constraint g(β) ≤ 0. At an optimal solution β∗, the
normal vector ∇f (β∗) to the level sets of the cost function f points in the opposite
direction to the normal vector ∇g(β∗) of the constraint boundary g(β) = 0. Conse-
quently, up to ﬁrst order, the value of f (β∗) cannot be decreased by moving along
the contour g(β) = 0.

(c) Lagrangian condition: The pair (β∗, λ∗) satisﬁes condition (5.8).

These KKT conditions are necessary and suﬃcient for β∗ to be a global
optimum whenever the optimization problem satisﬁes a regularity condition
known as strong duality. (See Exercise 5.4 for more details.) The comple-
mentary slackness condition asserts that the multiplier λ∗
j must be zero if
0 is inactive at the optimum—that is, if gj(β∗) < 0.
the constraint gj(β)
Consequently, under complementary slackness, the Lagrangian gradient con-
f (β∗) lies in the positive
dition (5.8) guarantees that the normal vector
linear span of the gradient vectors

≤

gj(β∗)

−∇
λ∗
j > 0

{∇

|

.
}

5.2.2 Nondiﬀerentiable Functions and Subgradients

|

βj

j=1 |

In practice, many optimization problems arising in statistics
involve
convex but nondiﬀerentiable cost functions. For instance, the ‘1-norm
g(β) = Pp
is a convex function, but it fails to be diﬀerentiable at any
point where at least one coordinate βj is equal to zero. For such problems,
the optimality conditions that we have developed—in particular, the ﬁrst-
order condition (5.3) and the Lagrangian condition (5.8)—are not directly
applicable, since they involve gradients of the cost and constraint functions.
Nonetheless, for convex functions, there is a natural generalization of the no-
tion of gradient that allows for a more general optimality theory.

A basic property of diﬀerentiable convex functions is that the ﬁrst-order
tangent approximation always provides a lower bound. The notion of subgra-

f(β)=c1f(β)=c2<c1g(β)=0β∗CONVEX OPTIMALITY CONDITIONS

99

Figure 5.3 A convex function f : R → R, along with some examples of subgradients
at β1 and β2.

dient is based on a natural generalization of this idea. In particular, given a
convex function f : Rp
Rp is said to be a subgradient of f
at β if

R, a vector z

→

∈

f (β0)

f (β) +

z, β0
h

β

for all β0

Rp.

i

∈

≥

−
In geometric terms, the subgradient vector z is the normal to a (nonverti-
cal) hyperplane that supports the epigraph of f . The set of all subgradients
of f at β is called the subdiﬀerential, denoted by ∂f (β). Whenever f is dif-
ferentiable at β, then the sub-diﬀerential reduces to a single vector—namely
∂f (β) =
. At points of nondiﬀerentiability, the subdiﬀerential is a
convex set containing all possible subgradients. For example, for the absolute
value function f (β) =

f (β)
}

{∇

(5.9)

β
|

, we have
|



∂f (β) =

+1
{
}
1
}
{−
1, +1]
[
−

if β > 0
if β < 0
if β = 0.

(5.10)



We frequently write z
the absolute value function at β.

∈

sign(β) to mean that z belongs to sub-diﬀerential of

Figure 5.3 shows a function f : R

R, and some examples of subgradients
→
at the two points β1 and β2. At the point β1, the function is diﬀerentiable and
hence there is only one subgradient—namely, f 0(β1). At the point β2, it is
not diﬀerentiable, and there are multiple subgradients; each one speciﬁes a
tangent plane that provides a lower bound on f .

How is this useful? Recall the convex optimization problem (5.5), and
assume that one or more of the functions
are convex but nondiﬀer-
entiable. In this case, the zero-gradient Lagrangian condition (5.8) no longer
makes sense. Nonetheless, again under mild conditions on the functions, the
generalized KKT theory can still be applied using the modiﬁed condition

f, gj
{

}

∂f (β∗) +

0

∈

m
X

j=1

j ∂gj(β∗),
λ∗

(5.11)

β1β2f(β)f(β2)+zc(β−β2)f(β2)+zb(β−β2)f(β1)+za(β−β1)100

OPTIMIZATION METHODS

in which we replace the gradients in the KKT condition (5.8) with subdif-
ferentials. Since the subdiﬀerential is a set, Equation (5.11) means that the
all-zeros vector belongs to the sum of the subdiﬀerentials.2
Example 5.1. Lasso and subgradients. As an example, suppose that we want to
solve a minimization problem of the form (5.5) with a convex and diﬀerentiable
cost function f , and a single constraint speciﬁed by g(β) = Pp
R for
βj
0 is equivalent to
some positive constant R. Thus, the constraint g(β)
requiring that β belongs to an ‘1-ball of radius R. Recalling the form of the
subdiﬀerential (5.10) for the absolute value function, condition (5.11) becomes

j=1 |

| −

≤

f (β∗) + λ∗z∗ = 0,

∇

(5.12)

k

−

2N k

where the subgradient vector satisﬁes z∗
When the cost function f is the squared error f (β) = 1
condition is equivalent to Equation (2.6) from Chapter 2.

sign(β∗

j ∈

j ) for each j = 1, . . . , p.
2
2, this

Xβ

y

}

∈

≥

vj
{

≤
uj
}
{

n), it can always be decomposed in the form Θ = Pm
m
j=1 and

♦
Example 5.2. Nuclear norm and subgradients. The nuclear norm is a convex
Rm×n (where we as-
function on the space of matrices. Given a matrix Θ
j=1 σjujvT
sume m
j .
m
where
j=1 are the (left and right) singular vectors, chosen
to be orthonormal in Rm and Rn, respectively, and the nonnegative numbers
σj
0 are the singular values. This is known as the singular-value decompo-
sition (SVD) of Θ. The nuclear norm is the sum of the singular values—that
is,
j=1 σj(Θ). Note that it is a natural generalization of the vector
‘1-norm, since for any (square) diagonal matrix, the nuclear norm reduces to
the ‘1-norm of its diagonal entries. As we discuss in Chapter 7, the nuclear
norm is useful for various types of matrix approximation and decomposition.
? of the nuclear norm at Θ consists of all matri-
The subdiﬀerential ∂
Θ
k
ces of the form Z = Pm
j=1 zjujvT
j , where each for j = 1, . . . , p, the scalar
zj
sign(σj(Θ)). We leave it as an exercise for the reader to verify this claim
using the deﬁnition (5.9).

? = Pm
k

Θ
k

∈

k

♦

5.3 Gradient Descent

Thus far, we have seen various types of optimality conditions for diﬀerent types
of convex programs. We now turn to various classes of iterative algorithms
for solving optimization problems. In this section, we focus on ﬁrst-order al-
gorithms, meaning methods that exploit only gradient (or subgradient) in-
formation, as opposed to information from higher-order gradients. First-order
methods are particularly attractive for large-scale problems that arise in much
of modern statistics.

2Here we deﬁne the sum of two subsets A and B of R

p as A + B : = {α + β | α ∈ A, β ∈

B}.

GRADIENT DESCENT

5.3.1 Unconstrained Gradient Descent

101

We begin with the simplest case —namely, unconstrained minimization of
a convex diﬀerentiable function f : Rp
R. In this case, assuming that
the global minimum is achieved, then a necessary and suﬃcient condition for
optimality of β∗
f (β∗) = 0.
Gradient descent is an iterative algorithm for solving this ﬁxed point equation:
it generates a sequence of iterates

Rp is provided by the zero-gradient condition

∞
t=0 via the update

→

∇

∈

βt
}
{
f (βt),

βt+1 = βt

st

∇

−

for t = 0, 1, 2, . . .,

(5.13)

where st > 0 is a stepsize parameter. This update has a natural geomet-
ric interpretation: by computing the gradient, we determine the direction of
f (βt), and then walk in this direction for a certain amount
steepest descent
determined by the stepsize st.

−

More generally, the class of descent methods is based on choosing a direc-

tion ∆t

∈

Rp such that

f (βt), ∆t

h∇

i
βt+1 = βt + st∆t

< 0, and then performing the update

for t = 0, 1, 2, . . ..

(5.14)

f (βt), ∆t

h∇

In geometric terms, the inner product condition
< 0 means
that the chosen direction ∆t forms an angle of less than 90◦ with the di-
rection of steepest descent. The gradient descent update (5.13) is a special
f (βt). Other interesting choices include diagonally-scaled
case with ∆t =
gradient descent: given a diagonal matrix Dt
0, it uses the descent direc-
f (βt). This type of diagonal scaling is helpful when the
tion ∆t =
function varies more rapidly along some coordinates than others. More gen-
erally, Newton’s method is applicable to functions that are twice continuously
diﬀerentiable, and is based on the descent direction

−∇
(Dt)−1

∇

(cid:31)

−

i

∆t =

(cid:0)

−

∇

2f (βt)(cid:1)−1

f (βt),

∇

(5.15)

∇

2f (βt) is the Hessian of f , assumed to be invertible. Newton’s method
where
is a second-order method, since it involves ﬁrst and second derivatives. In
particular, a Newton step (with stepsize one) amounts to exactly minimizing
the second-order Taylor approximation to f at βt. Under some regularity
conditions, it enjoys a quadratic rate of convergence; however, computation
of the Newton direction (5.15) is more expensive than ﬁrst-order methods.

An important issue for all iterative algorithms, among them the gradient
descent update (5.13), is how to choose the stepsize st. For certain problems
with special structure, it can be shown that a constant stepsize (meaning st =
s for all iterations t = 0, 1, . . .) will guarantee convergence; see Exercise 5.1
for an illustration. In general, it is not suﬃcient to simply choose a stepsize
for which f (βt+1) < f (βt); without some care, this choice may cause the
algorithm to converge to a nonstationary point. Fortunately, there are various
kinds of stepsize selection rules that are relatively simple, and have associated
convergence guarantees:

102

OPTIMIZATION METHODS

Figure 5.4 Armijo rule or backtracking line search. Starting with step-
size s0 = 1, we repeatedly reduce s by a fraction γ until
the condition
f (β + s∆) ≤ f (β) + αsh∇f (β), ∆i is satisﬁed. This is achieved here at s1.

•

•

Limited minimization rule: choose the stepsize st = arg min
s∈[0,1]
it does require solving a one-

Although this choice is very intuitive,
dimensional optimization problem at each step.

f (βt + s∆t).

Armijo or backtracking rule: Given parameters α
∈
and an initial stepsize s = 1, perform the reduction s
condition

(0, 0.5) and γ

(0, 1)
γs until the descent

∈

←

f (cid:0)βt + s∆t(cid:1)

f (βt) + αs

f (βt), ∆t

i

h∇

≤

(5.16)

is met. In practice, the choices α = 0.5 and γ = 0.8 are reasonable. The
condition (5.16) can be interpreted as saying that we will accept a fraction α
of the decrease in f (β) that is predicted by linear extrapolation (Figure 5.4).

For convex functions, both of these stepsize choices, when combined with
∞
suitable choices of the descent directions
t=0, yield algorithms that are
}
guaranteed to converge to a global minimum of the convex function f . See the
bibliographic section on page 131 for further discussion.

∆t
{

5.3.2 Projected Gradient Methods

We now turn to gradient methods for problems that involve additional side
constraints. In order to provide some geometric intuition for these methods,
it is useful to observe that the gradient step (5.13) has the alternative repre-
sentation

βt+1 = arg min

β∈Rp

(cid:26)

f (βt) +

f (βt), β

h∇

βt

i

−

+

1
2st k

β

βt

2
2
k

−

(cid:27)

.

(5.17)

s=0s0=1s1f(β)f(β+s∆)f(β)+αs1h∇f(β),∆if(β)+αs0h∇f(β),∆iGRADIENT DESCENT

103

Thus, it can be viewed as minimizing the linearization of f around the cur-
rent iterate, combined with a smoothing penalty that penalizes according to
Euclidean distance.

This view of gradient descent—an algorithm tailored speciﬁcally for uncon-
strained minimization—leads naturally to the method of projected gradient
descent, suitable for minimization subject to a constraint β

:

βt+1 = arg min

β∈C

(cid:26)

f (βt) +

f (βt), β

h∇

+

βt

i

−

1
2st k

β

βt

2
2
k

−

.

(5.18)

∈ C

(cid:27)

Equivalently, as illustrated in Figure 5.5, this method corresponds to taking
f (βt), and then projecting the result back onto the
a gradient step βt
s
−
∇
convex constraint set
. It is an eﬃcient algorithm as long as this projection
C
can be computed relatively easily. For instance, given an ‘1-ball constraint
, this projection can be computed easily by a
}

C
variant of soft thresholding, as we discuss in more detail later.

β
{

Rp

| k

=

≤

R

∈

β

k

1

Figure 5.5 Geometry of projected gradient descent. Starting from the current iterate
βt, it moves in the negative gradient direction to βt − st∇f (βt), and then performs
a Euclidean projection of the result back onto the convex constraint set C in order to
obtain the next iterate βt+1.

5.3.3 Proximal Gradient Methods

Here we discuss a general class of methods that include projected gradient
descent as a special case. As discussed previously, many objective functions f
can be decomposed as a sum f = g + h, where g is convex and diﬀerentiable,
and h is convex but nondiﬀerentiable. Suppose that we would like to minimize
such an objective function by a gradient-type algorithm. How do we deal with
the nondiﬀerentiability of the component h?

In order to see how this diﬃculty can be ﬁnessed, recall that an ordinary
gradient step can be viewed as minimizing the combination of a local linear
approximation to f combined with a quadratic smoothness term—in particu-
lar, see Equation (5.17). This perspective suggests the following strategy: form

βtβt+1βt−st∇f(βt)104

OPTIMIZATION METHODS

a local approximation to f by linearizing the diﬀerentiable component g, but
leaving the nondiﬀerentiable component ﬁxed. This leads to the generalized
gradient update, deﬁned by

βt+1 = arg min

β∈Rp

(cid:26)

g(βt) +

g(βt), β

h∇

+

βt

i

−

1
2st k

β

−

βt

(cid:27)

2
2 + h(β)
k

, (5.19)

where we have approximated the diﬀerentiable part g, but retained an exact
form of the nondiﬀerentiable component h.

The update (5.19) is closely related to the projected gradient descent up-
date (5.18); in fact, it can be viewed as a Lagrangian analog. In order to make
this connection explicit, we deﬁne the proximal map of a convex function h, a
type of generalized projection operator:

proxh(z) : = arg min

θ∈Rp

(cid:26) 1
2 k

z

θ

−

(cid:27)

2
2 + h(θ)
k

.

(5.20)

From this deﬁnition we immediately have the following relations:
(a) proxsh(z) = arg minθ∈Rp
(b) When

2 + h(θ)(cid:9).
2
k

z
2s k

(cid:8) 1

−

θ

(

h(θ) = IC(θ) =

0
+

, and

if θ
∈ C
otherwise

we have proxh(z) = arg minθ∈C k
.
clidean projection onto the set
C
1, then proxh(z) =
k

(c) If h(θ) = λ

θ
k

−

k

z

thresholded version of z. See Example 5.3 below.

S

∞
2
2, corresponding to the usual Eu-
θ

λ(z), the element-wise soft-

As we show in Exercise 5.7, it follows that the update (5.19) has the equivalent
representation

βt+1 = proxsth

(cid:0)βt

g(βt)(cid:1) .

st

∇

−

Similarly, it is easy to see that the proximal-gradient update

−
is exactly the projected gradient step (5.18).

βt+1 = proxIC

(cid:0)βt

st

g(βt)(cid:1)

∇

(5.21)

(5.22)

The updates (5.21) will be computationally eﬃcient as long as the proximal
map is relatively easy to compute. For many problems that arise in statistics—
among them the ‘1-norm, group-lasso ‘2 norm, and nuclear norms—the proxi-
mal map (5.20) can be computed quite cheaply. Typically the update (5.21) is
better suited to statistical problems that impose regularization via a penalty,
as opposed to a constraint of the form h(θ)
Example 5.3. Proximal gradient descent for ‘1-penalty. Suppose that the
nondiﬀerentiable component is a (scaled) ‘1 penalty, say h(θ) = λ
1. With
k
this choice of h, proximal gradient descent with stepsize st at iteration t con-
sists of two very simple steps:

θ
k

R.

≤

GRADIENT DESCENT

1. First, take a gradient step z = βt
2. Second, perform elementwise soft-thresholding βt+1 =
In detail, the proximal map (5.21) is given by

g(βt).

st

∇

−

stλ(z).

S

proxsh(z) = arg min

θ∈Rp

(cid:26) 1

z
2s k

θ

2
2 + λ
k

θ
k

1
k

−

= arg min

θ∈Rp

(cid:26) 1
z
2 k

θ

2
2 + λs
k

θ
k

1
k

−

(cid:27)

(cid:27)

.

105

(5.23)

This optimization problem has an explicit closed-form solution; in particular,
since the objective function decouples across coordinates as

1
z
2 k

θ

2
2 + λs
k

θ

k

k

−

1 =

p
X

j=1

(cid:26) 1
2

(zj

θj)2 + λs
|

θj

|

−

(cid:27)

,

(5.24)

we can solve the p-dimensional problem by solving each of the univariate
problems separately. We leave it as an exercise for the reader to verify the
Rp
solution is obtained by applying the soft thresholding operator
with coordinates

τ : Rp
S

→

[

τ (z)]j = sign(zj)(

S

zj

|

| −

τ )+,

(5.25)

.)

x, 0
}
{

with the threshold choice τ = sλ. (Here we use (x)+ as a shorthand for
max

♦
Example 5.4. Proximal gradient descent for nuclear norm penalty. As a sec-
ond illustration, suppose that h is λ times the nuclear norm. As previously
introduced in Example 5.2, the nuclear norm is a real-valued function on the
space of m
Θ
are
k
the singular values of Θ. With this choice of h, the generalized projection
operator (5.20) takes the form

j=1 σj(Θ), where

n matrices, given by

σj(Θ)
{

? = Pm

×

}

k

(cid:26) 1

(cid:27)

.

(5.26)

Z

2
F + λ
Θ
k
k

Θ
k

?)

proxsh(Z) = arg min
Θ∈Rm×n

−

−

Θ

j=1

Pn

Z
k

k=1(Zjk

2s k
F = Pm
Θjk)2 is simply the
2
Here the Frobenius norm
k
usual Euclidean norm applied to the entries of the matrices. Although this
proximal map (5.26) is no longer separable, it still has a relatively simple so-
lution. Indeed, as we explore in Exercise 5.8, the update Πs,h(Z) is obtained by
computing the singular value decomposition of Z, and then soft-thresholding
its singular values.

♦
Nesterov (2007) provides suﬃcient conditions for the convergence of the
updates (5.21) when applied to a composite objective function f = g + h.
Suppose that the component g is continuously diﬀerentiable with a Lipschitz
gradient, meaning that there is some constant L such that

−

g(β)

k∇

g(β0)
k

2

β

L
k

−

≤

β0

2
k

− ∇

for all β, β0

Rp.

∈

(5.27)

106

OPTIMIZATION METHODS

Under this condition and with a constant stepsize st = s
(0, 1/L], it can be
shown that there is a constant C, independent of the iteration number, such
that the updates (5.21) satisfy

∈

f (βt)

−

f (β∗)

C
t + 1 k

βt

≤

β∗

2
k

−

for all t = 1, 2, . . .,

(5.28)

where β∗ is an optimal solution. In words, the diﬀerence between the value
f (βt) of the tth iterate and the optimal value f (β∗) decreases at the rate
(1/t). This rate is known as sublinear convergence, and is guaranteed for
O
any ﬁxed stepsize in the interval (0, 1/L]. Such a choice requires an upper
bound on the Lipschitz constant L, which may or may not be available. In
practice, the Armijo rule also yields the same rate (5.28). (See Figure 5.6.)

Figure 5.6 Plot of log |f (βt) − f (β∗)| versus the iteration number t, comparing a
sublinear convergence rate (5.28) with a linear or geometric convergence rate (5.30).
For an algorithm with geometric convergence, the error decay on this logarithmic
scale is linear with a negative slope.

Signiﬁcantly faster rates are possible if the objective function has addi-
tional structure. For instance, suppose that in addition to having a Lipschitz
continuous gradient (5.27), the diﬀerentiable component g is strongly convex,
meaning that there exists some γ > 0 such that

g(β + ∆)

g(β)

−

− h∇

g(β), ∆

γ2

∆

2
2
k

k

i ≥

for all β, ∆

Rp.

∈

(5.29)

This condition guarantees that g has at least as much curvature as the
2
2 in all directions. Under conditions (5.27)
quadratic function β
β
k
k
(0, 1/L], the
and (5.29), it can be shown that with a constant stepsize s

γ2

7→

∈

01020304050−8−7−6−5−4−3−2−10IterationLog |f(βt) − f(β*)|Linear versus sublinear convergence  SublinearLinearGRADIENT DESCENT

107

updates (5.21) will achieve a linear or geometric rate of convergence, meaning
that there exists a positive constant C and contraction factor κ
(0, 1) such
that

∈

−

≤

β∗

C κt

f (βt)

f (β∗)

β0
k
f (β∗)
Thus, under the additional strong convexity condition, the error f (βt)
(0, 1). See
is guaranteed to contract at a geometric rate speciﬁed by κ
Figure 5.6 for an illustration of the diﬀerence between this linear rate and the
earlier sublinear rate (5.28).

for all t = 1, 2, . . .,

(5.30)

2
k

−

−

∈

Example 5.5. Proximal gradient for lasso. For the lasso, we have

g(β) =

1
2N k

y

Xβ

2
2 and h(β) = λ
k

k

β

1,
k

−

so that the proximal gradient update (5.21) takes the form

βt+1 =

(cid:18)

βt

st 1
N

−

st λ

S

XT (y

−

(cid:19)

.

Xβt)

(5.31)

Note that this has a very similar form to the coordinate descent update (see
Section 5.4), especially if we take the stepsize s = 1 and assume that the
predictors are standardized. Then both procedures operate on the same quan-
tities, one in a cyclical manner and the other (proximal gradients) in a simul-
taneous manner on all coordinates. It is not clear which is a more eﬀective
approach. The coordinate descent procedure can exploit sparsity of the coeﬃ-
cient vector and doesn’t need to worry about step-size optimization, while the
proximal gradient may gain eﬃciency by moving all parameters at the same
time. It may also have speed advantages in problems where the multiplication
of a vector by both X and XT can be done quickly, for example by a fast
Fourier transform. The Lipschitz constant L here is the maximum eigenvalue
of XT X/N ; one can use a ﬁxed stepsize in (0, 1/L] or a form of backtracking
step selection. We compare these in a numerical example in Section 5.5.

♦

5.3.4 Accelerated Gradient Methods

In this section, we discuss a class of accelerated gradient methods due to
Nesterov (2007). Suppose that we have a convex diﬀerentiable function f , and
recall the standard gradient step (5.13). For certain objective functions, this
update may exhibit an undesirable type of “zig-zagging” behavior from step
to step, which could conceivably slow down convergence. With the motivation
of alleviating this drawback, Nesterov (2007) proposed the class of accelerated
gradient methods that use weighted combinations of the current and previous
gradient directions.

quences

In more detail, the accelerated gradient method involves a pair of se-
t=0, and some initialization β0 = θ0. For iterations
∞
}

∞
t=0 and
}

βt
{

θt

{

108

OPTIMIZATION METHODS

t = 0, 1, 2, . . ., the pair is then updated according to the recursions

βt+1 = θt

st

−

θt+1 = βt+1 +

∇

f (θt),
t
t + 3

and

(βt+1

βt).

−

(5.32a)

(5.32b)

For non-smooth functions f that have the “smooth plus non-smooth” de-
composition g + h, Nesterov’s acceleration scheme can be combined with
the proximal gradient update: in particular, we replace the ordinary gradi-
ent step (5.32a) with the update

βt+1 = proxsth

(cid:0)θt

st

g(θt)(cid:1) .

(5.33)

−

∇

In either case, the stepsize st is either ﬁxed to some value, or chosen according
to some type of backtracking line search.

Example 5.6. Proximal gradient descent with momentum. Let us consider the
combination of proximal gradient steps with the acceleration scheme in ap-
plication to the ‘1-regularized lasso program. Recalling the form (5.31) of the
composite gradient update, we see that the accelerated scheme consists of the
updates

βt+1 =

stλ

S
θt+1 = βt+1 +

(cid:0)θt + st 1
t
t + 3

N XT (y
(cid:0)βt+1

−

Xθt)(cid:1)
−
βt(cid:1) .

(5.34a)

This algorithm for the lasso is essentially equivalent, modulo some minor dif-
ferences in the acceleration weights, to the Fast Iterative Soft-thresholding
Algorithm (FISTA) of Beck and Teboulle (2009).

To investigate how well this works, we generated data from a regression
problem with N = 1000 observations and p = 500 features. The features xij
are standard Gaussian having pairwise correlation 0.5. Twenty of the 500 co-
eﬃcients βj were nonzero, each distributed as standard Gaussian variates and
chosen at random locations between 1 and p. Figure 5.7 shows the performance
of the generalized gradient and Nesterov’s method, for two diﬀerent values of
the regularization parameter λ. We tried the algorithms using a ﬁxed value of
the step-size t (equal to the reciprocal of the largest eigenvalue of 1
N XT X). We
also tried the approximate backtracking line search for t
[0, 0.5]. We see that
Nesterov’s momentum method yields substantial speedups, over the general-
ized gradient, and backtracking is faster than the ﬁxed stepsize choice. In the
latter comparison this does not even take into account the cost of computing
the largest eigenvalue of 1
N XT X: backtracking can speed up the computation
by allowing a a larger stepsize to be used when it is appropriate. Note that
we are simply counting the number of iterations, rather than measuring the
total elapsed time; however the Nesterov momentum steps are only slightly
more costly than the generalized gradient steps. We also note that the rela-
tive error and hence the iterates f (βt) are not strictly monotone decreasing
for Nesterov’s momentum method.

∈

♦

COORDINATE DESCENT

109

Figure 5.7 Performance of the generalized gradient and Nesterov momentum meth-
ods for a sample lasso problem described in the text. The vertical axis shows the error
measure [f (βt) − f (β∗)]/f (β∗), where β∗ is the minimizer, and βt is the solution
after t steps. On the left, the solution β∗ is sparse with just 20 of the 500 coeﬃcients
not equal to zero; on the right, 237 of the coeﬃcients are nonzero.

In computational terms, the momentum updates (5.32) and (5.33) only in-
volve slightly more work than an ordinary gradient update. Nonetheless, Nes-
terov (2007) proves that the change yields a signiﬁcant improvement in conver-
gence rates: in particular, whenever g satisﬁes the Lipschitz condition (5.27),
then there is a constant C > 0 such that the iterates satisfy

f (βt)

−

f (β∗)

C
(t + 1)2 k

β0

≤

β∗

2.
k

−

(5.35)

−

O

f (β∗) decreases at the rate

(1/t2), as opposed
Consequently, the error f (βt)
to the slower
(1/t) rate of a nonaccelerated method (see Equation (5.28)).
When g is strongly convex (5.29), the accelerated gradient method again en-
joys a geometric rate of convergence (5.30), although with a smaller con-
traction factor κ. More precisely, the nonaccelerated method converges with
a contraction factor determined by the condition number of g, whereas the
accelerated variant converges according to the square root of this condition
number.

O

5.4 Coordinate Descent

Certain classes of problems, among them the lasso and variants, have an ad-
ditional separability property that lends itself naturally to a coordinate mini-
mization algorithm. Coordinate descent is an iterative algorithm that updates

51015201e−081e−061e−041e−02Number of Steps kRelative ErrorProximal gradient   with backtrackNesterov momentum   with backtrack010203040501e−071e−051e−031e−01Number of Steps kRelative ErrorDense—λ=0.7Sparse—λ=0.05110

OPTIMIZATION METHODS

from βt to βt+1 by choosing a single coordinate to update, and then performing
a univariate minimization over this coordinate. More precisely, if coordinate
k is chosen at iteration t, then the update is given by

βt+1
k = arg min

βk

f (cid:0)βt

1, βt

2, . . . , βt

k−1, βk, βt

k+1, . . . , βt
p

(cid:1) ,

(5.36)

j for j

j = βt

and βt+1
= k. A typical choice would be to cycle through the
coordinates in some ﬁxed order. This approach can also be generalized to block
coordinate descent, in which the variables are partitioned into non-overlapping
blocks (as in the group lasso), and we perform minimization over a single block
at each round.

5.4.1 Separability and Coordinate Descent

When does this procedure converge to the global minimum of a convex func-
tion? One suﬃcient (but somewhat restrictive) condition is that f be contin-
uously diﬀerentiable and strictly convex in each coordinate. However, the use
of various statistical regularizers leads to optimization problems that need not
be diﬀerentiable. For such cases, more care is required when using coordinate
minimization, because, as we discuss below, it can become “stuck” at non-
optimal points. One form of problem structure that ensures good behavior
of coordinate minimization is a type of separability condition. In particular,
suppose that the cost function f has the additive decomposition

f (β1, . . . βp) = g(β1, . . . βp) +

p
X

j=1

hj(βj),

(5.37)

|

y

−

· |

βj

→

Xβ

2N k

2
2 and hj(βj) = λ
k

where g : Rp
R is diﬀerentiable and convex, and the univariate functions
hj : R
R are convex (but not necessarily diﬀerentiable). An important
→
example of this problem structure is the standard lasso program (2.5), with
g(β) = 1
. Tseng (1988, 2001) shows that
for any convex cost function f with the separable structure (5.37), the co-
ordinate descent Algorithm (5.36) is guaranteed to converge to the global
minimizer. The key property underlying this result is the separability of the
nondiﬀerentiable component h(β) = Pp
j=1 hj(βj), as a sum of functions of
each individual parameter. This result implies that coordinate descent is a
suitable algorithm for the lasso as well as certain other problems discussed in
this book. In contrast, when the nondiﬀerentiable component h is not sepa-
rable, coordinate descent is no longer guaranteed to converge. Instead, it is
possible to create problems for which it will become “stuck,” and fail to reach
the global minimum.

Example 5.7. Failure of coordinate descent. As an illustration, we con-
sider an instance of a problem that violates (5.37)—the fused lasso, dis-
cussed in Section 4.5. Here the nondiﬀerentiable component takes the form
h(β) = Pp
. Figure 5.8 illustrates the diﬃculty. We created a
|

j=1 |

βj−1

βj

−

6
COORDINATE DESCENT

111

fused lasso problem with 100 parameters, with the solutions for two of the
parameters, β63 = β64
1. The left and middle panels show slices of the
function f varying β63 and β64, with the other parameters set to the global
minimizers. We see that the coordinate-wise descent algorithm has got stuck
in a corner of the response surface, and is stationary under single-coordinate
moves. In order to advance to the minimum, we have to move both β63 and
β64 together.

≈ −

Figure 5.8 Failure of coordinate-wise descent in a fused lasso problem with 100
parameters. The optimal values for two of the parameters, β63 and β64, are both
−1.05, as shown by the dot in the right panel. The left and middle panels show
slices of the objective function f as a function of β63 and β64, with the other pa-
rameters set to the global minimizers. The coordinate-wise minimizer over both β63
and β64 (separately) is -0.69, rather than −1.05. The right panel shows contours of
the two-dimensional surface. The coordinate-descent algorithm is stuck at the point
(−0.69, −0.69). Despite being strictly convex, the surface has corners, in which the
coordinate-wise procedure can get stuck. In order to travel to the minimum we have
to move both β63 and β64 together.

♦
Tseng (2001) gives a more general and intuitive condition for convergence
of coordinate descent, one which depends on the behavior of the directional
Rp, the lower
derivatives of the cost function f . For a given direction ∆
directional derivative at β is given by

∈

f 0(β; ∆) : = lim inf
s↓0

f (β + s∆)
s

−

f (β)

.

(5.38)

In rough terms, a coordinate descent algorithm only gains information about
directions of the form ej = (cid:0)0, 0,
R.
Therefore, suppose that the coordinate descent algorithm reaches a point β
for which

. . . , 0(cid:1) for some ej

. . . 0, ej, 0,

∈

f 0(β; ej)

≥

0

for all j = 1, . . . , p, and coordinate vectors ej.

(5.39)

−1.0−0.50.0102.0102.5103.0103.5104.0−1.0−0.50.0102.0102.5103.0103.5104.0−1.0−0.50.0−1.0−0.50.0β63β63β64β64f(β)f(β)112

OPTIMIZATION METHODS

At any such point, there are no coordinate directions that will further reduce
the function value. Therefore, we require that any β satisfying the condi-
tion (5.39) also satisﬁes f 0(β; ∆)
Rp. Tseng (2001)
calls this condition regularity. It rules out a situation like that of Figure 5.8,
in which moves along all coordinate directions fail to decrease the criterion,
but an oblique move does improve the criterion. As a side-note, it is worth
observing that separability of the nondiﬀerentiable component of the objective
function implies regularity, but that there are nondiﬀerentiable and nonsepa-
rable functions that are still regular. An example is the function

0 for all directions ∆

≥

∈

h(β1, . . . , βp) =

β
|

T P
|

|

β

|

=

p
X

j,k=1

βj

Pjk
|

βk
|

,
|

|

(5.40)

where P is a symmetric positive deﬁnite matrix.

5.4.2 Linear Regression and the Lasso

Recall the optimization problem (2.5) that underlies the lasso estimator. As
discussed in Chapter 2, the optimality conditions for this problem are

1
N

−

N
X

(yi

i=1

β0

−

−

p
X

j=1

xijβj)xij + λsj = 0,

(5.41)

sign(βj) for j = 1, 2, . . . , p. The coordinate descent proce-
where sj
dure simply solves these equations in a cyclical fashion, iterating over j =
1, 2, . . . , p, 1, 2, . . ..

∈

Since the intercept β0 is typically not penalized, we can center both the
response yi and the covariate vectors xi by their means, and then omit the in-
tercept in the calculations of the other βj. (Of course, as in OLS, the intercept
is calculated at the end using the bβ0 = ¯y
j=1 ¯xj bβj.) To simplify matters,
−
P
we deﬁne the partial residual r(j)
k6=j xik bβk, which removes from the
−
outcome the current ﬁt from all but the jth predictor. Then the solution for
bβj satisﬁes

i = yi

Pp

λ

bβj = S

(cid:17)

(cid:16) 1
N

1
N

PN

i xij

i=1 r(j)
i=1 x2
ij

PN

,

(5.42)

λ(θ) = sign(θ)(

whereas before
λ)+ is the soft-thresholding operator. If
in addition to centering, the variables are standardized to have unit variance
(typically a good idea, especially if the variables are in diﬀerent units), then
the update has the particularly succinct form

| −

S

θ

|

λ( ˜βj),
S
where ˜βj is the simple linear regression coeﬃcient of the partial residual on

(5.43)

bβj =

COORDINATE DESCENT

113

variable j. If instead we have an elastic net penalty (1
update (5.42) becomes

−

α)β2

j /2 + α

, the

βj
|

|

bβj = S

(cid:17)

PN

(cid:16) 1
N
i=1 x2

i=1 r(j)
ij + (1

αλ
PN

i xij

α)λ

1
N

−

,

(5.44)

or in the standardized case

bβj = S

1 + (1

αλ( ˜βj)

α)λ

−

.

(5.45)

There are a number of strategies for making these operations eﬃcient. For
ease of notation we assume that the predictors are standardized to have mean
zero and variance one; for nonstandardized data, the steps are similar.
Partial residuals. Note that we can write r(j)
k6=j xik bβk = ri +
xij bβj, where ri denotes the current residual for observation i. Since the vectors
xj
{

p
j=1 are standardized, we can write
}

i = yi

P

−

1
N

N
X

i=1

xijr(j)

i =

1
N

N
X

i=1

xijri + bβj,

(5.46)

a representation that reveals the computational eﬃciency of coordinate de-
scent. Many coeﬃcients are zero and remain so after thresholding, and so
nothing needs to be changed. The primary cost arises from computing the
(N ) operations. On the other hand,
sum in Equation (5.46), which requires
if a coeﬃcient does change after the thresholding, ri is changed in
(N ) and
O
the step costs
(pN ) oper-
ations. Friedman et al. (2010b) refer to this as naive updating, since it works
directly with the inner products of the data.

(2N ). A full cycle through all p variables costs

O

O

O

Covariance updating. Naive updating is generally less eﬃcient than covari-
ance updating when N
p and N is large. Up to a factor 1/N , we can write
the ﬁrst term on the right of expression (5.46)

(cid:29)

N
X

i=1

xijri =

xj, y
h

i −

X

k | |bβk|>0

xj, xk
h

bβk.
i

(5.47)

In this approach, we compute inner products of each feature with y initially,
and then each time a new feature xk enters the model for the ﬁrst time, we
compute and store its inner product with all the rest of the features, requiring
(N p) operations. We also store the p gradient components (5.47). If one of
O
the coeﬃcients currently in the model changes, we can update each gradient in
(p) operations. Hence with k nonzero terms in the model, a complete cycle
O
costs
(N p)
(pk) operations if no new variables become nonzero, and costs
for each new variable entered. Importantly, each step does not require making

O

O

(N ) calculations.

O

114

OPTIMIZATION METHODS

Warm starts. Typically one wants a sequence of lasso solutions, say for a
L
decreasing sequence of values
0 . It is easy to see that the largest value
that we need consider is

λ‘

}

{

λ0 = 1

N max
j

xj, y

|h

,
i|

(5.48)

since any value larger would yield an empty model. One strategy, as employed
L
‘=0 decreasing
by the R package glmnet, is to create a sequence of values
}
from λ0 down to λL = (cid:15)λ0
0 on a log scale. The solution bβ(λ‘) is typically a
very good warm start for the solution bβ(λ‘+1). Likewise the number of nonzero
elements tends to increase slowly with ‘, starting at zero at ‘ = 0. Doubling
the number L = 100 to say 2L does not double the compute time, since the
warm starts are much better, and fewer iterations are needed each time.

λ‘

≈

{

A

Active-set convergence. After a single iteration through the set of p variables
at a new value λ‘, starting from the warm start bβ(λ‘−1), we can deﬁne the
to index those variables with nonzero coeﬃcients at present.
active set
The idea is to iterate the algorithm using only the variables in
. Upon
convergence, we do a pass through all the omitted variables. If they all pass
the simple exclusion test 1
< λ‘, where r is the current residual, we
have the solution for the entire set of p variables. Those that fail are included
in
and the process is repeated. In practice we maintain an ever-active set—
any variable that had a nonzero coeﬃcient somewhere along the path until
present is kept in

xj, r

N |h

A

A

i|

Strong-set convergence. Similar to the above, we identify a subset of variables
likely to be candidates for the active set. Let r be the residual at bβ(λ‘−1),
and we wish to compute the solution at λ‘. Deﬁne the strong set

as

.
A

S

=

j

{

1
N h

| |

S

xj, r

i|

> λ‘

(λ‘−1

.

λ‘)
}

−

−

(5.49)

We now compute the solution restricting attention to only the variables in
. Apart from rare exceptions, the strong set will cover the optimal active
S
set. Strong rules are extremely useful, especially when p is very large (in the
100Ks or millions). We discuss them in some detail in Section 5.10.

Sparsity. The main computational operation in all the above is an inner-
product of a pair of N -vectors, at least one of which is a column of the design
matrix X. If X is sparse, we can compute these inner products eﬃciently.
An example is document classiﬁcation, where often the feature vector follows
the so-called “bag-of-words” model. Each document is scored for the pres-
ence/absence of each of the words in the entire dictionary under consideration
(sometimes counts are used, or some transformation of counts). Since most
words are absent, the feature vector for each document is mostly zero, and
so the entire matrix is mostly zero. Such matrices can be stored eﬃciently in
sparse-column format, where we store only the nonzero entries and the coor-
dinates where they occur. Now when we compute inner products, we sum only
over the nonzero entries.

COORDINATE DESCENT

115

Penalty strength. The default formulation applies the same penalty param-
eter λ to each term in the model. It is a simple matter to include a relative
penalty strength γj

0 per variable, making the overall penalty

≥

λ

p
X

j=1

γjPα(βj).

(5.50)

This allows for some γj to be zero, which means those variables are always in
the model, unpenalized.

Parameter bounds. Coordinate descent also makes it easy to set upper and
lower bounds on each parameter:

βj

≤

Uj,

(5.51)

Lj

≤
Uj

Lj

where typically
. For example, we sometimes want
to constrain all coeﬃcients to be nonnegative. One simply computes the coor-
dinate update, and if the parameter violates the bound, it is set to the closest
boundary.

−∞ ≤

≤ ∞

≤

≤

0

5.4.3 Logistic Regression and Generalized Linear Models

Here we move from squared-error loss to other members of the exponential
family—the so-called generalized linear models. For simplicity, we focus on the
most prominent (nonlinear) member of this class—namely, logistic regression.
In logistic regression, the response is binary, and can be modeled as a class
label G taking the values
1 or 1. The standard logistic model represents the
−
class probabilities as a linear model in the log-odds

log

1
Pr(G =
−
Pr(G = 1

|

x)
|
x)

= β0 + xT β.

(5.52)

See Section 3.2 for more detail.

We consider ﬁtting this model by regularized maximum (binomial) likeli-
xi) for the
hood. Introducing the shorthand notation p(xi; β0, β) = Pr(G = 1
|
probability (5.52) of observation i, we maximize the penalized log-likelihood

1
N

N
X

(cid:8)I(gi = 1) log p(xi; β0, β) + I(gi =

i=1

1) log(1

−

−

p(xi; β0, β))(cid:9)

λPα(β).

−

Denoting yi = I(gi =
the more explicit form

−

(5.53)
1), the log-likelihood part of (5.53) can be written in

‘(β0, β) =

1
N

N
X

i=1

h
yi

·

(β0 + xT

i β)

−

log(1 + eβ0+xT

i
i β)

,

(5.54)

which corresponds to a concave function of the parameters. By way of

116

OPTIMIZATION METHODS

background, the Newton algorithm for maximizing the (unpenalized) log-
likelihood (5.54) amounts to iteratively reweighted least squares. Hence,
if the current estimates of the parameters are ( eβ0, eβ), we form a second-
order Taylor expansion about current estimates. In terms of the shorthand
˜p(xi) = p(xi; eβ0, eβ), and wi = ˜p(xi)(1
˜p(xi)), this Taylor expansion leads to
the quadratic objective function

−

‘Q(β0, β) =

1
2N

−

N
X

i=1

wi(zi

β0

−

−

i β)2 + C(fβ0, eβ)2.
xT

(5.55)

i eβ + yi− ˜p(xi)

where zi = eβ0 + xT
˜p(xi)(1− ˜p(xi)) is the current working response. The
Newton update is obtained by minimizing ‘Q, which is a simple weighted-
least-squares problem. In order to solve the regularized problem, one could
apply coordinate descent directly to the criterion (5.53). A disadvantage of
this approach is that the optimizing values along each coordinate are not
explicitly available and require a line search. In our experience, it is better to
apply coordinate descent to the quadratic approximation, resulting in a nested
algorithm. For each value of λ, we create an outer loop which computes the
quadratic approximation ‘Q about the current parameters ( ˜β0, ˜β). Then we
use coordinate descent to solve the penalized weighted least-squares problem

minimize
(β0,β)∈Rp+1 {−

‘Q(β0, β) + λPα(β)
}

.

(5.56)

By analogy with Section 5.3.3, this is known as a generalized Newton algo-
rithm, and the solution to the minimization problem (5.56)) deﬁnes a proximal
Newton map (see the paper (Lee et al. 2014) for details). Overall, the proce-
dure consists of a sequence of nested loops:
outer loop: Decrement λ.
middle loop: Update the quadratic approximation ‘Q using the current pa-

rameters ( ˜β0, ˜β).

inner loop: Run the coordinate descent algorithm on the penalized

weighted-least-squares problem (5.56).

(cid:29)

When p

N , one cannot run λ all the way to zero, because the sat-
urated logistic regression ﬁt is undeﬁned (parameters wander oﬀ to
in
order to achieve probabilities of 0 or 1). Also, the Newton algorithm is not
guaranteed to converge without step-size optimization (Lee, Lee, Abneel and
Ng 2006). The glmnet program does not implement any checks for divergence;
this would slow it down, and when used as recommended, it does not seem to
be necessary. We have a closed form expression for the starting solutions, and
each subsequent solution is warm-started from the previous close-by solution,
which generally makes the quadratic approximations very accurate. We have
not encountered any divergence problems so far.

±∞

The glmnet package generalizes this procedure to other GLMs, such as

A SIMULATION STUDY

117

multiclass logistic regression, the Poisson log-linear model and Cox’s propor-
tional hazards model for survival data. More details are given in Chapter 3.
The speed of this procedure is studied in Section 5.5.

5.5 A Simulation Study

Both the coordinate descent algorithm and Nesterov’s composite gradient
method are simple and computationally eﬃcient approaches for solving the
lasso. How do they compare in terms of computational cost per iteration? If
(at a given iteration) the current iterate βt has k nonzero coeﬃcients, each
pass of coordinate descent over all p predictors (using naive updating) takes
(pN + kN ) operations. On the other hand, the generalized gradient up-
(kN ) operations to compute the matrix-vector product
Xβ), again a total of

O
date (5.31) requires
Xβ, and then

(pN ) to compute the product XT (y

O

−

(pN + kN ) operations.

O

O

In order to examine more closely the relative eﬃciency of coordinate de-
scent, proximal gradient descent, and Nesterov’s momentum method, we car-
ried out a small simulation study.3 We generated an N
p predictor matrix
X with standard Gaussian entries and pairwise correlation 0 or 0.5 between
1))2] with
the features. Coeﬃcients βj were deﬁned by
u = pπ/20 and alternating signs +1,
1, +1, . . .. Then the outcome yi was
generated as

= exp[

.5(u(j

βj
|

−

−

−

×

|

yi =

p
X

j=1

xijβj + σεi

(5.57)

with σ chosen so that the signal to noise ratio Sd[E(yi)]/σ equals 3. Table 5.1
shows the average (standard error) of CPU times for coordinate descent, gener-
alized gradient and Nesterov’s momentum methods, for a scenario with N > p
and another with N < p. Shown is the total time over a path of 20 values
of the regularization parameterλ. Warms starts were used in each case, with

Table 5.1 Lasso for linear regression: Average (standard error) of CPU times over
ten realizations, for coordinate descent, generalized gradient, and Nesterov’s momen-
tum methods. In each case, time shown is the total time over a path of 20 λ values.

N = 10000, p = 100

N = 200, p = 10000

Correlation
Coordinate descent
Proximal gradient
Nesterov

0
0.110 (0.001)
0.218 (0.008)
0.251 (0.007)

0.5
0.127 (0.002)
0.671 (0.007)
0.604 (0.011)

0
0.298 (0.003)
1.207 (0.026)
1.555 (0.049)

0.5
0.513 (0.014)
2.912 (0.167)
2.914 (0.119)

convergence deﬁned as the maximum change in the parameter vector being
less than 10−4. An approximate backtracking line search was used for the

3We thank Jerome Friedman for the programs used in this section.

118

OPTIMIZATION METHODS

Table 5.2 Lasso for logistic regression: average (standard error) of CPU times over
ten realizations, for coordinate descent, generalized gradient, and Nesterov’s momen-
tum methods. In each case, time shown is the total time over a path of 20 λ values.

N = 10000, p = 100

N = 200, p = 10000

Correlation
Coordinate descent
Proximal gradient
Nesterov

0
0.309 (0.086)
2.023 (0.018)
1.482 (0.020)

0.5
0.306 (0.086)
6.955 (0.090)
2.867 (0.045)

0
0.646 (0.006)
2.434 (0.095)
2.910 (0.106)

0.5
0.882 (0.026)
4.350 (0.133)
8.292 (0.480)

latter two methods. We see that coordinate descent is 2–6 times faster than
the other methods, with a greater speedup in the p > N case. Interestingly,
momentum does not provide a consistent speedup over proximal gradient de-
scent, as the aforementioned theory would suggest. Our investigation into this
suggests that the warm starts are the reason: by starting close to the solution,
the “zig-zagging”, that is ameliorated by the momentum term, is not nearly
as much of a problem as it is when starting far from the solution.

Table 5.2 shows the corresponding results for logistic regression. The pre-
dictors were generated as before, but now there are 15 nonzero βj with alter-
P xijβj))
nating signs, and
|
we generate 0/1 yi with Prob(yi = 1) = pi.

j + 1. Then deﬁning pi = 1/(1 + exp(

= 15

βj

−

−

|

We see that coordinate descent is 5–10 times faster than the other methods,
with a greater speedup in the p > N case. Again, momentum does not provide
a consistent speedup over proximal gradient descent.

The reader should take comparisons like those above with a grain of salt, as
the performance of a method will depend on the details of its implementation.
Further suspicion should arise, since two of the authors of this text are co-
authors of the method (coordinate descent) that performs best. For our part,
we can only say that we have tried to be fair to all methods and have coded all
methods as eﬃciently as we could. More importantly, we have made available
all of the scripts and programs to generate these results on the book website,
so that the reader can investigate the comparisons further.

5.6 Least Angle Regression

Least angle regression, also known as the homotopy approach, is a procedure
for solving the lasso with squared-error loss that delivers the entire solution
path as a function of the regularization parameter λ. It is a fairly eﬃcient
algorithm, but does not scale up to large problems as well as some of the other
methods in this chapter. However it has an interesting statistical motivation
and can be viewed as a kind of “democratic” version of forward stepwise
regression.

Forward stepwise regression builds a model sequentially, adding one vari-
able at a time. At each step, it identiﬁes the best variable to include in the
active set, and then updates the least-squares ﬁt to include all the active vari-

LEAST ANGLE REGRESSION

119

ables. Least angle regression (LAR) uses a similar strategy, but only enters “as
much” of a predictor as it deserves. At the ﬁrst step it identiﬁes the variable
most correlated with the response. Rather than ﬁt this variable completely,
the LAR method moves the coeﬃcient of this variable continuously toward
its least-squares value (causing its correlation with the evolving residual to
decrease in absolute value). As soon as another variable catches up in terms
of correlation with the residual, the process is paused. The second variable
then joins the active set, and their coeﬃcients are moved together in a way
that keeps their correlations tied and decreasing. This process is continued
until all the variables are in the model, and ends at the full least-squares ﬁt.
The details are given in Algorithm 5.1. Although the LAR algorithm is stated
in terms of correlations, since the input features are standardized, it is equiva-
lent and easier to work with inner products. The number of terms K at step 3
1, the LAR algorithm reaches a zero
requires some explanation. If p > N
residual solution after N
1 is because there is an intercept in
the model, and we have centered the data to take care of this).

−
1 steps (the

−

−

Algorithm 5.1 Least Angle Regression.
1. Standardize the predictors to have mean zero and unit ‘2 norm. Start with
¯y, β0 = (β1, β2, . . . , βp) = 0.
2. Find the predictor xj most correlated with r0; i.e., with largest value for
, and XA, the

. Call this value λ0, deﬁne the active set

the residual r0 = y

xj, r0

=

−

A

j
{

}

|h
matrix consisting of this single variable.

i|

3. For k = 1, 2, . . . , K = min(N

1, p) do:

−

(a) Deﬁne the least-squares direction δ = 1

Ark−1, and de-
ﬁne the p-vector ∆ such that ∆A = δ, and the remaining elements are
zero.

AXA)−1XT

(XT

λk−1

(b) Move the coeﬃcients β from βk−1 in the direction ∆ toward their least-
λk−1,

λ)∆ for 0 < λ

squares solution on XA: β(λ) = βk−1 + (λk−1
keeping track of the evolving residuals r(λ) = y
(λk−1

−

Xβ(λ) = rk−1

≤

−

−

, identify the largest value of λ
at which a variable “catches up” with the active set; if the variable has
index j, that means

= λ. This deﬁnes the next “knot” λk.

xj, r(λ)

x‘, r(λ)

for ‘ /

∈ A

|h

i|

λ)XA∆.
−
(c) Keeping track of

(d) Set

=

A

A ∪

4. Return the sequence

|h

i|

j, βk = β(λk) = βk−1 + (λk−1
K
0 .
}

λk, βk

{

λk)∆, and rk = y

−

Xβk.

−

We make a few observations to clarify the steps in the algorithm. In step 3b,
= λ1—that is, the correlations remain
it is easy to check that
tied along this path, and decrease to zero with λ. In fact β0 = βk−1 + λk−1∆
is the least-squares coeﬃcient vector corresponding to the subset

XA, r(λ)

|h

i|

By construction the coeﬃcients in LAR change in a piecewise linear fash-
ion. Figure 5.9 [left panel] shows the LAR coeﬃcient proﬁle evolving as a

.
A

120

OPTIMIZATION METHODS

Figure 5.9 Left panel shows the LAR coeﬃcient proﬁles on the simulated data, as
a function of the L1 arc length. The right panel shows the lasso proﬁle. They are
identical until the red coeﬃcient crosses zero at an arc length of about 16.

function of their ‘1 arc length. 4 Note that we do not need to take small steps
and recheck the correlations in step 3c. Variable ‘ “catching up” means that

x‘, r(λ)

= λ, a pair of equations linear in λ. We solve for λ for each ‘ /

|h
and pick the largest (Exercise 5.9).

i|

∈ A

The right panel of Figure 5.9 shows the lasso coeﬃcient proﬁles on the
same data. They are almost identical to those in the left panel, and diﬀer
for the ﬁrst time when the pink coeﬃcient passes back through zero. These
observations lead to a simple modiﬁcation in step 3c of the LAR algorithm
that gives the entire lasso path, which is also piecewise-linear:

3(c)+ lasso modiﬁcation: If a nonzero coeﬃcient crosses zero before the next
and recompute the current joint least-

variable enters, drop it from
squares direction.

A

Notice in the ﬁgure that the pink coeﬃcient remains zero for a while, and then
it becomes active again, but this time negative.

We can give a heuristic argument for why these procedures are so similar.

As observed, we have at any stage of the algorithm

xT

j (y

Xβ(λ)) = λ

j
∀
indicates the sign of the inner-product, and λ is the com-

,
∈ A

(5.58)

sj,

−

·

where sj

1, 1
}

∈ {−

4The ‘1 arc-length of a diﬀerentiable curve {s 7→ β(s) | s ∈ [0, S]} is given by
TV(β, S) = R S
k ˙β(s)k1ds, where ˙β(s) = ∂β(s)/∂s. For the piecewise-linear LAR coeﬃ-
cient proﬁle, this amounts to summing the ‘1-norms of the changes in coeﬃcients from step
to step.

0

051015−1.5−1.0−0.50.00.51.01.5CoefficientsLeast Angle Regression05101520−1.5−1.0−0.50.00.51.01.5CoefficientsLassoℓ1ArcLengthℓ1ArcLengthALTERNATING DIRECTION METHOD OF MULTIPLIERS

121

mon value. Also by deﬁnition of the LAR active set,

. Now consider the lasso criterion5

A

xT
k (y
|

−

Xβ(λ))

λ

k

∀

6∈

| ≤

2
2 + λ
k
be the active set of variables in the solution for a given value of λ. For

Let
these variables R(β) is diﬀerentiable, and the stationarity conditions give

R(β) = 1

(5.59)

β
k

Xβ

2 k

1.

−

B

y

k

xT

j (y

Xβ) = λ

sign(βj),

j
∀

.

−

∈ B

·
Comparing (5.60) with (5.58), we see that they are identical only if the sign
of βj matches the sign of the inner product. That is why the LAR algorithm
and lasso start to diﬀer when an active coeﬃcient passes through zero; condi-
tion (5.60) is violated for that variable, and it is removed from the active set
in step 3(c)+. Exercise 5.9 shows that these equations imply a piecewise-
B
linear coeﬃcient proﬁle as λ decreases, as was imposed in the LAR update.
The stationarity conditions for the nonactive variables require that

(5.60)

xT

k (y

|

Xβ)

λ,

k

∀

,

6∈ B

| ≤

−

(5.61)

which again agrees with the LAR algorithm.

The LAR algorithm exploits the fact that the coeﬃcient paths for the lasso
are piecewise linear. This property holds for a more general class of problems;
see Rosset and Zhu (2007) for details.

5.7 Alternating Direction Method of Multipliers

The alternating direction method of multipliers (ADMM) is a Lagrangian-
based approach that has some attractive features for large-scale applications.
It is based on a marriage of diﬀerent ideas that developed over a long period
of time. Here we provide a brief overview, referring the reader to Boyd et
al. (2011) for a comprehensive discussion.

Consider a problem of the form

minimize
β∈Rm,θ∈Rn

f (β) + g(θ)

subject to Aβ + Bθ = c,

(5.62)

∈

→

R and g : Rn

→
Rn×d are (known) matrices of constraints, and c

Rn×d and
where f : Rm
Rd is a constraint
B
∈
Rd of Lagrange
vector. To solve this problem we introduce a vector µ
multipliers associated with the constraint, and then consider the augmented
Lagrangian

R are convex functions, and A

∈

∈

Lρ(β, θ, µ) : = f (β) + g(θ) +

µ, Aβ + Bθ
h

+

c
i

−

ρ
2 k

Aβ + Bθ

c

2
2, (5.63)
k

−

5We have omitted the factor 1
of λ are hence larger by a factor of N .

N , to stay faithful to the original LAR procedure; all values

122

OPTIMIZATION METHODS

where ρ > 0 is a small ﬁxed parameter. The quadratic term involving ρ is an
augmented Lagrangian that enforces the constraint in a smoother fashion. The
ADMM algorithm is based on minimizing the augmented Lagrangian (5.63)
successively over β and θ, and then applying a dual variable update to µ.
Doing so yields the updates

βt+1 = arg min
β∈Rm
θt+1 = arg min

θ∈Rn

Lρ(β, θt, µt)

Lρ(βt+1, θ, µt)

µt+1 = µt + ρ (cid:0)Aβt+1 + Bθt+1

c(cid:1) ,

−

(5.64a)

(5.64b)

(5.64c)

for iterations t = 0, 1, 2, . . .. The update (5.64c) can be shown to be a dual
ascent step for the Lagrange multiplier vector µ. Under relatively mild condi-
tions, one can show that this procedure converges to an optimal solution to
Problem (5.62).

The ADMM framework has several advantages. First, convex problems
with nondiﬀerentiable constraints can be easily handled by the separation of
parameters into β and θ. We illustrate this procedure via application to the
lasso, as discussed in the example to follow. A second advantage of ADMM is
its ability to break up a large problem into smaller pieces. For datasets with
large number of observations we break up the data into blocks, and carry out
the optimization over each block. As discussed in more detail in Exercise 5.12,
constraints are included to ensure that the solution vectors delivered by the
optimization over each data block agree with one another at convergence. In
a similar way, the problem can be split up into feature blocks, and solved in
a coordinated blockwise fashion.

Example 5.8. ADMM for the lasso. The Lagrange form of the lasso can be
expressed in equivalent form as

minimize
β∈Rp,θ∈Rp

(cid:26) 1
2 k

y

Xβ

2
2 + λ
k
k

θ

1

k

−

(cid:27)

such that β

θ = 0.

−

(5.65)

When applied to this problem, the ADMM updates take the form

βt+1 = (XT X + ρI)−1(XT y + ρθt
θt+1 =
Sλ/ρ(βt+1 + µt/ρ)
θt+1).
µt+1 = µt + ρ(βt+1

µt)

−

(5.66)

−
Thus, the algorithm involves a ridge regression update for β, a soft-
thresholding step for θ and then a simple linear update for µ. The ﬁrst step
is the main work, and after an initial singular value decomposition of X,
(p3)
subsequent iterations can be done quickly. The initial SVD requires
operations, but can be done oﬀ-line, whereas subsequent iterations have cost
(N p). Consequently, after the start-up phase, the cost per iteration is similar

O

O
to coordinate descent or the composite gradient method.

♦

MINORIZATION-MAXIMIZATION ALGORITHMS

123

5.8 Minorization-Maximization Algorithms

In this section, we turn to a class of methods, known either as minorization-
maximization or majorization-minimization (MM) algorithms, that are espe-
cially useful for optimization of nonconvex functions. These belong to the class
of auxiliary-variable methods, in that they are based on introducing extra vari-
ables and using them to majorize (or upper bound) the objective function to
be minimized. Although these methods apply more generally to constrained
problems, here we describe them in application to a simple unconstrained
problem of the form minimizeβ∈Rp f (β), where f : Rp
R is a (possibly)
nonconvex function.
A function Ψ : Rp

R1 majorizes the function f at a point β

Rp

Rp

→

if

×

7→

∈

f (β)

≤

Ψ(β, θ)

for all θ

Rp

∈

(5.67)

with equality holding when β = θ. (Naturally, there is a corresponding deﬁ-
nition of minorization, with the inequality reversed in direction.) Figure 5.10
shows a schematic of a majorizing function.

Figure 5.10 Illustration of a majorizing function for use in an MM algorithm. The
function Ψ(β, θ) lies on or above f (β) for all β and is equal to f (β) when β = θ.
The MM algorithm seeks to minimize the target function f by solving a sequence of
subproblems involving the majorizing function Ψ and the current iterate.

An MM algorithm for performing an unconstrained minimization of f in-

volves initializing β0, and then updating via the recursion

βt+1 = arg min

β∈Rp

Ψ (cid:0)β, βt(cid:1)

for t = 0, 1, 2, . . ..

(5.68)

By the majorization property (5.67), this scheme generates a sequence for
which the cost f (βt) is nonincreasing. In particular, we have

f (βt) = Ψ(βt, βt)

(i)

≥

Ψ(βt+1, βt)

(ii)

≥

f (βt+1),

(5.69)

βθf(β)Ψ(β,θ)124

OPTIMIZATION METHODS

where inequality (i) uses the fact that βt+1 is a minimizer of the function
Ψ(β, βt), and inequality (ii) uses the majorization property (5.67). If the
β
original function f is strictly convex, it can be shown the MM algorithm
converges to the global minimizer.

7→

There are diﬀerent classes of majorizing functions that are useful for dif-
ferent problems. In general, a good majorization function is one for which
the update (5.68) is relatively easy to compute, at least relative to direct
minimization of f . See Lange (2004) for more details.

Example 5.9. Proximal gradient as an MM algorithm. Recall
from Sec-
tion 5.3.3 the proximal gradient algorithm that can be applied to cost functions
that decompose as a sum f = g + h, where g is convex and diﬀerentiable, and
h is convex and (potentially) nondiﬀerentiable. By applying a second-order
Taylor series expansion (with remainder) to g, we obtain

f (β) = g(β) + h(β)

= g(θ) +

g(θ), θ

+

β

i

−

h∇

(cid:10)θ

1
2

β,

∇

−

2g(cid:0)β0(cid:1)(cid:0)θ

−

β(cid:1)(cid:11) + h(β),

where β0 = sβ + (1
condition (5.27) on the gradient
Hessian, namely

−
2g(β0)

s)θ for some s

∇

∇

(cid:22)

[0, 1]. It can be veriﬁed that Lipschitz
g implies a uniform upper bound on the

∈

L Ip×p, from which we obtain the inequality

f (β)

≤

g(θ) +

|

g(θ), θ

h∇

−

β

+

i
{z
Ψ(β,θ)

L
2 k

θ

−

β

2
2 + h(β)
k
}

,

with equality holding when θ = β. Thus, we see that the proximal gradi-
ent method can be viewed as an MM algorithm with a particular choice of
majorizing function.

♦
Apart from a direct bound on the Hessian, there are other ways of deriving
majorizing functions, For example, Jensen’s inequality can be used to derive
the usual EM algorithm as an instance of an MM algorithm (Hunter and
Lange 2004, Wu and Lange 2007). As we discuss in Chapter 8, MM algorithms
turn out to be useful in procedures for sparse multivariate analysis.

5.9 Biconvexity and Alternating Minimization

Recall the class of coordinate descent algorithms discussed in Section 5.4.
Algorithms of this form are also useful for optimizing a class of (potentially)
nonconvex functions known as biconvex functions. A function f : Rm
R
is biconvex if for each β
f (α, β) is convex, and for each
n, the function α
∈
Rm, the function β
f (α, β) is convex. Of course, any function that
α
is jointly convex in the pair (α, β) is also biconvex. But a function can be
biconvex without being jointly convex. For instance, consider the biconvex
function

Rn

7→

→

7→

×

∈

f (α, β) = (1

αβ)2 for

−

α

|

| ≤

2,

β
|

| ≤

2.

(5.70)

BICONVEXITY AND ALTERNATING MINIMIZATION

125

As illustrated in Figure 5.11, it is convex when sliced along lines parallel to
the axes, as required by the deﬁnition of biconvexity, but other slices can lead
to nonconvex functions.

Figure 5.11 Example of a biconvex function. Shown in the top left is the function
f (α, β) = (1 − αβ)2 over the range −2 ≤ α, β ≤ 2. The top right and bottom left
panels show slices of the function for β = 2 and α = −1. The bottom right panel
shows the function along the line α = β = t.

More generally, let

sets, and let

C ⊆ A × B

Rm and
B ⊆
A ⊆
. For each ﬁxed α

Rn be two nonempty and convex
, the sets

and β

∈ A
β : =

∈ B

α

{

∈ A |

(α, β)

∈ C}

(5.71)

α : =
C

β
{

(α, β)

,

and

∈ C}

∈ B |
are called the α and β sections of
set if the section
for every β
∈ B
function if the function α
the function β

7→

α is convex for each α
C

. Given a biconvex set

C

C
. The set

∈ A

C ⊆ A × B
, and the section

, a function f :
f (α, β) is convex in α for each ﬁxed β

C →

C

f (α, β) is convex in β for each ﬁxed α

7→

Given these ingredients, a biconvex optimization problem has the form
, and the objective

is biconvex on

minimize(α,β)∈C f (α, β), where the set
function is biconvex on

.

C

A×B

The most obvious method for solving a biconvex optimization problem is

C

is called a biconvex
β is convex
R is a biconvex
, and

C

∈ B

.
∈ A

−2−10120510152025−2−101202468−2−101202468ααββf(α,2)f(−1,β)f(t,t)tf(α,β)126

OPTIMIZATION METHODS

based on Alternate Convex Search (ACS), which is simply block coordinate
descent applied to the α and β blocks:
(a) Initialize (α0, β0) at some point in
(b) For iterations t = 0, 1, 2, . . .:

C

.

∈

1. Fix β = βt, and perform the update αt+1
∈
2. Fix α = αt+1, and perform the update βt+1

arg minα∈Cβt f (α, βt).
arg minβ∈Cαt+1 f (αt+1, β).
Given the biconvex structure, each of the two updates involve solving a convex
optimization problem. The ACS procedure will be eﬃcient as long as these
convex sub-problems can be solved relatively quickly.
∞
By construction, the sequence of function values
t=0 is nonin-
}
, then the function
creasing. Consequently, if f is bounded from below over
values converge to some limiting value. We note that this form of convergence
is relatively weak, and only ensures that the function values converge. The so-
lution sequence
may not converge, and in some cases may diverge to
inﬁnity. Assuming convergence, to what does the solution sequence converge?
Since a biconvex function f need not be convex in general, we cannot expect
it to converge to the global minimum. All we can say in general is that if it
converges, it converges to a partial optimum.
More speciﬁcally, we say that (α∗, β∗)

is a partial optimum if

(αt, βt
{

f (αt, βt)

C

}

{

f (α∗, β∗)
f (α∗, β∗)

f (α∗, β)
f (α, β∗)

≤

≤

∈ C
for all β

for all α

α∗ , and
β∗ .

∈ C

∈ C

Example 5.10. Alternating subspace algorithm. One biconvex problem in which
convergence of ACS can be fully characterized is the alternating subspace al-
gorithm for computing the maximal singular vectors/value of a matrix. Given
Rm×n, consider the problem of ﬁnding the best rank-one ap-
a matrix X
proximation in the Frobenius norm.6 This approximation problem can be
formulated in terms of minimizing the objective function

∈

f (α, β, s) =

X
−
k
Rn, with
over vectors α
2 = 1, and a scalar
k
s > 0. The ACS procedure for this problem starts with any random unit-
norm initialization for β0, and then for iterations t = 1, 2, . . ., it performs the
updates

k
2 =
k

Rm and β

(5.72)

α
k

β
k

∈

∈

s αβT

2
F

αt =

Xβt−1
Xβt−1
k

2
k

,

and βt =

XT αt
XT αt
k

k

.

2

(5.73)

Xβt
The scalar s can be computed as s =
2 at convergence. It can be shown
k
k
(see Exercise 5.13 that as long as β0 is not orthogonal to the largest right

6The Frobenius norm of a matrix is the Euclidean norm applied to its vectorized version.

SCREENING RULES

127

singular vector, the iterates (αt, βt) converge to the left and right singular
vectors of X corresponding to the largest singular value of X.

The procedure is related to the power method for ﬁnding the largest eigen-
vector of a symmetric positive semi-deﬁnite matrix. The βt iterates for the
right singular vector have the form

βt+1 =

XT Xβt
XT Xβt
k

2
k

,

(5.74)

with similar updates for αt in terms of XXT . Consequently, the procedure
simply “powers up” the operator XT X, with the normalization driving all
but the largest eigenvalue to zero. See De Leeuw (1994) and Golub and Loan
(1996,

7.3) for further details on the power method.

♦
In Chapter 7, we present Algorithm 7.2 on page 189 as another example

§

of an ACS procedure.

5.10 Screening Rules

As seen in Section 5.6, inner products play an important role in the lasso
problem. For simplicity we assume all variables are mean centered (so we can
ignore the intercept), and we consider solving the lasso problem7

minimize
β∈Rp

1
2 k

y

Xβ

2
2 + λ
k

β
k

1
k

−

(5.75)

i|

|h

i|

|h

−

ˆyλ

xj, y

xj, y

with a decreasing sequence of values for λ. The ﬁrst variable to enter the
model has largest absolute inner-product λmax = maxj
, which also
deﬁnes the entry value for λ. Also, at any stage, all variables xj in the active
= λ, and all those out have smaller inner-products with
set have
the residuals. Hence one might expect a priori that predictors having small
inner products with the response are not as likely to have a nonzero coeﬃcient
as compared to those with larger inner products. Based on this intuition, one
might be able to eliminate predictors from the problem, and thereby reduce
the computational load. For example, in some genomic applications we might
have millions of variables (SNPs), and anticipate ﬁtting models with only a
handful of terms. In this section, we discuss screening rules that exploit this
intuition, and have the potential to speed up the computation substantially
while still delivering the exact numerical solution.

We begin our discussion with the “dual polytope projection” (DPP) rule
(Wang, Lin, Gong, Wonka and Ye 2013). Suppose we wish to compute a lasso
solution at λ < λmax. The DPP rule discards the jth variable if

j y

xT
|

|

< λmax

x

2
k

k

y

2
k

− k

λ

λmax
λ

−

(5.76)

7In this section we have omitted the 1

N in the ﬁrst part of the objective (to match the

referenced formulas); this increases the scale of λ by a factor N .

128

OPTIMIZATION METHODS

It may come as a surprise that such a rule can work, as it surprised us
when we ﬁrst saw it. We know that in a linear regression, a predictor can
be insigniﬁcant on its own, but can become signiﬁcant when included in the
model with other predictors. It seems that the same phenomenon should occur
with the lasso.

In fact, there is no contradiction, and a similar rule applies at any stage of
the regularization path (not just the start). Suppose we have the lasso solution
ˆβ(λ0) at λ0, and we wish to screen variables for the solution at λ < λ0. Then if

(cid:12)
(cid:12)xT
j

(cid:0)y

−

X ˆβ(λ0)(cid:1)(cid:12)

(cid:12) < λ0

x

y
k

k

2

2

k

− k

λ0

λ

,

−
λ

(5.77)

variable j is not part of the active set at λ. We refer to this as the sequential
DPP rule.

Figure 5.12 shows the performance of this rule on a simulated example
with 5000 predictors (details in caption). The global DPP applies rule (5.76)
for all values of λ, and we can see it quickly runs out of steam. By the time
λ is small enough to admit 8 predictors into the model, all 5000 predictors
survive the screen. But the sequential DPP rule is much more aggressive, and
even with 250 predictors in the model, only 1200 need to be considered. So
the sequential screening rule (5.77) works much better if λ0 and λ are close
together. We derive the lasso dual and the DPP rules in Appendix B on
Page 132.

In order to achieve even better performance, it is natural to consider screen-
ing rules that are less conservative, and allow for occasional failures. Such rules
can be incorporated as part of an overall strategy that still yields the exact so-
lution upon termination. A variant of the global DPP rule (5.76) is the global
strong rule, which discards predictor j whenever

xT

j y

|

|

< λ

−

(λmax

−

λ) = 2λ

λmax.

−

(5.78)

This tends to discard more predictors than the global DPP rule (compare
blue with orange points in Figure 5.12.) Similarly the sequential strong rule
discards the jth predictor from the optimization problem at λ if

(cid:12)
(cid:12)xT
j

(cid:0)y

−

X ˆβ(λ0)(cid:1)(cid:12)

(cid:12) < 2λ

λ0.

−

(5.79)

λ.

Intuitively, the active set will include predictors that can achieve inner-product
λ with the residuals. So we include all those that achieve inner product close
to λ using the current residuals at λ0 > λ, where close is deﬁned by the gap
λ0

−
As with the sequential DPP rule, the sequential strong rule is based on
solving the lasso over a grid of decreasing λ values. Figure 5.12 includes the
global and sequential strong rules. In both cases they dominate the DPP coun-
terparts. Neither of the strong rules make any errors in this example, where an
error means that it discards some predictor with a nonzero coeﬃcient in the

SCREENING RULES

129

Figure 5.12 Lasso regression: Results of diﬀerent rules applied to a simulated
dataset. There are N = 200 observations and p = 5000 uncorrelated Gaussian pre-
dictors; one-quarter of the true coeﬃcients are nonzero. Shown are the number of
predictors left after screening at each stage, plotted against the number of predictors
in the model for a given value of λ. The value of λ is decreasing as we move from left
to right. In the plots, we are ﬁtting along a path of 100 decreasing λ values equally
spaced on the log-scale, A broken line with unit slope is added for reference. The
proportion of variance explained by the model is shown along the top of the plot.
There were no violations for either of the strong rules.

050100150200250010002000300040005000Number of Predictors in ModelNumber of Predictors after Filteringglobal DPPglobal STRONGsequential DPPsequential STRONGPercent Variance Explained00.150.30.490.670.750.820.890.960.970.99111130

OPTIMIZATION METHODS

actual solution. The sequential strong rule (5.79) has remarkable performance,
discarding almost all of the redundant predictors.

|

xT

j y

We now give further motivation for the strong rules (Tibshirani, Bien,
Friedman, Hastie, Simon, Taylor and Tibshirani2 2012). Suppose that predic-
tor j is not in the model at λ = λmax. The KKT conditions for the lasso then
< λmax, so that the global rule (5.78) can be interpreted as
ensure that
X ˆβ(λ))
dictating that as we move from λmax to λ, the inner product
|
λ. Consequently, if the inner product is below
can increase by at most λmax
the strong bound λ
λ), it cannot reach the necessary level λ for
(λmax
inclusion in the model, where we have again used the KKT conditions in our
X ˆβ(λ)), then for either the global or
reasoning. If we deﬁne cj(λ) : = xT
sequential strong rules to hold, it would be suﬃcient to have

j (y

j (y

−
−

xT

−

−

−

|

|

(cid:12)
(cid:12)
(cid:12)

dcj(λ)
dλ

(cid:12)
(cid:12)
(cid:12) ≤

1,

(5.80)

assuming that this derivative exists.8 Now the KKT conditions at λ are

cj(λ) = λ sj(λ),

for j = 1, 2, . . . , p,

(5.81)

where sj(λ) = sign( ˆβj(λ)) if ˆβj(λ)
the chain rule

= 0 and sj(λ)

[

−

∈

1, 1] if ˆβj(λ) = 0. By

dcj(λ)
dλ

= sj(λ) + λ

dsj(λ)
dλ

.

·

dcj (λ)

|

dλ | ≤

If we ignore the second term, then we have
1. Now the second term
equals zero when a variable has a nonzero coeﬃcient in an interval of λ values,
for then sj(λ) is constant (equaling
1). In addition, the slope condition (5.80)
always holds if (XT X)−1 is diagonally dominant (Tibshirani et al. 2012), a
condition meaning that the predictors are nearly uncorrelated. In general,
however, the slope condition can fail over short stretches of λ, and in these
instances, the strong rules can fail (i.e., discard predictors in error). However
these failures are rare, and are virtually nonexistent when p

N .

±

In summary, we have found empirically that the strong rules, and especially
the sequential strong rule (5.79) seem to be very good heuristics for discarding
variables. This is the case in the lasso, lasso-penalized logistic regression, and
the elastic net.

One can use the sequential strong rule to save computation time, without
sacriﬁcing the exact solution, as follows. We compute the solution along a ﬁne
grid of decreasing λ values. For each value of λ, the screening rule is applied,
yielding a subset of the predictors. Then the problem is solved using only this
subset. The KKT conditions (5.81) for all predictors are then checked. If they
are satisﬁed, we are done. Otherwise the predictors that violate the conditions

8The arguments here are only heuristic, because dcj (λ)/dλ and dsj (λ)/dλ discussed

below it do not exist at ˆβj (λ) = 0.

(cid:29)

6
BIBLIOGRAPHIC NOTES

131

are added to the active set and the problem is solved again. In principle this
must be iterated until no violations occur.

This approach is eﬀective computationally because violations of the strong
N . Tibshirani et al. (2012)
rule turn out to be rare, especially when p
implement these rules for the coordinate descent approach in glmnet and the
generalized gradient and Nesterov ﬁrst-order methods. They report speedup
factors in the range from 2 to 80, depending on the setting.

(cid:29)

Finally, suppose instead that we are interested in a more general convex

problem of the form

minimize
β

(cid:8)f (β) + λ

r
X

j=1

cj

βj
k

pj
k

(cid:9).

(5.82)

Here f is a convex and diﬀerentiable function, and β = (β1, β2, . . . βr) with
each βj being a scalar or a vector. Also λ
1 for
each j = 1, . . . r. Then given λ0 > λ, the sequential strong rule for discarding
predictor j takes the form

0, and cj

0, pj

≥

≥

≥

(cid:13)
(cid:13)

∇

jf (cid:0) ˆβ(λ0)(cid:1)(cid:13)
(cid:13)qj

< cj(2λ

λ0),

−

(5.83)

where

∇
pj and

jf ( ˆβ) = (∂f ( ˆβ)/∂βj1, . . . ∂f ( ˆβ)/∂βjm) where 1/pj + 1/qj = 1 (i.e.,
qj are dual norms). The rule (5.83) can be applied to a wide
k · k
variety of problems, including logistic regression and other generalized linear
models, the group lasso and the graphical lasso.

k · k

Bibliographic Notes

The behavior of descent algorithms, including convergence proofs for methods
based on appropriate stepsize selection rules, such as limited minimization
or the Armijo rule, is a classical subject in optimization; see Chapters 1 and
2 of Bertsekas (1999) for more details. Further background on Lagrangian
methods and duality can be found in Bertsekas (1999), as well as Boyd and
Vandenberghe (2004). Rockafellar (1996) provides a more advanced treat-
ment of convex duality and convex analysis. Nesterov (2007) derives and an-
alyzes the generalized gradient method (5.21) for composite objectives; see
also Nesterov’s book (2004) for related analysis of projected gradient meth-
ods. Minorization-maximization procedures, also known as auxiliary function
methods, are discussed in Lange (2004) and Hunter and Lange (2004).

Gorski, Pfeuﬀer and Klamroth (2007) provide an overview of biconvex
functions, and alternating algorithms for optimizing them. El Ghaoui, Vial-
lon and Rabbani (2010) introduced the use of screening rules such as (5.76);
inspired by this work, we derived a very similar formula, and which led to
our development of the strong rules in Section 5.10. However, the more recent
DPP rules of Wang, Lin, Gong, Wonka and Ye (2013) dominate these earlier
safe rules, and provide a simple sequential formula. Fu (1998) was an early
proponent of coordinate descent for the lasso.

132

OPTIMIZATION METHODS

Appendix A: The Lasso Dual

In this appendix, we derive a useful dual of the lasso primal problem (2.5),
which we write in a slightly more convenient form

Lasso Primal: minimize

β∈Rp

1
2 k

y

Xβ

2
2 + λ
k

β
k

1.
k

−

(5.84)

Introducing the residual vector r = y
tion (5.84) as

−

Xβ, we can rewrite the primal Equa-

minimize
β∈Rp

1
2 k

r

2
β
2 + λ
k

k

k

1 subject to r = y

Xβ.

−

(5.85)

Letting θ
problem can be written as

∈

RN denote a Lagrange multiplier vector, the Lagrangian of this

L(β, r, θ) : =

1
2 k

r

2
β
2 + λ
k

k

1

k

−

θT (r

−

y + Xβ).

(5.86)

The dual objective is derived by minimizing this expression (5.86) with respect
to β and r. Isolating those terms involving β, we ﬁnd

θT Xβ + λ

min
β∈Rp −

β
k

1 =
k

(

0

−∞

XT θ
if
∞
k
k
otherwise

λ

≤

(5.87)

where

XT θ
k

k

∞ = maxj

j θ

xT
|

. Next we isolate terms involving r and ﬁnd
|
1
2 k

θT r =

2
2 −

θT θ,

1
2

−

r

k

(5.88)

min
r

with r = θ. Substituting relations (5.87) and (5.88) into the Lagrangian rep-
resentation (5.86), we obtain

Lasso Dual: maximize

θ

1
2 {k

y

2
2 − k
k

y

θ

2
2}
k

−

subject to

XT θ
k

∞
k

≤

λ. (5.89)

λ =

Overall, this form of the lasso dual amounts to projecting y onto the feasi-
XT θ
ble set
λ is the intersection of the 2p half-
.
∞
k
∈
F
}
p
j=1, a convex-polytope in RN . In the language
spaces deﬁned by
λ
}
of Section 5.3.3, the solution is given by the proximal map θ∗ = proxI(Fλ)(y).
Figure 5.13 provides an illustration of this geometric interpretation.

| k
| ≤

RN
xT

θ
{

j θ

≤

{|

F

λ

Appendix B: Derivation of the DPP Rule

Here we derive the sequential DPP screening rule (5.77); our proof follows
that in Wang, Lin, Gong, Wonka and Ye (2013). We ﬁrst modify the lasso
dual via a change of variables φ = θ/λ, leading to

maximize
θ

1
2

(cid:8)
k

y

2
2 −
k

λ2

y/λ
k

−

2
φ
2
k

(cid:9) subject to

XT φ

k

∞
k

≤

1.

(5.90)

APPENDIX

133

Figure 5.13 The Lagrange dual of the lasso, with G(θ) = 1
2). The
blue shaded region is the feasible set Fλ. The unconstrained dual solution is θ0 = y,
the null residual. The dual solution θ∗ = proxI(Fλ)(y), the projection of y onto the
convex set Fλ.

2 − ky − θk2

2 (kyk2

Theorem 5.1. Suppose we are given a solution ˆφ(λ0) to the lasso dual (5.90)
λ0 > 0. Let λ be a nonnegative value diﬀerent from λ0.
for a speciﬁc λmax
≥
If the following holds:

xT
j
|

ˆφ(λ0)
|

< 1

xj

2
k

k

y

2
k

− k

(cid:12)
(cid:12)
(cid:12)
(cid:12)

1
λ0 −

(cid:12)
(cid:12)
(cid:12)
(cid:12)

1
λ

,

(5.91)

then ˆβj(λ) = 0.

Since ˆφ(λ0) = (y

−

X ˆβ(λ0))/λ0, simple algebra leads to (5.77).

Proof: We know from the stationarity conditions for the lasso that

xT
j
|

ˆφ(λ)
|

< 1 =

⇒

bβj(λ) = 0.

(5.92)

From the dual (5.90), ˆφ(λ) is the projection of y/λ into the feasible set
λ.
By the projection theorem (Bertsekas 2003) for closed convex sets, ˆφ(λ) is
continuous and nonexpansive, which implies

F

ˆφ(λ)

k

−

ˆφ(λ0)

2
k

≤

=

(cid:13)
(cid:13)
(cid:13)

y
λ −
(cid:12)
(cid:12)
(cid:12)
(cid:12)

k

2

(cid:13)
(cid:13)
(cid:13)2

y
λ0
1
λ −

1
λ0

(cid:12)
(cid:12)
(cid:12)
(cid:12)

.

(5.93)

y
k

|xT1θ|=λ|xT2θ|=λ|xT5θ|=λ|xT4θ|=λ|xT3θ|=λθ∗θ0=yG(θ)=G(θ∗)Dualfeasibleset|xTjθ|≤λ∀jOPTIMIZATION METHODS

xT
j

ˆφ(λ)

xT
j

| ≤ |
<

xj
k

2
k

k

−
ˆφ(λ)

=

xj

≤ k

y
k

2
k

2

k

ˆφ(λ0)
|
ˆφ(λ0)

−
(cid:12)
(cid:12)
(cid:12)
(cid:12)

1
λ0 −

+

xT
j
|
2 + 1
k
(cid:12)
1
(cid:12)
(cid:12)
λ
(cid:12)

+ 1

ˆφ(λ0)
|
xj

− k

2
k

y

k

2
k

xj

y
k

2
k

2

k

− k

(5.94)

= 1.

(cid:12)
1
(cid:12)
(cid:12)
λ
(cid:12)
(cid:12)
1
(cid:12)
(cid:12)
λ
(cid:12)

(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)

1
λ0 −
1
λ0 −

134

Then

xT
j

ˆφ(λ)

|

Exercises

Ex. 5.1 Consider the unconstrained minimization of the quadratic function
f (β) = 1
0 is a symmetric positive deﬁnite matrix,
and b
(a) Show that the optimal solution β∗ exists and is unique, and specify its

2 βT Qβ
Rp.

, where Q

β, b

− h

(cid:31)

∈

i

form in terms of (Q, b).

(b) Write out the gradient descent updates with constant stepsize s for this

problem.

(c) Show that there exists some constant c > 0, depending only on Q, such

that gradient descent converges for any ﬁxed stepsize s

(0, c).

∈

Ex. 5.2 Consider the constrained program minimize f (β) subject to gj(β)
for j = 1, . . . , m, and let f ∗ be its optimal value.
Deﬁne the Lagrangian function

0

≤

L(β; λ) = f (β) +

m
X

j=1

λjgj(β).

(5.95)

(a) Show that

L(β; λ) =

sup
λ≥0

(

f (β)
+

∞

if gj(β)
≤
otherwise.

0 for j = 1, . . . , m

(b) Use part (a) to show that f ∗ = inf β supλ≥0 L(β; λ).
(c) How is f ∗ related to the quantity supλ≥0 inf β L(β, λ)?

→

Ex. 5.3 Let f : Rp
a subspace constraint of the form
is a ﬁxed matrix, and c
(a) Suppose that β∗

R be a convex and diﬀerentiable function, and consider
Rm×p

Rp
=
Rm is a ﬁxed vector.
satisﬁes the ﬁrst-order optimality condition (5.4).
Rm such that

Show that there must exist a vector λ∗

M β = c
}

, where M

∈
∈ C

β
{

∈

∈

C

|

∈

f (β∗) + M T λ∗ = 0

∇

(5.96)

EXERCISES

135

(b) Conversely, suppose that condition (5.96) holds for some λ∗

∈
that the ﬁrst-order optimality condition (5.4) must be satisﬁed.

Rm. Show

Ex. 5.4 Consider the Lagrangian L(β, λ) = f (β) + Pm
j=1 λjgj(β) associated
with the constrained problem (5.5), and assume that the optimal value f ∗ is
ﬁnite. Suppose that there exist vectors β∗

Rm

+ such that

Rp and λ∗

∈

∈

L(β∗, λ)

(i)

≤

L(β∗, λ∗)

(ii)

≤

L(β, λ∗)

(5.97)

for all β
program.

∈

Rp and λ

∈

Rm

+ . Show that β∗ is optimal for the constrained

2 =

qPp

Ex. 5.5 Subgradient of Euclidean norm. Consider the Euclidean or ‘2 norm
β
k
(a) For any β
.

j , which is used in the group lasso. Show that:

2 is diﬀerentiable with
k

= 0, the norm g(β) : =

j=1 β2

g(β) =

∇

β

k

k

β
kβk2

(b) For β = 0, any vector bs

ferential of g at 0.

∈

Rp with

kbs
2
k

≤

1 is an element of the subdif-

Ex. 5.6 Show that the function

h(β1, . . . , βp) =

β
|

T P
|

|

β

|

in Equation (5.40) satisﬁes the regularity conditions below Equation (5.39) on
page 111. (As a consequence, coordinate descent will still work even though
this function is not separable).

Ex. 5.7 Show that the proximal-gradient update step (5.21) is equal to the
step (5.19)

Ex. 5.8 Show that when h is given by the nuclear norm, the composite gradient
update (5.26) can be obtained by the following procedure:

(a) Compute the singular value decomposition of the input matrix Z, that
is a diagonal matrix of the singular

is Z = UDVT where D = diag
values.

σj(Z)
}

{

(b) Apply the soft-thresholding operator (5.25) to compute the “shrunken”

singular values

γj : =

sλ(σj(Z)),

S

for j = 1, . . . , p.

(c) Return the matrix bZ = U diag

γ1, . . . , γp

{

VT .
}

6
136

OPTIMIZATION METHODS

Ex. 5.9 Consider a regression problem with all variables and response having
mean zero and standard deviation one in the dataset. Suppose also that each
variable has identical absolute correlation with the response—that is

1
N |h

xj, y

i|

= λ,

for all j = 1, . . . , p.

Let bβ be the least-squares coeﬃcient vector of y on X, assumed to be unique
for this exercise. Let u(α) = αX ˆβ for α
[0, 1] be the vector that moves a
2
fraction α toward the least-squares ﬁt u. Let RSS =
2, the residual
X bβ
k
sum-of-squares from the full least-squares ﬁt.

−

∈

k

y

(a) Show that

1
N |h

xj, y

u(α)

i|

−

= (1

−

α)λ for j = 1, . . . , p,

and hence the correlations of each xj with the residuals remain equal in
magnitude as we progress toward u.

(b) Show that these correlations are all equal to

λ(α) =

q

(1

−

(1

α)

−
α)2 + α(2−α)

N

λ,

RSS ·

·

and hence they decrease monotonically to zero.

(c) Use these results to show that the LAR algorithm in Section 5.6 keeps

the correlations tied and monotonically decreasing.

Ex. 5.10 Consider step 3c of the LAR Algorithm 5.1. Deﬁne c‘ =
and a‘ =

. Deﬁne

, ‘ /

x‘, rk−1
h

i

x‘, XAδ
h

i

∈ A

α‘ = min+

(cid:26) λk−1
1

c‘

,

λk−1 + c‘
1 + a‘

−
a‘

(cid:27)

,

−
where min+ only considers positive entries. Show that the variable to enter at
step k has index j = arg min‘ /∈A α‘, with value λk = λk−1

αj.

−

Ex. 5.11 Strong rules

(a) Show that if the slope condition (5.80) holds, then the global and sequen-

tial strong rules (5.78) and (5.79) are guaranteed to work.

(b) In the case of orthogonal design XT X = I, show that the slope condition

(5.80) always holds.

(c) Design a simulation study to investigate the accuracy of the DPP and
strong rules for the lasso, in the cases (N, p) = (100, 20), (N, p) = (100, 100),
and (N, p) = (100, 1000).

EXERCISES

137

}

Ex. 5.12 ADMM for consensus optimization: Suppose that we have a dataset
N
y)
i=1, and that our goal is to minimize an objective function L(Xβ
xi, yi
{
that decomposes additively as a sum of N terms, one for each sample. A
natural approach is to divide the dataset into B blocks, and denote by
yb) the objective function over the bth block of data, where Xb
Lb(Xbβb
and yb are the corresponding blocks of X and y. We thus arrive at the prob-
lem

−

−

minimize
β∈Rp

( B
X

b=1

Lb(Xbβb

−

)

yb) + r(θ)

such that βb = θ for all b = 1, . . . B.

(a) Show that the ADMM algorithm for this problem takes the form

βt+1
b ←
θt+1

←

µt+1
b ←

arg min
βb

arg min
θ

(cid:0)Lb(Xbβb

−

(cid:0)r(z) + (N ρ/2)
k

βb

yb) + (ρ/2)
k
¯βt+1

θ

−

−

(cid:1)

2
θt + µt
2
bk

(cid:1)

2
2
k

−
¯µt

b + (βt+1
µt

b −

θt+1)

(5.98)

(5.99a)

(5.99b)

(5.99c)

where the ¯µk and ¯βk+1 denote averages over blocks. Interpret it as consensus
optimization.

(b) Now consider the lasso, which uses the regularizer r(θ) = λ
k

that the algorithm has the form

θ

k

1. Show

(XT

b Xb + ρI)−1(Xbyb + ρ(θt

βt+1
b ←
θt+1
µt+1
b ←

← Sλ/(ρN )( ¯βt+1 + ¯µt)
b + (βt+1
θt+1)
µt
b −

µt

b))

−

(5.100a)

(5.100b)

(5.100c)

(c) Implement the updates (5.100) in software and demonstrate it on a nu-

merical example.

Ex. 5.13

(a) Derive the alternating convex minimization (ACS) for problem (5.72), and
show that it has the form of a power iteration (Equations (5.73) and (5.74)).

(b) Show that it converges to the eigenvector corresponding to the largest
eigenvalue of XT X, provided that the starting vector v0 is not orthogonal
to this largest eigenvector.

Chapter 6

Statistical Inference

An attractive feature of ‘1-regularized procedures is their ability to combine
variable selection with parameter ﬁtting. We often select a model based on
cross-validation—as an estimate for prediction or generalization error—and
then do further validation on a held-out test set.

It is sometimes of interest to determine the statistical strength of the in-
cluded variables, as in “p-values” in traditional models. The adaptive nature of
the estimation procedure makes this problem diﬃcult—both conceptually and
analytically. We describe some useful approaches to the inference problem in
this chapter. We begin by discussing two “traditional” approaches—Bayesian
methods and the bootstrap, and then present some newer approaches to this
problem.

6.1 The Bayesian Lasso

The Bayesian paradigm treats the parameters as random quantities, along
with a prior distribution that characterizes our belief in what their values
might be. Here we adopt the approach of Park and Casella (2008), involving
a model of the form

β, λ, σ

y

|

λ, σ

β

|

∼

∼

N (Xβ, σ2IN ×N )
p
Y

e− λ

σ |βj |,

λ
2σ

j=1

(6.1a)

(6.1b)

using the i.i.d. Laplacian prior (6.1b). Under this model, it is easy to show
that the negative log posterior density for β

y, λ, σ is given by

1
2σ2 k

y

Xβ

2
2 +
k

−

|
λ
σ k

β

1,

k

(6.2)

where we have dropped an additive constant independent of β. Consequently,
for any ﬁxed values of σ and λ, the posterior mode coincides with the lasso
estimate (with regularization parameter σλ). Park and Casella (2008) include
σ2 in the prior speciﬁcation (6.1b) for technical reasons. Here we have as-
sumed there is no constant in the model, and that the columns of X are

139

140

STATISTICAL INFERENCE

Figure 6.1 Prior and posterior distribution for the seventh variable in the diabetes
example, with λ held ﬁxed. The prior in the ﬁgure is a double exponential (Laplace)
distribution with density proportional to exp(−.0065|β7|). The prior rate .0065 is a
representative value just for illustration.

mean-centered, as is y.1 The posterior distribution provides more than point
estimates: it provides an entire joint distribution.

The red curve in Figure 6.1 is the Laplace prior used in the Bayesian
lasso, applied to variable β7 in the “diabetes data.” These data consist of
observations on 442 patients, with the response of interest being a quantitative
measure of disease progression one year after baseline. There are ten baseline
variables—age, sex, body-mass index, average blood pressure, and six blood
serum measurements—plus quadratic terms, giving a total of 64 features. The
prior has a sharp peak at zero, which captures our belief that some parameters
are zero. Given a probability distribution (likelihood) for the observed data
given the parameters, we update our prior by conditioning on the observed
data, yielding the posterior distribution of the parameters. The histogram in
Figure 6.1 characterizes the posterior distribution for β7 for the diabetes data.
The prior distribution has a variance parameter that characterizes the strength
of our belief in zero as a special value. The posterior mode is slightly away
from zero, although a 95% posterior credible interval comfortably covers zero.
Exact Bayesian calculations are typically intractable, except for the simplest
of models. Fortunately, modern computation allows us to use Markov chain
Monte Carlo (MCMC) to eﬃciently sample realizations from the posterior
distributions of the parameters of interest. Figure 6.2 [left panel] shows a
λ; the
summary of MCMC samples from the posterior distribution of β
median of 10, 000 posterior samples is shown at each of 100 values of λ. Here

|

1This is not a real restriction on the model, and is equivalent to assuming an improper

ﬂat prior on β0, which is rarely of interest.

Posterior Density−1.0−0.50.00.51.00.00.51.01.52.02.53.03.5β7THE BAYESIAN LASSO

141

Figure 6.2 Bayesian lasso on the diabetes data. The left plot shows the posterior
medians from MCMC runs (conditional on λ). The right plot shows the lasso pro-
ﬁle. In the left plot, the vertical line is at the posterior median of kβk1 (from an
unconditional model), while for the right plot the vertical line was found by N-fold
cross-validation.

∼

1
σ2 is allowed to vary (with π(σ2)
σ2 ). This, and the fact that we have
displayed medians, accounts for the slight discrepancies with the right plot
(the lasso), which shows the posterior mode for ﬁxed values of σλ. A complete
Bayesian model will also specify a prior distribution for λ; in this case, a
diﬀuse Gamma distribution is conjugate and hence convenient for the MCMC
sampling. This is where the Bayesian approach can be worth the considerable
extra eﬀort and leap of faith. The full posterior distribution includes λ as well
as β, so that model selection is performed automatically. Furthermore, the
posterior credible intervals for β take into account the posterior variability in
λ. Figure 6.3 shows a summary of 10, 000 MCMC samples from the posterior
distribution for the diabetes data. While the posterior mode has nine nonzero
coeﬃcients, the posterior distributions suggest that only 5–8 of these are well
separated from zero.

Specifying the Bayesian model is technically challenging, and there are
several choices to be made along the way. These include priors for λ and σ2,
which themselves have hyperparameters that have to be set. Our examples
were ﬁt in R using the function blasso in the package monomvn (Gramacy
2011), and for the most part we used the default parameter settings. For

0.00.51.01.52.0−0.4−0.20.00.20.4Posterior MediansCoefficients123456789100.00.51.01.52.0−0.4−0.20.00.20.4LassoCoefficients12345678910kβk1kβk1142

STATISTICAL INFERENCE

Figure 6.3 Posterior distributions for the βj and kβk1 for the diabetes data. Sum-
mary of 10, 000 MCMC samples, with the ﬁrst 1000 “burn-in” samples discarded.

this 442
10 problem it took 5 seconds on a 2.3 GHz Macbook Pro. However,
Bayesian computations do not scale well; experiments in the next section show
that the computational cost scales roughly as

(p2).

×

O

6.2 The Bootstrap

The bootstrap is a popular nonparametric tool for assessing the statistical
properties of complex estimators (Efron 1979, Efron and Tibshirani 1993). To
motivate its use, suppose that we have obtained an estimate bβ(ˆλCV ) for a
lasso problem according to the following procedure:

1. Fit a lasso path to (X, y) over a dense grid of values Λ =

λ‘
{

L
‘=1.
}

2. Divide the training samples into 10 groups at random.
3. With the kth group left out, ﬁt a lasso path to the remaining 9/10ths, using

the same grid Λ.

4. For each λ
group.

∈

Λ compute the mean-squared prediction error for the left-out

5. Average these errors to obtain a prediction error curve over the grid Λ.
6. Find the value bλCV that minimizes this curve, and then return the coeﬃ-

cient vector from our original ﬁt in step (1) at that value of λ.

|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||−0.6−0.4−0.20.00.20.40.6Bayesian Posterior SamplesCoefficientsDensity0.00.51.01.52.00.00.51.01.52.02.53.0β1β2β3β4β5β6β7β8β9β10kβk1THE BOOTSTRAP

143

Figure 6.4 [Left] Boxplots of 1000 bootstrap realizations of bβ∗(ˆλCV ) obtained by the
nonparametric bootstrap, which corresponds to re-sampling from the empirical CDF
bFN . Comparing with the corresponding Bayesian posterior distribution in Figure 6.3,
we see a close correspondence in this case. [Right] Proportion of times each coeﬃcient
is zero in the bootstrap distribution.

How do we assess the sampling distribution of bβ(bλCV )? That is, we are inter-
ested in the distribution of the random estimate bβ(bλCV ) as a function of the
N
i=1. The nonparametric bootstrap is one method
(xi, yi)
N i.i.d. samples
}
{
for approximating this sampling distribution: in order to do so, it approxi-
mates the cumulative distribution function F of the random pair (X, Y ) by
the empirical CDF bFN deﬁned by the N samples. We then draw N sam-
ples from bFN , which amounts to drawing N samples with replacement from
the given dataset. Figure 6.4[left] shows boxplots of 1000 bootstrap realiza-
tions bβ∗(ˆλCV ) obtained in this way, by repeating steps 1–6 on each bootstrap
sample.2 There is a reasonable correspondence between this ﬁgure, and the
corresponding Bayesian results in Figure 6.3. The right plot shows the propor-
tion of times that each variable was exactly zero in the bootstrap distribution.
None of the Bayesian posterior realizations are exactly zero, although often
some are close to zero. (The blasso function has an argument that allows
for variable selection via “reversible jump” MCMC, but this was not used
here.) Similar to the right-hand plot, Meinshausen and B¨uhlmann (2010) pro-

2On a technical note, we implement the bootstrap with observation weights w∗

i = k/N ,
with k = 0, 1, 2, . . .. In cross-validation, the units are again the original N observations,
which carry along with them their weights w∗
i .

|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||−0.6−0.4−0.20.00.20.40.6Bootstrap SamplesCoefficientsBootstrap Probability of 00.00.20.40.60.81.0β1β1β2β2β3β3β4β4β5β5β6β6β7β7β8β8β9β9β10β10144

STATISTICAL INFERENCE

Figure 6.5 [Left] Cross-validation curve for lasso on the diabetes data, with one-
standard-error bands computed from the 10 realizations. The vertical line on the left
corresponds to the minimizing value for λ. The line on the right corresponds to the
one-standard-error rule; the biggest value of λ for which the CV error is within one
standard error of the minimizing value. [Right] 1000 bootstrap CV curves, with the
average in red, and one-standard-error bands in blue. The rug-plot at the base shows
the locations of the minima.

duce a stability plot for lasso under bootstrap resampling; as a function of λ
they display what fraction of times a variable is nonzero in the bootstrapped
coeﬃcient paths.

Figure 6.5 shows the bootstrapped cross-validation curves, and their min-
ima. Not surprisingly, the bootstrapped minima have a wide spread, since
the original CV curve is ﬂat over a broad region. Interestingly, the bootstrap
standard-error bands bear a close correspondence to those computed from the
original CV ﬁt in the left plot. Figure 6.6 shows pairwise plots of the boot-
strapped coeﬃcients. From such plots we can see, for example, how correlated
variables can trade oﬀ with each other, both in value and their propensity for
being zero.

In Table 6.2, we show comparative timings in seconds for problems with
N = 400 and diﬀerent numbers of predictors. We generated 1000 bootstrap
samples; for the Bayesian lasso we generated 2000 posterior samples, with the
idea of discarding the ﬁrst 1000 samples as a burn-in. While such comparisons
depend on implementation details, the relative growth with p is informative.
The Bayesian lasso is perhaps faster for small problems, but its complexity

−8−6−4−20.40.50.60.70.80.91.01.1Mean−Squared Error101091088776442−8−6−4−20.40.50.60.70.80.91.01.1Bootstrapped CV CurvesMean−Squared Errorlog(λ)log(λ)THE BOOTSTRAP

145

Figure 6.6 Pairwise plots of the bootstrapped coeﬃcients bβ∗(ˆλCV ). The red points
correspond to values that are zero on at least one coordinate for that plot. The samples
x5 and x6 have high correlation (0.9); we see the corresponding negative correlation
in their coeﬃcients, with zero playing a prominent role.

Table 6.1 Timings for Bayesian lasso and boot-
strapped lasso, for four diﬀerent problem sizes. The
sample size is N = 400.

p Bayesian Lasso Lasso/Bootstrap
163.8 secs
10
374.6 secs
50
14.7 mins
100
18.1 mins
200

3.3 secs
184.8 secs
28.6 mins
4.5 hours

−0.25−0.100.100.25−0.40.20.8−0.10.2−0.050.10−0.100.05−0.25−0.100.200.350.100.25−1.00.0−0.40.20.8−0.20.2−0.10.20.20.40.6−0.100.05−0.050.100.200.35−1.00.0−0.20.20.20.40.6β1β2β3β4β5β6β7β8β9β10146

STATISTICAL INFERENCE

O

O

seems to scale as
closer to

(p2). In contrast, the scaling of the bootstrap seems to be
(p), because it exploits the sparseness and convexity of the lasso.
The above procedure used the nonparametric bootstrap, in which we esti-
mate the unknown population F by the empirical distribution function bFN ,
the nonparametric maximum likelihood estimate of F . Sampling from bFN
corresponds to sampling with replacement from the data. In contrast, the
parametric bootstrap samples from a parametric estimate of F , or its corre-
sponding density function f . In this example, we would ﬁx X and obtain
estimates bβ and bσ2 either from the full least-squares ﬁt, or from the ﬁtted
lasso with parameter λ. We would then sample y values from the Gaussian
model (6.1a), with β and σ2 replaced by bβ and bσ2.

Using the full least-squares estimates for bβ and bσ2, the parametric boot-
strap results for our example are shown in Figure 6.7. They are similar to both
the nonparametric bootstrap results and those from the Bayesian lasso. In
general, we might expect that the parametric bootstrap would likely produce
results even closer to the Bayesian lasso as compared to the nonparametric
bootstrap, since the parametric bootstrap and Bayesian lasso both use the
assumed parametric form for data distribution (6.1a). Note also that the use
of the full least squares estimates for bβ and bσ2 would not work when p
N ,
and we would need to generate a diﬀerent dataset for each value of λ. This
would slow down the computations considerably.

(cid:29)

Figure 6.7 [Left] Boxplots of 1000 parametric bootstrap realizations of bβ∗(ˆλCV ).
Comparing with the corresponding Bayesian posterior distribution in Figure 6.3, we
again see a close correspondence. [Right] Proportion of times each coeﬃcient is zero
in the bootstrap distribution.

|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||−0.6−0.4−0.20.00.20.40.6Bootstrap SamplesCoefficientsBootstrap Probability of 00.00.20.40.60.81.0β1β1β2β2β3β3β4β4β5β5β6β6β7β7β8β8β9β9β10β10POST-SELECTION INFERENCE FOR THE LASSO

147

In summary, in this section we have compared the Bayesian and bootstrap
approach on a Gaussian linear-regression problem, for which Bayesian software
was available at the time of writing. As we move to GLMs and other models,
the Bayesian technical complexities grow. The bootstrap, on the other hand,
can be applied seamlessly in many situations. In a general sense, the similar
results for the Bayesian lasso and lasso/bootstrap are not surprising. The
histogram of values from the nonparametric bootstrap can be viewed as a kind
of posterior-Bayes estimate under a noninformative prior in the multinomial
model (Rubin 1981, Efron 1982).

Which approach is better? Both the Bayesian and bootstrap approaches
provide a way to assess variability of lasso estimates. The Bayesian approach
is more principled but leans more heavily on parametric assumptions, as com-
pared to the nonparametric bootstrap. The bootstrap procedure scales better
computationally for large problems. Some further discussion of the relation-
ship between Bayesian and bootstrap approaches is given in Efron (2011).

6.3 Post-Selection Inference for the Lasso

In this section we present some relatively recent ideas on making inference
after selection by adaptive methods such as the lasso and forward-stepwise
regression. The ﬁrst method we discuss in Section 6.3.1 pioneered a particu-
lar line of research, and has been followed in rapid succession by a series of
generalizations and improvements discussed in Section 6.3.2.

6.3.1 The Covariance Test

In this section we describe a method proposed for assigning p-values to predic-
tors as they are successively entered by the lasso. This method is based on the
LAR algorithm and its piecewise construction of the path of lasso solutions
(Section 5.6).

Suppose that we are in the usual linear regression setup, with an outcome

vector y

∈

RN and matrix of predictor variables X

RN ×p related by

∈

y = Xβ + (cid:15),

(cid:15)

N (0, σ2IN ×N ),

∼

(6.3)

∈

where β

Rp are unknown coeﬃcients to be estimated.

To understand the motivation for the covariance test, let’s ﬁrst consider
forward-stepwise regression. This procedure enters predictors one at a time,
choosing the predictor that most decreases the residual sum of squares at
each stage. Deﬁning RSSk to be the residual sum of squares for the model
containing k predictors, we can use this change in residual sum-of-squares to
form a test statistic

Rk =

1
σ2 (RSSk−1

−

RSSk)

(6.4)

148

STATISTICAL INFERENCE

(with σ assumed known for now), and compare it to a χ2

1 distribution.

Figure 6.8(a) shows the quantiles of R1 from forward stepwise regression
(the chi-squared statistic for the ﬁrst predictor to enter) versus those of a χ2
1
variate, in the fully null case (β = 0). The observed quantiles are much larger
than those of the χ2
1 distribution. A test at the 5% level, for example, using
the χ2

1 cutoﬀ of 3.84, would have an actual type I error of about 39%.

(a) Forward stepwise

(b) Lasso

Figure 6.8 A simulation example with N = 100 observations and p = 10 orthogonal
predictors and β = 0. (a) a quantile-quantile plot, constructed over 1000 simulations,
of the standard chi-squared statistic R1 in (6.4), measuring the drop in residual sum-
of-squares for the ﬁrst predictor to enter in forward stepwise regression, versus the χ2
1
distribution. The dashed vertical line marks the 95% quantile of the χ2
1 distribution.
(b) a quantile-quantile plot of the covariance test statistic T1 in (6.5) for the ﬁrst
predictor to enter in the lasso path, versus its asymptotic null distribution Exp(1).
The covariance test explicitly accounts for the adaptive nature of lasso modeling,
whereas the chi-squared test is not appropriate for adaptively selected models as in
forward-stepwise regression.

The reason for this is clear: the chi-squared test assumes that the models
being compared are pre-speciﬁed, not chosen on the basis of the data. But the
forward stepwise procedure has deliberately chosen the strongest predictor
among all of the available choices, so it is not surprising that it yields a larger
drop in training error than expected.

It seems diﬃcult to derive an appropriate p-value for forward stepwise
regression, one that properly accounts for the adaptive nature of the ﬁtting.
For the ﬁrst step and the test of the global null hypothesis, one can use a
permutation distribution. For subsequent steps, it is not clear how to correctly
carry out permutations. One can resort to sample splitting: we divide the data
in half, compute the sequence of models on one half and then evaluate their
signiﬁcance on the other half. But this can lead to a signiﬁcant loss of power,
unless the sample size is large.

ooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo02468100246810χ21R1ooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo012345012345Exp(1)T1POST-SELECTION INFERENCE FOR THE LASSO

149

Surprisingly, it turns out that for the lasso, a simple test can be derived
that properly accounts for the adaptivity. Denote the knots returned by the
LAR algorithm (Algorithm 5.1 on page 119) by λ1 > λ2 . . . > λK. These are
the values of the regularization parameter λ where there is a change in the set
of active predictors. Suppose that we wish to test signiﬁcance of the predictor
entered by LAR at λk. Let
k−1 be the active set (the predictors with nonzero
coeﬃcients) before this predictor was added and let the estimate at the end
of this step be ˆβ(λk+1). We reﬁt the lasso, keeping λ = λk+1 but using just
k−1. This yields the estimate ˆβAk−1(λk+1). The covariance
the variables in
test statistic is deﬁned by

A

A

Tk =

1
σ2 ·

(cid:16)

h

y, X ˆβ(λk+1)

y, X ˆβAk−1 (λk+1)
i

i − h

(cid:17)

.

(6.5)

This statistic measures how much of the covariance between the outcome and
the ﬁtted model can be attributed to the predictor that has just entered the
model; i.e., how much improvement there was over the interval (λk, λk+1) in
this measure. Interestingly, for forward-stepwise regression, the corresponding
covariance statistic is equal to Rk (6.4); however, for the lasso this is not the
case (Exercise 6.2).

Remarkably, under the null hypothesis that all k

1 signal variables are
in the model, and under general conditions on the model matrix X, for the
predictor entered at the next step we have

−

Tk

d
→

Exp(1)

(6.6)

→ ∞

as N, p
. Figure 6.8(b) shows the quantile-quantile plot for T1 ver-
sus Exp(1). When σ2 is unknown, we estimate it using the full model:
ˆσ2 = 1
N −p RSSp. We then plug this into (6.5), and the exponential test be-
comes an F2,N −p test.

Table 6.2 shows the results of forward stepwise regression and LAR/lasso
applied to the diabetes data. Only the ﬁrst ten steps are shown in each case.
We see that forward stepwise regression enters eight terms at level 0.05, while
the covariance test enters only four. However as we argued above, the forward
stepwise p-values are biased downward, and hence they are not trustworthy. In
Exercise 6.3 we discuss a method for combining a set of sequential p-values to
control the false discovery rate of the list of selected predictors. When applied
to the covariance test at an FDR of 5%, it yields a model containing the ﬁrst
four predictors. For comparison, cross-validation estimated the optimal model
size for prediction to be in the range of 7 to 14 predictors.

Why is the mean of the forward-stepwise statistic R1 much larger than one,
while the mean of T1 is approximately equal to one? The reason is shrinkage:
the lasso picks the best predictor available at each stage, but does not ﬁt it
fully by least squares. It uses shrunken estimates of the coeﬃcients, and this
shrinkage compensates exactly for the inﬂation due to the selection. This test
is also the natural analogue of the degrees of freedom result for the lasso and

150

STATISTICAL INFERENCE

Table 6.2 Results of forward stepwise regression and LAR/lasso applied to the di-
abetes data introduced in Chapter 2. Only the ﬁrst ten steps are shown in each case.
The p-values are based on (6.4), (6.5), and (6.11), respectively. Values marked as 0
are < 0.01.

Forward Stepwise

LAR/lasso

Step Term

p-value

Term

p-value

1
2
3
4
5
6
7
8
9
10

bmi
ltg
map
age:sex
bmi:map
hdl
sex
glu2
age2
tc:tch

0
0
0
0
0
0
0
0.02
0.11
0.21

bmi
ltg
map
hdl
bmi:map
age:sex
glu2
bmi2
age:map
age:glu

Covariance
0
0
0
0.02
0.27
0.72
0.48
0.97
0.88
0.95

Spacing
0
0
0.01
0.02
0.26
0.67
0.13
0.86
0.27
0.44

LAR, discussed in Section 2.5. The lasso with k nonzero coeﬃcients has k
degrees of freedom in expectation, and LAR spends one degree of freedom in
each segment (λk+1, λk) along the path. The covariance test has mean equal
to one, the degrees of freedom per step. In a sense, the Exp(1) distribution is
the analogue of the χ2
1 distribution, for adaptive ﬁtting.

The exponential limiting distribution for the covariance test (6.5) requires
certain conditions on the data matrix X, namely that the signal variables
(having nonzero true coeﬃcients) are not too correlated with the noise vari-
ables. These conditions are similar to those needed for support recovery for
the lasso (Chapter 11). In the next section we discuss a more general scheme
that gives the spacing test, whose null distribution holds exactly for ﬁnite N
and p, and works for any X.

6.3.2 A General Scheme for Post-Selection Inference

b

Ay

Here we discuss a general scheme for inference after selection—one that yields
exact p-values and conﬁdence intervals in the Gaussian case. It can deal with
any procedure for which the selection events can be characterized by a set of
linear inequalities in y. In other words, the selection event can be written as
for some matrix A and vector b. In particular, it can be applied to
{
successive steps of the LAR algorithm, where it gives an exact (ﬁnite sample)
form of the covariance test. Similarly, it can be applied to forward stepwise
regression, and to the lasso at a ﬁxed choice of the regularization parameter λ.
Why can the selection events for these procedures be written in the form
? This is easiest to see for forward-stepwise regression. In this case we
}

Ay

≤

≤

}

{

b

POST-SELECTION INFERENCE FOR THE LASSO

151

−

−

take b = 0. At the ﬁrst step, forward-stepwise regression chooses the predictor
whose absolute inner product with y is the largest (see Figure 6.10 for an
illustration). This can be expressed by forming 2(p
1) rows in the matrix
A, each computing a diﬀerence of inner products, once each for the positive
and negative directions. Similarly, at the next step we add 2(p
2) rows
contrasting the inner product between the selected predictor and the other
p

2 predictors, and so on.
The lasso solution at a ﬁxed value of λ is characterized by an active set of
variables
, along with the signs of their coeﬃcients. Again, it turns out that
the selection event that led to this particular combination can be written in
the form
corresponds
to the values of the outcome vector y that would yield this same collection
of active variables and signs (with X ﬁxed) (see Lee, Sun, Sun and Taylor
(2013), and Exercise 6.10). The same is true for the LAR algorithm after its
kth step.

for some A and b. That is, the set

Ay
{

y
{

b
}

Ay

A

≤

≤

−

}

b

|

∼

b
}

Ay
{

Now suppose that y

N (µ, σ2IN ×N ), and that we want to make infer-
ences conditional on the event
. In particular, we wish to make
≤
inferences about ηT µ, where η might depend on the selection event. With
lasso, LAR, or forward-stepwise regression having selected this set, we can
now make inference statements about the selected variables. For example,
we could be interested in the (ordinary) regression coeﬃcients of y on XA,
namely ˆθ = (XT
Ay. These correspond to the population parameters
θ = (XT
Aµ, the coeﬃcients in the projection of µ on XA. So here
ηT µ could correspond to one of these coeﬃcients, and hence η is one of the
columns of XA(XT

AXA)−1. We pursue this example in Section 6.3.2.1.

AXA)−1XT

AXA)−1XT

Lee, Sun, Sun and Taylor (2013) and Taylor, Lockhart, Tibshirani2 and

Tibshirani (2014) show that

−(y)

b

≤

=

Ay

0
}
{V
{
and furthermore, ηT y and (
0(y)) are statistically indepen-
V
dent. See Figure 6.9 for a geometric view of this surprising result, known as
the polyhedral lemma. The three values on the right in (6.7) are computed via

≤
−(y),

+(y),

(6.7)

≤ V

≥

V

V

V

}

,

+(y),

0(y)

ηT y

α =

Aη
2
η
2
k

k
−(y) = max
j:αj <0

+(y) = min
j:αj >0
0(y) = min
j:αj =0

(bj

V

V

V

bj

bj

(Ay)j + αjηT y

αj

(Ay)j + αjηT y

αj
(Ay)j)

−

−

−

(6.8)

(Exercise 6.7). Hence the selection event
is equivalent to the event
that ηT y falls into a certain range, a range depending on A and b. This
equivalence and the independence means that the conditional inference on

Ay

≤

}

{

b

152

STATISTICAL INFERENCE

Figure 6.9 Schematic illustrating the polyhedral lemma (6.7), for the case N = 2
and kηk2 = 1. The yellow region is the selection event {Ay ≤ b}. We decompose y
as the sum of two terms: its projection Pηy onto η (with coordinate ηT y) and its
projection onto the (N − 1)-dimensional subspace orthogonal to η: y = Pηy + Pη⊥ y.
Conditioning on Pη⊥ y, we see that the event {Ay ≤ b} is equivalent to the event
{V −(y) ≤ ηT y ≤ V +(y)}. Furthermore V +(y) and V −(y) are independent of ηT y
since they are functions of Pη⊥ y only, which is independent of y.

ηT µ can be made using the truncated distribution of ηT y, a truncated normal
distribution.

To use this fact, we deﬁne the cumulative distribution function (CDF) of

a truncated normal distribution with support conﬁned to [c, d]:

F c,d

µ,σ2 (x) =

Φ((x
Φ((d

µ)/σ)
µ)/σ)

Φ((c
Φ((c

−
−

−
−

−
−

µ)/σ)
µ)/σ)

,

(6.9)

with Φ the CDF of the standard Gaussian. Now the CDF of a random variable,
evaluated at the value of that random variable, has a uniform distribution.
Hence we can write

F V −,V +
ηT µ, σ2kηk2
2

(cid:0)ηT y(cid:1)

Ay

| {

b

≤

} ∼

U(0, 1).

(6.10)

−

This result is used to make conditional inferences about any linear functional
ηT µ. For example, we can compute a p-value for testing ηT µ = 0. We can
α level selection interval for θ = ηT µ by inverting this
also construct a 1
test, as follows. Let P (θ) = F V −,V +
. The lower boundary
Ay
}
≤
of the interval is the largest value of θ such that 1
α/2, and the
P (θ)
−
upper boundary is the smallest value of θ such that P (θ)

≤
Example 6.1. To help understand these results, we present an example. We
simulated N = 60 observations from the model Y = Pp
j=1 Xjβj + Z, with
X1, X2, . . . , Xp, Z
N (0, 1), and each standardized to have sample mean
zero and unit ‘2 norm. We considered the global null case with all βj = 0, and

(cid:0)ηT y(cid:1)

θ, σ2kηk2
2

≤
α/2.

| {

∼

b

V+(y)V−(y)Pη⊥yPηyηTyyη{Ay≤b}POST-SELECTION INFERENCE FOR THE LASSO

153

Figure 6.10 Selection regions in Example 6.1 for which λ1 = hx1, yi. Left panel: two
orthogonal predictors; right panel: three correlated predictors. The red line indicates
the part of the set Pη⊥ y + tη inside the selection region. In the left panel, V −(y) =
hx2, yi, while in the right it is λ2.

∈ {

2, 5, 10, 20, 50
}

found the predictor j1 having largest absolute inner product with y. This is the
ﬁrst variable to enter the LAR or lasso path. We wish to make inference on λ1,
the value of the largest knot in LAR, under the global null hypothesis. Thus
η = xj1 and ηT y is the attained inner product (for simplicity we condition
on a positive sign for the inner-product). Note that with our standardization,
ηT y = xT
y is also the simple least-squares coeﬃcient of y on the chosen xj1 ,
j1
and so we are also making (conditional) inference on the population coeﬃcient
in the simple regression of y on xj1. We chose ﬁve scenarios with number of
predictors p
. We also considered two correlation patterns
for the predictors: uncorrelated and pairwise correlation 0.5. Figure 6.10 il-
lustrates the corresponding version of Figure 6.9 for the two situations. The
− depends on y in
upper bound in all cases is
each simulation. In the orthogonal case (left panel), conditioning on Pη⊥ y re-
, for all predictors k not achieving
duces to conditioning on the values of
|
|
the maximum absolute inner product. Hence the lower bound on ηT y is the
second-largest among these. The right panel shows the nonorthogonal case,
with correlations between the Xj. Here the situation is slightly more complex,
−(y): it turns out
but nevertheless a simple formula can be used to derive
to be λ2, the second knot in the LAR sequence (Exercise 6.11). Figure 6.11
shows the resulting truncated normal densities from (6.10), averaged over 100
− over the simu-
simulations. We plotted the density for the average value of
lations. The colored squares along the bottom show the average largest inner
product λ1 = ηT y in each setting. In the lower panel, with larger p, the eﬀec-
tive number of variables is smaller due to the correlation, so the maximum is
smaller as well. We pursue this example further in Section 6.3.2.2.

, and the lower bound

♦
This general mechanism (6.10) allows one to make inferences about any

xT
k y

+ =

∞

V

V

V

V

x1x2∞hx1,yiV−(y)yV−(y)x1x2x3∞hx1,yiy154

STATISTICAL INFERENCE

Figure 6.11 Simulation: N = 60 observations from the model with X1, X2, . . . Xp ∼
N (0, 1), Y = P
j Xijβj +Z with Z ∼ N (0, 1), with all βj = 0; two diﬀerent predictor-
correlation settings. The selection chooses the predictor j1 having largest absolute
inner product with y. Shown is the truncated density on the left-hand side of (6.10)
for p = 2, 5, 10, 20, 50. The colored squares along the bottom show the average largest
inner product in each setting.

linear functional ηT µ; for example, inferences about any parameter ηT µ at
a given step of the LAR algorithm, or at a lasso solution computed at λ.
The form of A and b is diﬀerent depending on the setting, but otherwise
the construction is the same. We illustrate two applications in the next two
sections.

6.3.2.1 Fixed-λ Inference for the Lasso

Consider the solution to the lasso, at some ﬁxed value of λ. We can apply
result (6.10) by constructing A and b so that the event
represents
the set of outcome vectors y that yield the observed active set and signs of the
predictors selected by the lasso at λ. These inequalities derive from the sub-
gradient conditions that characterize the solution (Exercise 6.10). This yields
an active set
of variables, and we can now make conditional inference on the
population regression coeﬃcients of y on XA, for example. This means we will
perform a separate conditional analysis for η equal to each of the columns of
AXA)−1. Hence we can obtain exact p-values and conﬁdence intervals
XA(XT
for the parameters of the active set in the lasso solution at λ. These quantities

Ay

A

≤

{

}

b

012340.00.51.01.52.0Densityp=2p=5p=10p=20p=50Uncorrelated Predictors012340.00.51.01.52.0DensityPairwise Correlation 0.5POST-SELECTION INFERENCE FOR THE LASSO

155

have the correct type-I error and coverage conditional on the membership and
signs of the active set.3

Figure 6.12 Lasso model ﬁt to the diabetes data. The solution at λ = 7 yields a
model with seven nonzero coeﬃcients. Shown are the 95% conﬁdence intervals for the
least-squares ﬁt using the chosen variables. The OLS intervals ignore the selection,
while the lasso intervals are exact under a Gaussian assumption, and condition on
the selection event. Disclosure: λ was selected by cross-validation (1 SE rule), and
σ2 in (6.10) was estimated using the residuals from the full regression on all 64
variables.

Figure 6.12 shows the result of ﬁxed-λ lasso inference for the diabetes data
with λ = 7; seven variables were selected. Notice that we now focus attention
on the OLS regression coeﬃcients using the reduced model containing only
those seven predictors. The blue intervals are based on the usual multiple
regression normal theory, ignoring the fact that we used the data to select
the seven variables from the full set of 64. The red post-selection intervals
were constructed by inverting relationship (6.10), and take the selection into
account. We see that these two sets of intervals are similar for the larger
coeﬃcients, but the selection-adjusted ones are (appropriately) longer for the
smaller coeﬃcients.

How did we choose λ = 7? Here we cheated a bit, and used ten-fold cross-
validation (using the one-standard-error rule). In practice one would need to
condition on this selection event as well, which would add considerably more
complexity to the selection set. Simulations suggest this does not widen the
conﬁdence intervals substantially. In the next section, we discuss conditional
, which limits the set of λs to the knots in
inference at the LAR sequence
}

λk
{

3Lee, Sun, Sun and Taylor (2013) also discuss inference without conditioning on the

signs, by considering the union of all regions with the same active set.

−30−100102030PredictorCoefficientbmimaphdlltgglu^2age:sexbmi:mapOLS intervalLasso interval156

STATISTICAL INFERENCE

the lasso path. We also needed to estimate σ in (6.10); since N > p, we used
the root mean-squared error from the full regression on all 64 predictors for
this purpose.

6.3.2.2 The Spacing Test for LAR

Here we apply the inference procedure (6.10) to successive steps of the LAR
algorithm. We already visited the ﬁrst step in Example 6.1 on page 152, for
testing the global null hypothesis. There we set ηT
,
i|
and the test amounts to testing if this maximum covariance exceeds what we
− = λ2,
expect by chance. We saw that
, and hence the resulting
test can be written in a very simple form:

1 y = λ1 = maxj

+ = +

xj, y

∞

|h

V

V

R1 = 1

−

F V −,V +
0,σ2

(λ1

Ay

b

) =
}

≤

|{

Φ(λ1/σ)
Φ(λ2/σ) ∼

1
1

−
−

U (0, 1).

(6.11)

Remarkably, the uniform distribution above holds exactly for ﬁnite N and p,
and for any X. This is known as the spacing test (Taylor et al. 2014) for the
global null hypothesis: it is a nonasymptotic version of the covariance test,
and is asymptotically equivalent to it (Exercise 6.5). The spacing test is a
λ2: the larger this spacing, the smaller the p-value.
monotone function of λ1
Similarly, there is a more general form of the spacing test for testing that
the partial regression coeﬃcient of the variable added at any given LAR step
is zero. These tests are based on the successive values for λk, and result in
expressions more complex than Equation (6.11).

−

In detail, if variable xjk is chosen at the kth step in the LAR algorithm,

one can show that the corresponding knot λk is given by λk = ηT

k y, with

ηk =

sk

−

xT
jk

P⊥
XAk−1 (XT

Ak−1

Ak−1

xjk

XAk−1)−1sAk−1

(6.12)

(Exercise 6.8). Here

k−1 indexes the active set after k

A

1 steps, and

−

P⊥

Ak−1

= IN

−

XAk−1 (XT

Ak−1

XAk−1 )−1XAk−1

k−1 (the latter being a (k

is the residual projection operator that “adjusts” xjk for XAk−1. Finally, sk
and sAk−1 are the signs for the coeﬃcients for variables k and those indexed by
1)-vector). Using this value of η, the spacing test
A
follows from the general inference procedure outlined above, culminating in
(6.10) on page 152. The matrix A at knot λk has considerably more rows than
k
1.
in the ﬁxed-λ case, since we are conditioning on the entire sequence
}
Nevertheless the computations are quite manageable, and one can compute
exact p-values as well as conﬁdence intervals for the chosen variables, as in
the ﬁxed-λ case.

λ‘
{

−

Taylor et al. (2014) give some simpliﬁed versions of the general spacing
test—approximations to the exact case, that empirically are very close, and

POST-SELECTION INFERENCE FOR THE LASSO

157

asymptotically are equivalent (also with the covariance test). The most ap-
pealing of these has the form

Rk =

Φ

Φ

(cid:16) λk−1
σkηkk2
(cid:16) λk−1
σkηkk2

(cid:17)

(cid:17)

−

−

Φ

Φ

(cid:16) λk

σkηkk2
(cid:16) λk+1
σkηkk2

(cid:17)

(cid:17) ,

(6.13)

− = λk−1 and
which is an exact generalization of (6.11), using
It is easy to see that the term of interest (top-right in (6.13)) is

V

V

+ = λk+1.

(6.14)

˜θk =

λk
η
k

σ

=

ηT
k y
η
σ
2
k
k

2
k
is the (absolute) standardized partial regression coeﬃcient for xjk in the pres-
ence of XAk−1 (Exercise 6.9); this view shows that testing for λk amounts to
testing for this partial regression coeﬃcient.

The rightmost column of Table 6.2 shows the result of this more general
spacing test applied to the diabetes data. Qualitatively the results look similar
to those from the covariance test.

Although the spacing test and ﬁxed-λ approaches are similar in their con-
struction, and are both exact, they are diﬀerent in an important way. In par-
ticular, the spacing test applies to each step of the sequential LAR procedure,
and uses speciﬁc λ values (the knots). In contrast, the ﬁxed-λ inference can be
applied at any value of λ, but then treats this value as ﬁxed. Hence it ignores
any additional variability caused by choosing λ from the data.

6.3.3 What Hypothesis Is Being Tested?

In adaptive testing, this question is tricky. The covariance test uses a set of
conditional hypotheses: at each stage of LAR, we are testing whether the coef-
ﬁcients of all other predictors not yet in the model are zero. This is sometimes
called the complete null hypothesis

It turns out that the spacing test has a diﬀerent focus. At the ﬁrst step, it
tests the global null hypothesis, as does the covariance test. But at subsequent
steps, it tests whether the partial correlation of the given predictor entered
at that step is zero, adjusting for other variables that are currently in the
model. This is sometimes called the incremental null hypothesis. Unlike the
covariance test, it does not try to assess the overall correctness of the current
model. The ﬁxed-λ test is similar; it conditions on the current active set of
predictors and tests whether the coeﬃcient of any given predictor is zero in the
projected model. In contrast, Section 6.4 below discusses a procedure which
forms conﬁdence intervals for the population regression parameters in the full
model.

158

STATISTICAL INFERENCE

6.3.4 Back to Forward Stepwise Regression

At the beginning of this section, we complained that na¨ıve inference for
forward-stepwise regression ignores the eﬀects of selection, as in Figure 6.8(a)
and the left side of Table 6.2. Coming full circle, we note that the general
inference procedure outlined in Section 6.3.2 can in fact be applied to forward
stepwise regression, providing proper selective inference for that procedure as
well. In that case, the constraint matrix A is somewhat complicated, con-
taining approximately 2pk rows at step k. However the resulting procedure is
computationally tractable: details are in Taylor et al. (2014) and Loftus and
Taylor (2014).

6.4 Inference via a Debiased Lasso

The aim of the method that we describe here is quite diﬀerent from those
discussed in Section 6.3. It does not attempt to make inferences about the
partial regression coeﬃcients in models derived by LAR or the lasso. Instead
it directly estimates conﬁdence intervals for the full set of population regres-
sion parameters, under an assumed linear model. To do so, it uses the lasso
estimate4 as a starting point and applies a debiasing operation to yield an
estimate that can be used for constructing conﬁdence intervals.

Suppose we assume that the linear model y = Xβ + (cid:15) is correct, and we
p
want conﬁdence intervals for the components
1. Then if N > p, we can
}
simply ﬁt the full model by least squares and use standard intervals from
least-squares theory

βj
{

bβj

z(α)vj ˆσ,

(6.15)

±
j = (cid:0)XT X(cid:1)−1
where bβ is the OLS estimate, v2
p),
and zα is the α-percentile of the standard normal distribution. However this
approach does not work when N < p.

jj , ˆσ2 = P

ˆyi)2/(N

i(yi

−

−

One proposal that has been suggested (Zhang and Zhang 2014, B¨uhlmann
2013, van de Geer, B¨uhlmann, Ritov and Dezeure 2013, Javanmard and
Montanari 2014), is to use a debiased version of the lasso estimator, namely

bβd = bβλ + 1

N ΘXT (y

X bβλ),

−

(6.16)

where bβλ is the lasso estimate at λ, and Θ is an approximate inverse of
bΣ = 1

N XT X.5 From this, we can write

bβd = β + 1

N ΘXT (cid:15) + (Ip

|

−

1

N ΘXT X)( bβλ
{z
ˆ∆

β)
}

−

(6.17)

4Fit using a value of λ based on consistency considerations.
5If N ≥ p, then Θ−1 = 1

N XT X and (6.16) would be exactly unbiased for β. However

when N < p, XT X/N is not invertible and we try to ﬁnd an approximate inverse.

INFERENCE VIA A DEBIASED LASSO

159

∼
ˆ∆
∞
k
k
N (β, σ2

N (0, σ2Ip). These authors provide (diﬀerent) estimates of Θ so
with (cid:15)
0. From Equation (6.17), one can use the approximation
that
→
N Θ bΣΘT ) to form conﬁdence intervals for the components βj.
bβd
The debiasing operation (6.16) can be viewed as an approximate Newton step
for optimizing the residual sum of squares, starting at the lasso estimate β
(Exercise 6.6). There have been diﬀerent proposals for estimating Θ:

∼

•

•

van de Geer et al. (2013) estimate Θ using neighborhood-based methods
to impose sparsity on the components (see Chapter 9 for details on sparse
graph estimation).

Javanmard and Montanari (2014) use a diﬀerent approach: for each j they
deﬁne mj to be the solution to the convex program

minimize
m∈Rp

subject to

mT bΣm

bΣm
k

−

ej

∞

k

≤

γ,

with ej being the jth unit vector. Then they set

bΘ := (m1, m2, . . . , mp).

(6.18)

(6.19)

(6.20)

This tries to make both bΣ bΘ

≈

I and the variances of bβd

j small.

Figure 6.13 Diabetes data: Lasso estimates, debiased lasso estimates, and conﬁ-
dence intervals from the debiasing approach. These intervals have not been adjusted
for multiple comparisons. The ﬁrst 6 predictors have intervals not containing zero:
when Bonferroni-adjusted, this number drops to three.

Figure 6.13 shows the result of applying the debiasing procedure of Javanmard
and Montanari (2014) to the diabetes data. For six of the predictors, the

−20−100102030PredictorsCoefficientsltgbmimapsexage:sexhdlLasso estimateDebiased estimate95% CI160

STATISTICAL INFERENCE

95% conﬁdence intervals do not contain zero. However these intervals are not
corrected for multiple comparisons; if we instead use a Bonferroni-adjusted
level of 0.05/64, then the number of signiﬁcant predictors drops to three. The
top three predictors agree with those from the covariance and spacing tests
of Table 6.2; the fourth predictor (sex) is not entered until step seven by the
forward stepwise algorithm of Table 6.2, and not in the ﬁrst ten steps by the
other two procedures.

6.5 Other Proposals for Post-Selection Inference

The PoSI method (Berk, Brown, Buja, Zhang and Zhao 2013, “Post-Selection
Inference”) ﬁts the selected submodel, and then adjusts the standard (non-
adaptive) conﬁdence intervals by accounting for all possible models that might
have been delivered by the selection procedure. The adjustment is not a func-
tion of the particular search method used to ﬁnd the given model. This can
be both an advantage and a disadvantage. On the positive side, one can apply
the method to published results for which the search procedure is not speci-
ﬁed by the authors, or there is doubt as to whether the reported procedure is
an accurate account of what was actually done. On the negative side, it can
produce very wide (conservative) conﬁdence intervals in order to achieve its
robustness property.

In detail, consider again the linear model y = Xβ + (cid:15), and suppose that
a model-selection procedure
chooses a submodel M , with estimate bβM .
The authors of PoSI argue that inferences should most naturally be made not
about the true underlying parameter vector β, but rather the parameters in
the projection of Xβ onto XM :

M

βM = (XT

M XM )−1XT

M Xβ.

(6.21)

This approach was also adopted with the conditional inference discussed in
Section 6.3.2. Consider a conﬁdence interval for the jth component of βM of
the form

CIj·M = bβj·M

K ˆσvj·M ,

±

(6.22)

j·M = (XT

M XM )−1

jj . Then the PoSI procedure delivers a constant K so

with v2
that

Pr(βj·M

CIj·M )

1

2α

(6.23)

∈

−
≥
over all possible model selection procedures
. The value of K is a function of
the data matrix X and the maximum number of nonzero components allowed
in βM , but not the outcome vector y. The authors show that K grows like
p2 log(p) for orthogonal designs but can grow as quickly as √p for nonorthog-
onal designs.

M

Note that any individual parameter in any projected submodel of the form
(6.21) can be written as aT β, with least-squares estimate aT bβ, where bβ is the

BIBLIOGRAPHIC NOTES

161

least-squares estimate for the full model. Scheﬀ´e (1953) provides a way to
obtain simultaneous inference for all such linear combinations:

"

Pr

[aT ( bβ
aT (XT X)−1a

−

β)]2

sup
a

ˆσ2 ≤

#

K 2

Sch

= 1

−

2α.

(6.24)

·
Assuming that the full model is correct, with Gaussian errors, it can be shown
that KSch = ppFp,N −p,1−2α, which provides the √p upper bound referred to
above. The PoSI authors show that using numerical methods and direct search,
smaller values of K can be found for actual model matrices X, in particular
when the user limits the search to all models within a certain maximum size.
For the diabetes data, Andreas Buja computed for us the value of K for
submodels of size 5 (this took a little less than 2 hours of computing time).
The resulting values of K were 4.21 (90%), 4.42 (95%), and 4.85 (99%). At the
95% level, this yielded four signiﬁcant predictors bmi, map, hdl, and ltg. This
is one more predictor than we obtain from the lasso method of Figure 6.12, if
the latter intervals were adjusted for multiplicity.

The PoSI intervals have advantages compared to the lasso method of Fig-
ure 6.12 in that they don’t require σ to be known or λ to be ﬁxed. On the
other hand, the conﬁdence intervals from PoSI can be very wide. In the di-
abetes dataset there are four very strong predictors: their lasso intervals are
essentially unaﬀected by the selection and look much like the standard least-
squares intervals. Even with a Bonferroni adjustment from 0.05 to 0.01, the
intervals have approximate length
σvj·M for
2.33
PoSI. However the authors of PoSI make the point that their method provides
much stronger protection against all kinds of (unreported) things that people
actually do with their data, like ﬁshing for models that have lots of signiﬁcant
predictors.

σvj·M compared to

4.42

±

±

·

·

A major limitation of PoSI at this time is computation. According to the
authors, with parallel computation the current problem could probably be
solved for models up to size 7 or 8 out of 64, but no larger.

Bibliographic Notes

Our discussion of the Bayesian Lasso is based on Park and Casella (2008). The
bootstrap is due to Efron (1979); the book by Efron and Tibshirani (1993) is a
comprehensive reference. The connection between Bayesian methods and the
bootstrap is explored in various papers (Rubin 1981, Efron 1982, Efron 2011).
The covariance test was introduced in Lockhart, Taylor, Tibshirani2 and
Tibshirani (2014); the discussion following that paper is a valuable resource
on model selection. This work was extended to general models and exact
tests in Taylor, Loftus and Tibshirani2 (2013). The spacing test is proposed
in Taylor et al. (2014), while Lee, Sun, Sun and Taylor (2013) derive the
ﬁxed λ inference procedure for the lasso. Taylor et al. (2014) and Loftus and
Taylor (2014) propose tests for forward stepwise regression, the latter includ-
ing categorical variables via the group lasso penalty. Grazier G’Sell, Wager,

162

STATISTICAL INFERENCE

Chouldechova and Tibshirani (2015) propose FDR-controlling procedures for
sequential testing and apply them to the model selection p-values described
here. Grazier G’Sell, Taylor and Tibshirani (2013) develop a covariance test
for the graphical lasso while Choi, Taylor and Tibshirani (2014) do the same
for principal components. Fithian, Sun and Taylor (2014) provide a general
theoretical framework for conditional inference after model selection, with
particular emphasis on exponential families.

The “debiasing approach” (Section 6.4) was proposed by a number of au-
thors. For example, Zhang and Zhang (2014) derive conﬁdence intervals for
contrasts of high-dimensional regression coeﬃcients, by replacing the usual
score vector with the residual from a relaxed projection (i.e., the residual
from sparse linear regression). B¨uhlmann (2013) constructs p-values for coef-
ﬁcients in high-dimensional regression models, starting with ridge estimation
and then employing a bias-correction term that uses the lasso. This initial
work was followed by van de Geer et al. (2013), Javanmard and Montanari
(2014), and Javanmard and Montanari (2013), who all present approaches
for debiasing the lasso estimate based on estimates of the inverse covariance
matrix of the predictors. (The latter work focuses on the special case of a
predictor matrix X with i.i.d. Gaussian rows; the ﬁrst two consider a general
matrix X.) These debiased lasso estimates are asymptotically normal, which
allows one to compute p-values both marginally for an individual coeﬃcient,
and simultaneously for a group of coeﬃcients. The PoSI (Post-Selection In-
ference) method was proposed in Berk et al. (2013).

Exercises

Ex. 6.1
(a) Show that in the orthonormal design setting XT X = Ip×p, the covariance

test (6.5) reduces to the simple form

Tk =

1
σ2 ·

λk(λk

−

λk+1).

(6.25)

for all steps k.

(b) Show that for general X, the covariance test (6.5) reduces to (6.25) for

the ﬁrst step (k = 1)

Ex. 6.2 Show that Rk in Equation (6.4) can be written as a covariance statistic

Rk =

1
σ2 ·

(cid:16)
h

y, X ˆβk

i − h

y, X ˆβk−1

(cid:17)
i

,

(6.26)

where ˆβk is the coeﬃcient vector after k steps of forward stepwise regression
(with the coeﬃcients of those variables not included set to 0).

EXERCISES

163

0 , H 2

0 , . . . , H m

Ex. 6.3 Sequential control of FDR. Suppose that we carry out tests of a set
of hypotheses H 1
0 , using p-values p1, p2, . . . , pm. Let the ordered
p-values be p(1) < p(2) < . . . < p(m). If we apply a procedure that rejects R
of the hypotheses and there are V false positives among these, then the false
discovery rate of the procedure is deﬁned to be E(V /R). Given a target FDR of
α, the Benjamini–Hochberg (BH) procedure (Benjamini and Hochberg 1995)
rejects the R hypotheses with the smallest R p-values, where R is the largest
j/m. If the p-values are independent, this procedure has
j such that p(j) ≤
an FDR of at most α.
(a) Compute the univariate regression coeﬃcients bβj and standard errors
bsej for each predictor in the diabetes data. Hence obtain approximate
normal scores zj = bβj/ bsej and associated (two)-tailed p-values. Apply the
BH procedure to ﬁnd a list of signiﬁcant predictors at an FDR of 5%.

α

·

(b) Now suppose that our hypotheses have to be considered in order. That
is, we must reject a contiguous initial block of K of the hypotheses H 1
0 , H 2
0 ,
. . . , H K
(or we could reject none of them). The covariance or spacing test
0
are examples of this. The BH procedure cannot be applied in this setting, as
it does not respect the ordering. For example in Table 6.2, the BH procedure
might tell us to reject the null hypothesis for ltg, but not reject that for
bmi. This is not helpful, because we seek a model consisting of the ﬁrst k
predictors that enter, for some k
0. There is a generalization of the BH
procedure that can be applied here. Let the p-values from the covariance or
spacing test be p1, p2, . . . pm and let rk =
pj)/k. Then the
so-called ForwardStop rule rejects p1, p2, . . . pˆk where ˆk is the largest k such
that rk
α (Grazier G’Sell et al. 2015). Apply the ForwardStop rule to the
covariance or spacing test p-values with a target FDR of 5%.

j=1 log(1

Pk

−

−

≥

≤

Ex. 6.4 Here we derive a fact about the multivariate normal distribution, and
then in (c) we apply it to derive the spacing test for LAR in the global null case.
Suppose that the random vector Z = (Z1, . . . , Zp) follows the multivariate
normal distribution N (0, Σ) with Σjj = 1 for all j.
(a) Let

(j1, s1) =

arg max
j∈{1,2,...,p}, s∈{−1,1}

(sZj)

and assume that these indices are uniquely attained. Deﬁne the random
variables

Mj =

max
1≤i≤p, i6=j, s∈{−1,1}

(cid:26) sZi
1

sΣijZj
ssjΣij

−
−

(cid:27)

.

(6.27)

with sj = arg maxs∈{−1,1}(sZj). Show that Mj is independent of Zj, for
j = 1, 2, . . . p.

(b) Let Φ(x) be the CDF of a standard Gaussian, and

U (z, m) =

Φ(z)
Φ(m)

.

1
1

−
−

(6.28)

164

Verify that j1 = j if and only if Zj
uniformly distributed on (0, 1).

≥

STATISTICAL INFERENCE

Mj, and prove that U (Zj1 , Mj1) is

(c) In the LAR procedure with standardized predictors, let Σ = 1

N XT X, and
j y. Show that λ1 = maxj,s(sZj) and λ2 = Mj1 (diﬃcult). Hence

N xT

Zj = 1
derive the spacing test (6.11).

Ex. 6.5 Show that as N, p
(6.11) are asymptotically equivalent. [Hint: send λ2
λ1/λ2

1 and apply Mill’s ratio.]

, the covariance test (6.5) and the spacing test
at a rate such that

→ ∞

→ ∞

→

Ex. 6.6 Consider the residual sum of squares function J(β) =
construct a Newton step for minimizing J(β) of the form

y

k

−

Xβ

2 and
k

βnew

β +

←

(cid:16) ∂J
∂β

(cid:17)−1 ∂J
∂β

(6.29)

where β is the lasso estimate at some λ. Show that this has the form (6.16)
with (XT X)−1 replaced by the estimate bΘ from (6.20).

Ex. 6.7 General inference for the LAR algorithm and the lasso. Let y
∼
N (µ, σ2I), and consider the distribution of y conditional on the selection
event
b
Ay
}
{
(a) Show that

≤

.

Ay
{

=

b
}

≤ V
with the variables above deﬁned as follows:

{V

≤

≤

−(y)

ηT y

+(y),

0(y)

V

0
}

≥

(6.30)

α =

Aη
2
η

k

k
−(y) = max
j:αj <0

+(y) = min
j:αj >0
0(y) = min
j:αj =0

(bj

V

V

V

bj

bj

(Ay)j + αjηT y

αj

(Ay)j + αjηT y

αj
(Ay)j)

−

−

−

(6.31)

[Hint: subtract E(Ay
plify and examine separately the cases αj < 0, = 0 and > 0.]

ηT y) from both sides of the inequality Ay
|

≤

b. Sim-

(b) Let

F c,d

µ,σ2(x) =

Φ((x
Φ((d

µ)/σ)
µ)/σ)

Φ((c
Φ((c

−
−

−
−

−
−

µ)/σ)
µ)/σ)

.

(6.32)

This is the truncated normal distribution, with support on [c, d]. Show that

F V −,V +
ηT µ, σ2kηk2 (ηT y)

Ay

| {

b

≤

} ∼

U(0, 1).

(6.33)

EXERCISES

165

This result can be used to make inferences about parameter ηT µ at a given
step of the LAR algorithm, or for a lasso solution computed at a ﬁxed value
of λ.

(c) Use result (6.33) to provide an alternate proof of the spacing test re-

sult (6.11).

Ex. 6.8 The kth knot in the LAR algorithm is the value λk at which the kth
variable enters the model. At λk the coeﬃcient of this variable is zero (about
to grow from zero). Using the KKT optimality conditions, verify expression
(6.12).

Ex. 6.9 With ηk deﬁned in (6.12), show that ˜θk in (6.14) is the absolute
standardized partial regression coeﬃcient of y on xjk , adjusted for XAk−1 .

Ex. 6.10 Consider a solution to the lasso problem

minimize
β

1
2 k

y

Xβ

k

−

2
2 + λ

1,

β
k

k

1, . . . , p

and let E
the signs of the active variables. The KKT conditions corresponding to any
solution bβE with the same E and SE are given by

denote a candidate active set, and sE

∈ {−

⊂ {

|E|
1, 1
}

}

XT

E(y
−E(y

XT

XE bβE) + λsE = 0
XE bβE) + λs−E = 0,

−

−

(6.34)

(6.35)

with sign( bβE) = sE and
∞ < 1. Eliminate bβE in these equations, and
show that the set of values of y with solution characterized by (E, sE) can be
deﬁned by a set of linear inequalities

s−E
k

k

Ay

b.

≤

Ex. 6.11 Consider the setup in Example 6.1, and assume xT
j1
Using simple inequalities, derive an expression for
equal to λ2, the second LAR knot.

y is positive.
−(y). Show that this is

V

Chapter 7

Matrix Decompositions,
Approximations, and Completion

7.1 Introduction

×

n matrix Z =

This chapter is devoted to problems of the following type: given data in the
form of an m
, ﬁnd a matrix bZ that approximates Z in a
}
suitable sense. One purpose might be to gain an understanding of the matrix
Z through an approximation bZ that has simple structure. Another goal might
be to impute or ﬁll in any missing entries in Z, a problem known as matrix
completion.

zij
{

Our general approach is to consider estimators based on optimization prob-

lems of the form

bZ = arg min

M∈Rm×n k

Z

2
F subject to Φ(M)
M
k

−

≤

c,

(7.1)

2
F is the (squared) Frobenius norm of a matrix (deﬁned as the
where
k · k
) is a constraint function that encourages
element-wise sum of squares), and Φ(
·
bZ to be sparse in some general sense. The manner in which we impose sparsity
leads to a variety of useful procedures, many of which are discussed in this
chapter. One can regularize the overall approximating matrix bZ, or factor
it and regularize the components of its factorization. Of course, there are
variations: for instance, the observed matrix Z might have missing entries,
2
so that the squared Frobenius norm
F is modiﬁed accordingly. In other
k · k
settings, we might impose multiple constraints on the approximating matrix bZ.
Table 7.1 provides a summary of the methods discussed in this chapter.
Method (a) is based on a simple ‘1-norm constraint on all of the entries on
the matrix bZ; this constraint leads to a soft-thresholded version of the origi-
nal matrix—that is, the optimal solution to our general problem (7.1) takes
the form bzij = sign(zij)(
γ)+, where the scalar γ > 0 is chosen so
Pn
that Pm
= c. The resulting estimate bZ can be useful in the con-
i=1
text of sparse covariance estimation. Method (b) bounds the rank of bZ, or in
other words, the number of nonzero singular values in bZ. Although the ma-
trix approximation problem (7.1) with such a rank constraint is nonconvex,

j=1 |bzij

zij
|

| −

|

167

168

MATRIX DECOMPOSITIONS

Table 7.1 Diﬀerent formulations for the matrix approximation problem.

Constraint

Resulting method

(a)

(b)

(c)

(d)

(e)

(f)

?

c

k

k

≤
c

bZ
‘1 ≤
k
k
rank(bZ)
bZ
≤
k
bZ = UDVT ,
Φ1(uj)
bZ = LRT ,
Φ1(L)
bZ = L + S,
Φ1(L)

≤

≤

≤

Sparse matrix approximation

Singular value decomposition

Convex matrix approximation

c1, Φ2(vk)

≤

c2 Penalized SVD

c1, Φ2(R)

≤

c2 Max-margin matrix factorization

c1, Φ2(S)

c2

≤

Additive matrix decomposition

the optimal solution is easily found by computing the singular value decom-
position (SVD) and truncating it to its top k components. In method (c),
we relax the rank constraint to a nuclear norm constraint, namely an upper
bound on the sum of the singular values of the matrix. The nuclear norm is
a convex matrix function, so that the problem in (c) is convex and can be
solved by computing the SVD, and soft-thresholding its singular values. This
modiﬁcation—from a rank constraint in (b) to the nuclear norm constraint in
(c)—becomes important when the methods are applied to matrices with miss-
ing elements. In such settings, we can solve the corresponding problem (c)
exactly, whereas methods based on (b) are more diﬃcult to solve in general.
The approach in (d) imposes penalties on the left and right singular vectors
of bZ. Examples of the penalty functions or regularizers Φ1 and Φ2 include the
usual ‘2 or ‘1 norms, the latter choice yielding sparsity in the elements of the
singular vectors. This property is useful for problems where interpretation of
the singular vectors is important. Approach (e) imposes penalties directly on
the components of the LR-matrix factorization; although ostensibly similar to
approach (d), we will see it is closer to (c) when Φ1 and Φ2 are the Frobenius
norm. Finally, approach (f) seeks an additive decomposition of the matrix,
imposing penalties on both components in the sum.

Matrix decompositions also provide an approach for constructing sparse
versions of popular multivariate statistical methods such as principal compo-
nent analysis, canonical correlation analysis and linear discriminant analysis.
In this case, the matrix Z is not the raw data, but is derived from the raw
data. For example, principal components are based on the sample covariance
matrix (or the column-centered data matrix), canonical correlation uses the
cross-products matrix from two sets of measurements, while clustering starts
with inter-point distances. We discuss these multivariate methods, and related
approaches to these problems, in Chapter 8.

THE SINGULAR VALUE DECOMPOSITION

169

7.2 The Singular Value Decomposition

Given an m
the form

×

n matrix Z with m

≥

n, its singular value decomposition takes

Z = UDVT .

(7.2)

×

×

∈
n orthogonal matrix (VT V = In) whose columns vj

This decomposition is standard in numerical linear algebra, and many algo-
rithms exist for computing it eﬃciently (see, for example, the book by Golub
n orthogonal matrix (UT U = In) whose
and Loan (1996)). Here U is an m
Rm are called the left singular vectors. Similarly, the matrix
columns uj
Rn are
V is an n
n matrix D is diagonal, with diag-
called the right singular vectors. The n
d2
onal elements d1
0 known as the singular values. If these
n
diagonal entries
‘=1 are unique, then so are U and V, up to column-wise
sign ﬂips. If the columns of Z (the variables) are centered, then the left singu-
n
j=1 deﬁne the principal components of Z. Consequently, the
lar vectors
}
unit vector v1 yields the linear combination s1 = Zv1 with highest sample
variance among all possible choices of unit vectors. Here s1 is called the ﬁrst
principal component of Z, and v1 is the corresponding direction or loading
vector. Similarly, s2 = Zv2 is the second principal component, with maximal
sample variance among all linear combinations uncorrelated with s1, and so
on. See Exercise 7.1 and Section 8.2.1 for further details.

≥ · · · ≥

≥
d‘
{

vj
{

dn

×

≥

∈

}

The singular value decomposition provides a solution to the rank-q matrix
rank(Z), and let Dr be a diagonal ma-
approximation problem. Suppose r
trix with all but the ﬁrst r diagonal entries of the diagonal matrix D set to
zero. Then the optimization problem

≤

minimize
rank(M)=r k

Z

−

M
F
k

(7.3)

actually has a closed form solution bZr = UDrVT , a decomposition known
as the rank-r SVD (see Exercise 7.2). The estimate bZr is sparse in the sense
that all but r singular values are zero. A fuller discussion of the SVD—in the
context of principal components analysis—is given in Section 8.2.1.

7.3 Missing Data and Matrix Completion

What if some of the entries of Z are missing? In general, the problem of
ﬁlling in or imputing missing values in a matrix is known as matrix comple-
tion (Laurent 2001). Of course, the matrix completion problem is ill-speciﬁed
unless we impose additional constraints on the unknown matrix Z, and one
common choice is a rank constraint. Low-rank forms of matrix completion
arise in the problem of collaborative ﬁltering and can be used to build recom-
mender systems.

The SVD provides an eﬀective method for matrix completion. Formally,
suppose that we observe all entries of the matrix Z indexed by the subset

170

MATRIX DECOMPOSITIONS

⊂ {

1, . . . , m

Ω
. Given such observations, a natural approach is
to seek the lowest rank approximating matrix bZ that interpolates the observed
entries of Z—namely

1, . . . , n

} × {

}

minimize rank(M)

subject to mij = zij for all (i, j)

Ω.

∈

(7.4)

Unlike its fully observed counterpart, this rank-minimization problem is com-
putationally intractable (NP-hard), and cannot be solved in general even for
moderately large matrices.

In addition, forcing the estimate M to interpolate each of the observed
entries zij will often be too harsh and can lead to overﬁtting; it is gener-
ally better to allow M to make some errors on the observed data as well.
Accordingly, consider the optimization problem

minimize rank(M)

subject to P

(zij

(i,j)∈Ω

mij)2

δ,

≤

−

(7.5)

or its equivalent form

minimize
rank(M)≤r

X

(i,j)∈Ω

(zij

−

mij)2.

(7.6)

In words, we seek the matrix bZ = bZr of rank at most r that best approximates
the observed entries of our matrix Z, with the other entries of bZr serving to
ﬁll in the missing values. The family of solutions generated by varying δ in
optimization problem (7.5) is the same as that generated by varying r in
problem (7.6).

Unfortunately, both optimization problems (7.5) and (7.6) are nonconvex,
and so exact solutions are in general not available. However, there are useful
heuristic algorithms that can be used to ﬁnd local minima. For instance, sup-
pose that we start with an initial guess for the missing values, and use them to
complete Z. We then compute the rank-r SVD approximation of the ﬁlled-in
matrix as in (7.3), and use it to provide new estimates for the missing values.
This process is repeated till convergence. The missing value imputation for a
missing entry xij is simply the (i, j)th entry of the ﬁnal rank-r approximation
bZ. See Mazumder, Hastie and Tibshirani (2010) for further details. In Sec-
tion 7.3.2, we discuss convex relaxations of these optimization problems based
on the nuclear norm, for which exact solutions are available.

7.3.1 The Netﬂix Movie Challenge

The Netﬂix movie-rating challenge has become one of the canonical examples
for matrix completion (Bennett and Lanning 2007). Netﬂix is a movie-rental
company that launched a competition in 2006 to try to improve their sys-
tem for recommending movies to their customers. The Netﬂix dataset has
n = 17, 770 movies (columns) and m = 480, 189 customers (rows). Customers

MISSING DATA AND MATRIX COMPLETION

171

Figure 7.1 The Netﬂix competition leaderboard at the close of the competition.

172

MATRIX DECOMPOSITIONS

have rated some of the movies on a scale from 1 to 5, where 1 is worst and
5 is best. The data matrix is very sparse with “only” 100 million (1%) of
the ratings present in the training set. The goal is to predict the ratings for
unrated movies, so as to better recommend movies to customers. In 2006,
the “Cinematch” algorithm used by Netﬂix had a root-mean-square error of
0.9525 over a large test set. A competition was held starting in 2006, with the
winner being the ﬁrst algorithm that could improve this RMSE by at least
10%. The competition was ﬁnally won in 2009 by a large group of researchers
called “Bellkor’s Pragmatic Chaos,” which was the combined eﬀort of three
individual groups. The winning algorithm used a combination of a large num-
ber of statistical techniques, but as with many of the competing algorithms,
the SVD played a central role. Figure 7.1 shows the leaderboard at the close
of the competition.

Table 7.2 Excerpt of the Netﬂix movie rating data. The movies are rated from 1
(worst) to 5 (best). The symbol • represents a missing value: a movie that was not
rated by the corresponding customer.

P arents
D ancing
G un
the
M eet
T he
T op
•
•
•
3
4
•
•
•
•
•
•
•
•
5
•
•
•
•
•
•

•
•
2
•
5
•
•
•
•
•

Dirty

•
•
•
3
5
•
•
•
3
•

Customer 1
Customer 2
Customer 3
Customer 4
Customer 5
Customer 6
Customer 7
Customer 8
Customer 9
Customer 10

If

Sense
Sixth
M e
C atch
T he
•
•
•
•
•
2
•
2
•
•

4
•
•
•
4
•
•
•
5
•

Y ou

C an

R oyal Tenenbau m s

Air
Big
•
•
•
•
•
•
3
•
5
•

Fish
T he
•
•
2
•
•
•
•
•
•
•

C on
•
3
•
•
•
4
•
•
•
•

M en

G ood

M atrix
Fe w

A
•
3
•
•
•
•
•
3
•
•

A low rank model provides a good heuristic for rating movies: in particular,
suppose that we model the rating of user i on movie j by a model of the form

zij =

r
X

‘=1

ci‘gj‘ + wij,

(7.7)

Rn×r. In this
or in matrix form Z = CGT + W, where C
model, there are r genres of movies, and corresponding to each is a clique
of viewers who like them. Here viewer i has a membership weight of ci‘ for
the ‘th clique, and the genre associated with this clique has a score gj‘ for
movie j. The overall user rating is obtained by summing these products over

Rm×r and G

∈

∈

MISSING DATA AND MATRIX COMPLETION

173

‘ (cliques/genres), and then adding some noise. Table 7.2 shows the data for
the ten customers and ten movies with the most ratings.

The competition identiﬁed a “probe set” of ratings, about 1.4 million of
the entries, for testing purposes. These were not a random draw, rather movies
that had appeared chronologically later than most. Figure 7.2 shows the root-
mean-squared error over the training and test sets as the rank of the SVD
was varied. Also shown are the results from an estimator based on nuclear
norm regularization, discussed in the next section. Here we double centered
the training data, by removing row and column means. This amounts to ﬁtting
the model

zij = αi + βj +

ci‘gj‘ + wij;

(7.8)

r
X

However, the row and column means can be estimated separately, using a
simple two-way ANOVA regression model (on unbalanced data).

‘=1

Figure 7.2 Left: Root-mean-squared error for the Netﬂix training and test data for
the iterated-SVD (Hard-Impute) and the convex spectral-regularization algorithm
(Soft-Impute). Each is plotted against the rank of the solution, an imperfect cal-
ibrator for the regularized solution. Right: Test error only, plotted against training
error, for the two methods. The training error captures the amount of ﬁtting that
each method performs. The dotted line represents the baseline “Cinematch” score.

While the iterated-SVD method is quite eﬀective, it is not guaranteed to
ﬁnd the optimal solution for each rank. It also tends to overﬁt in this example,
when compared to the regularized solution. In the next section, we present
a convex relaxation of this setup that leads to an algorithm with guaranteed
convergence properties.

0501001502000.70.80.91.0RankRMSETrainTest0.650.700.750.800.850.900.950.960.970.980.991.00Training RMSETest RMSEHard−ImputeSoft−ImputeNetflix Competition Data174

MATRIX DECOMPOSITIONS

7.3.2 Matrix Completion Using Nuclear Norm

A convenient convex relaxation of the nonconvex objective function (7.4) is
given by

minimize

M
k
k

? subject to mij = zij for all (i, j)

Ω,

∈

(7.9)

M
k
k

where
? is the nuclear norm, or the sum of the singular values of M.
It is also sometimes called the trace norm.1 Figure 7.3 shows the level set
of the nuclear norm of a symmetric 2
2 matrix, and depicts the convex
problem (7.9).2

×

The nuclear norm is a convex relaxation of the rank of a matrix, and hence
problem (7.9) is convex (Fazel 2002). Speciﬁcally, as shown in Exercise 7.3,
it is a semi-deﬁnite program (SDP), a particular class of convex programs
for which special purpose solvers can be applied. The underlying convexity
is also theoretically useful, since one can characterize the properties of the
observed matrix and sample size under which the method succeeds in exactly
reconstructing the matrix, as discussed in Section 7.3.3.

Figure 7.3 The blue cylinder shows the level set of the nuclear norm unit-ball for
a symmetric 2 × 2 matrix. The tangent plane is the feasible set z = z0 for the matrix
imputation problem where we observe z and wish to impute x and y. The point
M is the solution that we seek, leading to the minimum value for δ. This ﬁgure is
analogous to the lasso estimation picture in Figure 2.2 of Chapter 2.

In practice, however, it is unrealistic to model the observed entries as
being noiseless. Accordingly, a more practical method is based on the following

1This terminology can be confusing: for symmetric, positive semi-deﬁnite matrices, the
AT A,

trace is the sum of the eigenvalues. For general matrices, “trace norm” refers to trace
which is the sum of the singular values.

√

2Thanks to Emmanuel Candes and Benjamin Recht for providing Figure 7.3.

MFeasibleset(cid:13)(cid:13)(cid:13)(cid:13)(cid:20)xyyz(cid:21)(cid:13)(cid:13)(cid:13)(cid:13)∗≤δMISSING DATA AND MATRIX COMPLETION

175

relaxed version of the program (7.9):

minimize
M






1
2

X

(zij

(i,j)∈Ω

mij)2 + λ

M
?
k
k

−






,

(7.10)

called spectral regularization. As in our relaxation from problem (7.4) to (7.6),
this modiﬁcation allows for solutions bZ that do not ﬁt the observed entries
exactly, thereby reducing potential overﬁtting in the case of noisy entries.
The parameter λ is a tuning parameter that must be chosen from the data,
typically by cross-validation. As in the previous section, we do not necessarily
require the error P
mij)2 to be zero, and this will only occur for
(i,j)∈Ω(zij
a suﬃciently small value of λ.

−

·

∈ {

} × {

1, . . . , m

n pairs (i, j)

There is a simple algorithm for solving (7.10), similar to the iterated SVD
for missing-data imputation in the previous section. First consider the case
where there is no missing data, so that the set Ω of observed entries includes
. Then to solve (7.10), we simply
1, . . . , n
all m
compute the SVD of Z, soft-threshold the singular values by λ, and reconstruct
the matrix. This observation leads to an obvious procedure for the setup with
missing data. We start with an initial guess for the missing values, compute
the (full rank) SVD, and then soft-threshold its singular values by an amount
λ. We reconstruct the corresponding SVD approximation and obtain new
estimates for the missing values. This process is repeated until convergence.
In order to describe this procedure more precisely, we require some more
notation. Given an observed subset Ω of matrix entries, we can deﬁne the
projection operator

}

Ω : Rm×n

P

7→

Rm×n as follows:
(

zij
0

if (i, j)
∈
if (i, j) /
∈

Ω(Z)]ij =

[

P

Ω
Ω,

(7.11)

so that
entries alone. With this deﬁnition, we have the equivalence

Ω replaces the missing entries in Z with zeros, and leaves the observed

P

X

(i,j)∈Ω

(zij

−

mij)2 =

Ω(Z)

kP

Ω(M)

2
F.
k

− P

(7.12)

Given the singular value decomposition3 W = UDVT of a rank-r matrix W,
we deﬁne its soft-thresholded version as

Sλ(W)

≡

UDλVT

where Dλ = diag [(d1

λ)+, . . . , (dr

−

−

λ)+]

(7.13)

(note that the soft-threshholding can reduce the rank even further). Using
this operator, the procedure for solving (7.10) is given in Algorithm 7.1.

This algorithm was proposed and studied by Mazumder et al. (2010), where

3If a matrix has rank r < min(m, n), we assume its SVD is represented in the truncated

form, discarding the singular values of zero, and the corresponding left and right vectors.

176
Algorithm 7.1 Soft-Impute for matrix completion.
1. Initialize Zold = 0 and create a decreasing grid λ1 > . . . > λK.
2. For each k = 1, . . . , K, set λ = λk and iterate until convergence:

MATRIX DECOMPOSITIONS

Compute bZλ
Update Zold

λ
← S
bZλ

←

(cid:0)PΩ(Z) + P ⊥

Ω (Zold)(cid:1).

3. Output the sequence of solutions bZλ1, . . . , bZλK .

its convergence to the global solution is established. In Exercise 7.4, the reader
is asked to verify that a ﬁxed point of the algorithm satisﬁes the zero sub-
gradient equations associated with the objective function (7.10). It can also
be derived as a ﬁrst-order Nesterov algorithm (see Exercise 7.5). Each itera-
tion requires an SVD computation of a (potentially large) dense matrix, even
though
Ω(Z) is sparse. For “Netﬂix-sized” problems, such large dense matri-
ces can typically not even be stored in memory (68Gb with 8 bytes per entry).
Note, however, that we can write

P

Ω(Z) +

P

P

Ω (Zold) =
⊥

P
|

Ω(Z)

Ω(Zold)
}

+ Zold
|{z}
low rank

.

(7.14)

− P
{z
sparse

The ﬁrst component is sparse, with
nonmissing entries. The second com-
Ω
|
|
ponent is a soft-thresholded SVD, so can be represented using the correspond-
ing components. Moreover, for each component, we can exploit their special
structure to eﬃciently perform left and right multiplications by a vector, and
thereby apply iterative Lanczos methods to compute a (low rank) SVD eﬃ-
ciently. It can be shown that this iterative algorithm converges to the solution
of the problem

minimize
M∈Rm×n

(cid:26) 1

Ω(Z)

2 kP

Ω(M)
k

2
M
F + λ
k

?
k

− P

(cid:27)

,

(7.15)

which is another way of writing the objective function in (7.10).

Figure 7.2 shows the results of Soft-Impute applied to the Netﬂix ex-
ample. We see that the regularization has paid oﬀ, since it outperforms the
iterated SVD algorithm Hard-Impute. It takes longer to overﬁt, and because
of the regularization, is able to use a higher rank solution. Taking advantage of
the warm starts in Algorithm 7.1, it took under 5 hours of computing to pro-
duce the solution path in Figure 7.2, using the R package softImpute (Hastie
and Mazumder 2013). See also Figure 7.5 in Section 7.3.3, which illustrates
the performance of the Soft-Impute algorithm for noisy matrix completion
over a range of diﬀerent ranks and sample sizes. We discuss this ﬁgure at more
length in that section.

In terms of convergence speed, Mazumder et al. (2010) show that the
Soft-Impute algorithm is guaranteed to converge at least sub-linearly, mean-
(1/δ) iterations are suﬃcient to compute a solution that is δ-close
ing that

O

MISSING DATA AND MATRIX COMPLETION

177

to the global optimum. In the absence of additional structure (such as strong
convexity), this is the fastest rate that can be expected from a ﬁrst-order gra-
dient method (Nemirovski and Yudin 1983). Interestingly, in certain settings,
it can be shown that simple ﬁrst-order methods converge at a much faster
geometric rate, meaning that
(log(1/δ)) iterations are suﬃcient to compute
a δ-optimum. For instance, Agarwal, Negahban and Wainwright (2012a) an-
alyze an algorithm closely related to the Soft-Impute algorithm; they show
that under the same conditions that guarantee good statistical performance
of the nuclear norm estimator, this ﬁrst-order algorithm is guaranteed to con-
verge at the geometric rate.

O

7.3.3 Theoretical Results for Matrix Completion

≥

×

There are a variety of theoretical results for matrix completion using nuclear-
norm regularization. Beginning with the simpler “no-noise” case, suppose that
p matrix uniformly at random. How large does
we sample N entries of a p
N need to be, as a function of the matrix dimension p and rank r, for the
nuclear norm relaxation (7.9) to recover the matrix exactly? Of course, this
p2, so that our interest is in guarantees based on
is always possible if N
p2 samples.
N

(cid:28)
A ﬁrst easy observation is that if there are no observed entries in some
row (or column) of the matrix, then it is impossible to recover the matrix
exactly, even if it is rank one. In Exercise 7.8, we show how this argument
implies that any method—not only nuclear norm relaxation—needs at least
N > p log p samples, even for a rank one matrix. This phenomenon is an
instance of the famous “coupon collector” problem (Erdos and Renyi 1961).
(rp) parameters
As for the eﬀect of the rank, note that we need roughly
to specify an arbitrary p
(r) singular
vectors, each with p components. As we will see, under certain restrictions
on the “coherence” of the matrices, nuclear norm relaxation succeeds in exact
recovery based on a sample size just a logarithmic factor larger. Coherence
measures the extent to which the singular vectors of a matrix are aligned with
the standard basis.

p matrix with rank r, since it has

O

O

×

In order to appreciate the need for coherence constraints, consider the
1 , with a single one in its upper left corner, as shown

rank-one matrix Z = e1eT
on the left side of Equation (7.16) below:

Z =


1
0


0

0







0 0 0
0 0 0
0 0 0
0 0 0

and Z0 =







v1
0
0
0

v2
0
0
0

v3
0
0
0







v4
0
0
0

.

(7.16)

p2 entries of this matrix, with the
If we are allowed to observe only N
(cid:28)
entries chosen uniformly at random, then with high probability, we will not
observe the single nonzero entry, and hence have no hope of distinguishing
it from the all-zeroes matrix. Similar concerns apply to a matrix of the form

178

MATRIX DECOMPOSITIONS

∈

Z0 = e1vT , where v
Rp is an arbitrary p vector, as shown on the right side of
Equation (7.16). Thus, any theoretical guarantees on nuclear norm regulariza-
tion must somehow account for these pathological cases. Both the matrices Z
and Z0 have maximal coherence with the standard basis of R4, meaning that
some subset of their left and/or right singular vectors are perfectly aligned
with some standard basis vector ej.

j=1 ajbT

One way to exclude troublesome matrices is by drawing matrices from
some random ensemble; for instance, we might construct a random matrix
of the form Z = Pr
N (0, Ip) and
bj
N (0, Ip) are all independently drawn. Such random matrices are ex-
tremely unlikely to have singular vectors that are highly coherent with stan-
dard basis vectors. For this ensemble, Gross (2011) shows that with high
probability over the randomness in the ensemble and sampling, the nuclear
norm relaxation succeeds in exact recovery if the number of samples satisﬁes

j , where the random vectors aj

∼

∼

Crp log p,

N

≥

(7.17)

where C > 0 is a ﬁxed universal constant. See also Cand`es and Recht (2009)
for earlier but somewhat weaker guarantees. More generally, it is possible
to give exact recovery guarantees in which the pre-factor C depends on the
singular vector incoherence, as measured by the maximal alignment between
the singular vectors and the standard basis. We refer the reader to the papers
by Cand`es and Recht (2009), Gross (2011), and Recht (2011) for further details
on results of this type, as well as to Keshavan, Oh and Montanari (2009) for
related results on a slightly diﬀerent estimator.

We carried out a small simulation study to better understand what result
(7.17) is saying. We generated matrices U, V each of size p
r and with i.i.d
standard normal entries and deﬁned Z = UVT . Then we set to missing a ﬁxed
proportion of entries, and applied Soft-Impute with λ chosen small enough
F < 10−5; in other words, the observed entries
2
so that
Ω(Z)
k
are (eﬀectively) reproduced. Then we checked to see if

bZ)
k

Ω(Z

2
F/

kP

kP

×

−

⊥
Ω (Z

2
2/
bZ)
k

⊥
Ω (Z)
k

2 < 10−5,
2

kP
that is, the missing data was interpolated. The process was repeated 100 times
for various values of the rank r and the proportion set to missing.

kP

−

(7.18)

The proportion of times that the missing data was successfully interpolated
is shown in Figure 7.4. We see that when the rank is a small fraction of
the matrix dimension, one can reproduce the missing entries with fairly high
probability. But this gets signiﬁcantly more diﬃcult when the true rank is
higher.

Of course, the “exact” setting is often not realistic, and it might be more
reasonable to assume some subset of the entries are observed with additional
noise, as in observation model (7.7)—that is, Z = L∗+W, where L∗ has rank r.
In this setting, exact matrix completion is not generally possible, and we would
be interested in how well we can approximate the low-rank matrix L∗ using the

MISSING DATA AND MATRIX COMPLETION

179

Figure 7.4 Convex matrix completion in the no-noise setting. Shown are probabili-
ties of exact completion (mean ± one standard error) as a function of the proportion
missing, for n × n matrices with n ∈ {20, 40}. The true rank of the complete matrix
is one in the left panel and ﬁve in the right panel.

−

estimator (7.10). Singular vector incoherence conditions are less appropriate
for noisy observations, because they are not robust to small perturbations.
To understand this issue, suppose that we start with a matrix B that has
rank r
1, Frobenius norm one, and is maximally incoherent, meaning that
all its singular vectors are orthogonal to the standard basis vectors. Recalling
the troublesome matrix Z from Equation (7.16), now consider the perturbed
matrix L∗ = B + δZ for some δ > 0. The matrix L∗ always has rank r, and no
matter how small we choose the parameter δ, it is always maximally coherent,
Rp as one of its singular vectors.
since it has the standard basis vector e1
An alternative criterion that is not sensitive to such small perturbations is
based on the “spikiness” ratio of a matrix (Negahban and Wainwright 2012).
Rp×p, we deﬁne αsp(L) = pkLk∞
In particular, for any nonzero matrix L
,
kLkF
where
∞ is the element-wise maximum absolute value of the matrix entries.
L
k
This ratio is a measure of the uniformity (or lack thereof) in the spread of
the matrix entries; it ranges between 1 and p. For instance, any matrix L
with all equal entries has αsp(L) = 1, the minimal value, whereas the spikiest
possible matrix such as Z from Equation (7.16) achieves the maximal spikiness
ratio αsp(Z) = p. In contrast to singular vector incoherence, the spikiness
ratio involves the singular values (as well as the vectors). Thus, the matrix
L∗ = B + δZ. will have a low spikiness ratio whenever the perturbation δ > 0
is suﬃciently small.

∈

∈

k

For the nuclear-norm regularized estimator (7.10) with a bound on the

0.00.20.40.60.00.20.40.60.81.0Proportion MissingProbability of Exact CompletionRank 1p=20p=400.00.20.40.60.00.20.40.60.81.0Proportion MissingProbability of Exact CompletionRank 5180

MATRIX DECOMPOSITIONS

spikiness ratio, Negahban and Wainwright (2012) show that the estimate bL
satisﬁes a bound of the form

bL

k

L∗
2
F
k
2
F ≤
k

−
L∗
k

C max (cid:8)σ2, α2

sp(L∗)(cid:9) rp log p

N

(7.19)

with high probability over the sampling pattern, and random noise (assumed
i.i.d., zero-mean with all moments ﬁnite, and variance σ2). See also Keshavan,
Montanari and Oh (2010) and Koltchinskii, Lounici and Tsybakov (2011), who
prove related guarantees for slightly diﬀerent estimators.

Figure 7.5 Performance of the nuclear-norm regularized estimator (7.10), solved
via the Soft-Impute algorithm, for noisy matrix completion under the model (7.7)
with matrix L∗ = CGT of rank r. Plots of the relative Frobenius norm error kbL −
F for p = 50 as a function of the rank ratio δ = r log p
F/kL∗k2
L∗k2
and observation
ratio ν = N
p2 , corresponding to the fraction of observed entries in a p × p matrix.
Observations were of the linear form (7.7) with wij ∼ N (0, σ2) where σ = 1/4, and
we used the Soft-Impute algorithm to solve the program (7.10) with λ/N = 2σp p
N ,
the latter choice suggested by theory. The theory also predicts that the Frobenius error
should be low as long as ν (cid:37) δ, a prediction conﬁrmed in this plot.

p

In order to better understand the guarantee (7.19), we carried out a sim-
(0, 1), corresponding to the fraction

ulation. Let us deﬁne the ratio ν = N
of observed entries in a p
, corre-
sponding to the relative rank of the matrix (up to a logarithmic factor). For
a constant noise variance and spikiness ratio, the bound predicts that the es-
timator (7.10) should have low relative mean-squared error whenever ν > δ.
Figure 7.5 conﬁrms this prediction, and shows that the theory is actually
somewhat conservative; see the ﬁgure caption for further details.

p matrix, and the rank ratio δ = r log p

p2 ∈

×

p

Rank RatioObservation RatioPerformance of Nuclear Norm Regularization  0.10.20.30.40.50.60.70.80.910.90.80.70.60.50.40.30.20.10.10.20.30.40.50.60.70.80.91MISSING DATA AND MATRIX COMPLETION

181

Figure 7.6 Matrix completion via Soft-Impute in the noisy setting. The plots show
the imputation error from matrix completion as a function of the proportion missing,
for 40 × 40 matrices. Shown are the mean absolute error( ± one standard error) over
100 simulations, all relative to the noise standard deviation. In each case we chose
the penalty parameter to minimize the imputation error, and the results would be
somewhat worse if that parameter were chosen by cross-validation. The true rank of
the complete matrix is one in the left panel and ﬁve in the right panel. The average
absolute size of each matrix entry was 0.80 and 1.77 in the left and right panels,
respectively.

Figure 7.6 is another illustration of the imputation error from matrix com-
pletion in the noisy setting. Here we use Soft-Impute on 40
40 matrices,
with entries generated from a standard Gaussian matrix with rank r = 1 or
5, plus noise of standard deviation σ = 0.5. We see that for rank one, we
can impute the missing values with average error close to σ even when the
proportion missing is as high as 50%. However when the true rank increases
to ﬁve, the procedure starts to break down at about 30% missing.

×

7.3.4 Maximum Margin Factorization and Related Methods

Here we discuss a class of techniques that are close in spirit to the method of
the previous section. These are known as maximum margin matrix factoriza-
tion methods (MMMF), and use a factor model for approximating the matrix
Z (Rennie and Srebro 2005).4 Consider a matrix factorization of the form
M = ABT , where A and B are m
r, respectively. One way to

r and n

×

×

4The “maximum margin” refers to the particular margin-based loss used by these au-
thors; although we use squared-error loss, our focus is on the penalty, so we use the same
acronym.

0.00.20.40.61.01.52.02.53.03.5Proportion MissingAverage Relative ErrorRank 10.00.20.40.61.01.52.02.53.03.5Proportion MissingAverage Relative ErrorRank 5182

MATRIX DECOMPOSITIONS

estimate such a factorization is by solving the optimization problem

minimize
A∈Rm×r
B∈Rn×r

(cid:8)

Ω(Z)

kP

Ω(ABT )
k

− P

2

F + λ (cid:0)

2
F +

A
k

k

B
k
k

(cid:1)(cid:9) .

2
F

(7.20)

Interestingly, this problem turns out to be equivalent to the nuclear norm
regularized problem (7.10) for suﬃciently large r, in a way that we now make
precise. First, for any matrix M, it can be shown (Rennie and Srebro 2005,
Mazumder et al. 2010) that

M
k
k

? =

min
A∈Rm×r, B∈Rn×r
M=ABT

(cid:0)

1
2

2
F +

A
k

k

B
k

k

(cid:1)

2
F

(7.21)

As shown in Exercise 7.6, the solution to the problem (7.21) need not be
unique. However, the equivalence (7.21) implies that the family of solutions
cM = bA bBT of the biconvex problems (7.20) for r
min(m, n) are the same as
those for the family of convex problems (7.10). To be more speciﬁc, we have
the following result:

≥

m, n
{
}
0.
≥

Theorem 1. Let Z be an m
(a) The solutions to the MMMF criterion (7.20) with r = min
nuclear norm regularized criterion (7.10) coincide for all λ

n matrix with observed entries indexed by Ω.
and the

×

≥

(b) For some ﬁxed λ∗ > 0, suppose that the objective (7.10) has an opti-
mal solution with rank r∗. Then for any optimal solution ( bA, bB) to the
r∗ and λ = λ∗, the matrix cM = bA bBT is an op-
problem (7.20) with r
timal solution for the problem (7.10). Consequently, the solution space of
the objective (7.10) is contained in that of (7.20).
The MMMF criterion (7.20) deﬁnes a two-dimensional family of models
indexed by the pair (r, λ), while the Soft-Impute criterion (7.10) deﬁnes a
one-dimensional family. In light of Theorem 1, this family is a special path
. Figure 7.7 depicts
in the two-dimensional grid of solutions
the situation. Any MMMF model at parameter combinations above the red
points are redundant, since their ﬁt is the same at the red point. However, in
practice the red points are not known to MMMF, nor is the actual rank of the
solution. Further orthogonalization of bA and bB would be required to reveal
the rank, which would only be approximate (depending on the convergence
criterion of the MMMF algorithm). In summary, the formulation (7.10) is
preferable for two reasons: it is convex and it does both rank reduction and
regularization at the same time. Using (7.20) we need to choose the rank of
the approximation and the regularization parameter λ.

bA(r,λ), bB(r,λ)

(cid:17)

(cid:16)

In a related approach, Keshavan et al. (2010) propose the criterion

Ω(Z)

kP

Ω(USVT )
k

2
F + λ

2
F,
S
k
k

− P

(7.22)

to be minimized over the triplet (U, V, S), where UT U = VT V = Ir and

MISSING DATA AND MATRIX COMPLETION

183

Figure 7.7 Comparison of the parameter space for MMMF (gray and black points),
and Soft-Impute (red points) for a simple example. MMMF solutions for ranks
above the red points are identical to the Soft-Impute solutions at the red points and
hence the gray points are redundant. On the other hand, ﬁxing a rank for MMMF
(for a given λ) that is less than that of the Soft-Impute solution leads to a non-
convex problem.

×

S is an r
r matrix. For a ﬁxed rank r, they minimize the criterion (7.22)
by gradient descent. This criterion is similar to the MMMF criterion (7.20),
except that the matrices U, V are constrained to be orthonormal, so that
the “signal” and corresponding regularization are shifted to the (full) matrix
S. Like MMMF, the problem is nonconvex so that gradient descent is not
guaranteed to converge to the global optimum; moreover, it must be solved
separately for diﬀerent values of the rank r.

∈

∈

×

Keshavan et al. (2010) provide some asymptotic theory for the estima-
tor (7.22) when applied to noisy matrix completion, using a scaling in which
(0, 1). Here is a rough
the aspect ratio m/n converges to some constant α
n matrix Z that can be written
description of one such result. Consider an m
Rr×r is a diagonal matrix.
as a sum of the form Z = UΣV + W, where Σ
Here the term W is a random matrix with i.i.d. entries, each with zero mean
and variance σ2√mn. Each entry of the matrix Z is assumed to be observed
independently with probability ρ. Let bZ be the estimate obtained by mini-
mizing the criterion (7.22) using the optimal value for λ. For this criterion,
2
2
Z
Keshavan et al. (2010) show that the relative error
F converges
F/
bZ
k
k
k
(0, 1). The constant
in probability to a quantity 1
α
→
c(ρ) is zero if σ2/ρ
maxjj Σjj and nonzero otherwise. This shows that the
estimator undergoes a phase transition: if the noise and probability of missing
entries are low relative to the signal strength, then the missing entries can be
recovered successfully. Otherwise they are essentially useless in reconstructing
the missing entries. Full details may be found in Keshavan et al. (2009) and
Keshavan et al. (2010).

c(ρ) as as m/n

Z
k

−
∈

−

≥

−4−20246020406080100Rankrlogλ184

MATRIX DECOMPOSITIONS

7.4 Reduced-Rank Regression

In this section we brieﬂy revisit a topic touched on in Section 4.3, namely mul-
RK and covariates
tivariate regression. We have vector-valued responses yi
Rp, and we wish to build a series of K linear regression models. With N
xi
observations on (yi, xi), we can write these regression models in matrix form
as

∈

∈

Y = XΘ + E,

(7.23)

with Y
RN ×K a matrix of errors.

RN ×K, X

∈

∈

RN ×p, Θ

Rp×K a matrix of coeﬃcients, and E

∈

∈

The simplest approach would be to ﬁt K separate models, perhaps via
the lasso or elastic net. However, the idea is that the responses may have a
lot in common, and these similarities can be used to borrow strength when
ﬁtting the K regression models. In Section 4.3, we used the group lasso to
select variables simultaneously for each response; i.e., we used the group lasso
to set whole rows of Θ to zero. In this section we instead assume Θ has low
rank. The same ideas underlie multitask machine learning. Hence we entertain
models of the form

∈

Y = XABT + E,

Rp×r and B

(7.24)
RK×r. One can think of having r < K derived
with A
features Z = X bA which are then distributed among the responses via K
separate regressions bY = Z bBT . Although ﬁtting (7.24) by least-squares is
a nonconvex optimization problem, with N > p closed-form solutions are
available through a form of canonical-correlation analysis (Hastie et al. 2009).

∈

Example 7.1. As an example, we consider the problem of video denoising. Fig-
ure 7.8 shows four representative images of a video taken by a helicopter ﬂying
over the desert. Each column j of the matrix Y represents an image frame (in
a vectorized form) at a time k, and the full matrix Y represents a video con-
sisting of K image frames. The p columns of X represent a dictionary of image
basis functions (e.g.,unions of orthonormal bases; see Chapter 10). Imposing a
low rank model on Θ is reasonable when the video sequence changes relatively
slowly over time (as they do in this sequence), so that most of its variation
can be described by linear combinations of a small number of representative
images.

Figure 7.9 shows the SVD computed using K = 100 frames from the video
in Figure 7.8; although the matrix Y is not exactly low-rank, its singular
values decay rapidly, suggesting that it can be well-approximated by a low-
rank matrix.

♦
As before, the nuclear norm is a useful convex penalty for enforcing low-
rank structure on an estimate. In this case we would solve the optimization
problem

(cid:8)

minimize
Θ∈Rp×K

Y
k

XΘ
k

−

2
F + λ

Θ
k

?
k

(cid:9) ,

(7.25)

and for suﬃciently large values of λ the solution bΘ would have rank less than
min(N, K).

A GENERAL MATRIX REGRESSION FRAMEWORK

185

Figure 7.8 Four 352×640 image frames from a video sequence of a helicopter ﬂying
N with N = 352 × 640 =
over the desert. Each image was converted to a vector in R
225280 elements, and represented by one column of the matrix Y.

7.5 A General Matrix Regression Framework

In this section we present a general “trace” regression framework, that includes
matrix completion and reduced-rank regression as special cases. This general
framework allows for a uniﬁed theoretical treatment.

Let’s start with matrix completion. Let M represent a model underlying a
n matrix Z that we wish to complete. Then we consider

partially observed m
observations (Xi, yi), i = 1, 2, . . . ,

×

from the model

Ω
|
yi = trace(XT

|

i M) + εi.

(7.26)

×

n matrices and yi and εi are scalars. The observation
Here Xi are m
model (7.26) can be viewed as a regression with inputs the matrices Xi and
outputs the yi. The trace inner product on matrices plays the role of an or-
dinary inner product on vectors, but otherwise everything is conceptually the
same as in a usual regression model.5

To relate this to matrix completion, let [a(i), b(i)] be the row-column
indices of the matrix entry observed in observation i. We then deﬁne

5Recall that if A and B are both m × n matrices, trace(AT B) = Pm

i=1

Pn

j=1

aij bij .

186

MATRIX DECOMPOSITIONS

p×K using K = 100 frames from
Figure 7.9 Singular values of the matrix Y ∈ R
the video sequence. Note the rapid decay, showing that a low-rank approximation is
possible.

‘ ∈

a(i)em
b(i)

T , where em

Xi = en
Rm denotes the unit m-vector with a single
one in the ‘th coordinate, so that Xi is zero everywhere except at position
[a(i), b(i)]. With this choice, we have trace(XT
i M) = ma(i) b(i), so that the
observation model (7.26) provides us with certain entries of M—those in the
training set Ω—each contaminated with noise εi. Our goal is to predict the un-
observed entries in Z via cM, which can be thought of as E(y∗
X∗) for feature
values X∗ that are distinct from those in the training set.

|

The trace observation model (7.26) is also relevant in a more general set-
ting, since with diﬀerent choices of the covariate matrices
, it can also be
used to model other types of matrix estimation problems involving low-rank
constraints.

Xi
{

}

The multiresponse regression model of the previous section is another
example. The response and covariate vectors are linked via the equation
yi = ΘT xi + (cid:15)i, where Θ
Rp×K is a matrix of regression coeﬃcients, and
RK is a noise vector. Since each response yi is a K-vector of observations,
(cid:15)i
it can be rewritten as a collection of K separate observations in the trace
form: if we set Xij = xieK
RK is the unit vector with a single
j ∈
j
one in the jth position, then the jth component of yi can be expressed in the
form yij = trace(XT

where eK

ijΘ) + (cid:15)ij.

∈

∈

T

In the context of multivariate regression, the matrix lasso takes the form

minimize
Θ






1
2N

N
X

K
X

i=1

j=1

(cid:0)yij

−

trace(XT

ijΘ)(cid:1)2

+ λ

Θ
k

?
k






.

(7.27)

Exercise 7.9 explores another example. See the papers by Yuan, Ekici, Lu
and Monteiro (2007), Negahban and Wainwright (2011a), and Rohde and
Tsybakov (2011) for further details and beneﬁts of this uniﬁed approach. See

0204060801000.00.20.40.60.81.0IndexSingular ValueSVD for K=100 FramesPENALIZED MATRIX DECOMPOSITION

187

also Bunea, She and Wegkamp (2011) for analysis of an alternative procedure
for reduced-rank multivariate regression.

7.6 Penalized Matrix Decomposition

Maximum-margin matrix factorization methods lead naturally to other forms
of regularization such as the ‘1-penalized version

minimize
U∈Rm×r, V∈Rn×r
D∈Rr×r

(cid:8)

Z
k

−

UDVT

2
F + λ1

k

1 + λ2

U
k

k

V

1
k

k

(cid:9) ,

(7.28)

where D is diagonal and nonnegative. Here we assume that all values of Z are
observed, and apply an ‘1 penalty to the left and right singular vectors of the
decomposition. The idea is to obtain sparse versions of the singular vectors
for interpretability.

Before discussing how to optimize the criterion (7.28), let’s see how it
can be used. Returning to the Netﬂix example, we created a smaller matrix
consisting of the 1000 users and the 100 movies, each with the most ratings.
We imputed the missing values using an iterated rank 10 SVD (Section 7.3).
Then we set the rank of U and V to two, and minimized a version of the
criterion (7.28) for values of λ1 and λ2 that yielded a very sparse solution.
The resulting solution bV had 12 nonzero entries, all with the same sign, cor-
responding to the movies in Table 7.3. The ﬁrst group looks like a mixture

Table 7.3 Movies with nonzero loadings, from a two-dimensional penalized matrix
decomposition.

First Component

Second Component

The Wedding Planner
Gone in 60 Seconds
The Fast and the Furious
Pearl Harbor
Maid in Manhattan
Two Weeks Notice
How to Lose a Guy in 10 Days

Lord of the Rings: The Fellowship of the Ring
The Last Samurai
Lord of the Rings: The Two Towers
Gladiator
Lord of the Rings: The Return of the King

of romantic comedies and action movies, while the second group consists of
historical action/fantasy movies.

How do we solve the optimization problem (7.28)? Let us ﬁrst consider
the one-dimensional case, written in the constrained rather than Lagrangian
form:

minimize
u∈Rm, v∈Rn
d≥0

Z
k

−

duvT

k

2
F subject to

u

k

1

k

≤

c1 and

v
k

1
k

≤

c2.

(7.29)

188

MATRIX DECOMPOSITIONS

It turns out that the estimator (7.29) is not very useful, as it tends to produce
solutions that are too sparse, as illustrated in Figure 7.10 (right panel). In
order to ﬁx this problem, we augment our formulation with additional ‘2-
norm constraints, thereby obtaining the optimization problem

minimize
u∈Rm, v∈Rn
d≥0

Z
k

−

duvT

2
F subject to
k

u
k

k

1

≤

c1,

v
k

1
k

≤

c2,

u

k

2
k

≤

1,

v

k

2
k

≤

1.

(7.30)

It may seem surprising that adding constraints can make the solution sparse,
but Figure 7.10 provides some insight.

√

2. The constraints kuk1 = 1 and kuk1 =

2 in
Figure 7.10 A graphical representation of the ‘1 and ‘2 constraints on u ∈ R
the PMD(‘1, ‘1) criterion. The constraints are as follows: kuk2
2 ≤ 1 and kuk1 ≤ c.
The gray lines indicate the coordinate axes u1 and u2. Left panel: The ‘2 constraint
is the solid circle. For both the ‘1 and ‘2 constraints to be active, the constraint
2 are
radius c must be between 1 and
shown using dashed lines. Right panel: The ‘2 and ‘1 constraints on u are shown
for some c between 1 and
2. Red dots indicate the points where both the ‘1 and
the ‘2 constraints are active. The red contour shows the boundary of the constraint
region. The black lines are the linear contours of the criterion (7.30) as a function
of u, which increase as we move to the upper right in this example. The solid red
arcs indicate the solutions that occur when λ1 = 0 in Algorithm 7.2 (‘2 active, ‘1
not). The ﬁgure shows that in two dimensions, the points where both the ‘1 and ‘2
constraints are active have neither u1 nor u2 equal to zero. We also see that without
the ‘2 constraints, we would always end up at a corner; this would lead to trivial
solutions.

√

√

If we ﬁx the second component v, the criterion (7.30) is linear in u. Suppose
that the linear contour of the criterion is angled as in Figure 7.10 and not
exactly parallel to a side of the polyhedral constraint region. Then to solve
the problem, we move the linear contour toward the top right as far as possible
while still remaining inside the constraint region. The solution occurs at one

−1.5−0.50.51.01.5−1.5−0.50.51.01.5−1.5−0.50.51.01.5−1.5−0.50.51.01.5u1u1u2u2PENALIZED MATRIX DECOMPOSITION

189

of the open circles, or on the solid red contour. Notice that without the ‘2
constraint, the solution will occur at a corner of the polyhedron where only one
coeﬃcient is nonzero. As shown in the left panel of Figure 7.10, the problem
is well deﬁned as long as 1

√m and 1
Since the criterion (7.30) is biconvex, we can minimize it in an alternat-
ing fashion. It is easy to verify that the solution in each direction is a soft-
thresholding operation. For example, the update for v

Rn takes the form

√n.

c1

c2

≤

≤

≤

≤

∈

u

←

S
λ1
kS

(cid:0)Zv(cid:1)
λ1
(cid:0)Zv(cid:1)

2
k

.

(7.31)

Here we apply our soft-thresholding operator

element-wise on its vector

S

Algorithm 7.2 Alternating soft-thresholding for rank-one penal-
ized matrix decomposition.
1. Set v to the top left singular vector from the SVD of Z.

2. Perform the update u

(cid:0)Zv(cid:1)
(cid:0)Zv(cid:1)k2

Sλ1
kSλ1

←

, with λ1 being the smallest value such

that

u
k

k

1

≤

c1;

3. Perform the update v

(cid:0)ZT u(cid:1)
(cid:0)ZT u(cid:1)k2

Sλ2
kSλ2

←

, with λ2 being the smallest value

v

such that

c2;
4. Iterate steps 2 and 3 until convergence.
5. Return u, v and d = uT Zv.

1
k

≤

k

argument. The threshold λ1 in Equation (7.31) must be chosen adaptively
c1, and
to satisfy the constraints: it is set to zero if this results in
1
k
otherwise λ1 is chosen to be a positive constant such that
1 = c1. (See
k
Exercise 7.7). The overall procedure is summarized in Algorithm 7.2. We note
that if c1 > √m and c2 > √n so that the ‘1 constraints have no eﬀect,
then Algorithm 7.2 reduces to the power method for computing the largest
singular vectors of the matrix Z. See Section 5.9 for further discussion of
the (ordinary) power method. Some recent work has established theoretical
guarantees for iterative soft thresholding updates related to Algorithm 7.2;
see the bibliographic section for further details.

u
k
u
k

≤

The criterion (7.30) is quite useful and may be used with other penalties
(in addition to the ‘1-norm) for either u or v, such as the fused lasso penalty

Φ(u) =

m
X

j=2

uj

|

−

uj−1

,
|

(7.32)

where u = (u1, u2, . . . um). This choice is useful for enforcing smoothness along
a one-dimensional ordering j = 1, 2, . . . m, such as chromosomal position in

190

MATRIX DECOMPOSITIONS

a genomics application. Depending on this choice of penalty, the correspond-
ing minimization in Algorithm 7.2 must change accordingly. In addition, one
can modify Algorithm 7.2 to handle missing matrix entries, for example by
omitting missing values when computing the inner products Zv and ZT u.

To obtain a multifactor penalized matrix decomposition, we apply the
rank-one Algorithm (7.2) successively to the matrix Z, as given in Algo-
rithm 7.3. If ‘1 penalties on uk and vk are not imposed—equivalently, if we

Algorithm 7.3 Multifactor penalized matrix decomposition
1. Let R

Z.

←

2. For k = 1, . . . K:

(a) Find uk, vk, and dk by applying the single-factor Algorithm 7.2 to

data R.

(b) Update R

R

−

←

dkukvT
k .

set λ1 = λ2 = 0 in Algorithm 7.2—then it can be shown that the K-factor
PMD algorithm leads to the rank-K SVD of Z. In particular, the successive
solutions are orthogonal. With penalties present, the solutions are no longer
in the column and row spaces of Z, and so the orthogonality does not hold.

It is important to note the diﬀerence between sparse matrix decomposition
and matrix completion, discussed earlier. For successful matrix completion, we
required that the singular vectors of Z have low coherence; that is, they need
to be dense. In sparse matrix decomposition, we seek sparse singular vectors,
for interpretability. Matrix completion is not the primary goal in this case.

Unlike the minimization of convex functions, alternating minimization of
biconvex functions is not guaranteed to ﬁnd a global optimum. In special cases,
such as the power method for computing the largest singular vector, one can
show that the algorithm converges to a desired solution, as long as the start-
ing vector is not orthogonal to this solution. But in general, these procedures
are only guaranteed to move downhill to a partial local minimum of the func-
tion; see Section 5.9 for discussion of this issue. Based on our experience,
however, they behave quite well in practice, and some recent theoretical work
provides rigorous justiﬁcation of this behavior. See the bibliographic section
for discussion.

Lee, Shen, Huang and Marron (2010) suggest the use of the penalized ma-
trix decomposition for biclustering of two-way data. In Chapter 8 we describe
applications of the penalized matrix decomposition to derive penalized mul-
tivariate methods such as sparse versions of principal components, canonical
correlation, and clustering.

7.7 Additive Matrix Decomposition

In the problem of additive matrix decomposition, we seek to decompose a
matrix into the sum of two or more matrices. The components in this additive

ADDITIVE MATRIX DECOMPOSITION

191

composition should have complementary structures; for instance, one of the
most widely studied cases involves decomposing into the sum of a low-rank
matrix with a sparse matrix (see also Section 9.5). Additive matrix decomposi-
tions arise in a wide variety of applications, among them factor analysis, robust
forms of PCA and matrix completion, and multivariate regression problems,
as discussed below.

Most of these applications can be described in terms of the noisy linear
observation model Z = L∗ + S∗ + W, where the pair (L∗, S∗) specify the
additive matrix decomposition into low rank and sparse components, and W
is a noise matrix. In certain cases, we consider a slight generalization of this
model, in which we observe a noisy version of X(L∗ + S∗), where X is some
type of linear operator on the matrix sum (e.g., the projection operator
Ω
in the case of matrix completion, or multiplication via the model matrix X in
the case of matrix regression.

P

Given such observations, we consider estimators of the pair (L∗, S∗) based

on the criterion

(cid:26) 1
2 k

Z

−

minimize
L∈Rm×n
S∈Rm×n

(L + S)

2
F + λ1Φ1(L) + λ2Φ2(S)
k

(cid:27)

,

(7.33)

where Φ1 and Φ2 are penalty functions each designed to enforce a diﬀerent
type of generalized sparsity. For instance, in the case of low rank and sparse
matrices, we study the choices Φ1(L) =

? and Φ2(S) =

We now turn to some applications of additive matrix decompositions.

S
k

1.
k

L
k
k

Factor Analysis with Sparse Noise: Factor analysis is a widely used form of
linear dimensionality reduction that generalizes principal component analy-
sis. Factor analysis is easy to understand as a generative model: we generate
Rp using the “noisy subspace” model
random vectors yi

∈
yi = µ + Γui + wi,

for i = 1, 2, . . . , N .

(7.34)

∼

Rp is a mean vector, Γ
N (0, Ir×r) and wi

Rp×r is a loading matrix, and the random
Here µ
∈
N (0, S∗) are independent. Each vector yi
vectors ui
drawn from model (7.34) is obtained by generating a random element in the
r-dimensional subspace spanned by the columns of Γ. Given N samples from
this model, the goal is to estimate the column of the loading matrix Γ, or
equivalently, the rank r matrix L∗ = ΓΓT
Rp×p that spans the column
space of Γ.

∈
∼

∈

A simple calculation shows that the covariance matrix of yi has the form
Σ = ΓΓT + S∗. Consequently, in the special case when S∗ = σ2Ip×p, then
the column span of Γ is equivalent to the span of the top r eigenvectors of
Σ, and so we can recover it via standard principal components analysis. In
particular, one way to do so is by computing the SVD of the data matrix
RN ×p, as discussed in Section 7.2. The right singular vectors of Y spec-
Y
ify the eigenvectors of the sample covariance matrix, which is a consistent
estimate of Σ.

∈

192

MATRIX DECOMPOSITIONS

What if the covariance matrix S∗ is not a multiple of the identity? A
typical assumption in factor analysis is that S∗ is diagonal, but with the noise
variance depending on the component of the data. More generally, it might
have nonzero entries oﬀ the diagonal as well, but perhaps a relatively small
number, so that it could be represented as a sparse matrix. In such settings,
we no longer have any guarantees that the top r eigenvectors of Σ are close to
the column span of Γ. When this is not the case, PCA will be inconsistent—
meaning that it will fail to recover the true column span even if we have an
inﬁnite sample size.

}

∈

yi
{

Rp×p be the sample covariance matrix 1
N

Nonetheless, when S∗ is a sparse matrix, the problem of estimating
L∗ = ΓΓT can be understood as an instance of our general observation model
N
i=1, we can let our
with p = N . In particular, given our observations
PN
i−1 yiyT
i .
observation matrix Z
With this algebra, we can then write Z = L∗ + S∗ + W, where L∗ = ΓΓT is of
rank r, and the random matrix W is a re-centered form of Wishart noise—in
particular, the zero-mean matrix W : = 1
N
Robust PCA: As discussed in Section 7.2, standard principal component
analysis is based on performing an SVD of a (column centered) data ma-
RN ×p, where row i represents the ith sample of a p-dimensional data
trix Z
vector. As shown there, the rank-r SVD can be obtained by minimizing the
2
squared Frobenius norm
L
F subject to a rank constraint on L. What
k
if some entries of the data matrix Z are corrupted? Or even worse, what if
some subset of the rows (data vectors) are corrupted? Since PCA is based
on a quadratic objective function, its solution (the rank r SVD) can be very
sensitive to these types of perturbations.

(cid:8)L∗ + S∗(cid:9).

i=1 yiyT

i −

PN

−

Z

∈

k

Additive matrix decompositions provide one way in which to introduce
some robustness to PCA. In particular, instead of approximating Z with a
low-rank matrix, we might approximate it with the sum L + S of a low-
rank matrix with a sparse component to model the corrupted variables. In
the case of element-wise corruption, the component S would be modeled as
element-wise sparse, having relatively few nonzero entries, whereas in the more
challenging setting of having entirely corrupted rows, it would be modeled as
a row-sparse matrix. Given some target rank r and sparsity k, the direct
approach would be to try and solve the optimization problem

minimize
rank(L)≤r
card(S)≤k

1
2 k

Z

(L + S)
k

−

2
F.

(7.35)

Here card denotes a cardinality constraint, either the total number of nonzero
entries (in the case of element-wise corruption), or the total number of nonzero
rows (in the case of row-wise corruption). Of course, the criterion (7.35) is
doubly nonconvex, due to both the rank and cardinality constraints, but a
natural convex relaxation is provided by our general estimator (7.33) with
Φ1(L) =

for element-wise sparsity.

sij

? and Φ2(S) = P
L
k

k

i,j |

Figure 7.11 shows an example of robust PCA with the above penalties,

|

ADDITIVE MATRIX DECOMPOSITION

193

taken from an unpublished paper by Mazumder and Hastie and using images
from Li, Huang, Gu and Tian (2004). The columns of the data matrix Z are
frames from a video surveillance camera, and are noisy and have missing pixel
values (next section). The last two columns show the reconstructed frames; the
low-rank part represents the static background, while the sparse component
changes in each frame, and in this case represent people moving.

True Image

Training Image

Low-Rank (bL)

Sparse (bS)

Figure 7.11 Video surveillance. Shown are the true image, noisy training image
with missing-values, the estimated low-rank part, and the sparse part aligned side by
side. The true images were sampled from the sequence and include ones with varying
illumination and some benchmark test sequences. Despite the missingness and added
noise the procedure succeeds in separating the moving components (people) from the
ﬁxed background.

Robust Matrix Completion: Robustness is also a concern for matrix-com-
pletion methods (Section 7.3), which are used in collaborative ﬁltering and
recommender systems. Ratings may be corrupted for various reasons: for in-
stance, users might try to “game” the system (e.g., a movie star would like to
have his/her movies more highly recommended by Netﬂix). Alternatively, a
subset of users might simply be playing pranks with their ratings; for instance,
in 2002, The New York Times reported how the Amazon system had been ma-
nipulated by adversarial users, so that it would recommend a sex manual to
users who expressed interest in Christian literature (Olsen 2002).

As we did for robust PCA, we can build in robustness to matrix comple-
tion by introducing a sparse component S to our representation. The nature
of sparsity depends on how we model the adversarial behavior: if we believed
that only a small fraction of entries were corrupted, then it would be appro-
priate to impose element-wise sparsity via the ‘1-norm. On the other hand,
if we wished to model users (rows) as being adversarial, then it would be ap-

194

MATRIX DECOMPOSITIONS

propriate to impose a row-wise sparsity penalty, such as the group lasso norm
Rn denotes the ith row of the matrix. This
k
choice would lead to the following modiﬁcation of our earlier estimator (7.10):

1,2 = Pm
S
k

2, where Si
k

i=1 k

Si

∈

minimize
L,S∈Rm×n






1
2

X

(i,j)∈Ω

(zij

−

(Lij + Sij))2 + λ1

? + λ2
L
k

k

m
X

i=1

Si
k

2

k






.

(7.36)

Exercise 7.10 shows an equivalence between this criterion and a nuclear-norm
regularized robust Huber loss. Hence one can develop an algorithm along the
lines of Soft-Impute in Section 7.1, replacing the squared-error loss with
the Huber loss. Figure 7.11 shows the results of this approach on some video-
surveillance data.

∈

Multivariate Regression: Recall the multivariate linear regression model
yi = ΘT xi + (cid:15)i, where Θ
Rp×K is a matrix of regression coeﬃcients used to
RK. As discussed in Section 7.5,
predict the multivariate response vector y
in one application of matrix regression, each column of the response matrix
Y represents a vectorized image, so that the full matrix represents a video
sequence consisting of K frames. The model matrix X represents p image
basis functions, one per column; for example, an orthonormal basis of two-
dimensional wavelets, at diﬀerent scales and locations (see Section 10.2.3).
Figure 7.8 showed that for certain types of video sequences, the matrix Y
exhibits rapid decay in its singular values, and so can be well-approximated
by a low-rank matrix.

∈

In a more realistic setting, a video sequence consists of both a background,
and various types of foreground elements. The background component is of-
ten slowly varying, so that the low-rank model is appropriate, whereas fore-
ground elements vary more rapidly, and may disappear and reappear. (The
“helicopter” sequence in Figure 7.8 can be viewed as pure background.) Con-
sequently, a more realistic model for the video sequence is based on decom-
position Θ = L + S, where L is low-rank, and S is a relatively sparse matrix.
Active entries of S correspond to the basis functions (rows) and time posi-
tions (columns) for representing the foreground elements that play a role in
the video.

Of course, these types of decompositions also arise in other applications of
multivariate regression. In the general setting, we try to recover the decom-
position using the estimator

minimize
L,S






1
2N

N
X

K
X

i=1

j=1

(cid:0)yij

−

trace(XT

ij(L + S))(cid:1)2

+ λ1

? + λ2
L
k

k

S
k
k

1





(7.37)

T

where Xij = xieK
for i = 1, . . . , N and j = 1, . . . , K. Note that this is a nat-
j
ural generalization of our earlier estimator (7.27) for nuclear-norm regularized
multivariate regression.

BIBLIOGRAPHIC NOTES

Bibliographic Notes

195

Early work by Fazel (2002) studied the use of the nuclear norm as a sur-
rogate for a rank constraint. Srebro, Alon and Jaakkola (2005) studied the
nuclear norm as well as related relaxations of rank constraints in the context
of matrix completion and collaborative ﬁltering. Bach (2008) derived some
asymptotic theory for consistency of nuclear norm regularization. Recht, Fazel
and Parrilo (2010) derived nonasymptotic bounds on the performance of nu-
clear norm relaxation in the compressed sensing observation model. See also
the papers Negahban and Wainwright (2011a), Rohde and Tsybakov (2011)
for nonasymptotic analysis of the nuclear norm relaxation for more general
observation models.

Maximum margin matrix factorization is discussed in Srebro and Jaakkola
(2003), Srebro, Alon and Jaakkola (2005), and Srebro, Rennie and Jaakkola
(2005). Spectral regularization and the Soft-Impute algorithm were devel-
oped by Mazumder et al. (2010). The penalized matrix decomposition is de-
scribed in Witten, Tibshirani and Hastie (2009). Matrix completion using
the nuclear norm has been studied by various authors, with initial results on
prediction-error bounds by Srebro, Alon and Jaakkola (2005). The ﬁrst the-
oretical results on exact recovery with noiseless observations for exactly low-
rank matrices were established by Cand`es and Recht (2009), with subsequent
reﬁnements by various authors. Gross (2011) developed a general dual-witness
scheme for proving exactness of nuclear norm relaxations given noiseless ob-
servations in arbitrary bases, generalizing the case of entry-wise sampling; see
also Recht (2011) for related arguments. Keshavan et al. (2009) provide ex-
act recovery guarantees for a slightly diﬀerent two-stage procedure, involving
trimming certain rows and columns of the matrix and then applying the SVD.
The more realistic noisy observation model has also been studied by various
authors (e.g., Cand`es and Plan (2010), Negahban and Wainwright (2012),
Keshavan et al. (2010)).

The problem of additive matrix decomposition was ﬁrst considered
by Chandrasekaran, Sanghavi, Parrilo and Willsky (2011) in the noiseless
setting, who derived worst-case incoherence conditions suﬃcient for exact re-
covery of an arbitrary low-rank/sparse pair. Subsequent work by Cand`es, Li,
Ma and Wright (2011) studied the case of random sparse perturbations to
the low-rank matrix, with applications to robust PCA. Xu, Caramanis and
Sanghavi (2012) proposed an alternative approach to robust PCA, based on
modeling the corruptions in terms of a row-sparse matrix. Chandrasekaran,
Parrilo and Willsky (2012) developed the use of sparse/low-rank decomposi-
tions for the problem of latent Gaussian graphical model selection. In the more
general noisy setting, Hsu, Kakade and Zhang (2011) and Agarwal, Negahban
and Wainwright (2012b) provide bounds on relatives of the estimator (7.33).
A recent line of work has provide some theory for alternating mini-
mization algorithms in application to particular nonconvex problems,
in-
cluding matrix completion (Netrapalli, Jain and Sanghavi 2013), phase re-

196

MATRIX DECOMPOSITIONS

trieval (Netrapalli et al. 2013), mixtures of regression (Yi, Caramanis and
Sanghavi 2014), and dictionary learning (Agarwal, Anandkumar, Jain, Ne-
trapalli and Tandon 2014). These papers show that given suitable initial-
izations, alternating minimization schemes do converge (with high probabil-
ity) to estimates with similar statistical accuracy to a global minimum. Sim-
ilarly, there are also theoretical guarantees for variants of the power method
with soft thresholding for recovering sparse eigenvectors (Ma 2013, Yuan and
Zhang 2013).

Exercises

Ex. 7.1 Recall the singular value decomposition (7.2) of a matrix.
(a) Show that the SVD of the column-centered matrix Z gives the principal

components of Z.

(b) Show that the condition that successive PCs are uncorrelated is equiv-
are orthogonal. What is the
in Section 7.2 and the components of

alent to the condition that the vectors
relationship between the vectors
the SVD?

sj
{

vj

{

}

}

Ex. 7.2 In this exercise, we work through the proof of assertion (7.3), namely
that

bZr = arg min

rank(M)=r k

Z

−

2
F,
M
k

where bZr = UDrVT is the SVD truncated to its top r components. (In detail,
the SVD is given by Z = UDVT , and Dr is the same as D except all but the
ﬁrst r diagonal elements are set to zero.) Here we assume that m
n and
rank(Z) = m.

≤

We begin by noting that any rank r matrix M can be factored as M = QA,

Rm×r is an orthogonal matrix, and A

where Q
(a) Show that given Q, the optimal value for A is given by QT Z.
(b) Using part (a), show that minimizing

Rr×n.

∈

∈

Z
k
trace(QT ΣQ) subject to QT Q = Ir,

2
F is equivalent to solving
M
k
(7.38)

−

maximize
Q∈Rm×r

where Σ = ZZT .

(c) Show that this is equivalent to the problem

maximize
Q∈Rm×r

trace(QT D2Q) subject to QT Q = Ir.

(7.39)

(d) Given an orthonormal matrix Q

elements hii for i = 1, . . . , m. Show that hii
∈
Conclude that problem (7.39) is equivalent to

∈

Rm×r, deﬁne H = QQT with diagonal
[0, 1] and that Pm
i=1 hii = r.

m
X

i=1

hii d2
i .

(7.40)

maximize
hii∈[0,1]
Pm

hii=r

i=1

EXERCISES

197

(e) Assuming that d2

0, show that the solution to prob-
m ≥
lem (7.40) is obtained by setting h11 = h22 = . . . = hrr = 1, and setting
the remaining coeﬃcients zero. If the
are strictly ordered, show that
this solution is unique.

d2
2 ≥

d2
i }

. . . d2

1 ≥

{

(f) Conclude that an optimal choice for Q in problem (7.38) is U1, the matrix

formed from the ﬁrst r columns of U. This completes the proof.

Ex. 7.3
(a) ‘1 norm as an LP: For any vector β

Rp, show that

∈

β
k

1 = max
u∈Rp
k

p
X

j=1

ujβj subject to

u
k
k

∞

≤

1.

(7.41)

This relation expresses the fact that the ‘∞ norm is dual to the ‘1 norm.

(b) Nuclear norm as an SDP: For any matrix B

Rm×n, show that

∈

? = max
B
k
k

U∈Rm×n

trace(UT B) subject to

U

k

op
k

≤

1,

U
k

where
op is the maximum singular value of the matrix U, a quantity
k
known as the spectral norm or ‘2 operator norm. This relation expresses
the fact that the spectral norm is dual to the nuclear norm. (Hint: use the
SVD of Z and cyclical properties of trace operator in order to reduce this
to an instance of part (a).)

(c) Given a matrix U

∈
alent to the constraint

Rm×n, show that the inequality
(cid:19)

(cid:18) Im U
UT
In

0.

(cid:23)

U
k

k

op

≤

1 is equiv-

(7.42)

Since this constraint is a linear matrix inequality, it shows nuclear norm
minimization can be formulated as an SDP. (Hint: The Schur-complement
formula might be useful.)

Ex. 7.4 Subgradients of the nuclear norm: Subgradients, as previously deﬁned
in Section 5.2, extend the notion of a gradient to nondiﬀerentiable functions.
min(m, n), write its singular
(a) Given a matrix A
value decomposition as A = UDVT . With this notation, show that the
subgradient of the nuclear norm is

Rm×n with rank r

≤

∈

∂

A
k

? = (cid:8)UVT + W
k

|

UT W = WV = 0,

W
k

k

op

≤

1(cid:9) .

(7.43)

(b) Use part (a) to show that a ﬁxed point of the Soft-Impute proce-

dure (7.1) satisﬁes the subgradient equation of the criterion (7.10).

Ex. 7.5 From Chapter 5, recall our description (5.21) of Nesterov’s generalized
gradient procedure. Show that the Soft-Impute procedure (7.1) corresponds
to this algorithm applied to the criterion (7.10).

198

MATRIX DECOMPOSITIONS

Ex. 7.6 Construct a solution to the maximum-margin problem (7.21), in the
min(m, n), of the form cM = bAm×r bBT
case rank(M) = r
r×n. Show that this
solution is not unique. Suppose we restrict A and B to have r0 > r columns.
Show how solutions of this enlarged problem might not reveal the rank of M.

≤

Ex. 7.7 Consider the convex optimization problem

maximize
u∈Rp

uT Zv subject to

u

k

2

k

≤

1 and

u

k

1
k

≤

c.

(7.44)

Show that the solution is given by

λ
u = S
λ
kS

(cid:0)Zv(cid:1)
(cid:0)Zv(cid:1)

2
k

,

(7.45)

where λ

≥

0 is the smallest positive value such that

u
k

k

1

≤

c.

×

Ex. 7.8 In this exercise, we demonstrate that, in the context of exact com-
pletion of a n
n matrix M from noiseless entries, it is necessary to observe
at least N > n log n entries, even for a rank one matrix. We begin by noting
that if we fail to observe any entries from some row (or column) of M, then it
is impossible to recover M exactly (even if we restrict to incoherent matrices
with rank one). We let
be the event that there exists some row with no ob-
served entries, under the sampling model in which we choose N entries from
the matrix uniformly at random with replacement.
(a) For each row j = 1, . . . , p, let Zj be a binary indicator variable for the
j=1 Zj. Show that

event that no entries of j are observed, and deﬁne Z = Pn

F

P[

F

] = P[Z > 0]

(cid:0)

E[Z](cid:1)2
E[Z 2]

.

≥

(Hint: The Cauchy–Schwarz inequality could be useful.)

(b) Show that E[Z] = n(1
(c) Show that E[ZiZj]
(d) Use parts (b) and (c) so show that E[Z 2]
(e) Use the previous parts to show that P[

1/n)N .
−
E[Zi]E[Zj] for i

≤

= j.

F

unless N > n log n.

n(1

1/n)2N .
1/n)N + n2(1
≤
] stays bounded away from zero

−

−

Ex. 7.9 Quadratic polynomial regression in high dimensions is dangerous, be-
cause the number of parameters is proportional to the square of the dimension.
Show how to represent this problem as a matrix regression (Section 7.5), and
hence suggest how the parameter explosion can be controlled.

Ex. 7.10 . In Exercise 2.11 of Chapter 2, we show that a regression model that
allows for a sparse perturbation of each prediction is equivalent to a robust

6
EXERCISES

199

regression using Huber’s ρ function. Here we establish an analogous result for
robust PCA.

Recall the sparse plus low-rank version of PCA:

minimize
L,S

1
2 k

Z

2
F + λ1
(L + S)
k

L
k
k

−

? + λ2

1.

S
k
k

(7.46)

Now consider a robustiﬁed version of PCA

minimize
L

1
2

N
X

p
X

i=1

j=1

ρ (zij

−

‘ij; λ2) + λ1

?,
L
k

k

(7.47)

where

ρ(t; λ) =

(

λ
t
| −
|
t2/2

λ2/2

if
if

t
|
t
|

> λ
λ.

|
| ≤

(7.48)

is Huber’s loss function. Show that problem (7.47) has the same solution for
L as does problem (7.46).

Chapter 8

Sparse Multivariate Methods

8.1 Introduction

In this chapter, we discuss some popular methods for multivariate analysis
and explore how they can be “sparsiﬁed”: that is, how the set of features can
be reduced to a smaller set to yield more interpretable solutions. Many stan-
dard multivariate methods are derived from the singular value decomposition
of an appropriate data matrix. Hence, one systematic approach to sparse mul-
tivariate analysis is through a sparse decomposition of the same data matrix.
The penalized matrix decomposition of Section 7.6 is well-suited to this task,
as it delivers sparse versions of the left and/or right singular vectors.
For example, suppose that we have a data matrix X of dimension N

p, and
assume that the columns each have mean zero. Then the principal components
of X are derived from its singular value decomposition (SVD) X = UDVT :
the columns of V are the principal component direction vectors (in order), and
the columns of U are the standardized principal components. Hence we can
derive sparse principal components by applying instead the penalized matrix
decomposition to X, with sparsity enforced on the right vectors. In a similar
way, many multivariate methods can be derived by appropriate application
of the penalized matrix decomposition. These methods are summarized in
Table 8.1.

×

Table 8.1 The penalized matrix decomposition of Section 7.6 applied
to appropriate input matrices leads to sparse versions of classical mul-
tivariate methods.

Input Matrix

Result

Data matrix

sparse SVD and principal components

Variance-covariance

sparse principal components

Cross-products

Dissimilarity

sparse canonical variates

sparse clustering

Between-class covariance

sparse linear discriminants

201

202

SPARSE MULTIVARIATE METHODS

Figure 8.1 A two-dimensional illustration of principal components analysis, show-
2 of a collection of data points xi = (xi1, xi2),
ing the ﬁrst principal component v1 ∈ R
shown in green circles. Letting ¯x = (¯x1, ¯x2)T denote the sample mean, the line
¯x + λT v1 maximizes the variance of the projected points along the line, and min-
imizes the total squared distance from each point to its orthogonal projection onto
the line. Here zi1 = ui1d1 is the scalar valued representation of observation xi in the
ﬁrst principal component z1.

8.2 Sparse Principal Components Analysis

We begin our exploration with the problem of sparse principal component
analysis, which is a natural extension of PCA well-suited to high-dimensional
data. To set the stage, we ﬁrst review principal components.

8.2.1 Some Background

Given a data matrix X of dimension N
x1, . . . , xN
{
approximations, indexed by a rank r

p, consisting of N vectors
×
in Rp, principal component analysis provides a sequence of linear

p, N

min

}

There are two diﬀerent but equivalent ways of viewing and deriving prin-
cipal components. The ﬁrst approach is based on the directions of maximal
Rp leads to a one-dimensional projection
variance. Any unit-norm vector α
of the data, namely the N -vector Xα.1 Assuming that the columns of X have
been centered, the sample variance of the projected data vector is given by

∈

≤

{

.
}

N ×p;
1In this chapter we deal with multivariate methods applied to a data matrix X ∈ R
we hence adhere to our convention of representing N -vectors and all matrices in boldface,
and p-vectors in plain text.

−3−2−10123−3−2−10123x1x2v1zi1xiSPARSE PRINCIPAL COMPONENTS ANALYSIS

203

dVar(Xα) = 1
N
that maximizes the sample variance

i=1(xT

PN

i α)2. Principal components analysis ﬁnds the direction

v1 = arg max
kαk2=1

n

dVar(Xα)

o

= arg max
kαk2=1

(cid:26)

αT XT X
N

(cid:27)

α

.

(8.1)

Hence the ﬁrst principal component direction corresponds to the largest eigen-
value of the sample covariance XT X/N , which provides the link to the notion
of maximal variance at the population level. See Exercise 8.1 for further de-
tails. Figure 8.1 illustrates the geometry of this optimization problem. The
resulting projection z1 = Xv1 is called the ﬁrst principal component of the
data X, and the elements of v1 are called the principal component loadings.
The vector v1 is easily seen to be the right singular vector corresponding
to the largest singular value d1 of X. Similarly z1 = u1d1, where u1 is the
corresponding left singular vector.

Subsequent principal-component directions (eigen-vectors) v2, v3, . . . , vp
2 = 1 and vj orthogonal to
correspond to maxima of dVar(Xvj) subject to
k
v1, . . . vj−1. This property also implies that the zj are mutually uncorrelated
(see Exercise 8.2). In fact, after r steps of this procedure, we obtain a rank r
matrix that solves the optimization problem

vj

k

Vr = arg max
A: AT A=Ir

trace(AT XT XA)

(8.2)

See Exercise 7.2 for further details on this property. Thus, even though they
are deﬁned sequentially, the collection of loading vectors in Vr also maximize
the total variance among all such collections.

A second derivation of principal components is based on minimizing the
reconstruction error associated with a particular generative model for the
data. Suppose that the rows of the data matrix can be modeled as xi
f (λi),
where the function

≈

f (λ) = µ + Arλ

(8.3)
Rp is a location vector,
Rp×r is a matrix with orthonormal columns corresponding to directions,
Rr is a parameter vector that varies over samples. It is natural to
to minimize the average reconstruction

parametrizes an aﬃne set of dimension r. Here µ
Ar
∈
and λ
choose the parameters
error

N
i=1}

µ, Ar,

λi
{

∈

∈

{

}

1
N

N
X

i=1

xi

k

−

µ

−

Arλi

2
2.
k

(8.4)

This interpretation of PCA is illustrated in Figure 8.1. As we explore in Ex-
ercise 8.3, when the data has been precentered (so that we may take µ = 0),
the criterion (8.4) can be reduced to

1
N

N
X

i=1

xi
k

−

ArAT

r xi

2
2,
k

(8.5)

204

SPARSE MULTIVARIATE METHODS

and the value of Ar that minimizes the reconstruction error (8.5) can again
be obtained from the singular value decomposition of the data matrix. In
operational terms, we compute the SVD X = UDVT , and then form ˆAr = Vr
by taking the r columns of V corresponding to the top r singular values. The
estimates for λi are given by the rows of Zr = UrDr. So maximizing total
variance within the aﬃne surface corresponds to minimizing total distance
from the surface. Again we observe that the successive solutions are nested;
this property is special, and is not necessarily inherited by the generalizations
that we discuss in this chapter.

8.2.2 Sparse Principal Components

We often interpret principal components by examining the loading vectors
r
j=1 so as to determine which of the variables play a signiﬁcant role. In
vj
{
}
this section, we discuss some methods for deriving principal components with
sparse loadings. Such sparse principal components are especially useful when
the number of variables p is large relative to the sample size. With a large
number of variables, it is often desirable to select a smaller subset of relevant
variables, as revealed by the loadings. At the theoretical level, in the p
(cid:29)
N regime, ordinary PCA is known to break down very badly, in that the
eigenvectors of the sample covariance need not be close to the population
eigenvectors (Johnstone 2001). Imposing sparsity on the principal components
makes the problem well-posed in the “large p, small N ” regime. In this section,
we discuss a number of methods for obtaining sparse principal components,
all based on lasso-type (‘1) penalties. As with ordinary PCA, we start with an
N
p data matrix X with centered columns. The proposed methods focus on
either the maximum variance property of principal components, or minimum
reconstruction error. For ease of exposition, we begin by discussing the rank-
one case for each method, deferring the case of higher ranks until Section 8.2.3.

×

8.2.2.1 Sparsity from Maximum Variance

We begin by discussing how the maximum variance characterization of PCA
can be modiﬁed to incorporate sparsity. The most natural modiﬁcation would
be to impose an ‘0-restriction on the criterion, leading to the problem

maximize
kvk2=1

(cid:8)vT XT Xv(cid:9) subject to

v
k

0
k

≤

t,

(8.6)

0 = Pp
k

v
k

j=1 I[vj

= 0] simply counts the number of nonzeros in the vec-
where
tor v. However, this problem is doubly nonconvex, since it involves maximizing
(as opposed to minimizing) a convex function with a combinatorial constraint.
The SCoTLASS procedure of Jolliﬀe, Trendaﬁlov and Uddin (2003) is a natu-
ral relaxation of this objective, based on replacing the ‘0-norm by the ‘1-norm,
leading to

maximize
kvk2=1

(cid:8)vT XT Xv(cid:9) subject to

v
k

1
k

≤

t.

(8.7)

6
SPARSE PRINCIPAL COMPONENTS ANALYSIS

205

The ‘1-constraint encourages some of the loadings to be zero and hence v
to be sparse. Although the ‘1-norm is convex, the overall problem remains
nonconvex, and moreover is not well-suited to simple iterative algorithms.

There are multiple ways to address these challenges. One approach draws
on the SVD version of principal components; we re-express the problem, leav-
ing it nonconvex but leading to a computationally eﬃcient algorithm for ﬁnd-
ing local optima. Recall the penalized matrix criterion (7.28) on page 187;
—leads to the
applying it with no constraint on u—that is, with c1 =
optimization problem

∞

maximize
kuk2=kvk2=1

(cid:8)uT Xv(cid:9) subject to

v

k

1

k

≤

t.

(8.8)

Any optimal solution bv to this problem is also optimal for the original SCoT-
LASS program (8.7). The advantage of this reformulation is that the objective
function (8.8) is biconvex in the pair (u, v), so that we can apply alternating
minimization to solve it—in particular, recall Algorithm 7.2 in Chapter 7 for
the penalized matrix decomposition. Doing so leads to Algorithm 8.1, which
consists of the following steps:

Algorithm 8.1 Alternating algorithm for rank one sparse PCA.
1. Initialize v

2 = 1.
k
2. Repeat until changes in u and v are suﬃciently small:

Rp with

v
k

∈

(a) Update u

(b) Update v

RN via u
Rp via

←

∈

∈

Xv
kXvk2

.

v

←

v(λ, u) = S
kS

λ(XT u)
λ(XT u)

2
k

,

(8.9)

where λ = 0 if
1 = t.

v(λ, u)
k

k

XT u

k

1
k

≤

t, and otherwise λ > 0 is chosen such that

x

S

Here

λ(x) = sign(x) (
|

λ)+ is the familiar soft-thresholding operator
at level λ. In Exercise 8.6, we show that any ﬁxed point of this algorithm rep-
resents a local optimum of the criterion (8.7), and moreover, that the updates
can be interpreted as a minorization-maximization, or simply a minorization
algorithm for the objective function (8.7).

| −

An alternative approach, taken by d’Aspremont, El Ghaoui, Jordan and
Lanckriet (2007), is to further relax the SCoTLASS objective to a convex
program, in particular by lifting it to a linear optimization problem over the
space of positive semideﬁnite matrices. Such optimization problems are known
as semideﬁnite programs. In order to understand this method, let us begin
with an exact reformulation of the nonconvex objective function (8.7). By the
properties of the matrix trace, we can rewrite the quadratic form vT XT Xv in

206

SPARSE MULTIVARIATE METHODS

terms of a trace operation—speciﬁcally

vT XT Xv = trace(XT XvvT ).

(8.10)

In terms of the rank one matrix M = vvT , the constraint
2
2 = 1 is equiv-
k
alent to the linear constraint trace(M) = 1, and the constraint
t can
Rp×p is a matrix of all ones,
be expressed as trace(
M
|
|
is the matrix obtained by taking absolute values entry-wise. Putting
and
together the pieces, we conclude that the nonconvex SCoTLASS objective has
the equivalent reformulation

t2, where E

M
|

v
k

E)

≤

≤

∈

k

k

v

1

|

maximize
M(cid:23)0

trace(XT X M)

M
subject to trace(M) = 1, trace(
|

E)
|

≤

t2, and rank(M) = 1.

(8.11)

By construction, any optimal solution to this problem is a positive semideﬁnite
matrix of rank one, say M = vvT , and the vector v is an optimal solution to
the original problem (8.7). However, the optimization problem (8.11) is still
nonconvex, due to the presence of the constraint rank(M) = 1. By dropping
this constraint, we obtain the semideﬁnite program proposed by d’Aspremont
et al. (2007), namely

maximize
M(cid:23)0

trace(XT XM)

subject to trace(M) = 1, trace(
|

E)
M
|

≤

t2.

(8.12)

Since this problem is convex, it has no local optima, and a global optimum
can be obtained by various standard methods. These include interior point
methods (Boyd and Vandenberghe 2004); see also d’Aspremont et al. (2007)
for a special-purpose and more eﬃcient method for solving it.

In general, solving the SDP (8.12) is computationally more intensive than
ﬁnding a local optimum of the biconvex criterion (8.8). However, since it is a
convex relaxation of an exact reformulation, it has an attractive theoretical
guarantee: if we solve the SDP and do obtain a rank-one solution, then we
have in fact obtained the global optimum of the nonconvex SCoTLASS crite-
rion. For various types of spiked covariance models, it can be shown that the
SDP (8.12) will have a rank-one solution with high probability, as long as the
sample size N is suﬃciently large relative to the sparsity and dimension (but
p); see Section 8.2.6 for further discussion. Thus, for
still allowing for N
all of these problems, we are guaranteed to have found the global optimum of
the SCoTLASS criterion.

(cid:28)

8.2.2.2 Methods Based on Reconstruction

We now turn to methods for sparse PCA that are based on its reconstruction
interpretation. In the case of a single sparse principal component, Zou, Hastie

SPARSE PRINCIPAL COMPONENTS ANALYSIS

207

and Tibshirani (2006) proposed the optimization problem

(

1
N

N
X

i=1

minimize
θ,v∈Rp
kθk2=1

xi

k

−

θvT xi

2
2 + λ1
k

v
k

1 + λ2
k

v
k

2
2
k

)

,

(8.13)

where λ1, λ2 are nonnegative regularization parameters. Let’s examine this
formulation in more detail.

•

•

(cid:29)

If we set λ1 = λ2 = 0, then it is easy to show that the program (8.13)
achieves its optimum at a pair ˆθ = ˆv = v1, corresponding to a maximum
eigenvector of XT X, so that we recover the usual PCA solution.
N the solution is not necessarily unique unless λ2 > 0. If we set
When p
λ1 = 0, then for any λ2 > 0, the optimal solution bv is proportional to the
largest principal component direction.
In the general setting with both λ1 and λ2 strictly positive, the ‘1-penalty
weighted by λ1 encourages sparsity of the loadings.
Like the objective (8.8), criterion (8.13) is not jointly convex in v and θ,
but is biconvex. Minimization over v with θ ﬁxed is equivalent to an elastic-
net problem (see Section 4.2) and can be computed eﬃciently. On the other
hand, minimization over θ with v ﬁxed has the simple solution

•

θ =

XT z
XT z
k

2
k

,

(8.14)

where zi = vT xi for i = 1, . . . , N (see Exercise 8.8). Overall, this procedure is
reasonably eﬃcient, but not as simple as Algorithm 8.1, which involves just
soft-thresholding.

It turns out that the original SCoTLASS criterion (8.7) and the regression-
based objective function (8.13) are intimately related. Focusing on the rank-
one case (8.13), consider the constrained as opposed to the Lagrangian form
of the optimization problem—namely

minimize
kvk2=kθk2=1 k

X

−

XvθT

2
F subject to
k

v
k

1
k

≤

t.

(8.15)

If we add the extra ‘1-constraint
t, then as shown in Exercise 8.7,
1
k
the resulting optimization problem is equivalent to the SCoTLASS crite-
rion (8.7). Consequently, it can be solved conveniently by Algorithm 8.1. Note
that adding this ‘1-constraint is quite natural, as it just symmetrizes the con-
straints in problem (8.15).

θ
k

≤

8.2.3 Higher-Rank Solutions

In Section 8.2.1, we presented a sequential approach for standard principal
components analysis, based on successively solving the rank-one problem, re-
stricting each candidate to be orthogonal to all previous solutions. This se-
quential approach also solves the multirank problem (8.2).

208

SPARSE MULTIVARIATE METHODS

How about in the sparse setting? This sequential approach is also used
in the SCoTLASS procedure, where each candidate solution for rank k is
restricted to be orthogonal to all previous solutions for ranks < k. However,
here the sequential approach will typically not solve a multirank criterion.

For the sparse PCA approach (8.8), we can apply the multifactor penal-
ized matrix decomposition (7.3) of Chapter 7. Given the rank-one solution
(u1, v1, d1), we simply compute the residual X0 = X
1 and apply the
rank-one Algorithm (8.8) to X0 to obtain the next solution.2 Doing so ensures
neither orthogonality of the principal components
(u1d1), (u2d2), . . . (ukdk)
}
{
nor the sparse loading vectors
. But the solutions do tend to be
}
somewhat orthogonal in practice.

v1, v2 . . . , vk

d1u1vT

−

{

However, there is a subtle issue here: it is not clear that orthogonality of
the vectors
is desirable in the setting of sparse PCA, as orthogo-
nality may be at odds with sparsity. Otherwise stated, enforcing orthogonality
might result in less sparse solutions. A similar issue arises with sparse coding,
as discussed in Section 8.2.5.

v1, v2, . . . vk
{

}

Interestingly, one can modify the approach (8.8) to constrain the vectors uj
to be orthogonal, with no such constraints on the vectors vj. This modiﬁcation
can improve the interpretability of the set of solutions while still allowing the
vj to be sparse. In detail, consider the problem

maximize
uk, vk

(cid:8)uT

k Xvk

(cid:9) subject to

vk
k

2
k

≤

1,

vk

k

1
k

≤

c,

and

uk

k

2
k

≤

1 with uT

k uj = 0 for all j = 1, . . . , k

1.

−

The solution for uk with vk ﬁxed is

uk =

P⊥
k−1Xvk
P⊥
k−1Xvk

k

2

k

(8.16)

(8.17)

Pk−1

k−1 = I

i=1 uiuT

where P⊥
i , the projection onto the orthogonal complement
of the space spanned by u1, u2, . . . uk−1. This multifactor version of Algo-
rithm 8.1 uses operation (8.17) in place of the rank-one projection u = Xv
.
kXvk2
The approach (8.13) of Zou et al. (2006) can be generalized to r > 1

−

components by minimizing the cost function

1
N

N
X

i=1

xi
k

−

ΘVT xi

2
2 +

k

r
X

k=1

λ1k

vk

1 + λ2
k

k

r
X

k=1

vk

2
2,
k

k

(8.18)

subject to ΘT Θ = Ir×r. Here V is a p
,
}
×
r. Although this objective func-
and Θ is also a matrix of dimension p
tion (8.18) is not jointly convex in V and Θ, it is biconvex. Minimization over
V with Θ ﬁxed is equivalent to solving r separate elastic net problems and

r matrix with columns

v1, . . . , vr
{

×

2Without sparsity constraints, this procedure would deliver exactly the usual sequence

of principal components.

SPARSE PRINCIPAL COMPONENTS ANALYSIS

209

can be done eﬃciently. On the other hand, minimization over Θ with V ﬁxed
is a version of the so-called Procrustes problem, and can be solved by a simple
SVD calculation (Exercise 8.10). These steps are alternated until convergence
to a local optimum.

8.2.3.1 Illustrative Application of Sparse PCA

Here we demonstrate sparse principal components on a dataset of digitized
handwritten digits. We have a training set of N = 664 gray-scale images of
handwritten sevens. Each image contains 16
16 pixels, leading to a data
256. Panel (a) of Figure 8.2 shows some ex-
matrix X of dimension 664

×

×

(a)

(b)

Figure 8.2 (a) A sample of handwritten sevens from the zip code database. (b)
Top row: ﬁrst four principal components for “sevens” data (color shades represent
negative loadings as yellow and positive loadings as blue); Bottom two rows: ﬁrst eight
sparse principal components, constrained to be positive. These are superimposed on
the average seven to enhance interpretability.

amples of these images, where panel (b) shows the results of sparse principal
components, and contrasts them with standard PCA. The top row in panel
(b) shows the ﬁrst four standard principal components, which explain about
50% of the variance. To enhance interpretability, we compute sparse principal
components with the loadings constrained to be nonnegative. In order to do
so, we simply replace the soft-threshold operator
λ(x) in Algorithm 8.1 by
the nonnegative soft-threshold operator

λ)+.

S
+
λ (x) = (x
S

−

210

SPARSE MULTIVARIATE METHODS

The ﬁrst eight sparse principal components are shown in the middle and
bottom rows, and also explain about 50% of the variation. While more com-
ponents are needed to explain the same amount of variation, the individual
components are simpler and potentially more interpretable. For example, the
2nd and 6th sparse components appear to be capturing the “notch” style used
by some writers, for example in the top left image of Figure 8.2(a).

8.2.4 Sparse PCA via Fantope Projection

Vu, Cho, Lei and Rohe (2013) propose another related approach to sparse
PCA. Letting S = XT X/N , their proposal is to solve the semideﬁnite program

maximize
Z∈F p

trace(SZ)
{

λ

Z
k

1
k

}

−

(8.19)

p =

Z

F

Z : 0
{

is known as a
where the convex set
p is redundant and (8.19)
Fantope. When p = 1 the spectral norm bound in
reduces to the direct approach of d’Aspremont et al. (2007). For p > 1, al-
though the penalty in (8.19) only implies entry-wise sparsity of the solution, it
can be shown (Lei and Vu 2015) that the solution is able to consistently select
the nonzero entries of the leading eigenvectors under appropriate conditions.

I, trace(Z) = p

(cid:22)

(cid:22)

F

}

8.2.5 Sparse Autoencoders and Deep Learning

In the neural network literature, an autoencoder generalizes the idea of prin-
cipal components. Figure 8.3 provides a simple illustration of the idea, which
is based on reconstruction, much like in the criterion (8.13). The autoen-

Figure 8.3 Left: Network representation of an autoencoder used for unsupervised
learning of nonlinear principal components. The middle layer of hidden units creates
a bottleneck, and learns nonlinear representations of the inputs. The output layer is
the transpose of the input layer, and so the network tries to reproduce the input
data using this restrictive representation. Right: Images representing the estimated
columns of W in an image modeling task.

x1x2x3x4x5ˆx1ˆx2ˆx3ˆx4ˆx5InputlayerHiddenlayerOutputlayerWTσ(WTx)WSPARSE PRINCIPAL COMPONENTS ANALYSIS

211

×

coder is based on a p
m matrix of weights W with m < p; it is used to
create m linear combinations of the input vector x. Each such linear combi-
nation is passed through a nonlinear function σ, with the sigmoid function
σ(t) = 1/(1 + e−t) being one typical choice, as represented in Figure 8.3 via
the vector function h(x) = σ(WT x). The output layer is then modeled as
Wh(x) = Wσ(WT x).3 Given input vectors xi for i = 1, . . . , N , the weight
matrix W is then estimated by solving the (nonconvex) optimization problem

minimize
W∈Rm×p

(

1
2

N
X

i=1

xi
k

Wh(xi)
k

−

)

2

.

(8.20)

If we restrict σ to be the identity function, then h(x) = WT x and the solution
to (8.20) is equivalent to principal components; i.e., WWT = VmVT
m, where
Vm is the p
m matrix consisting of the ﬁrst m principal component load-
ings (see Exercise 8.12). Here the bottleneck in the network imposes a rank
constraint on W, forcing it to learn structure.

×

In modeling high-dimensional signals such as images, the vectors xi might
represent the pixels of a (sub) image. The columns of W represent a learned
dictionary of image shapes, and h(xi) tries to represent xi in this basis. Now
the bottleneck might be seen as an unnecessary restriction, since many slightly
diﬀerent shapes are likely in an image. The idea is to replace this restriction
by imposing sparseness on the coeﬃcients h(x), leading to so-called sparse
coding (Olshausen and Field 1996). To build intuition, we ﬁrst consider the
linear case, but now with m > p. In the optimization problem

minimize
W∈Rp×m,{si}N

1 ∈Rm

(

1
2

N
X

(cid:8)

Wsi

2
2 + λ
k
k

si

1
k

−

)

(cid:9)

(8.21)

xi
k

i=1
subject to

W
k

k

2
F ≤

1,

the individual si are forced to be sparse through the ‘1-penalties. The columns
of W are not constrained to be uncorrelated, and their total size is kept
in bound by the Frobenius norm. Exercise 8.13 examines the sparse linear
coder (8.21) in more detail, and develops a natural alternating algorithm for
solving it. The right panel of Figure 8.3 illustrates a typical solution for W
in an image modeling problem, where each xi is a vectorized version of an
image. Each subimage represents a column of W (the codebook), and every
image is modeled as a sparse superposition of elements of W. Modern sparse
encoders used in deep learning generalize this formulation in several ways (Le
et al. 2012):

•

•

They use multiple hidden layers, leading to a hierarchy of dictionaries;

Nonlinearities that can be computed more rapidly than the sigmoid are
used—for example σ(t) = t+.

3In practice, bias terms are also included in each linear combination; we omit them here

for simplicity.

212

SPARSE MULTIVARIATE METHODS

•

More general sparseness penalties are imposed directly on the coeﬃcients
h(xi) in the problem (8.20).

These models are typically ﬁt by (stochastic) gradient descent, and often on
very large databases of images (for example), using distributed computing
with large clusters of processors.

One important use of the sparse autoencoder is for pretraining. When ﬁt-
ting a supervised neural network to labelled data, it is often advantageous
to ﬁrst ﬁt an autoencoder to the data without the labels and then use the
resulting weights as starting values for ﬁtting the supervised neural network
(Erhan et al. 2010). Because the neural-network objective function is noncon-
vex, these starting weights can signiﬁcantly improve the quality of the ﬁnal
solution. Furthermore, if there is additional data available without labels, the
autoencoder can make use of these data in the pretraining phase.

8.2.6 Some Theory for Sparse PCA

Here we give a brief overview of how standard principal component analysis
breaks down in the high-dimensional setting (p
N ), and why some struc-
tural assumption—such as sparsity in the principal components—is essential.
One way of studying the behavior of (sparse) PCA is in terms of a spiked
covariance model, meaning a p-dimensional covariance matrix of the form

(cid:29)

Σ =

M
X

j=1

ωjθjθT

j + σ2Ip×p,

(8.22)

{

M
j=1.
}

M
j=1 are orthonormal, and associated with positive
θj
where the vectors
{
}
M
weights ω1
j=1 are the
ωM > 0. By construction, the vectors
≥ · · · ≥
top M eigenvectors of the population covariance, with associated eigenvalues
σ2 + ωj

θj
{

ω2

≥

}

{

+

∞

→

Given N i.i.d. samples

N
i=1 from a zero-mean distribution with covari-
xi
}
M
j=1 using the
ance Σ, standard PCA is based on estimating the span of
θj
}
{
PN
top M eigenvectors of the sample covariance matrix bΣ = 1
i=1 xixT
i . In
N
the classical setting, in which the dimension p remains ﬁxed while the sample
size N
, the sample covariance converges to the population covariance,
so that the principal components are consistent estimators. More relevant for
high-dimensional data analysis is a scaling in which both p and N tend to
) with M and the eigenvalues remaining ﬁxed.4
inﬁnity, with p/N
Under this scaling, the sample eigenvectors or principal components do not
θ(p)
M
converge to the population eigenvectors
j=1. In fact, if the signal-to-noise
j }
{
ratios ωj/σ2 are suﬃciently small, the sample eigenvectors are asymptotically
orthogonal to the population eigenvectors! This poor behavior is caused by

(0,

→

∞

∈

c

4To be clear, for each j = 1, . . . , M , we have a sequence {θ(p)

j } of population eigenvectors,

but we keep the signal-to-noise ratio ωj /σ2 ﬁxed, independently of (p, N ).

SPARSE CANONICAL CORRELATION ANALYSIS

213

M dimensions of noise in the spiked covariance model (8.22), which
p; see Johnstone and Lu (2009) for a precise

−

the p
can swamp the signal when N
statement of this phenomenon.

(cid:28)

(cid:29)

Given the breakdown of high-dimensional PCA without any structure on
the eigenvectors, we need to make additional assumptions. A number of au-
thors have explored how sparsity can still allow for consistent estimation of
principal components even when p
N . Johnstone and Lu (2009) propose a
two-stage procedure, based on thresholding the diagonal of the sample covari-
ance matrix in order to isolate the highest variance coordinates, and then per-
forming PCA in the reduced-dimensional space. They prove consistency of this
method even when p/N stays bounded away from zero, but allow only polyno-
mial growth of p as a function of sample size. Amini and Wainwright (2009)
analyze the variable selection properties of both diagonal thresholding and the
semideﬁnite programming relaxation (8.12) of the SCoTLASS problem (8.7).
For a spiked covariance model (8.22) with a single leading eigenvector that
is k-sparse, they show that the diagonal thresholding method (Johnstone and
Lu 2009) succeeds in recovering sparsity pattern of the leading eigenvector if
k2 log p. The SDP relaxation also performs
and only if the sample size N
correct variable selection with this scaling of the sample size, and in cer-
tain settings, can succeed with fewer samples. Amini and Wainwright (2009)
show that no method—even one based on exhaustively enumerating all the
subsets—can succeed with fewer than N

k log p samples.

(cid:16)

Other authors have studied the estimation of the eigenspaces themselves
in ‘2 or related norms. Paul and Johnstone (2008) propose the augmented
SPCA algorithm, a reﬁnement of the two-stage method of Johnstone and
Lu (2009); this algorithm is also analyzed by Birnbaum, Johnstone, Nadler
and Paul (2013), who show that it achieves the minimax rates for models of
weakly sparse eigenvectors in ‘q-balls. In independent work, Vu and Lei (2012)
prove minimax lower bounds for the sparse PCA problem, and show that
they can be achieved by computing the maximum eigenvalue of the sample
covariance subject to an ‘q-constraint. Ma (2010, 2013) and Yuan and Zhang
(2013) have studied algorithms for sparse PCA based on a combination of
the power method (a classical iterative technique for computing eigenvectors)
with intermediate soft-thresholding steps. When M = 1, the procedure of Ma
(2013) is essentially the same as Algorithm 8.1, the only diﬀerence being the
use of a ﬁxed level λ in the soft-thresholding step, rather than the variable
choice used in the latter to solve the bound version of the problem.

(cid:16)

8.3 Sparse Canonical Correlation Analysis

Canonical correlation analysis extends the idea of principal components anal-
ysis to two data matrices. Suppose that we have data matrices X, Y of di-
mensions N
q, respectively, with centered columns. Given two
×
Rq, they deﬁne one-dimensional projections of the two
vectors β
datasets, namely the variates (N -vectors) Xβ and Yθ, respectively. Canoni-

×
Rp and θ

p and N

∈

∈

214

SPARSE MULTIVARIATE METHODS

cal correlation analysis (CCA) chooses β and θ to maximize the correlation
between these two variates.

In detail, the sample covariance between Xβ and Yθ is given by

dCov(Xβ, Yθ) =

1
N

N
X

(xT

i β) (yT

i θ) =

i=1

1
N

βT XT Yθ.

(8.23)

where xi and yi are the ith rows of X and Y, respectively. CCA solves the
problem

maximize
β∈Rp, θ∈Rq

n

dCov(Xβ, Yθ)

o

subject to dVar(Xβ) = 1 and dVar(Yθ) = 1.

(8.24)

The solution set (β1, θ1) are called the ﬁrst canonical vectors, and the cor-
responding linear combinations z1 = Xβ1 and s1 = Yθ1 the ﬁrst canonical
variates. Subsequent pairs of variates can be found by restricting attention
to vectors such that the resulting variates are uncorrelated with the earlier
ones. All solutions are given by a generalized SVD of the matrix XT Y (see
Exercise 8.14).

Canonical correlation analysis fails when the sample size N is strictly less
than max(p, q): in this case, the problem is degenerate, and one can ﬁnd
meaningless solutions with correlations equal to one. One approach to avoid-
ing singularity of the sample covariance matrices 1
N YT Y is by
imposing additional restrictions. For instance, the method of ridge regular-
ization is based on adding some positive multiple λ of the identity to each
sample covariance matrix; see Exercise 8.17 for further discussion. An alter-
native method is based on taking only the diagonal entries of the sample
covariance matrices, an approach that we adopt below.

N XT X and 1

Sparse canonical vectors can be derived by imposing ‘1-constraints on β

and θ in the criterion (8.24), leading to the modiﬁed objective

maximize
β, θ

n

dCov(Xβ, Yθ)

o

subject to Var(Xβ) = 1,

β

k

1
k

≤

c1, Var(Yθ) = 1,

θ
k

1
k

≤

c2.
(8.25)

Note that one can use either the bound form for the ‘1-constraints (as above),
or add corresponding Lagrangian terms. For numerical solution of this prob-
lem, we note that the standard CCA problem (8.24) can be solved by alternat-
ing least squared regressions (see Exercises 8.14–8.17). Not surprisingly then,
the sparse version (8.25) can be solved by alternating elastic-net procedures,
as we explore in Exercise 8.19.

The sparse formulation (8.25) is useful when N > max(p, q), but can fail
in high-dimensional situations just as before. Again, ridging the individual

SPARSE CANONICAL CORRELATION ANALYSIS

215

covariance matrices will resolve the issue, and can be absorbed in the alternat-
ing elastic-net regressions. When the dimensions are very high—as in genomic
problems—the cross-covariance between X and Y is of primary interest, and
the internal covariance among the columns of X and among the columns of
Y are nuisance parameters which can add to the estimation variance. In this
case, it is convenient to standardize the variables, and then assume the internal
covariance matrices are the identity. We are thus led to the problem

maximize
β,θ

dCov(Xβ, Yθ)

(8.26)

1,

2
k

β
subject to
k

2
k
This objective has the same form as the penalized matrix decomposition (7.6)
previously discussed in Chapter 7, but using as input the data matrix XT Y.
We can thus apply Algorithm 7.2 directly, using alternating soft-thresholding
to compute the solutions.

β
k

θ
k

θ
k

c2.

c1,

1
k

≤

≤

≤

≤

1,

k

1

Higher-order sparse canonical variates are obtained from the higher-order
PMD components: as in Algorithm 7.3, after computing a solution, we take
residuals and then apply the procedure to what remains.

8.3.1 Example: Netﬂix Movie Rating Data

Let us illustrate the behavior of sparse CCA by applying it to the Netﬂix
movie-ratings data. As originally described in detail in Section 7.3.1, the full
dataset consists of 17, 770 movies and 480, 189 customers. Customers have
rated some (around 1%) of the movies on a scale from 1 to 5. For this example,
we selected the p = N = 500 movies and customers with the most ratings,
and imputed the missing values with the movie means.

Among the 500 ﬁlms, we identiﬁed those that were action movies (59 in all)
and those that were romantic movies (73 in all). The remaining movies were
discarded. We then applied the sparse CCA procedure to the data. The idea
was to correlate each customer’s ratings on the action movies with their ratings
on the romantic movies. We divided the 500 customers into two equal-sized
training and test groups at random, and applied sparse CCA to the training
set. We constrained the weight vectors to be nonnegative for interpretability.
The movies receiving positive weights in the ﬁrst sparse pair of components
are shown in Table 8.3.1. Perhaps a movie buﬀ could tell us why the ratings
on these particular movies should correlate; for example, the action movies
may be relatively “tame” compared to ﬁlms like Terminator. In Figure 8.4,
we plot the average ratings for the seven action movies on the test set, plotted
against the average rating for the 16 romantic movies for each customer. The
correlation is quite high—about 0.7. Hence for a given customer, we can do a
reasonable job of predicting his/her average rating for the seven action movies
from his/her average rating on the 16 romantic movies, and vice versa.

216

SPARSE MULTIVARIATE METHODS

Table 8.2 Small Netﬂix dataset: Action and romantic movies with nonzero
weights in the ﬁrst sparse canonical covariates.
Action Movies

Speed
Men in Black II
S.W.A.T.
The Fast and the Furious Behind Enemy Lines Charlies Angels
Con Air

What Women Want
The Bodyguard
Sister Act
Just Married
Legally Blonde 2: Red
Legally Blonde

Romantic Movies

Ghost
Miss Congeniality
Dirty Dancing
Maid in Manhattan
13 Going on 30

The Family Man
Pretty Woman
Runaway Bride
Two Weeks Notice
Father of the Bride

Figure 8.4 Sparse canonical correlation analysis applied to a subset of the Netﬂix
movie rating data. The plot shows the average rating for the seven action movies on
the test data versus the average for the 16 romantic movies having nonzero weights
in the ﬁrst sparse CCA components.

1.52.02.53.03.54.04.55.02345Action MoviesRomantic  MoviesAverage Ratingscorr= 0.7SPARSE LINEAR DISCRIMINANT ANALYSIS

217

8.4 Sparse Linear Discriminant Analysis

Linear discriminant analysis (LDA) is an important technique for classiﬁca-
tion. There is a variety of diﬀerent proposals for sparse linear discriminant
analysis, in part because there are at least three diﬀerent ways to approach
classical discriminant analysis. These are the normal theory model, Fisher’s
between-to-within variance criterion, and optimal scoring. In addition, in the
N , some form of regularization is needed for
high-dimensional regime p
the within-class covariance estimate, and the form of this estimate leads to
diﬀerent methods for sparse LDA.

(cid:29)

8.4.1 Normal Theory and Bayes’ Rule

,
Consider a response variable G falling into one of K classes
}
Rp. Suppose that fk(x) is the class-conditional
and a predictor vector X
density of X in class G = k, and let πk be the prior probability of class k,
with PK

k=1 πk = 1. A simple application of Bayes’ rule gives us

1, 2, . . . , K

∈

{

Pr(G = k

|

X = x) =

πkfk(x)
‘=1 π‘f‘(x)

PK

.

(8.27)

Suppose moreover that each class density is modeled as a multivariate Gaus-
sian N (µk, Σw), with density

fk(x) =

1
(2π)p/2
Σw

|

1/2
|

e− 1

2 (x−µk)T Σ−1

w (x−µk),

(8.28)

based on a common covariance matrix Σw. In comparing two classes k and
‘, it is suﬃcient to look at the log-ratio of their posterior probabilities (8.27),
and we ﬁnd that

log

Pr(G = k
X = x)
|
X = x)
Pr(G = ‘
|

= log

= log

fk(x)
f‘(x)
πk
π‘ −

1
2

+ log

πk
π‘

(µk + µ‘)T Σ−1

w (µk

µ‘)

(8.29)

+ xT Σ−1

w (µk

−

−
µ‘),

an equation linear in x. Consequently, the decision boundary between classes k
X = x)—
and ‘—i.e., all vectors x for which Pr(G = k
deﬁnes a hyperplane in Rp. This statement holds for any pair of classes, so
all the decision boundaries are linear. If we divide Rp into regions that are
classiﬁed as class 1, class 2, and so on, these regions will be separated by
hyperplanes.

X = x) = Pr(G = ‘

|

|

Equation (8.29) shows us that these LDA models are also linear logistic
regression models; the only diﬀerence is the way the parameters are estimated.
In logistic regression, we use the conditional binomial/multinomial likelihoods,
whereas estimation in LDA is based on the joint likelihood of X and G (Hastie

218

SPARSE MULTIVARIATE METHODS

et al. 2009, Chapter 4). From Equation (8.29), we see that the linear discrim-
inant functions

δk(x) = xT Σ−1

w µk

1
2

−

k Σ−1
µT

w µk + log πk

(8.30)

provide an equivalent description of the decision rule, leading to the classiﬁ-
cation function G(x) = arg maxk∈{1,...,K} δk(x).

In practice, the parameters of the Gaussian class-conditional distributions
are not known. However, given N samples
of feature-
label pairs, we can estimate the parameters as follows. Let Ck denote the
denote the total
subset of indices i for which gi = k, and let Nk =
number of class-k samples. We then form the estimates bπk = Nk/N , and

(x1, g1), . . . , (xN , gN )
{

Ck

}

|

|

bµk =

1
Nk

X

i∈Ck

xi, and

bΣw =

N

1

−

K

K
X

X

k=1

i∈Ck

(xi

− bµk)(xi

− bµk)T .

(8.31a)

(8.31b)

Note that bΣw is an unbiased estimate of the pooled within-class covariance.
In the high-dimensional setting with p > N , the sample within-class covari-
ance matrix bΣw is singular, and so we must regularize it in order to proceed. As
before, there are many ways to do so; later in this section, we describe an ap-
proach based on quadratic regularization (Hastie, Buja and Tibshirani 1995).
In very high dimensions, it is often eﬀective to assume that predictors are
uncorrelated, which translates into a diagonal form for Σw. Doing so yields
the so-called naive Bayes classiﬁer, or alternatively diagonal linear discrimi-
nant analysis (see Exercise 8.20). Letting bσ2
j be the pooled within-class
variance for feature j, the estimated classiﬁcation rule simpliﬁes to

j = s2

bG(x) = arg min
‘=1,...,K




p
X

(xj



j=1

− bµj‘)2
bσ2

j

−

log ˆπk






,

(8.32)

known as the nearest centroid rule.

8.4.2 Nearest Shrunken Centroids

Notice that the classiﬁcation rule (8.32) will typically involve all features;
when p is large, while one might expect that only a subset of these features is
informative. This subset can be revealed by reparametrizing the model, and
imposing a sparsity penalty. More speciﬁcally, suppose that we decompose the
mean vector for class k into the sum µk = ¯x + αk, where ¯x = 1
i=1 xi is
N
Rp, k = 1, . . . , K denotes the contrast
the overall mean vector, and αk
for class k, together satisfying the constraint PK
k=1 αk = 0. We then consider

PN

∈

SPARSE LINEAR DISCRIMINANT ANALYSIS

219

optimizing the ‘1-regularized criterion

minimize
αk∈Rp,k=1,...,K




1
2N

K
X

X

p
X

(xij

−

¯xj
s2
j

−

αjk)2

+ λ

K
X

p
X

k=1

j=1

√Nk
sj

αjk
|




|



i∈Ck
k=1
subject to PK

j=1

k=1 αjk = 0 for j = 1, . . . , p.

The solutions for αjk amount to simple soft-thresholding of particular

class-wise contrasts. In detail, we deﬁne the contrasts

(8.33)

djk = exjk

¯xj

−
mksj

,

(8.34)

P
i∈Ck

where exjk = 1
global mean ¯x, and5 m2
erator

Nk

k = 1

Nk −

xij, the quantity ¯xj denotes the jth component of the

1
N . We then apply the soft-thresholding op-

d0
jk =

λ(djk) = sign(djk)(

S

djk
|

| −

λ)+,

(8.35a)

and reverse the transformation to obtain the shrunken centroid estimates

jk = ¯xj + mksjd0
bµ0

kj.

(8.35b)

Finally, we use these shrunken centroids for the estimates for µjk in the nearest
centroid rule (8.32).

Suppose for a given feature j, the contrasts d0

jk are set to zero by the soft-
thresholding for each of the k classes. Then that feature does not participate
in the nearest centroid rule (8.32), and is ignored. In this way, the nearest
shrunken centroid procedure does automatic feature selection. Alternatively,
a feature might have d0
jk = 0 for some classes but not others, and hence would
only play a role for those classes.

The nearest shrunken centroid classiﬁer is very useful for high-dimensional
classiﬁcation problems,
like those that occur in genomic and proteomic
data. The publicly available software (Hastie, Tibshirani, Narasimhan and
Chu 2003) includes some additional bells and whistles: a small constant s0
is added to each sj, to stabilize the contrasts when sj is close to zero; class-
speciﬁc shrinkage rates, to name a few.

Figure 8.5 shows the results of this procedure applied to some Lymphoma
cancer data (Tibshirani, Hastie, Narasimhan and Chu 2003). These data con-
sist of expression measurements on 4026 genes from samples of 59 lymphoma
patients. The samples are classiﬁed into diﬀuse large B-cell lymphoma (DL-
BCL), follicular lymphoma (FL), and chronic lymphocytic lymphoma (CLL).

5The quantity mk is a standardization constant, based on the variance of the numerator,

which makes djk a t-statistic.

220

SPARSE MULTIVARIATE METHODS

Figure 8.5 Results of nearest-shrunken-centroid classiﬁcation on some Lymphoma
data, with three classes. The top plot shows the class-speciﬁc mean expression for
each gene (gray lines), and their shrunken versions (blue). Most of the genes are
shrunk to the overall mean (0 here). The lower plot shows training, cross-validated,
and test misclassiﬁcation error as a function of the shrinkage threshold λ. The chosen
model includes 79 genes, and makes 0 test errors.

−1.5−0.50.51.01.5DLCL (27)01000200030004000−1.5−0.50.51.01.5FL (5)−1.5−0.50.51.01.5CLL (7)GeneCentroids: Average Expression Centered at Overall Centroid012345Amount of Shrinkage λError402631461774867557354212128784821133Size0.00.20.40.60.8TrainCVTestSPARSE LINEAR DISCRIMINANT ANALYSIS

221

The data are divided into a training set of 39 (27, 5, 7) samples, and a test
set of 20. The genes have been organized by hierarchical clustering. All but
79 of the genes have been shrunk to zero. Notice that the deviations of the
smaller classes are larger, since the biggest class DLBCL mostly determines
the overall mean. In Section 8.4.3.1, we compare the nearest shrunken centroid
classiﬁer to a sparse version of Fisher’s linear discriminant analysis, discussed
next.

8.4.3 Fisher’s Linear Discriminant Analysis

A diﬀerent approach to sparse discriminant analysis arises from Fisher’s dis-
criminant framework. Here the idea is to produce low-dimensional projections
of the data that preserve the class separation. Although these projections are
primarily intended for visualization, one can also perform Gaussian classiﬁca-
tion in the subspace produced.

×

Let X be an N

p matrix of observations, and assume that its columns,
corresponding to features, have been standardized to have mean zero. Given
such an observation matrix, we seek a low-dimensional projection such that
the between-class variance is large relative to the within-class variance. As
before, let bΣw be the pooled within-class covariance matrix and bµk the class-
speciﬁc centroids. The between-class covariance matrix bΣb is the covariance
matrix of these centroids, given by

bΣb =

K
X

k=1

bπk bµk bµT
k ,

treating them as multivariate observations with mass ˆπk. Note that

bΣt =

1
N

XT X = bΣb + bΣw.

(8.36)

(8.37)

For now we assume that bΣw is of full rank (which implies that p
N ); we
treat the non-full rank case below. For a linear combination z = Xβ, Fisher’s
between-to-within variance criterion is captured by the ratio

≤

R(β) =

βT bΣbβ
βT bΣwβ

,

(8.38)

which is to be maximized. Fisher’s LDA proceeds by sequentially solving the
following problem:

n

o

βT bΣbβ

maximize
β∈Rp

such that βT bΣwβ

1, and βT bΣw bβ‘ = 0 for all ‘ < k.
(8.39)
for k = 1, 2, . . . , min(K
1, p). Although the problem (8.39) is generally writ-
ten with the inequality constraint replaced with an equality constraint, the
two programs are equivalent if bΣw has full rank. The solution bβk is called

≤

−

222

SPARSE MULTIVARIATE METHODS

the kth discriminant vector, and zk = X bβk the corresponding discriminant
variable. Note that LDA essentially does principal components on the class
centroids, but using a normalization metric that respects the within-class vari-
ances (Hastie et al. 2009, Chapter 4). In practice, we do not need to solve the
problem sequentially, because as with PCA we can get all the solutions with a
single eigen-decomposition: the ﬁrst k discriminant vectors are the k leading
eigenvectors of bΣ

−1
w bΣb.

Witten and Tibshirani (2011) proposed a way to “sparsify” the objec-

tive (8.39), in particular by solving

maximize
β






βT bΣbβ

λ

−

p
X

j=1

ˆσj

βj
|




|


subject to βT eΣwβ

1,

≤

(8.40)

where ˆσ2
j is the jth diagonal element of bΣw, and eΣw is a positive deﬁnite es-
timate for Σw. This produces a ﬁrst sparse discriminant vector bβ1 with level
of sparsity determined by the choice of λ. Further components can be suc-
cessively found by ﬁrst removing the current solution from bΣb before solving
problem (8.40); see the reference for details.

The choice for the regularized within-covariance matrix eΣw depends on the
setting. In some problems, we might choose eΣw to encourage spatial smooth-
ness, for example when the data are images. Then we can take eΣw = bΣw + Ω
where Ω penalizes diﬀerences in spatially nearby values. This idea is stud-
ied in the ﬂexible and penalized discriminant analysis approach of Hastie,
Tibshirani and Buja (1994) and Hastie et al. (1995). In the sparse setting,
this is conveniently implemented using the optimal-scoring approach of Sec-
tion 8.4.4. In other cases we only require that eΣw makes the sample esti-
mate bΣw positive deﬁnite, and for that purpose we can use a ridged version
eΣw = bΣw + (cid:15) diag( bΣw) for some (cid:15) > 0.

One simple case of particular interest is where eΣw is taken to be a di-
agonal matrix, for example diag( bΣw). Then problem (8.40) can be cast as
a penalized matrix decomposition applied to the between covariance matrix
bΣb, and Algorithm 7.2 can be applied. In this case, with K = 2 classes, this
method gives a solution that is similar to nearest shrunken centroids: details
are in Witten and Tibshirani (2011, Section 7.2). With more than two classes,
the two approaches are diﬀerent. Nearest shrunken centroids produce sparse
contrasts between each class and the overall mean, while the sparse LDA
approach (8.40) produces sparse discriminant vectors for more general class
contrasts. This distinction is explored in the next example.

8.4.3.1 Example: Simulated Data with Five Classes

We created two artiﬁcial scenarios to contrast the nearest shrunken centroids
approach with sparse discriminant analysis (8.40). Figure 8.6 shows the results
of nearest shrunken centroids classiﬁer applied to the two diﬀerent simulated

SPARSE LINEAR DISCRIMINANT ANALYSIS

223

Figure 8.6 Results of nearest shrunken centroid classiﬁer applied to two diﬀerent
simulated datasets, as described in the text. Those features (rows in each plot) with
nonzero estimated contrasts are shown. The length of each horizontal line segment is
proportional to the size of the contrast, with positive values to the right and negative
values to the left.

datasets. In both cases there are N = 100 observations, with 20 observations
falling into each of K = 5 classes involving p = 1000 features.

1. In the ﬁrst scenario, the ﬁrst 10 features are two units higher in class 1,
features 11–20 are two units higher in class 3, and features 21–30 are two
units lower in class 5. Thus, higher values in each of the ﬁrst three block of
10 features characterize classes 1, 3, and 5.

2. In the second scenario, features 1–10 are one unit higher in classes 3–5
versus 1,2 and features 11–20 are one unit higher in class 2 and one unit
lower in class 1. Hence higher values for the ﬁrst 10 features discriminate
classes 3–5 versus 1 and 2, while higher values for the second 10 features
discriminate between classes 1 versus 2.

We applied the nearest shrunken centroid classiﬁer, using cross-validation
to choose the shrinkage parameter and show the features with nonzero esti-
mated contrasts. The length of each horizontal line segment is proportional to
the size of the contrast, with positive values to the right and negative values
to the left. In the left panel, we see that nearest shrunken centroids has clearly
revealed the structure of the data, while in the right panel, the structure does
not come through as clearly. Figure 8.7 shows the results of rank-2 sparse
linear discriminant analysis with diagonal within-class covariance in each of
the two scenarios. In the ﬁrst scenario (top row), the discriminant projection
cleanly separates classes 1, 3, and 5 from the rest, but the discriminant load-
ings (top right) are forced to combine three pieces of information into two
vectors, and hence give a cloudy picture. Of course one could use more than

12345123456789101112131415161718192021222324252627282930Scenario 11234512345679101112131415161718192053172233271512542671700750835925954Scenario 2224

SPARSE MULTIVARIATE METHODS

Figure 8.7 Rank two sparse linear discriminant analysis with diagonal within-class
covariance, applied to the same two scenarios (top and bottom panels) as in Fig-
ure 8.6. The projections onto the ﬁrst two sparse discriminant vectors is shown in
the left panels, while the right panels show the discriminant weights or loadings.

−6−4−202468−6−4−202468First Discriminant ScoreSecond Discriminant Score2553242531545324323442353145141524254131432122512113151325253253434455332534311212532451431445441121051015202530−0.3−0.10.10.20.3PredictorDiscriminant Loading●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●First ComponentSecond ComponentScenario 1−4−2024−4−202First Discriminant ScoreSecond Discriminant Score1122242343523151435431254132242453225414334455234233354455135552353115114425211253214135435142141132051015202530−0.5−0.4−0.3−0.2−0.10.0PredictorDiscriminant Loading●●●●●●●●●●●●●●●●●●●Scenario 2SPARSE LINEAR DISCRIMINANT ANALYSIS

225

K = 2 sparse components and this would help in this example, but this ap-
proach is less attractive if high-order discriminants are required. The second
scenario is well suited to sparse LDA, as it cleanly separates classes 1 and
2 from the rest (bottom left), and reveals the features responsible for this
separation (bottom right).

8.4.4 Optimal Scoring

A third approach to the derivation of linear discriminant analysis is called
optimal scoring. It is based on a recasting of the problem in terms of a mul-
tivariate linear regression, where the codes for the output classes are chosen
“optimally,” as we detail next. Suppose that the membership of the samples
are coded using a binary-valued N

K indicator matrix Y, with entries

×

yik =

(
1
0

if observation i belongs to class k
otherwise.

Using this notation, optimal scoring involves solving the sequence of problems
for k = 1, . . . , K, each of the form

( bβk, bθk) = arg min

βk∈Rp,θk∈RK

Yθk

Xβk

N k

−

(cid:26) 1

(cid:27)

such that θT

k YT Yθk = 1 and θT

2
2
k
k YT Yθj = 0 for all j = 1, 2, . . . , k

(8.41)

1.

−

The optimal solution bβk of this problem turns out to be proportional to the
solution of the Fisher linear discriminant criterion (8.39) (Breiman and Ihaka
1984, Hastie et al. 1995). This equivalence is not too surprising. With just
K = 2 classes, it is well known that the linear regression of a binary response
˜y = Yθ (with arbitrary coding θ) on X gives the same coeﬃcient vector as
linear discriminant analysis (up to a proportionality factor). For example, see
Exercise 4.2 of Hastie et al. (2009). With more than two classes, a regression
of ˜y‘ on X will diﬀer according to how we assign numerical scores θ‘k to
the classes. We obtain the particular solution from linear regression that is
equivalent to linear discriminant analysis by optimizing over the choice of
scores, as in the problem (8.41).

As with the other methods for sparse discriminant analysis, adding an

‘1-penalty to the criterion (8.41) yields the modiﬁed optimization problem

(cid:26) 1

(cid:27)

minimize
βk∈Rp,θk∈RK
such that θT

N k

Yθk

Xβk

2 + βT
2
k Ωβk + λ
k
k
k YT Yθj = 0 for all j = 1, 2, . . . , k
k YT Yθk = 1 and θT

1
k

βk

−

(8.42)

1

−

(Leng 2008, Clemmensen, Hastie, Witten and Ersboll 2011). In addition to
the ‘1-penalty with nonnegative regularization weight λ, we have also added
a quadratic penalty deﬁned by a positive semideﬁnite matrix Ω, equivalent

226

SPARSE MULTIVARIATE METHODS

to the elastic net penalty in the special case Ω = γI. The resulting dis-
criminant vectors will be sparse if the regularization weight λ on the ‘1-
penalty is suﬃciently large. At the other extreme, if λ = 0, then minimizing
the criterion (8.42) is equivalent to the penalized discriminant analysis pro-
posal of Hastie et al. (1995). Although the criterion is nonconvex (due to the
quadratic constraints), a local optimum can be obtained via alternating min-
imization, using the elastic net to solve for β. In fact, if any convex penalties
are applied to the discriminant vectors in the optimal scoring criterion (8.41),
then it is easy to apply alternating minimization to solve the resulting prob-
lem. Moreover, there is a close connection between this approach and sparse
Fisher LDA (8.40). In particular, they are essentially equivalent if we take
eΣ = bΣw + Ω. The qualiﬁcation “essentially” is needed due to nonconvexity:
we can only say that a stationary point for the one problem is also a stationary
point for the other (see Exercise 8.22 for details).

(cid:29)

Whether one approaches the sparse discriminant problem through Fisher
LDA (8.40) or optimal scoring (8.42) depends on the nature of the problem.
When p
N and the features are not structured—a category containing
many genomic problems—it is most attractive to set ˜Σw equal to diag( ˆΣw).
Since this matrix is positive deﬁnite, we can take Ω = 0, and the resulting
problem is easily solved via the soft-thresholding algorithm for penalized ma-
trix decomposition. When the problem has a spatial or temporal structure,
the matrix Ω can be chosen to encourage spatial or temporal smoothness of
the solution. In this case the optimal scoring approach is attractive, since the
quadratic term can be absorbed into the quadratic loss. Otherwise, the matrix
Ω can be chosen to be a diagonal matrix, as in the next example, and again
optimal scoring is convenient. Both methods are implemented in packages
in R: penalizedLDA (Witten 2011) for the criterion (8.40), and sparseLDA
(Clemmensen 2012) for the criterion (8.42).

8.4.4.1 Example: Face Silhouettes

We illustrate sparse discriminant analysis based on the objective func-
tion (8.42) with a morphometric example taken from Clemmensen et al.
(2011). The dataset consisting of 20 adult male and 19 adult female face-
silhouettes. Following the work of Thodberg and Olafsdottir (2003), we apply
a minimum description length (MDL) approach to annotate the silhouettes,
and then perform Procrustes’ alignment on the resulting 65 MDL landmarks
of (x, y)-coordinates. These 65 pairs are vectorized resulting in p = 130 spatial
features. We set Ω = I in the criterion (8.42); in this case the spatial features
are already smooth, and the ridge penalty I is suﬃcient to deal with the strong
spatial autocorrelations. For training, we used 22 of the silhouettes (11 female
and 11 male), which left 17 silhouettes for testing (8 female and 9 male). The
left and middle panels of Figure 8.8 illustrate the two classes of silhouettes.

Leave-one-out cross validation was performed on the training data, esti-
mating an optimal value of λ that yielded 10 nonzero features. Since there are

SPARSE CLUSTERING

227

Figure 8.8 The silhouettes and the 65 (x, y)-coordinates for females (left) and males
(middle). Right: The mean shape of the silhouettes, and the 10 (x, y)-coordinates in
the SDA model. The superimposed dots indicate the landmarks retained in the sparse
discriminant vector. The arrows illustrate the directions of the diﬀerences between
male and female classes.

two classes, there is only one sparse direction. The nonzero weights are shown
in the right panel of Figure 8.8. The few landmarks included in the model
are placed near high curvature points in the silhouettes, suggesting that the
important gender diﬀerences are located in these regions. The training and
test classiﬁcation rates were both 82%.

8.5 Sparse Clustering

In this section, we discuss methods for clustering observations that employ
sparsity to ﬁlter out the uninformative features. We ﬁrst give a brief back-
ground on clustering; more details can be found, for example, in Hastie et al.
(2009, Chapter 14).

8.5.1 Some Background on Clustering

(cid:29)

Suppose we wish to group or cluster a collection of N observations on p fea-
tures, where p
N . Our goal is to ﬁnd groups of observations that are similar
with respect to the p features. A standard method for doing this is called “hi-
erarchical clustering.” More precisely, we are referring to agglomerative (or
bottom-up) hierarchical clustering. This method starts with the individual
observations, and then merges or agglomerates the pair that are closest ac-
cording to some metric, with the Euclidean distance over the p features being
one common choice. This process is continued, with the closest pair grouped
together at each stage. Along the way, we consider merging not only individ-
ual pairs of observations, but also merging clusters of observations that were
created at previous steps, with individual observations or other clusters. For
this, we need to deﬁne a linkage measure—the distance between two clusters.
Some common choices include average linkage, which deﬁne the distance be-
tween two clusters as the average distance between any two observations, one
in each cluster; complete linkage, which uses the maximum pairwise distance;
and single linkage, which uses the minimum pairwise distance.

228

SPARSE MULTIVARIATE METHODS

8.5.1.1 Example: Simulated Data with Six Classes

The top panel of Figure 8.9 shows an example of hierarchical clustering ap-
plied to some artiﬁcial data with 120 observations and 2000 features. The
ﬁgure shows the result of hierarchical clustering using Euclidean distance and
complete linkage. The clustering tree or dendrogram summarizes the sequence
of merges, leading to a single cluster at the top. The colors of the leaves of
the tree were not used in the clustering, and are explained below.

Now suppose that the observations vary only over a subset of the features.
Then we would like to isolate that subset both for interpretation and to im-
prove the clustering. In the top panel of Figure 8.9, the data were actually
generated so that the average levels of the ﬁrst 200 features varied over six
predeﬁned classes, with the remaining 1800 features being standard Gaussian
noise. These classes are not used in the clustering, but after carrying out the
clustering, we have colored the leaves of the dendrogram according to the true
class. We see that hierarchical clustering is confused by the uninformative
features, and does a poor job of clustering the observations into classes. In
this instance we would like to isolate the informative subset of features both
for interpretability and to improve the clustering. One way of doing that is
described next.

8.5.2 Sparse Hierarchical Clustering

We now describe an approach that introduces sparsity and feature selection
RN ×p, standard clustering based
to this problem. Given a data matrix X
on Euclidean distance uses the dissimilarity measure Di,i0 = Pp
j=1 di,i0,j with
di,i0,j = (xij
0
and use these to deﬁne a weighted dissimilarity measure ˜Di,i0 = Pp
j=1 wjdi,i0,j;
we want each weight to reﬂect the importance of that feature. Finally, this
modiﬁed dissimilarity matrix is used as input into hierarchical clustering.

xi0j)2. The idea here is to ﬁnd a set of feature weights wj

≥

−

∈

×

Denote by ∆ the N 2

p matrix with column j containing the N 2 pair-
wise dissimilarities for feature j. Then ∆1 is the vectorized version of Di,i0,
and likewise ∆w the vectorized version of ˜Di,i0. We now seek the vector w,
subject to sparsity and normalization restrictions, that recovers most of the
variability in ∆. This requirement leads to the penalized matrix decomposi-
tion problem (Witten et al. 2009) (see Section 7.6):

maximize
u∈RN 2 , w∈Rp

(cid:8)uT ∆w(cid:9) subject to

u
k

k

2

≤

1,

w
k

2
k

≤

1,

(8.43)

w
k

s, and w

0.

≤

1
k
Notice that wj is a weight on the dissimilarity matrix for feature j. Given the
optimal solution bw, we rearrange the elements of ∆w into a N
N matrix,
and perform hierarchical clustering on this reweighted dissimilarity matrix.
The result is a sparse hierarchical clustering of the data. In Figure 8.9, we see
that sparse clustering isolates the informative features (bottom panel) and

×

(cid:23)

SPARSE CLUSTERING

229

Figure 8.9 Standard and sparse clustering applied to a simulated example. The
data were generated so that the average levels of the ﬁrst 200 features varied over
six predeﬁned classes, while the remaining 1800 features were noise features with the
same distribution over the classes. The top two panels show the result of standard
hierarchical clustering and sparse clustering, respectively. We used complete linkage
in each case. The class of each sample is indicated by the color of each leaf, and was
not used by the clustering procedures. The bottom panel shows the estimated weight
given to each feature by the sparse clustering procedure.

58626670Standard clustering0.0000.0100.020Sparse clustering05001000150020000.000.040.080.12FeatureFeature weightEstimated feature weights230

SPARSE MULTIVARIATE METHODS

uses this information to correctly cluster the observations into the predeﬁned
groups (middle panel).

8.5.3 Sparse K-Means Clustering

Another commonly used method of clustering is called “K-means.” Here we
predeﬁne the number of groups K and then try to partition the observations
into K homogeneous groups. Each group is summarized by a centroid, with
each observation assigned to the group with the closest centroid.

In detail, the K-means algorithm maintains a partition

}
of the index set
, where subset Ck corresponds to those observa-
}
tions currently assigned to class k. It chooses these partitions by minimizing
the within cluster sum of squares:

1, 2, . . . , N

C

{

{

=

C1, . . . , CK

) =

W (

C

K
X

X

k=1

i∈Ck

xi
k

−

¯xk

2
2.
k

(8.44)

Here xi is the ith observation and ¯xk is a p-vector equal to the average of all
K
observations in cluster k. The collection
1 is referred to as the codebook
}
in the compression literature. The encoder τ (i) assigns each observation xi to
the cluster k whose centroid is closest to it. Hence Ck =
. The
standard algorithm for K-means clustering alternates over optimizing for
and

, and is guaranteed to ﬁnd a local minimum of W (
}

i : τ (i) = k
{

¯x1, . . . , ¯xK
{

C
). Since

¯xk
{

C

}

X

i,i0∈Ck

xi

k

−

xi0

2
2 = 2Nk
k

X

i∈Ck

xi

k

−

¯xk

2
2,
k

(8.45)

|

Ck

with Nk =
, one can alternatively derive K-means clustering using a
|
squared Euclidean dissimilarity matrix Di,i0. For general dissimilarity ma-
trices, K-medoids clustering is a natural generalization (Hastie et al. 2009, for
example).

It might seem reasonable to deﬁne as a criterion for sparse K-means clus-

tering the minimum of the weighted within-cluster sum of squares:

minimize
C, w∈Rp




p
X



j=1

(cid:16) K
X

wj

k=1

1
Nk

X

di,i0,j

i,i0∈Ck




(cid:17)



.

1,

w
k

We still need to add constraints on w, to make the problem meaningful. Adding
the constraints
s as well as the nonnegativity constraint
0 makes the problem convex in w, but leads to the pathological solution
w
bw = 0. On the other hand, the triplet of constraints
0
would lead to a potentially useful solution, but make the problem nonconvex
in w.

w
k

s, w

1
k

2
k

1,

(cid:23)

≥

≥

≤

≤

(cid:23)

w

w

k

k

k

k

2

1

Witten and Tibshirani (2010) proposed a modiﬁed criterion that focuses

SPARSE CLUSTERING

instead on the between-cluster sum of squares:

maximize
C, w∈Rp




p
X



j=1



wj



1
N

N
X

N
X

i=1

i0=1

di,i0,j

K
X

k=1

1
Nk

−

X

i,i0∈Ck



di,i0,j








231

(8.46)

s, w

0.

1,

w
k

subject to

w
k

≤

≤

(cid:23)

2
k

1
k
When wj = 1 for all j, we can see from condition (8.45) that the second
term is equal to 2W (
), and hence this approach is equivalent to K-means.
This problem is now convex in w and generally has an interesting solution. It
can be solved by a simple alternating algorithm. With
= (C1, ..., CK) ﬁxed,
the minimization over w is a convex problem, with solutions given by soft-
thresholding. With w ﬁxed, optimization with respect to
leads to a weighted
K-means clustering algorithm. Details are given in Exercise 8.11.

C

C

C

8.5.4 Convex Clustering

The method of K-means clustering and its sparse generalization lead to prob-
lems that are biconvex but not jointly convex, and hence it is diﬃcult to
guarantee that a global solution has been attained. Here we present a dif-
ferent formulation of clustering that yields a convex program, and represents
an interesting alternative to K-means and hierarchical clustering. Unlike the
methods of the previous section which use sparsity to do feature selection, this
method uses a form of sparsity to determine the number and memberships of
the clusters.

In this approach, each of the N observations xi

∈
Rp. We then minimize the objective function

type ui

∈

Rp is assigned a proto-

J(u1, u2, . . . , uN ) =

1
2

N
X

i=1

xi
k

−

ui

2 + λ
k

X

i<i0

wii0

ui

k

−

ui0

q
k

(8.47)

≥

for some ﬁxed λ
0, and some q-norm (typically q = 1 or q = 2). This
criterion seeks prototypes that are close to the data points, but not too far
from one another. The weights wii0 can be equal to 1, or can be a function
of the distance between observations i and i0. We note that this problem is
convex for q
1. Consider for example the natural choice q = 2 (group lasso).
Then the penalty term shrinks prototype vectors toward each other, and the
distance between many pairs will be equal to zero for a suﬃciently large value
of λ.

≥

Each distinct prototype bui in the solution represents a cluster; however,
as shown in the example of Figure 8.10, we should not think of it as a typical
prototype or centroid of that cluster. In this example, there are two classes
each containing 50 spherical Gaussian data points, with their means separated
by three units in both directions. Here we used q = 2 and weight function
2). The colors in the right panel coincide with the
wii0 = exp(
k

−k

xi0

xi

−

232

SPARSE MULTIVARIATE METHODS

Figure 8.10 Convex clustering applied to data generated from two spherical Gaus-
sian populations separated by three units in each direction. We show two solutions
from a path of 50 values of λ; the solution on the right was the smallest value of λ
that yielded two clusters, and in this case identiﬁed the true clusters. Points xi are
associated with prototypes bµi of the same color. The estimated prototypes need not
be close to the centroids of their clusters.

true clusters; further details are given in the caption. The convexity of the
objective function as well as its ability to choose the number of clusters and
the informative features, makes this approach attractive.

The next example is taken from Chi and Lange (2014), on the problem of
clustering mammals based on their dentition. Eight diﬀerent kinds of teeth
were counted for each of 27 mammals: the number of top incisors, bottom
incisors, top canines, bottom canines, top premolars, bottom premolars, top
molars, and bottom molars. Figure 8.11 shows the resulting clustering path
over λ using kernel-based weights wii0. For visualization, the prototypes have
been projected onto the ﬁrst two principal components. The continuous path
of solutions provides an appealing summary of the similarity among the mam-
mals. Both these examples were produced using the cvxcluster package in
R (Chi and Lange 2014). The path of solutions creates a tree, which in this
example is rather similar to that produced by hierarchical clustering with
average linkage.

Bibliographic Notes

Jolliﬀe et al. (2003) proposed the original SCoTLASS criterion (8.7) for sparse
PCA; the reformulation and alternating updates (8.9) were proposed by Wit-
ten et al. (2009). d’Aspremont et al. (2007) proposed the semideﬁnite pro-
gramming relaxation (8.12) of the nonconvex SCoTLASS criterion; Amini and

024−101234024−101234X1X1X2X2λ=3.27λ=12.65BIBLIOGRAPHIC NOTES

233

Figure 8.11 Mammal data: path of convex clustering solutions using the crite-
rion (8.47), and a grid of values of λ. As λ increases, the prototypes unite to form
a smaller set.

Wainwright (2009) develop some theory for the variable selection properties of
this relaxation for sparse PCA. Zou et al. (2006) proposed the reconstruction-
based criterion (8.13). Johnstone (2001) studied the high-dimensional asymp-
totics of ordinary PCA, and proposed the spiked covariance model (8.22).
Johnstone and Lu (2009) and Birnbaum et al. (2013) study various types
of two-stage procedures for estimating sparse principal components. Birn-
baum et al. (2013) and Vu and Lei (2012) derive minimax lower bounds on
‘2-estimation error for sparse PCA when the eigenvectors belong ‘q-balls.
Ma (2010, 2013) and Yuan and Zhang (2013) have studied iterative algorithms
for sparse PCA based on combining the power method with soft thresholding.
Berthet and Rigollet (2013) study the detection problem for high-dimensional
sparse PCA, and establish a computational hardness result related to the
random k-clique problem.

Olshausen and Field (1996) proposed the version of sparse coding discussed
in Section 8.2.5. There is a large literature on deep learning; see Le et al. (2012)
and references therein for some recent approaches.

There is a variety of papers that explore sparse canonical correlation anal-
ysis, for example Parkhomenko, Tritchler and Beyene (2009), Waaijenborg,

oppossumhtailmolecommonmolebrownbatshairbatpigmybathousebatredbatarmadillopikassrabbitbeavergraysquirrelpackratcoyotewolfcivetcatraccoonweaselriverotterseaotterjaguarfursealwalrusephantsealelkdeer●●●●●●●●●●●●●●●●●●●●●●●●●●●−2−1012−2024Principal Component 1Principal Component 2234

SPARSE MULTIVARIATE METHODS

Vers´elewel de Witt Hamer and Zwinderman (2008), Phardoon and Shawe-
Taylor (2009), Parkhomenko et al. (2009), Witten et al. (2009), Witten and
Tibshirani (2009), and Lykou and Whittaker (2010). Dudoit, Fridlyand and
Speed (2002) provide comparison of diﬀerent classiﬁcation methods for mi-
croarray data, including diagonal LDA. Nearest shrunken centroids was pro-
posed by Tibshirani, Hastie, Narasimhan and Chu (2001) and Tibshirani
et al. (2003). Sparse discriminant analysis from Fisher’s framework and op-
timal scoring were explored in Trendaﬁlov and Jolliﬀe (2007), Leng (2008),
Clemmensen et al. (2011), and Witten and Tibshirani (2011). Minorization
algorithms are discussed in Lange, Hunter and Yang (2000), Lange (2004),
and Hunter and Lange (2004). Sparse hierarchical and k-means clustering are
presented in Witten and Tibshirani (2010), while convex clustering was pro-
posed by Pelckmans, De Moor and Suykens (2005) and Hocking, Vert, Bach
and Joulin (2011).

Exercises

Ex. 8.1 In this exercise, we consider some elementary properties of principal
component analysis.

(a) Show that the ﬁrst principal component is a maximal eigenvector of the

sample covariance matrix 1

N XT X.

(b) Suppose that the rows of X, denoted

are drawn i.i.d. ac-
cording to a zero-mean distribution P, and suppose that Σ = Cov(x) has
a unique maximal eigenvalue λ. Explain why, for large sample size N , one
might expect bv to approach

x1, . . . , xN
{

}

v∗ = arg max
kvk2=1

Var(vT x), where x

P.

∼

(8.48)

Ex. 8.2 Consider the principal component criterion (8.1), and the deﬁnition
of the vectors v1, v2, and so on.
(a) Show that the principal components zj are mutually uncorrelated.
(b) Show that instead of using orthogonality of the vj to deﬁne the sequence
of principal component directions, we can instead use the uncorrelatedness
of the zj.

Ex. 8.3 Consider the reconstruction error objective (8.4) with µ = 0.
(a) For ﬁxed Vr, show that the optimal choice of the reconstruction weights

is λi = VT

r xi for each i = 1, . . . , N .

(b) Use part (a) to show that the optimal Vr maximizes the criterion
r XT XV, and conclude that it can be obtained via the truncated SVD

VT
(as described in the main text).

EXERCISES

235

Ex. 8.4 Consider criterion (8.8) and Algorithm 8.1 for ﬁnding a solution. By
partially maximizing w.r.t. u with
1, show that any stationary value
of v is also a stationary value for the SCoTLASS criterion (8.7).

≤

u

k

k

2

Ex. 8.5 Consider the problem

minimize
u,v,d

X
k
c1,

v

−

1

k

≤

k

duvT

F

k
c2,

subject to

u

k

1
k

≤

(8.49)

2 = 1, d
k

≥

0,

u
k
c1

k

2 = 1,

v
k
√N , 1

where X is N
solution u1, v1, d1 is also the solution to the following problem:

p, and assume 1

c2

≤

≤

≤

≤

×

√p. Show that a

maximize
u,v

uT Xv

(8.50)

subject to

u
k

k

1

≤

c1,

v
k

1
k

≤

c2,

u
k

2 = 1,
k

v
k

k

2 = 1,

and d1 = uT

1 Xv1.

Ex. 8.6 In this exercise, we explore some properties of the SCoTLASS crite-
rion (8.7).
(a) Use the Cauchy–Schwarz inequality to show that a ﬁxed point of Algo-

rithm 8.1 is a local minimum of the SCoTLASS criterion (8.7).

(b) Notice that the Cauchy–Schwarz inequality implies that

vT XT Xv

(v(m)T
XT Xv)2
v(m)T XT Xv(m)

,

≥

(8.51)

and equality holds when v = v(m). So (v(m)T
v(m)T XT Xv(m) minorizes vT XT Xv at
v(m). Hence show that the MM algorithm (Section 5.8) using this minoriza-
tion function yields Algorithm 8.1.

XT Xv)2

Ex. 8.7 Show that the solution to the problem (8.15), with the additional
constraint

t, is also a solution to the SCoTLASS problem (8.7).

θ

1

k
Ex. 8.8 Consider the problem

≤

k

minimize
θ: kθk2=1

N
X

i=1

xi
k

−

θzi

2
2,

k

(8.52)

N
i=1 and θ are all p-dimensional, and the variables
}
N
i=1 are scalars. Show that the optimal solution is unique and given by

xi
{

where the vectors
zi
{
}
bθ = XT z
kXT zk2

.

Ex. 8.9 Show that the vectors uk in (8.17) solve the multifactor sparse PCA
problem (8.16).

236

SPARSE MULTIVARIATE METHODS

Ex. 8.10 Consider the reconstruction criterion (8.13) for sparse principal com-
ponents.
(a) With V ﬁxed, derive the solution for Θ.
(b) Show that when the λ1k = 0 for all k the iterations are stationary w.r.t.
any set of k principal components of X; in particular, if the algorithm is
started at the largest k principal components, it will not move from them.

(c) Show under the conditions in (b) that the criterion is maximized by
Θ = V and both are equal to Vk, the matrix consisting of the largest k
principal components of X.

(d) For a solution Vk in (c), show that VkR is also a solution, for any k

orthogonal matrix R.

k

×

Consequently, this version of sparse principal components is similar to the
Varimax method (Kaiser 1958) of rotating factors to achieve sparsity.

Ex. 8.11 Sparse K-means clustering algorithm. Consider the objective func-
tion (8.46).
(a) Show that with w ﬁxed, optimization with respect to

= (C1, ..., CK)

C

yields the problem

minimize
C1,...,CK




p
X



j=1

K
X

wj(

k=1

1
Nk

X

i,i0∈Ck

(xij

−

xi0j)2)






.

(8.53)

This can be thought of as K-means clustering with weighted data. Give a
sketch of its solution.

(b) With C1, ..., CK ﬁxed, we optimize with respect to w yielding

maximize
w∈Rp




p
X



j=1



wj



1
N

N
X

N
X

i=1

i0=1

(xij

−

xi0j)2

K
X

k=1

1
Nk

−

X

i,i0∈CK

(xij

−

xi0j)2










w
k

such that

2 = 1,
k

w
k
This is a simple convex problem of the form
(cid:8)wT a(cid:9) such that

s, and wj

≤

≥

0.

w

k

1

maximize
w∈Rp

2 = 1,
k

w
k

k

(8.54)

1
k

≤

s, and w

0.

(cid:23)

(8.55)

Give the details of its solution.

Ex. 8.12 Consider the optimization problem:

minimize
A,B∈Rp×m

( N
X

i=1

xi
k

−

ABT xi

)

,

2
k

(8.56)

where xi
that the solution satisﬁes ˆA ˆBT = VmVT
m right-singular vectors of X.

Rp, i = 1, . . . , N are the rows of X, and m < min(N, p). Show
m, where Vm is the matrix of the ﬁrst

∈

EXERCISES

237

Ex. 8.13 Consider the sparse encoder speciﬁed in the optimization prob-
lem (8.21). Develop a simple alternating algorithm for solving this problem.
Give some details for each step.

∈

∈

Rm1 and Y

Ex. 8.14 Canonical correlation via alternating regression: Consider two ran-
Rm2 with covariance matrices Σ11 and Σ22,
dom vectors X
respectively, and cross-covariance Σ12. Deﬁne L = Σ− 1
22 . Denote by
γi and τi the left and right singular vectors of L, ordered by their singular
values ρi.
(a) Show that the vectors β1 and θ1 maximizing Corr(Xβ, Y θ) are given by
β1 = Σ− 1
θ1 = Σ− 1

11 Σ12Σ− 1

11 γ1

(8.57)

2

2

2

2

22 τ1,

and the maximal correlation is ρ1.

×

×

p and N

(b) Now consider the analogous problem based on data matrices X and Y of
dimension N
q, respectively, each centered to have zero-mean
columns. In this setting, the canonical correlation estimates are obtained
simply by replacing Σ11, Σ22, and Σ12 by their sample estimates.
Based on this formulation, show that the optimal sample canonical vectors
are given by β1 = (XT X)− 1
2 τ1, where γ1 and τ1 are
the leading left and right singular vectors of the matrix
(XT X)− 1

2 γ1 and θ1 = (YT Y)− 1

2 XT Y(YT Y)− 1
2 .

(c) Denote the ﬁrst canonical variates by z1 = Xβ1 and s1 = Yθ1, both
N -vectors. Let HX = X(XT X)−1XT be the projection onto the column
space of X; likewise HY . Show that

HX s1 = ρ1z1,
HY z1 = ρ1s1.

and

Consequently, alternately regressing onto X and Y until convergence yields
a solution of the maximal canonical correlation problem.

Ex. 8.15 In Exercise 8.14, we found that the leading pair of canonical variates
can be found by alternating least-squares regressions. Having solved for the
leading canonical variates, how could you modify this procedure to produce
the second pair of canonical variates (z2, s2)? Propose a modiﬁcation and
prove that it works. Show how to extend this approach to ﬁnd all subsequent
pairs.

Ex. 8.16 CCA via optimal scoring: Given data matrices X and Y as in Exer-
cise 8.14, both with mean-centered columns and both with full column rank,
consider the problem

minimize
β,θ

Yθ
k

−

Xβ

k

2
2 subject to

1
N k

Yθ

2 = 1.
k

(8.58)

238

SPARSE MULTIVARIATE METHODS

(a) Characterize the solution to this problem, by ﬁrst solving for β with θ

ﬁxed, and then solving for θ.

(b) Show that the optimal solution is given by bθ = θ1 and bβ = ρ1β1, where
β1 and θ1 are the ﬁrst pair of canonical vectors, and ρ1 the largest canonical
correlation.

(c) Show in addition that

ρ2
1. This equivalence shows
that solving the optimal scoring problem is equivalent to solving the CCA
problem.

Yθ1
k

2
2 = 1

Xβ1

−

−

k

(d) Describe how to ﬁnd subsequent canonical solutions, uncorrelated with
the earlier solutions. Show how this can be achieved by transforming the
data matrices X and Y.

(e) Does the problem change if we include a constraint

Xβ

2 = 1?
k

k

Ex. 8.17 Low-rank CCA: Suppose that at least one of the matrices in Exer-
cise 8.14 or 8.16 do not have full column rank. (For instance, this degeneracy
will occur whenever N < min(p, q).)
(a) Show that ρ1 = 1, and the CCA problem has multiple optima.
(b) Suppose that Y is full column rank, but X is not. You add a ridge con-

straint to (8.58), and solve

minimize
β,θ

Yθ
k

−

Xβ

2
β
2 + λ
k

k

k

2
2 subject to

Yθ
k

k

2 = 1.

(8.59)

Is this problem degenerate? Characterize the solution.

(c) Show that the solution in (b) is equivalent to applying CCA to X and
Y, except that the optimal solution bβ satisﬁes the normalization condition
1
N bβT (XT X + λI) bβ = 1, corresponding to normalization by a type of ridged
covariance estimate.

Ex. 8.18 For data matrices X and Y with centered columns, consider the
optimization problem

maximize
β,θ

n

dCov(Xβ, Yθ)

λ1

β
k

2
2 −
k

λ2

β
k

2
2 −
k

λ0
θ
1k

1
k

λ0
θ
2k

2
k

−

−

o

.

(8.60)

Using the results of Exercise 8.14, outline how to solve this problem using
alternating elastic-net ﬁtting operations in place of the least-squares regres-
sions.

Ex. 8.19 Sparse canonical correlation analysis: Consider the optimal scoring
problem (8.58) from Exercise 8.16, but augmented with ‘1 constraints:

(cid:8)

minimize
β,θ

Yθ
k

−

Xβ

2
2 + λ1
k

β
k

1 + λ2
k

θ
k

1
k

(cid:9) subject to

Xβ

2 = 1. (8.61)
k

k

Using the results of Exercises 8.14, 8.16, and 8.17, outline how to solve this
problem using alternating elastic-net regressions in place of the least-squares
regressions.

EXERCISES

239

Ex. 8.20 Consider the multivariate Gaussian setup in Section 8.4.1, but as-
sume a diﬀerent covariance matrix Σk in each class.
(a) Show that the discriminant functions δk are quadratic functions of x.

What can you say about the decision boundaries?

(b) Suppose that the covariance matrices Σk are assumed to be diagonal,
meaning that the features X are conditionally independent in each class.
Describe the decision boundary between class k and ‘ for this naive Bayes
classiﬁer.

Ex. 8.21 This exercise relates to the nearest shrunken centroids problem of
Section 8.4.2. Consider the ‘1-regularized criterion

minimize
¯µ∈Rp
αk∈Rp,k = 1, . . . , p






1
2

K
X

X

p
X

(xij

k=1

i∈Ck

j=1

−

¯µj
s2
j

−

αjk)2

+ λ

K
X

p
X

k=1

j=1

√Nk
sj

|

αjk




|



.

(8.62)
Here we have decomposed each class mean into an overall mean plus a class-
wise contrast from the overall mean, and we have weighted the penalties by
the class sizes and within-class standard deviations for each feature.
(a) Show that replacing ¯µj by ¯xj, corresponding to the overall mean for
feature j, yields the shrinkage scheme (8.35a), apart from a term 1/N in
mk.

(b) Show that part (a) does not yield a solution to the criterion (8.33) unless

we restrict ¯µj as above.

(c) A more natural criterion would add the constraints PK

k=1 αjk = 0 for
all j = 1, . . . p. Discuss the solution to this problem, and whether it can
coincide with the solution from part (a).

Ex. 8.22 Show that the penalized Fisher’s discriminant problem (8.40) and
the penalized optimal scoring problem (8.42) are equivalent in the sense that
any stationary point for one problem is also a stationary point for the other
problem. (Clemmensen et al. 2011, Witten and Tibshirani 2011).

Chapter 9

Graphs and Model Selection

9.1 Introduction

Probabilistic graphical models provide a useful framework for building par-
simonious models for high-dimensional data. They are based on an interplay
between probability theory and graph theory, in which the properties of an
underlying graph specify the conditional independence properties of a set of
random variables. In typical applications, the structure of this graph is not
known, and it is of interest to estimate it based on samples, a problem known
as graphical model selection. In this chapter, we discuss a variety of methods
based on ‘1-regularization designed for this purpose.

9.2 Basics of Graphical Models

We begin by providing a brief introduction to the basics of graphical models;
for more details, we refer the reader to the references cited in the bibliographic
notes at the end of the chapter. Any collection X = (X1, X2, . . . , Xp) of
random variables can be associated with the vertex set V =
1, 2, . . . , p
}
of some underlying graph. The essential idea of a graphical model is to use
the structure of the underlying graph—either its clique structure or its cut set
structure—in order to constrain the distribution of the random vector X. We
now make these notions more precise.

{

9.2.1 Factorization and Markov Properties

{

V

×

⊂

1, 2, . . . , p

, and an edge
An ordinary graph G consists of a vertex set V =
}
V . In this chapter, we focus exclusively on undirected graphical
set E
models, meaning that there is no distinction between an edge (s, t)
E,
and the edge (t, s). In contrast, directed acyclic graphs (DAGs) are the most
popular form of graph in which the edges have directionality. In general, such
directed graphs are more diﬃcult to handle than undirected graphs, and we
do not cover them here. But we do note that some methods for computation
in undirected graphs can be helpful in the DAG case: see the bibliographic
notes for some references.

∈

A graph clique C

⊆

V is a fully-connected subset of the vertex set, meaning

241

242

GRAPHS AND MODEL SELECTION

∈

∈

E for all s, t

C. A clique is said to be maximal if it is not strictly
that (s, t)
contained within any other clique. For instance, any single vertex
is itself
a clique, but it is not maximal unless s is an isolated vertex (meaning that
it participates in no edges). We use C to denote the set of all cliques in the
graph, both maximal and nonmaximal; see Figure 9.1(a) for an illustration of
graph cliques.

s
}

{

(a)

(b)

Figure 9.1 (a) Illustration of cliques in a graph: each of the four subsets indicated
are cliques. Sets A and B are 3-cliques, whereas C and D are 2-cliques, more com-
monly known as edges. All of these cliques are maximal. (b) Illustration of a vertex
cut set S: with the vertices in S removed, the graph is broken into two subcomponents
A and B.

9.2.1.1 Factorization Property

We now describe how the clique structure of a graph can be used to constrain
the probability distribution of the random vector (X1, . . . , Xp) indexed by
C, a compatibility function ψC is
the graph vertices. For a given clique C
a real-valued function of the subvector xC : = (xs, s
C), taking positive
real values. Given a collection of such compatibility functions, we say that the
probability distribution P factorizes over G if it has the decomposition

∈

∈

P(x1, . . . , xp) =

1
Z

Y

C∈C

ψC(xC).

(9.1)

Q

x∈X p

Here the quantity Z, known as the partition function, is given by the sum
Z = P
C∈C ψC(xC). Thus, it ensures that P is properly normalized,
and so deﬁnes a valid probability distribution. As a particular example, any
probability distribution that factorizes over the graph in Figure 9.1(a) must
have the form

P(x1, . . . , x7) =

1
Z

ψ123(x1, x2, x3) ψ345(x3, x4, x5) ψ46(x4, x6) ψ57(x5, x7),

(9.2)

for some choice of the compatibility functions

ψ123, ψ345, ψ46, ψ57
{

.
}

3451234567ABCDABSBASICS OF GRAPHICAL MODELS

243

−

A factorization of the form (9.1) is practically signiﬁcant, since it can lead
to substantial savings, in both storage and computation, if the clique sizes
are not too large. For instance, if each variable Xs is binary, then a generic
p requires specifying
1, +1
probability distribution over the vector X
}
2p
1 nonnegative numbers, and so grows exponentially in the graph size.
On the other hand, for a clique-based factorization, the number of degrees of
2c, where c is the maximum cardinality of any clique.
freedom is at most
Thus, for the clique-based factorization, the complexity grows exponentially
in the maximum clique size c, but only linearly in the number of cliques
C
. Luckily, many practical models of interest can be speciﬁed in terms of
|
|
cliques with bounded size, in which case the clique-based representation yields
substantial gains.

∈ {−

C
|

|

9.2.1.2 Markov Property

We now turn to an alternative way in which the graph structure can be used
to constrain the distribution of X, based on its cut sets (see Figure 9.1(b)).
In particular, consider a cut set S that separates the graph into disconnected
components A and B, and let us introduce the symbol
to denote the relation
“is conditionally independent of.” With this notation, we say that the random
vector X is Markov with respect to G if

⊥⊥

XA

XB

XS

|

⊥⊥

for all cut sets S

V .

⊂

(9.3)

The graph in Figure 9.1(b) is an example showing this conditional indepen-
dence relation.

Markov chains provide a particular illustration of this property; naturally,

they are based on a chain-structured graph, with edge set

E =

(1, 2), (2, 3), . . . , (p
{

1, p)
}

.

−
1

∈ {
1, . . . , s
{

forms a cut set, separating
In this graph, any single vertex s
the graph into the past P =
.
}
−
For these cut sets, the Markov property (9.3) translates into the fact that, for a
Markov chain, the future XF is conditionally independent of the past XP given
the present Xs. Of course, graphs with more structure have correspondingly
more complex cut sets, and thus more interesting conditional-independence
properties.

2, 3, . . . , p
1
}

s + 1, . . . , p
{

and the future F =

−

}

9.2.1.3 Equivalence of Factorization and Markov Properties

A remarkable fact, known as the Hammersley–Cliﬀord theorem, is that for
p), the
any strictly positive distribution (i.e., for which P(x) > 0 for all x
two characterizations are equivalent: namely, the distribution of X factorizes
according to the graph G (as in Equation (9.1)) if and only if the random
vector X is Markov with respect to the graph (as in Equation (9.3)). See the
bibliographic section for further discussion of this celebrated theorem.

∈ X

244

GRAPHS AND MODEL SELECTION

9.2.2 Some Examples

We present some examples to provide a concrete illustration of these proper-
ties.

9.2.2.1 Discrete Graphical Models

We begin by discussing the case of a discrete graphical model, in which random
s. The
variables Xs at each vertex s
X
simplest example is the binary case, say with
. Given a graph
}
G = (V, E), one might consider the family of probability distributions

V take values in a discrete space
s =

1, +1

{−

X

∈

Pθ(x1, . . . , xp) = exp (cid:8) X

θsxs +

X

s∈V

(s,t)∈E

θstxsxt

−

A(θ)(cid:9),

(9.4)

∈

R|V |+|E|. For later convenience, here we have
parametrized by the vector θ
introduced the notation A(θ) = log Z(θ), reﬂecting the dependence of the
normalization constant on the parameter vector θ. This family of distributions
is known as the Ising model, since it was originally used by Ising (1925) to
model the behavior of magnetic materials; see the bibliographic section for
further discussion. Figure 9.2 shows simulations from three diﬀerent Ising
models.

(a)

(b)

(c)

Figure 9.2 Samples generated from Ising models based on a graph with p = 1024
nodes. For illustrative purposes, the resulting vector x ∈ {+1, 1}1024 is plotted as
a 32 × 32 binary image. Panels (a) through (c) correspond to three very diﬀerent
distributions. The samples were drawn by running the Gibbs sampler.

The Ising model has been used to model social networks, for exam-
ple the voting behavior of politicians. In this context, the random vector
(X1, X2, . . . , Xp) represents the set of votes cast by a set of p politicians on
a particular bill. We assume that politician s provides either a “yes” vote
1) on the bill. With the voting results
(Xs = +1) or a “no” vote (Xs =
for N bills, we can make inferences on the joint distribution of X. In the fac-
torization (9.4), a parameter θs > 0 indicates that politician s is more likely
(assuming ﬁxed values of other politicians’ votes) to vote “yes” on any given
bill, with the opposite interpretation holding in the case θs < 0. On the other

−

BASICS OF GRAPHICAL MODELS

245

hand, for any given pair s, t that are joined by an edge, a weight θst > 0
means that with the behavior of all politicians held ﬁxed, politicians s and
t are more likely to share the same vote (i.e., both yes or both no) than to
disagree; again, the opposite interpretation applies to the setting θst < 0. See
Figure 9.7 on page 257 for an application to voting-record data.

Many extensions of the Ising model are possible. First, the factoriza-
tion (9.4) is limited to cliques of size at most two (i.e., edges). By allowing
terms over cliques of size up to size three, one obtains the family of models

Pθ(x) = exp (cid:8) X

θsxs +

X

θstxsxt +

X

θstuxsxtxu

s∈V

(s,t)∈E

(s,t,u)∈E3

A(θ)(cid:9).

−

(9.5)

where E3 is some subset of vertex triples. This factorization can be extended
up to subsets of higher order, and in the limit (where we allow an interaction
term among all p variables simultaneously), it is possible to specify the dis-
tribution of any binary vector. In practice, of most interest are models based
on relatively local interactions, as opposed to such a global interaction.

Another extension of the Ising model is to allow for non-binary variables,
for some m > 2. In this case, one might

for instance Xs
1
−
∈ {
consider the family of distributions

0, 1, 2, . . . , m

}

Pθ(x1, . . . , xp) = exp (cid:8) X

m−1
X

θs;jI[xs = j] +

s∈V

j=1

X

(s,t)∈E

θstI[xs = xt]

A(θ)(cid:9),

−

(9.6)

where the indicator function I[xs = j] takes the value 1 when xs = j, and
0 otherwise. When the weight θst > 0, the edge-based indicator function
I[xs = xt] acts as a smoothness prior, assigning higher weight to pairs (xs, xt)
that agree. The model (9.6) has found many uses in computer vision, for
instance in image denoising and disparity computation problems.

All the models discussed here have a parallel life in the statistics and
biostatistics literature, where they are referred to as log-linear models for
multiway tables. However, in that setting the number of variables is typically
quite small.

In Section 9.4.3 we discuss a general class of pairwise-Markov models for

mixed data—allowing for both continuous and discrete variables.

9.2.2.2 Gaussian Graphical Models

Let X
vector µ

∼
∈

N (µ, Σ) be a Gaussian distribution in p dimensions, with mean
Rp and covariance matrix Σ:

Pµ,Σ(x) =

(2π)

1

p

2 det[Σ] 1

2

e− 1

2 (x−µ)T Σ−1(x−µ).

(9.7)

246

GRAPHS AND MODEL SELECTION

If we view the multivariate Gaussian distribution as a particular type of ex-
ponential family, then (µ, Σ) are known as the mean parameters of the family.
In order to represent the multivariate Gaussian as a graphical model, it is
convenient to consider instead its parametrization in terms of the so-called
Rp×p. Any nondegenerate
canonical parameters, say a vector γ
∈
multivariate Gaussian—meaning whenever Σ is strictly positive deﬁnite—can
be represented in the form

Rp and Θ

∈

Pγ,Θ(x) = exp

(cid:26) p
X

s=1

γsxs

1
2

−

p
X

s,t=1

θst xsxt

−

(cid:27)

A(Θ)

,

(9.8)

1

2 log det[Θ/(2π)], so that R
where A(Θ) =
Pγ,Θ(x)dx = 1. Our choice of
−
the rescaling by
1/2 in the factorization (9.8) is to ensure that the matrix
−
Θ has a concrete interpretation. In particular, with this scaling, as shown in
Exercise 9.1, we have the relation Θ = Σ−1, so that Θ corresponds to the
inverse covariance, precision or concentration matrix.

The representation (9.8) is especially convenient, because it allows us to
discuss the factorization properties directly in terms of the sparsity pattern
of the precision matrix Θ. In particular, whenever X factorizes according to
the graph G, then based on the factorization (9.8), we must have Θst = 0 for

(a)

(b)

Figure 9.3 (a) An undirected graph G on ﬁve vertices. (b) Associated sparsity pat-
tern of the precision matrix Θ. White squares correspond to zero entries.

any pair (s, t) /
E, which sets up a correspondence between the zero pattern
∈
of Θ and the edge structure E of the underlying graph. See Figure 9.3 for an
illustration of this correspondence.

9.3 Graph Selection via Penalized Likelihood

We now turn to the problem of graph selection, and the use of ‘1-regularized
likelihood methods for solving it. The problem itself is simply stated: suppose

123451234554321ZeropatternofΘGRAPH SELECTION VIA PENALIZED LIKELIHOOD

247

}

{

x1, . . . , xN

that we are given a collection X =
of samples from a graphical
model, but the underlying graph structure is unknown. How to use the data
to select the correct graph with high probability? Here we discuss the use of
likelihood-based methods in conjunction with ‘1-regularization for this pur-
pose. This section discusses methods based on the global likelihood function
of the graphical model. In the Gaussian case, this approach leads to tractable
methods for model selection based on a log-determinant convex program with
‘1-regularization. On the other hand, in the discrete case, this approach is
computationally tractable only for relatively small graphs, or graphs with
special structure.

9.3.1 Global Likelihoods for Gaussian Models

We start with model selection for the Gaussian graphical model, a problem
that is also known as covariance selection. Since our primary interest is in
estimating the graph structure, we assume that the distribution has mean zero,
so that under the parametrization (9.8), we need only consider the symmetric
precision matrix Θ

Suppose X represents samples from a zero-mean multivariate Gaussian
with precision matrix Θ. Based on some straightforward algebra (see Ex-
ercise 9.2 for details), it can be seen that (up to a constant) the rescaled
log-likelihood

(Θ; X) of the multivariate Gaussian takes the form

Rp×p.

∈

L

(Θ; X) =

L

1
N

N
X

i=1

log PΘ(xi)

= log det Θ

trace(SΘ),

−

(9.9)

PN

i=1 xixT
i

where S = 1
N
inant function is deﬁned on the space of symmetric matrices as
(Pp

is the empirical covariance matrix. The log-determ-

log det(Θ) =

j=1 log(λj(Θ))

0

if Θ
(cid:31)
otherwise,

;
−∞

(9.10)

where λj(Θ) is the jth eigenvalue of Θ. In Exercise 9.2, we explore some ad-
ditional properties of this function. The objective function (9.9) is an instance
of a log-determinant program, a well-studied class of optimization problems.
It is strictly concave, so that the maximum—when it is achieved—must be
unique, and deﬁnes the maximum likelihood estimate bΘML, denoted MLE for
short.

By classical theory, the maximum likelihood estimate bΘML converges to
the true precision matrix as the sample size N tends to inﬁnity. Thus, at least
in principle, one could use a thresholded version of bΘML to specify an edge set,
and thereby perform Gaussian graphical model selection. However, for prob-
lems frequently arising in practice, the number of nodes p may be comparable
to or larger than the sample size N , in which case the MLE does not exist.

248

GRAPHS AND MODEL SELECTION

Indeed, the empirical correlation matrix S must be rank-degenerate whenever
N < p, which implies that the MLE fails to exist (see Exercise 9.2(c)). Hence
we must consider suitably constrained or regularized forms of the MLE. More-
over, irrespective of the sample size, we may be interested in constraining the
estimated precision matrix to be sparse, and hence easier to interpret.

If we are seeking Gaussian graphical models based on relatively sparse
graphs, then it is desirable to control the number of edges, which can be
measured by the ‘0-based quantity

ρ0(Θ) =

X

s6=t

I[θst

= 0],

(9.11)

where I[θst
we have ρ0(Θ) = 2
E
|
|
|
deﬁned by Θ. We could then consider the optimization problem

= 0] is a 0-1-valued indicator function. Note that by construction,
is the number of edges in the graph uniquely

, where

E

|

bΘ

∈

arg max
Θ(cid:23)0
ρ0(Θ)≤k

(cid:8) log det(Θ)

−

trace(SΘ)(cid:9).

(9.12)

Unfortunately, the ‘0-based constraint deﬁnes a highly nonconvex constraint
set, essentially formed as the union over all (cid:0)(p
2)
(cid:1) possible subsets of k edges.
k
For this reason, it is natural to consider the convex relaxation obtained by
replacing the ‘0 constraint with the corresponding ‘1-based constraint. Doing
so leads to the following convex program

bΘ

arg max
Θ(cid:23)0

(cid:8) log det Θ

trace(SΘ)

λρ1(Θ)(cid:9),

(9.13)

|

−

−

θst

s6=t |

∈
where ρ1(Θ) = P
is simply the ‘1-norm of the oﬀ-diagonal entries of
Θ. The problem (9.13) can be formulated as an instance of a log-determinant
program; it is thus a convex program, often referred to as the graphical lasso.
Since this is a convex program, one can use generic interior point methods
for its solution, as in Vandenberghe, Boyd and Wu (1998). However this is not
eﬃcient for large problems. More natural are ﬁrst-order block coordinate-
descent approaches, introduced by d’Aspremont, Banerjee and El Ghaoui
(2008) and reﬁned by Friedman, Hastie and Tibshirani (2008). The latter
authors call this the graphical lasso algorithm. It has a simple form which
also connects it to the neighborhood-based regression approach, discussed in
Section 9.4.

9.3.2 Graphical Lasso Algorithm

The subgradient equation corresponding to (9.13) is

Θ−1

S

λ

Ψ = 0,

(9.14)

−
with the symmetric matrix Ψ having diagonal elements zero, ψjk = sign(θjk)
if θjk

1, 1] if θjk = 0.

= 0, else ψjk

−

[

·

∈

−

6
6
6
GRAPH SELECTION VIA PENALIZED LIKELIHOOD

249

We now consider solving this system by blockwise coordinate descent. To
this end we consider partitioning all the matrices into one column versus the
rest; for convenience we pick the last column:

Θ =

(cid:20) Θ11 θ12
θ22

θT
12

(cid:21)

, S =

(cid:20) S11
sT
12

(cid:21)

s12
s22

, etc.

(9.15)

Denote by W the current working version of Θ−1, with partitions as in (9.15).
Then ﬁxing all but the last row and column and using partitioned inverses,
(9.14) leads to

W11β

s12 + λ

ψ12 = 0,

(9.16)

−

·

θ12/θ22. Here we have ﬁxed the pth row and column: W11 is the
where β =
1) block of Θ−1, and s12 and θ12 are p
(p
(p
1)
1 nondiagonal elements
of the pth row and columns of S and Θ. Finally θ22 is the pth diagonal element
of Θ. These details are derived in Exercise 9.6.1

−
−

−

−

×

It can be seen that (9.16) is equivalent to a modiﬁed version of the esti-
mating equations for a lasso regression. Consider the usual regression setup
with outcome variables y and predictor matrix Z. In that problem, the lasso
minimizes

−
The subgradient equations are

1
2N (y

Zβ)T (y

Zβ) + λ

β

1

k

· k

−

1

N ZT Zβ

1

N ZT y + λ

·

−

sign(β) = 0.

(9.17)

(9.18)

Comparing to (9.16), we see that 1
N ZT Z cor-
responds to W11, the estimated cross-product matrix from our current model.
Thus we can solve each blockwise step (9.16) using a modiﬁed algorithm for
1
the lasso, treating each variable as the response variable and the other p
variables as the predictors. It is summarized in Algorithm 9.1.

N ZT y is the analog of s12, and 1

−

Friedman et al. (2008) use the pathwise-coordinate-descent approach to
solve the modiﬁed lasso problems at each stage, and for a decreasing series
of values for λ. [This corresponds to the “covariance” version of their lasso
algorithm, as implemented in the glmnet package in R and matlab (Friedman
et al. 2010b).]

From Equation (9.14) we see that the diagonal elements wjj of the solution

matrix W are simply sjj, and these are ﬁxed in Step 1 of Algorithm 9.1.2

1On a historical note, it turns out that this algorithm is not block-coordinate descent
on Θ in (9.14) (as originally intended in Friedman et al. (2008)), but instead amounts to
a block coordinate-descent step for the convex dual of problem (9.13). This is implied in
Banerjee, El Ghaoui and d’Aspremont (2008), and is detailed in Mazumder and Hastie
(2012). The dual variable is eﬀectively W = Θ−1. These latter authors derive alternative
coordinate descent algorithms for the primal problem (see Exercise 9.7). In some cases, this
gives better numerical performance than the original graphical lasso procedure.

2An alternative formulation of the problem can be posed, where we penalize the diagonal
of Θ as well as the oﬀ-diagonal terms. Then the diagonal elements wjj of the solution matrix
are sjj + λ, and the rest of the algorithm is unchanged.

250
Algorithm 9.1 Graphical Lasso.
1. Initialize W = S. Note that the diagonal of W is unchanged in what

GRAPHS AND MODEL SELECTION

follows.

2. Repeat for j = 1, 2, . . . p, 1, 2, . . . p, . . . until convergence:

(a) Partition the matrix W into part 1: all but the jth row and column,

and part 2: the jth row and column.
(b) Solve the estimating equations W11β

s12 + λ

sign(β) = 0 using a

−

·

cyclical coordinate-descent algorithm for the modiﬁed lasso.

(c) Update w12 = W11

ˆβ

3. In the ﬁnal cycle (for each j) solve for ˆθ12 =

w22

wT
12

−

ˆβ.

ˆβ

−

·

ˆθ22, with 1/ˆθ22 =

The graphical lasso algorithm is fast, and can solve a moderately sparse
problem with 1000 nodes in less than a minute. It is easy to modify the algo-
rithm to have edge-speciﬁc penalty parameters λjk; note also that λjk =
will force ˆθjk to be zero.

∞

Figure 9.4 illustrates the path algorithm using a simple example. We gen-

erated 20 observations from the model of Figure 9.3, with

Θ =









2
0.6
0
0
0.5

0.6
2
0.4
−
0.3
0

−

0
0.4
2
0.2
−
0

0
0.3
0.2
2
0.2

−

−









.

0.5
0
0
0
2

(9.19)

Shown are the graphical lasso estimates for a range of λ values, plotted against
the ‘1 norm of the solution ˆΘλ. The true values of Θ are indicated on the
right. The solutions are spot on, but this is not surprising since the solution on
the right (no regularization) is S−1 which equals Θ (Exercise 9.3). In the right
panel, we have added independent Gaussian noise to each element of the data
matrix (with standard deviation 0.05). Now we see that the estimate is not
nearly as accurate; in fact, the nonzero support is never recovered correctly
along the path.

•

Some further points about the Gaussian graphical model:
A simpler approach would be to use the observed covariance S11 in place of
W11: this requires just a single pass through the predictors, carrying out a
lasso regression of each variable Xj on the others. This is called neighbor-
hood selection (Meinshausen and B¨uhlmann 2006). Like the graphical lasso
algorithm, this yields a consistent estimate of the support of Θ, but is not
guaranteed to produce a positive deﬁnite estimate ˆΘ. We discuss this in
detail in Section 9.4.

•

If we pre-specify the zero pattern in Θ, we can use standard linear regres-
sion in place of the lasso, leaving out the predictors that are supposed to

GRAPH SELECTION VIA PENALIZED LIKELIHOOD

251

Figure 9.4 Left: Proﬁles of estimates from the graphical lasso, for data simulated
from the model of Figure 9.3. The actual values of Θ are achieved at the right end
of the plot. Right: Same setup, except that standard Gaussian noise has been added
to each column of the data. Nowhere along the path is the true edge set recovered.

have coeﬃcients of zero. This provides a convenient way of computing the
constrained maximum likelihood estimate of Θ. Details are in Chapter 17
of Hastie et al. (2009).

9.3.3 Exploiting Block-Diagonal Structure

If the inverse covariance matrix has a block diagonal structure

Θ =








Θ11

0
0 Θ22
...
...
0
0








,

0
0
...
Θkk

· · ·
· · ·
. . .

· · ·

(9.20)

for some ordering of the variables, then the graphical lasso problem can be
solved separately for each block, and the solution is constructed from the
individual solutions. This fact follows directly from the subgradient equations
(9.14).

It turns out that there is a very simple necessary and suﬃcient condition
for a graphical-lasso solution to have such structure (Witten, Friedman and
Simon 2011, Mazumder and Hastie 2012). Let C1, C2, . . . CK be a partition of
the indices 1, 2, . . . , p of S into K blocks. Then the corresponding arrangement
of ˆΘ has this same block structure if and only if
λ for all pairs (i, i0)
not belonging to the same block. The proof is easy, by inspection of (9.14)
and using the fact that the inverse of a block diagonal matrix has the same
block-diagonal structure. This means that the elements of each block Ck are
fully disconnected from elements of all other blocks.

| ≤

sii0

|

01234−0.4−0.20.00.20.40.6121523243435No Noise012345−0.4−0.20.00.20.40.612131415232425343545With Noiseℓ1Normℓ1NormEstimatedΘEstimatedΘ252

GRAPHS AND MODEL SELECTION

Figure 9.5 Plots of the operator-norm error k bΘ − Θ∗k2 between the graphical lasso
estimate bΘ and the true inverse covariance matrix. Left: plotted versus the raw
sample size N , for three diﬀerent graph sizes p ∈ {64, 100, 225}. Note how the curves
shift to the right as the graph size p increases, reﬂecting the fact that larger graphs
require more samples for consistent estimation. Right: the same operator-norm error
curves plotted versus the rescaled sample size
d2 log p for three diﬀerent graph sizes
p ∈ {64, 100, 225}. As predicted by theory, the curves are now quite well-aligned.

N

This fact can be exploited to provide a substantial speedup in computa-
tion, by ﬁrst identifying the disconnected components and then solving the
subproblems in each block. The number of blocks is monotone in λ. This
means, for example, that solutions can be found for very large problems (that
perhaps could not be solved in general), as long as λ is suﬃciently large.

9.3.4 Theoretical Guarantees for the Graphical Lasso

In order to explore the behavior of graphical lasso or log-determinant method,
we carried out a series of simulations. For a given graph type with p nodes and
speciﬁed covariance matrix, we generated a set of N zero-mean multivariate
Gaussian samples, and used them to form the empirical covariance matrix
S. We solved the graphical lasso program using the regularization parameter
N (Ravikumar, Wainwright, Raskutti and Yu 2011, as suggested
2 versus the sample

by theory) and plot the operator norm error
size N . Figure 9.5 (left) shows such plots for three diﬀerent dimensions p

64, 100, 225
{
four. For each graph size, we generated an inverse covariance matrix Θ∗

∈
of two-dimensional grid graphs, in which each node has degree

λN = 2

q log p

bΘ
k

Θ∗

−

}

k

∈

●●●●●●●●●10003000500070000.150.200.250.30Sample Size       Operator−Norm Error●●●●●●●●●●●●●●●●●●p=64p=100p=225●●●●●●●●●10152025300.100.150.200.250.30Rescaled Sample Size●●●●●●●●●●●●●●●●●●GRAPH SELECTION VIA PENALIZED LIKELIHOOD

253

Rp×p with entries

θ∗
st =






1
0.2
0

if s = t,
t
s
if
−
|
|
otherwise

= 1, and

The plots in the left panel show that the graphical lasso is a consistent pro-
cedure for estimating the inverse covariance Θ∗ in operator norm, since the
error curves converge to zero as N increases. Comparing the curves for diﬀer-
ent graph sizes, we see a rightward-upward shift in the error curves, reﬂecting
the fact that larger graphs require more samples to achieve the same error
tolerance.

It is known that the solution bΘ to the graphical lasso satisﬁes, with high

probability, the error bound

bΘ
k

−

Θ∗

2 (cid:46)
k

r

d2 log p
N

,

(9.21)

where d is the maximum degree of any node in the graph, and (cid:46) denotes
inequality up to constant terms. (See the bibliographic notes on page 261 for
details). If this theoretical prediction were sharp, one would expect that the
same error curves—if replotted versus the rescaled sample size
d2 log p —should
be relatively well-aligned. The right panel in Figure 9.5 provides empirical
conﬁrmation of this prediction. We note that there are also theoretical results
that guarantee that, as long as N = Ω(d2 log p), the support set bΘ of the
graphical lasso estimate coincides with the support set of Θ∗. Thus, the
graphical lasso also succeeds in recovering the true graph structure.

N

9.3.5 Global Likelihood for Discrete Models

In principle, one could imagine adopting the ‘1-regularized version of the
global likelihood to the problem of graph selection in models with discrete
variables. A major challenge here is that the partition functions A in (9.4)–
(9.6)—in sharp contrast to the multivariate Gaussian case—are diﬃcult to
compute in general. For instance, in the case of the Ising model (9.4), it takes
the form

A(θ) = log





X

exp

x∈{−1,+1}p




X



s∈V

θsxs +

X

θstxsxt

(s,t)∈E






 .



Thus, a brute force approach is intractable for large p, since it involves a
summation over 2p terms. With the exception of some special cases, computing
the value of A(θ) is computationally intractable in general.

There are various approaches that can be taken to approximate or bound
the partition function (see the bibliographic discussion for some references).
However, these methods are somewhat oﬀ the main course of development

254

GRAPHS AND MODEL SELECTION

in this chapter. Instead, the next section moves away from global likelihoods
toward the idea of conditional or pseudo-likelihoods. These approaches can be
used both for Gaussian and discrete variable models, and are computationally
tractable, meaning polynomial-time in both sample size and graph size in
either case.

9.4 Graph Selection via Conditional Inference

An alternative approach to graph selection is based on the idea of
neighborhood-based likelihood, or products of such quantities that are known
as pseudo-likelihoods. Both of these methods focus on conditional distribu-
tions, which for many situations are tractable.

For a given vertex s

V , we use

∈
X\{s} =

∈
to denote the collection of all other random variables in the graph. Now con-
sider the distribution of Xs given the random vector X\{s}. By the conditional

\{

Xt, t
{

V

s
}} ∈

p−1.

R

Figure 9.6 The dark blue vertices form the neighborhood set N (s) of vertex s (drawn
in red); the set N +(s) is given by the union N (s) ∪ {s}. Note that N (s) is a cut
set in the graph that separates {s} from V \N +(s). Consequently, the variable Xs is
conditionally independent of XV \N +(s) given the variables XN (s) in the neighborhood
set. This conditional independence implies that the optimal predictor of Xs based on
all other variables in the graph depends only on XN (s).

independence properties of any undirected graphical model (see Section 9.2),
the only relevant variables to this conditioning are those in the neighborhood
set

(s) = (cid:8)t

N

V

∈

|

(s, t)

∈

E(cid:9).

(9.22)

Indeed, as shown in Figure 9.6, the set
from the remaining vertices V

N

+(s), where we deﬁne

(s) is a cut set that separates

+(s) =

N

N

s
}
{
(s)
∪

\N

st1t2t3t4t5GRAPH SELECTION VIA CONDITIONAL INFERENCE

255

. Consequently, we are guaranteed that the variable Xs is conditionally

s
{
}
independent of XV \N +(s) given the variables XN (s), or equivalently that

X\{s}) d= (Xs

(Xs

|

XN (s)).

|

(9.23)

How can this conditional independence (CI) property be exploited in the
context of graph selection? If we consider the problem of predicting the value
of Xs based on XV \{s}, then by the CI property, the best predictor can be
speciﬁed as a function of only XN (s). Consequently, the problem of ﬁnding
the neighborhood can be tackled by solving a prediction problem, as detailed
next.

9.4.1 Neighborhood-Based Likelihood for Gaussians

Let us ﬁrst develop this approach for the multivariate Gaussian. In this case,
the conditional distribution of Xs given X\{s} is also Gaussian, so that Xs can
be decomposed into the best linear prediction based on X\{s} and an error
term—namely

Xs = X T

\{s}βs + W\{s}.

(9.24)

zero-mean Gaussian variable with
In this decomposition, W\{s}
Var(W\{s}) = Var(Xs
X\{s}), corresponding to the prediction error, and
is independent of X\{s}. So the dependence is captured entirely by the linear
regression coeﬃcients βs, which are a scalar multiple of θs, the corresponding
subvector of Θ in (9.8) in Section 9.2.2 (Exercise 9.4).

is

|

The decomposition (9.24) shows that in the multivariate Gaussian case,
the prediction problem reduces to a linear regression of Xs on X\{s}. The
key property here—as shown in Exercise 9.4—is that the regression vector βs
satisﬁes supp(βs) =
(s). If the graph is relatively sparse—meaning that the
degree
of node s is small relative to p—then it is natural to consider
estimating βs via the lasso. This leads to the following neighborhood-based
approach to Gaussian graphical model selection, based on a set of samples
X =

(s)
|

x1, . . . , xN

|N

N

In step 1(a), xi,V \{s} represents the (p

1) dimensional subvector of the p-
vector xi, omitting the sth component. To clarify step 2, the AND rule declares
that edge (s, t) belongs to the estimated edge set bE if and only s
(t)
(s). On the other hand, the OR rule is less conservative, allowing
and t
(s, t)

(t) or t

(s).

b
N

−

∈

b
∈
N
bE if either s
∈

b
N

∈

An advantage of neighborhood models is speed. Many eﬃcient implemen-
tations of the lasso are available, and the p regression problems can be solved
independently of each other, and hence in parallel.

b
N

∈

.
}

{

The AND/OR rules can be avoided by using a joint estimation approach
using the pseudo-likelihood, which is essentially the sum of the log-likelihoods
in (9.25). In this case we would enforce the symmetry of Θ. While more ele-
gant, this does incur a small additional computational cost (Friedman, Hastie

256
GRAPHS AND MODEL SELECTION
Algorithm 9.2 Neighborhood-based graph selection for Gaussian
graphical models.
1. For each vertex s = 1, 2, . . . , p:

(a) Apply the lasso to solve the neighborhood prediction problem:

bβs

arg min
βs∈Rp−1

∈

(

1
2N

N
X

i=1

(cid:0)xis −

βs
i,V \{s}βs)2 + λ
xT
k

1
k

)

.

(9.25)

(b) Compute the estimate b
N

(s) = supp( bβs) of the neighborhood set

(s).

via the AND or OR

N

2. Combine the neighborhood estimates

b
N
{
rule to form a graph estimate bG = (V, bE).

(s), s

V

}

∈

and Tibshirani 2010a). It also produces an estimate bΘ, and not just its graph.
We discuss such approaches in more generality in Section 9.4.3.

9.4.2 Neighborhood-Based Likelihood for Discrete Models

The idea of a neighborhood-based likelihood is not limited to Gaussian mod-
els, but can also be applied to other types of graphical models that can be
written in the exponential family form. In fact, given that global likelihood
calculations are intractable for discrete graphical models, the neighborhood-
based approach is especially attractive in the discrete case, at least from the
computational perspective.

The simplest type of discrete graphical model is the Ising model (9.4),
p that
used to model a collection of variables (X1, X2, . . . , Xp)
}
interact in a pairwise manner. In this case, as we explore in Exercise 9.5, the
conditional log-odds for the probability of Xs given XV \{s} takes the form3

∈ {−

1, +1

ηθs(X\{s}) = log

(cid:20) P(Xs = +1
1
P(Xs =
X

|
|
−
2θstXt,

X\{s})
X\{s})

(cid:21)

(9.26)

= 2θs +

t∈V \{s}

with θs = [θs,
}t∈V \{s}]. Consequently, the neighborhood-based approach
for the Ising model has the same form as Algorithm 9.2, with the ordinary
lasso in step 1(a) replaced by the lasso logistic regression problem

θst

{

bθs

arg min
θs∈Rp

∈






1
N

N
X

i=1

‘[xis, ηθs(xi,\{s})] + λ




|


,

θst

|

X

t∈V \{s}

(9.27)

3the factor of 2 comes from the particular response coding +1/-1 rather than the tradi-

tional 0/1.

GRAPH SELECTION VIA CONDITIONAL INFERENCE

257

(a)

(b)

Figure 9.7 Politician networks estimated from voting records of U.S. Senate (2004–
2006). A total of N = 546 votes were collected for each of p = 100 senators, with
Xs = +1 (respectively Xs = −1) meaning that senator s voted “yes” (respectively
“no”). A pairwise graphical model was ﬁt to the dataset using the neighborhood-
based logistic regression approach. (a) A subgraph of 55 senators from the ﬁtted
graph, with Democratic/Republican/Independent senators coded as blue/red/yellow
nodes, respectively. Note that the subgraph shows a strong bipartite tendency with
clustering within party lines. A few senators show cross-party connections. (b) A
smaller subgraph of the same social network.

where ‘ is the negative log-likelihood for the binomial distribution. This prob-
lem is again a convex program, and any algorithm for ‘1-penalized logistic
regression can be used, such as the coordinate-descent procedure discussed in
Chapter 5. As in the Gaussian case, rules have to be used to enforce symmetry
in the edge calls.

Hoeﬂing and Tibshirani (2009) present a pseudo-likelihood method for this
problem which imposes the symmetry. It can be thought of as intermediate
to the exact, but computationally intractable, global likelihood approach and
the neighborhood-based method described above. We cover their approach in
Section 9.4.3.

Figure 9.7 shows the results of ﬁtting an Ising model to represent the
politician social network for the U.S. Senate, reconstructed on the basis of
voting records. Details are given in the ﬁgure caption; overall we see strong
clustering within each party.

The neighborhood-based approach for graphical model selection can be
shown to be consistent under relatively mild conditions on the sample size
(see the bibliographic section for references and further discussion). In the
case of the Ising model, let bG denote the output of the neighborhood-based
approach using logistic regression. It is known that N = Ω(d2 log p) samples

JeffordsGrassleyHagelThomasSessionsBunningSununuMcCainWarnerKylKennedyReidKohlClintonRockefellerReedKerryLiebermanBidenSalazarCantwellJeffordsGrassleyHagelThomasSessionsBunningSununuMcCainWarnerKylKennedyReidKohlClintonRockefellerReedKerryLiebermanBidenSalazarCantwell258

GRAPHS AND MODEL SELECTION

Figure 9.8 Plots of the probability P[ bG = G] of correctly recovering the graph versus
the sample size. The neighborhood-based logistic regression procedure was applied to
recover a star-shaped graph (central hub with spokes) with p vertices and hub degree
d = d0.1pe. (a) Plotted versus the raw sample size N . As would be expected, larger
graphs require more samples for consistent estimation. (b) The same simulation
results plotted versus the rescaled sample size N

d log p .

d

∈ {

0.1p
e

64, 100, 225

are suﬃcient to ensure that bG = G with high probability. Figure 9.8 illustrates
the suﬃciency of this condition in practice, when the method is applied to a
star-shaped graph with p nodes, in which a central hub node is connected
to d =
spoke nodes. (The remaining nodes in the graph are discon-
nected from the hub-spoke subgraph.) We implemented the neighborhood-
nodes,
based logistic-regression method for graphs with p
using the AND rule to combine the neighborhoods so as to form the graph
estimate. In panel (a) of Figure 9.8, we plot the probability P[ bG = G] of
correctly recovering the unknown graph versus the sample size N , with each
curve corresponding to a diﬀerent graph size as labelled. Each of these plots
show that the method is model-selection consistent, in that as the sample size
N increases, the probability P[ bG = G] converges to one. Naturally, the tran-
sition from failure to success occurs later (at larger sample sizes) for larger
graphs, reﬂecting that the problem is more diﬃcult. Panel (b) shows the same
simulation results plotted versus the rescaled sample size N
d log p ; on this new
axis, all three curves are now well-aligned. This simulation conﬁrms that the
theoretical scaling N = Ω(d2 log p) is suﬃcient to ensure successful graph re-
covery, but not necessary for this class of graphs. However, there are other
classes of graphs for which this scaling is both suﬃcient and necessary (see
the bibliographic section for details).

}

●●●●●●●●●●●020040060080012000.00.20.40.60.81.0Sample Size       Probability of Correct Edge Detection●●●●●●●●●●●●●●●●●●●●●●p=64p=100p=225●●●●●●●●●●●2468100.00.20.40.60.81.0Rescaled Sample Size●●●●●●●●●●●●●●●●●●●●●●GRAPH SELECTION VIA CONDITIONAL INFERENCE

259

9.4.3 Pseudo-Likelihood for Mixed Models

So far we have covered graphical models for all continuous variables (the
Gaussian graphical model), and models for all binary variables (the Ising
model). These do not cover other frequently occurring situations:

discrete variables with more than two states;

•

mixed data types: i.e., some continuous and some discrete.

•
In this section, we extend the models covered so far to include these cases,
and demonstrate an approach for inference based on the pseudo-likelihood.

A simple generalization of the Gaussian and Ising models is the pairwise
Markov random ﬁeld model. For convenience in notation, we denote the p
continuous variables by X and the q discrete variables by Y . The density
PΩ(x, y) is proportional to




p
X

exp

p
X

p
X

γsxs

1
2

−

p
X

q
X

q
X

q
X

θstxsxt +

ρsj[yj]xs +

ψjr[yj, yr]

.






t=1

j=1

j=1

s=1

s=1

s=1

r=1


(9.28)
The ﬁrst two terms are as in the Gaussian graphical model (9.8). The term
ρsj represents an edge between continuous Xs and discrete Yj. If Yj has Lj
possible states or levels, then ρsj is a vector of Lj parameters, and ρsj[yj]
references the yth
Lr matrix representing
an edge between discrete Yj and Yr, and ψjr[yj, yr] references the element in
row yj and column yr. The terms ψjj will be diagonal, and represent the node
potentials (they correspond to the θs in the Ising model (9.4) on page 244).
The matrix Ω represents the entire collection of parameters. Needless to say,
the partition function is typically intractable, except in very low-dimensional
cases.

j value. Likewise ψjr will be an Lj

×

Here the pseudo-likelihood is attractive: it is the product of the p + q
conditional likelihoods, and each of these are simple (Exercise 9.8), depending
on the type of response:
Continuous: The conditional distribution for each of the p continuous vari-

ables is Gaussian, with mean linear in the conditioning variables.

P(Xs

X\{s}, Y ; Ω) =
|

(cid:19) 1

2

− θss
2

e

(cid:18) θss
2π

(cid:18)

Xs−

γs+P

j

ρsj [Yj ]−P

θstXt

t6=s

(cid:19)2

θss

(9.29)
The contributions of the discrete conditioning variables on the right-hand
side are diﬀerent additive constants, as for qualitative factors in linear re-
gression models; i.e., a constant for each level, determined by the ρsj.
Discrete: The conditional distribution for each of the q discrete variables is

multinomial, with log-odds linear in the conditioning variables.
eψjj [Yj ,Yj ]+P
‘=1 eψjj [‘,‘]+P
PLj

X, Y\{j}; Ω) =

ρsj [Yj ]Xs+P

ρsj [‘]Xs+P

P(Yj

ψ[Yj ,Yr]

ψ[‘,Yr]

r6=j

r6=j

|

s

s

(9.30)

260

GRAPHS AND MODEL SELECTION

Figure 9.9 Mixed graphical model, with three continuous and two discrete variables.
Y1 has two states, and Y3 has three. The diagram on the right shows the sets of pa-
rameters associated with each edge. The group lasso treats these as sets, and includes
or excludes them all together.

With this notation, the pseudo-log-likelihood is deﬁned to be

‘p(Ω; X, Y) =

N
X





p
X

i=1

s=1

log P(xis

xi\{s}, yi; Ω)
|

q
X

j=1



log P(yij

|

xi, yi\{j}; Ω)

 .

(9.31)
One can show that (9.31) is a concave function of Ω. Notice that each of the
parameters appears twice: once when one of the indices corresponds to the
response, and again when that index refers to a conditioning variable.

The edge parameters are now of three kinds: scalars θst, vectors ρsj, and
matrices ψjr. Figure 9.9 illustrates with a small example. Lee and Hastie
(2014) use the group-lasso to select these diﬀerent parameter types; they pro-
pose optimizing the penalized pseudo-log-likelihood

‘p(Ω; X, Y)



λ



p
X

s=1

s−1
X
t=1 |

−

+

θst

|

p
X

q
X

s=1

j=1

ρsj

2 +
k

k

q
X

j=1

j−1
X
r=1 k

ψjrk



 (9.32)

2

w.r.t. the parameters Ω. Notice that not all the parameters are penalized. In
particular the diagonal of Θ is left alone (as in the graphical lasso algorithm),
as are each of the node-potentials ψjj. This imposes interesting constraints
on some of the parameter estimates, which are explored in Exercise 9.9.

With only continuous variables, this is exactly the penalized pseudo-
likelihood for the Gaussian graphical model. For all binary variables, one can
show that this is equivalent to the lasso-penalized pseudo-likelihood for the
Ising model (see Hoeﬂing and Tibshirani (2009) and Exercise 9.10).

Block coordinate descent is attractive here, since each of the components
has well-studied solutions. However, the parameters are shared, and so care
must be taken to respect this symmetry. Lee and Hastie (2014) use a proximal-
Newton algorithm.

X1X2X3Y1Y2GRAPHICAL MODELS WITH HIDDEN VARIABLES

261

9.5 Graphical Models with Hidden Variables

Chandrasekaran et al. (2012) propose a method for undirected graphical mod-
els, in which some of the variables are unobserved (or “latent”). Suppose for
example that we are modelling stock prices in a certain sector, and they are
heavily dependent on the price of energy, the latter being unmeasured in our
data. Then the concentration matrix of the stock prices will not look sparse
in our data, but may instead be sparse if we could condition on energy price.
Let the covariance matrix of all variables—observed and unobserved—be
Σ. The sub-block of Σ corresponding to the observed variables is ΣO. Let
K = Σ−1 be the concentration matrix for the set of observed and hidden
variables, with sub-matrices KO, KO,H , KH,O and KH . These capture the
dependencies among the observed variables, between the observed and hidden
variables, and among the hidden variables, respectively. Making use of the
partitioned-inverse formulas, we get the following expression for the concen-
tration matrix of the observed variables:

˜KO = Σ−1

O = KO

KO,H K−1

H KH,O

−

(9.33)

Here KO is the concentration matrix of the conditional statistics of the ob-
served variables given the hidden variables. Now ˜KO may not be sparse, but
if the graphical model for all variables (observed and hidden) has few edges
then KO will be sparse.

Motivated by the form (9.33), letting KO = Θ the idea is to write

˜KO = Θ

L,

−

(9.34)

where L is assumed to be low rank, with the rank at most the number of
hidden variables. We then solve the problem

minimize
Θ,L

(cid:8)trace[S(Θ

L)]

−

−

log[det(Θ

L)] + λ

−

Θ
k

1 + trace(L)(cid:9) (9.35)
k

L

(cid:31)

−

(cid:23)

0, L

Θ
{

over the set
. Like the graphical lasso, this is again a
0
}
convex problem. This relates to the “sparse plus low rank” idea discussed
in Mazumder et al. (2010) and Chandrasekaran et al. (2011). Ma, Xue and
Zou (2013) propose ﬁrst-order alternating direction-of-multipliers (ADMM)
techniques for this problem, and compare them to second order methods.
Some details are given in Exercise 9.11.

Bibliographic Notes

Detailed discussion of graphical models can be found in Whittaker (1990),
Lauritzen (1996), Cox and Wermuth (1996), Edwards (2000), Pearl (2000),
Anderson (2003), and Koller and Friedman (2009).

The Hammersley–Cliﬀord theorem was ﬁrst announced in the unpublished
note of Hammersley and Cliﬀord (1971). Independent proofs were given by Be-
sag (1974) and Grimmett (1973), the latter proof using the M¨oebius inversion

262

GRAPHS AND MODEL SELECTION

formula. See Cliﬀord (1990) for some historical discussion and context of the
result.

Welsh (1993) discusses the computational intractability of evaluating the
partition function for general discrete graphical models. For graphs with spe-
cial structure, exact computation of the cumulant function is possible in poly-
nomial time. Examples include graphs with low tree width, for which the
junction tree algorithm can be applied (Lauritzen and Spiegelhalter 1988,
Lauritzen 1996), and certain classes of planar models (Kastelyn 1963, Fisher
1966). For other special cases, there are rapidly mixing Markov chains that
can be used to obtain good approximations to the cumulant function (Jerrum
and Sinclair 1993, Jerrum and Sinclair 1996, for example, and the references
therein). A complementary approach is provided by the class of variational
methods, which provide approximations to the cumulant generating func-
tion (e.g., see the monograph by Wainwright and Jordan (2008) and refer-
ences therein). Examples include the mean-ﬁeld algorithm, the sum-product
or belief-propagation algorithm, expectation propagation, as well as various
other convex relaxations. For certain graphs, particularly those that are “lo-
cally tree-like,” there are various kinds of asymptotic exactness results (e.g.,
see the book by M´ezard and Montanari (2008) and references therein).

Gaussian graphical models are used for modelling gene expression
data (Dobra, Hans, Jones, Nevins, Yao and West 2004), and other genomic
and proteomic assays. The Ising model (9.4) was ﬁrst proposed in the con-
text of statistical physics by Ising (1925). In more recent work, it and re-
lated models have been used as simple models for binary images (Geman and
Geman 1984, Greig, Porteous and Seheuly 1989, Winkler 1995), voting be-
havior in politicians (Banerjee et al. 2008), citation network analysis (Zhao,
Levina and Zhu 2011).

Some of the methods discussed in this chapter for undirected models can
be used to aid in the more diﬃcult model search for directed graphical models;
see for example Schmidt, Niculescu-Mizil and Murphy (2007). The paper by
Vandenberghe et al. (1998) provides an introduction to the problem of deter-
minant maximization with constraints; the Gaussian MLE (with or without
regularization) is a special case of this class of problems. Yuan and Lin (2007a)
proposed the use of ‘1-regularization in conjunction with the Gaussian (log-
determinant) likelihood for the covariance-selection problem, and used inte-
rior point methods (Vandenberghe et al. 1998) to solve it. d’Aspremont et al.
(2008) and Friedman et al. (2008) develop faster coordinate descent algo-
rithms for solving the graphical lasso (9.13), based on solving a sequence of
subproblems. Mazumder and Hastie (2012) oﬀer variants on these algorithms
with better convergence properties. Witten et al. (2011) and Mazumder and
Hastie (2012) show how to exploit block-diagonal structure in S in computing
graphical-lasso solutions. Rothman, Bickel, Levina and Zhu (2008) established
consistency of the estimator in Frobenius norm, whereas Ravikumar et al.
(2011) provide some results on model selection consistency as well as rates

EXERCISES

263

for operator norm. In particular, they proved the operator-norm bound (9.21)
illustrated in Figure 9.5.

The idea of pseudo-likelihood itself is quite old, dating back to the semi-
nal work of Besag (1975). Meinshausen and B¨uhlmann (2006) were the ﬁrst
to propose and develop the lasso-based neighborhood selection for Gaussian
graphical models, and to derive consistency results under high-dimensional
scaling; see also the papers by Zhao and Yu (2006) and Wainwright (2009) for
related results on static graphs. Zhou, Laﬀerty and Wasserman (2008) con-
sider the problem of tracking a time-varying sequence of Gaussian graphical
models.

Ravikumar, Wainwright and Laﬀerty (2010) proposed ‘1-regularized lo-
gistic regression for model selection in discrete binary graphical models, and
showed that it is model-selection consistent under the scaling N = Ω(d3 log p).
Subsequent analysis by Bento and Montanari (2009) improved this scal-
ing to N = Ω(d2 log p) for Ising models below the phase transition. Koh
et al. (2007) develop an interior-point algorithm suitable for large-scale ‘1-
regularized logistic regression. Instead of solving separate a logistic regression
problem at each node, Hoeﬂing and Tibshirani (2009) propose minimization
of the ‘1-regularized pseudo-likelihood, and derive eﬃcient algorithms for it;
see also Friedman et al. (2010a). Santhanam and Wainwright (2008) derive
information-theoretic lower bounds on Ising model selection, showing that no
(d2 log p). This shows
method can succeed more than half the time if N =
that the neighborhood approach is an optimal procedure up to constant fac-
tors.

O

Cheng, Levina and Zhu (2013) and Lee and Hastie (2014) discuss mixed
graphical models, involving both continuous and discrete variables. Kalisch
and B¨uhlmann (2007) show that a variant of the PC algorithm can be used
for high-dimensional model selection in directed graphs.

A diﬀerent kind of graphical model is the covariance graph or relevance
network, in which vertices are connected by bidirectional edges if the covari-
ance (rather than the partial covariance) between the corresponding variables
is nonzero. These are popular in genomics; see for example Butte, Tamayo,
Slonim, Golub and Kohane (2000). The negative log-likelihood from these
models is not convex, making the computations more challenging (Chaudhuri,
Drton and Richardson 2007). Recent progress on this problem has been made
by Bien and Tibshirani (2011) and Wang (2014). The latter paper derives
a blockwise coordinate descent algorithm analogous to the to the graphical
lasso procedure. Some theoretical study of the estimation of large covariance
matrices is given by Bickel and Levina (2008) and El Karoui (2008).

Exercises

Ex. 9.1 The most familiar parametrization of the multivariate Gaussian is in
Rp×p. Assuming
terms of its mean vector µ
that the distribution is nondegenerate (i.e., Σ is strictly positive deﬁnite),

Rp and covariance matrix Σ

∈

∈

264

GRAPHS AND MODEL SELECTION

show that the canonical parameters (γ, Θ)
tion (9.8) are related by

∈

Rp

p
+ from the factoriza-

× S

µ =

Θ−1γ,

−

and Σ = Θ−1.

(9.36)

Ex. 9.2 Let
and let
sample.

L

x1, . . . , xN

{

(Θ; X) = 1
N

be N i.i.d. samples from a Gaussian graphical model,
}
PN
i=1 log PΘ(xi) denote the rescaled log-likelihood of the

(a) Show that

where S = 1
N
constant independent of Θ.

L
PN
i=1 xixT
i

(Θ; X) = log det Θ

trace(SΘ) + C,

−

is the empirical covariance matrix, and C is a

(b) Show that the function f (Θ) =

on the cone of positive deﬁnite matrices. Prove that
Θ

∇

p
+.

∈ S

(c) The (unregularized) Gaussian MLE is given by

log det Θ is a strictly convex function
f (Θ) = Θ−1 for any

−

bΘ

arg max
Θ∈S p
+

∈

(cid:8) log det Θ

−

trace(SΘ)(cid:9),

when this maximum is attained. Assuming that the maximum is attained,
show that bΘ = S−1. Discuss what happens when N < p.

p
+ ×

∈ S

(d) Now consider the graphical lasso (9.13), based on augmenting the rescaled
log-likelihood with an ‘1-regularizer. Derive the Karush–Kuhn–Tucker equa-
tions that any primal-optimal pair ( bΘ, cW)

Rp×p must satisfy.

(e) Derive the dual program associated with the graphical lasso. Can you

generalize your result to regularization with any ‘q-norm, for q

[1,

]?

∞

∈

Ex. 9.3 Show that if S is positive deﬁnite, the graphical lasso algorithm with
λ = 0 computes bΘ = S−1.

Ex. 9.4 In this exercise, we explore properties of jointly Gaussian random
vectors that guarantee Fisher consistency of the neighborhood-based lasso
approach to covariance selection. Let (X1, X2, . . . , Xp) be a zero-mean jointly
Gaussian random vector with positive deﬁnite covariance matrix Σ. Letting
XT ).
T =

, consider the conditioned random variable Z = (X1
}
Rp−1 such that
(a) Show that there is a vector θ

2, 3, . . . , p
{

|

∈

Z = θT XT + W,

where W is a zero-mean Gaussian variable independent of XT . Hint: con-
sider the best linear predictor of X1 given XT .

(b) Show that θ = Σ−1
between X1 and XT .

T T ΣT 1, where ΣT 1

∈

Rp−1 is the vector of covariances

EXERCISES

265

(c) Show that θj = 0 if and only if j /

(1). Hint: The following elementary
∈ N
fact could be useful: let A be an invertible matrix, given in the block-
partitioned form

A =

(cid:21)

(cid:20)A11 A12
A21 A22

.

Then letting B = A−1, we have B12 = A−1
(Horn and Johnson 1985, for example).

11 A12

(cid:2)A21A−1

11 A12

(cid:3)−1

A22

−

Ex. 9.5 Consider the neighborhood-based likelihood approach for selection of
Ising models.
(a) Derive the conditional distribution P(xs

xV \{s}; θ), and show how the

neighborhood-prediction reduces to logistic regression.

|

(b) Verify that the method is Fisher-consistent, meaning that the true con-

ditional distribution is the population minimizer.

Ex. 9.6 Here we show how, in expression (9.14), we can solve for Θ and its
inverse W = Θ−1 one row and column at a time. For simplicity let’s focus on
the last row and column. Then the upper right block of Equation (9.14) can
be written as

w12

s12

λ

sign(θ12) = 0.

(9.37)

·
Here we have partitioned the matrices into two parts: part 1 being the ﬁrst
1 rows and columns, and part 2 the pth row and column. With W and its
p
inverse Θ partitioned in a similar fashion

−

−

−

(cid:18)W11 w12
12 w22

wT

(cid:19) (cid:18)Θ11 θ12
θT
θ22
12

(cid:19)

(cid:18) I
0T

=

(cid:19)

,

0
1

show that

w12 =

W11θ12/θ22

−
= W11β

(9.38)

(9.39)

(9.40)

where β =
θ12/θ22. This is obtained from the formula for the inverse of a
partitioned inverse of a matrix (Horn and Johnson 1985, for example). Sub-
stituting (9.40) into (9.37) gives

−

W11β

s12 + λ

·

−

sign(β) = 0.

(9.41)

Ex. 9.7 With the partitioning as in (9.38), write down the expressions for the
partitioned inverses of each matrix in terms of the other. Show that since
W11 depends on θ12, we are not really holding W11 ﬁxed as assumed in the
graphical lasso Algorithm 9.1.
(a) Show that as an alternative we can write (9.37) as

Θ−1

11 θ12w22 + s12 + λ sign(θ12) = 0.

(9.42)

266

GRAPHS AND MODEL SELECTION

(b) Show how to use the solution θ12 to update the current version of W and

bΘ in O(p2) operations.

(c) Likewise, show how to move to a new block of equations in O(p2) opera-

tions.

(d) You have derived a primal graphical lasso algorithm. Write it down in

algorithmic form, as in Algorithm 9.1

(Mazumder and Hastie 2012)

Ex. 9.8 Derive the conditional distributions (9.29) and (9.30) for the mixed
graphical model.

Ex. 9.9 Close inspection of the pairwise Markov random ﬁeld model (9.28)
will show that it is overparametrized with respect to the discrete potentials
ρsj and ψjr. This exercise shows that this aliasing is resolved by the quadratic
penalties in the penalized pseudo-likelihood, in the form of “sum-to-zero” con-
straints familiar in regression and ANOVA modelling.

Consider the penalized pseudo log-likelihood (9.32), with λ > 0.

(a) Since the γs are not penalized, show that the solution ˆρsj for any s and

j satisﬁes

Lj
X

‘=1

ˆρsj[‘] = 0.

(b) Since the (diagonal) matrices ψjj are not penalized, show that the solu-

tion ˆψjr for any j

= r satisﬁes

Lj
X

‘=1

LrX

m=1

ˆψjr[‘, m] = 0, m = 1, . . . , Lr;

ˆψjr[‘, m] = 0, ‘ = 1, . . . , Lj.

(9.43)

(9.44)

Ex. 9.10 Consider the pairwise Markov random ﬁeld model with only binary
discrete variables. This appears to be diﬀerent from the Ising model, since
we have four parameters per edge. Use Exercise 9.9 to show that with the
quadratic constraints in (9.32), it is exactly equivalent to a lasso-penalized
pseudo log-likelihood for the Ising model.

Ex. 9.11 Consider the objective function (9.35) for the graphical model that al-
lows for latent variables. Deﬁning a new variable R = Θ
L, derive the details
of the steps of an ADMM algorithm for solving (9.35) using the augmented
Lagrangian

−

Lµ(R, Θ0, L, Γ) = trace(SR)

+I(L

0)

(cid:23)

−

−

log det R + λ
k
·
Θ + L)] +

1 + β
Θ
k

trace[Γ(R

−

trace(L)
1
2µ k

R

−

Θ + L

2
F
k

6
EXERCISES

267

successively over R, Θ, L and Γ (Ma et al. 2013).

Chapter 10

Signal Approximation and Compressed
Sensing

10.1

Introduction

In this chapter, we discuss applications of ‘1-based relaxation to problems of
signal recovery and approximation. Our focus is the role played by sparsity
in signal representation and approximation, and the use of ‘1-methods for
exploiting this sparsity for solving problems like signal denoising, compression,
and approximation. We begin by illustrating that many classes of “natural”
signals are sparse when represented in suitable bases, such as those aﬀorded
by wavelets and other multiscale transforms. We illustrate how such sparsity
can be exploited for compression and denoising in orthogonal bases. Next
we discuss the problem of signal approximation in overcomplete bases, and
the role of ‘1-relaxation in ﬁnding near-optimal approximations. Finally, we
discuss the method of compressed sensing for recovering sparse signals. It
is a combination of two ideas: taking measurements of signals via random
projections, and solving a lasso-type problem for reconstruction.

10.2 Signals and Sparse Representations

Let us begin by providing some background on the role of sparse representa-
tions in signal processing. To be clear, our use of the term “signal” is general,
including (among other examples) data such as sea water levels, seismic record-
ings, medical time series, audio recordings, photographic images, video data,
and ﬁnancial data. In all cases, we represent the signal by a vector θ∗
Rp.
(For two-dimensional signals such as images, the reader should think about a
vectorized form of the image.)

∈

10.2.1 Orthogonal Bases

In signal processing, it is frequently useful to represent signals in diﬀerent
types of bases. Examples include Fourier representations, useful for extract-
ing periodic structure in time series, and multiscale representations such
as wavelets. Such representations are described by a collection of vectors

269

270

SIGNAL APPROXIMATION AND COMPRESSED SENSING

p
j=1 that form an orthonormal basis of Rp. If we deﬁne the p
}

ψj
{
trix Ψ : = (cid:2)ψ1 ψ2
that ΨT Ψ = Ip×p. Given an orthonormal basis, any signal θ∗
expanded in the form

p ma-
(cid:3), then the orthonormality condition guarantees
Rp can be

. . . ψp

×

∈

θ∗ : =

p
X

j=1

β∗
j ψj,

(10.1)

where the jth basis coeﬃcient β∗
θ∗, ψj
i ψij is obtained by
h
projecting the signal onto the jth basis vector ψj. Equivalently, we can write
Rp as
the transformation from signal θ∗
the matrix-vector product β∗ = ΨT θ∗.

Rp to basis coeﬃcient vector β∗

i=1 θ∗

j : =

∈

∈

i

= Pp

Figure 10.1 Illustration of sparsity in time series data. Left, top panel: Signal
θ∗ ∈ R
p of arterial pressure versus time over p = 128 points. Left, bottom panel:
Reconstruction bθ 128 based on retaining the largest (in absolute amplitude) k = 64
coeﬃcients from the Haar basis. Right: Haar basis coeﬃcients β∗ = ΨT θ∗ of the
signal.

To give a simple example, consider the following matrix








Ψ : =

1
2
1
2

1
2
1
2
1
2 −
1
2 −

1
2
1
2

1√
2
−1√
2
0
0








.

0
0
1√
2
−1√
2

(10.2)

It is an orthonormal matrix, satisfying ΨT Ψ = I4×4, and corresponds to a
two-level Haar transform for signal length p = 4. For any given signal θ∗
R4,
the Haar basis coeﬃcients β∗ = ΨT θ∗ have a natural interpretation. The ﬁrst

∈

2060100TimeArterial PressureOriginal13164961282060100TimeArterial PressureReconstructed1316496128−60−40−200204060IndexWavelet CoefficientHaar Representation1316496128SIGNALS AND SPARSE REPRESENTATIONS

271

P4

= 1
2

1 =

ψ1, θ∗
h

coeﬃcient β∗
j is a rescaled version of the averaged
signal. The second column ψ2 is a diﬀerencing operator on the full signal,
whereas the third and fourth columns are local diﬀerencing operators on each
half of the signal. This Haar transform is the simplest example of a wavelet
transform.

j=1 θ∗

i

An important fact is that many signal classes, while not sparse in the
canonical basis, become sparse when represented in a diﬀerent orthogonal
basis. Figure 10.1 provides an illustration of this phenomenon for some medical
time series data. The top-left panel shows p = 128 samples of arterial pressure
from a patient, showing that the signal θ∗ itself is not at all sparse. The right
panel shows the Haar coeﬃcient representation β∗ = ΨT θ∗ of the signal; note
how in contrast it is relatively sparse. Finally, the bottom-left panel shows a
reconstruction bθ of the original signal, based on discarding half of the Haar
coeﬃcients. Although not a perfect reconstruction, it captures the dominant
features of the time series.

×

Figure 10.2 provides a second illustration of this sparsity phenomenon, this
time for the class of photographic images and two-dimensional wavelet trans-
forms. Panel (a) shows a 512
512 portion of the “Boats” image; in our frame-
work, we view this two-dimensional image as a vector in p = 5122 = 262, 144
dimensions. Shown in panel (b) is the form of a particular two-dimensional
wavelet; as can be discerned from the shape, it is designed to extract diago-
nally oriented structure at a particular scale. Taking inner products with this
wavelet over all spatial positions of the image (a procedure known as con-
volution) yields a collection of wavelet coeﬃcients at all spatial positions of
the image. These coeﬃcients are then sub-sampled, depending on the scale
of the wavelet. Then we reconstruct the image from these coeﬃcients. Doing
so at multiple scales (three in this illustration) and orientations (four in this
illustration) yields the multiscale pyramid shown in panel (c). Once again,
although the original image is not a sparse signal, its representation in this
multiscale basis is very sparse, with many coeﬃcients either zero or very close
to zero. As a demonstration of this sparsity, panel (d) shows a histogram of
one of the wavelet coeﬃcients, obtained by pooling its values over all spatial
positions of the image. This histogram is plotted on the log scale, and the
sharp peak around zero reveals the sparsity of the coeﬃcient distribution.

10.2.2 Approximation in Orthogonal Bases

Rp, typically in
The goal of signal compression is to represent the signal θ∗
an approximate manner, using some number k
p of coeﬃcients much smaller
than the ambient dimension. In the setting of orthogonal bases, one method
for doing so is based on using only a sparse subset of the orthogonal vectors
that characterizes the
ψj
{

p
j=1. In particular, for an integer k
}

1, 2, . . . , p

∈ {

(cid:28)

∈

}

272

SIGNAL APPROXIMATION AND COMPRESSED SENSING

(a)

(b)

(c)

(d)

Figure 10.2 Sparsity in wavelet-based representations of natural
images. (a)
“Boats” image. (b) Basis vector of a multiscale pyramid transform, drawn here as
a 2-dimensional image. (c) Three levels of a multiscale representation of “Boats”
image with four diﬀerent orientations at each scale. (d) Log histogram of the am-
plitudes of a wavelet coeﬃcient from a ﬁxed scale and orientation, pooled over all
pixels within the image. Note that the majority of coeﬃcients are close to zero, with
relatively few large in absolute value.

approximation accuracy, let us consider reconstructions of the form

Ψβ =

p
X

j=1

βjψj,

such that

0 : = Pp

j=1 I[βj

= 0]

β

k

k

≤

k.

(10.3)

Here we have introduced the ‘0-“norm,” which simply counts the number of
Rp. We then consider the problem of
nonzero elements in the vector β

∈

−5000500−10−8−6−4−2Log Probability6
SIGNALS AND SPARSE REPRESENTATIONS

273

(a)

(b)

Figure 10.3 Illustration of image compression based on wavelet thresholding. (a)
Zoomed portion of the original “Boats” image from Figure 10.2(a). (b) Reconstruc-
tion based on retaining 5% of the wavelet coeﬃcients largest in absolute magnitude.
Note that the distortion is quite small, and concentrated mainly on the ﬁne-scale
features of the image.

optimal k-sparse approximation—namely, to compute

bβk

arg min

β∈Rp k

∈

θ∗

−

ΨT β

2
2

k

such that

β

k

0
k

≤

k.

(10.4)

Given the optimal solution bβk of this problem, the reconstruction

θk : =

p
X

j=1

bβk
j ψj

(10.5)

deﬁnes the best least-squares approximation to θ∗ based on k terms. Fig-
ure 10.3 illustrates the idea.

Note that the problem (10.4) is nonconvex and combinatorial, due to the
‘0-norm constraint. Despite this fact, it is actually very easy to solve in this
particular case, essentially due to the structure aﬀorded by orthonormal trans-
Rp of basis coef-
forms. In particular, suppose that we order the vector β∗
ﬁcients in terms of their absolute values, thereby deﬁning the order statistics

∈

Then for any given integer k
∈ {
k-term approximation is given by

β∗
(1)| ≥ |

|

. . .

β∗
(2)| ≥
1, 2, . . . , p

β∗
.
(p)|

≥ |
, it can be shown that the optimal
}

(10.6)

bθk : =

k
X

j=1

β∗
(j)ψσ(j),

(10.7)

274

SIGNAL APPROXIMATION AND COMPRESSED SENSING

where σ(j) denotes the basis vector associated with the jth order statistic. In
words, we retain only the basis vectors associated with the largest k coeﬃcients
in absolute value.

In summary, then, we have the following simple algorithm for computing

optimal k-term approximations in an orthogonal basis:
1. Compute the basis coeﬃcients β∗

θ∗, ψj

j =

vector notation, compute the vector β∗ = ΨT θ∗.

h

i

for j = 1, 2, . . . , p. In matrix-

2. Sort the coeﬃcients in terms of absolute values as in (10.6), and extract

the top k coeﬃcients.

3. Compute the best k-term approximation bθk as in (10.7).
For any orthogonal basis, the computational complexity of this procedure is at
most
(p log p) complexity of sorting in step 2 dominated by
the complexity of computing the basis coeﬃcients in step 1. An attractive fea-
ture of many orthogonal representations, including Fourier bases and discrete
wavelets, is that the basis coeﬃcients can be computed in time

(p2), with the

(p log p).

O

O

As discussed previously, Figure 10.1 provides one illustration of signal ap-
proximation within the Haar wavelet basis. In particular, the bottom-left panel
shows the approximated signal bθ64, based on retaining only half of the Haar
wavelet coeﬃcients (k/p = 64/128 = 0.5).

O

10.2.3 Reconstruction in Overcomplete Bases

Orthonormal bases, though useful in many ways, have a number of short-
comings. In particular, there is a limited class of signals that have sparse
representations in any given orthonormal basis. For instance, Fourier bases
are particularly well-suited to reconstructing signals with a globally periodic
structure; in contrast, the Haar basis with its localized basis vectors is rather
poor at capturing this kind of structure. On the other hand, the Haar basis ex-
cels at capturing step discontinuities, whereas such jumps have very nonsparse
representations in the Fourier basis.

∈

Based on this intuition, it is relatively straightforward to construct signals
that are in some sense “simple,” but fail to have sparse representations in a
classical orthonormal basis. As an illustration, panel (a) of Figure 10.4 shows
a signal θ∗
R128 that contains a mixture of both some globally periodic
components, and some rapid (nearly discontinuous) transitions. As shown in
panel (b), its Haar coeﬃcients β∗ = ΨT θ∗ are relatively dense, because many
basis vectors are required to reconstruct the globally periodic portion of the
signal. Similarly, as shown in panel (c), its representation α∗ = ΦT θ∗ in the
discrete cosine basis (a type of Fourier representation) is also relatively dense.
Due to this lack of sparsity, neither basis alone will provide a good sparse
approximation to the original signal.

However, suppose that we allow the reconstruction to use subsets of vectors
from both bases simultaneously; in this case, it might be possible to obtain a
signiﬁcantly more accurate, or even exact, sparse approximation. To set up

SIGNALS AND SPARSE REPRESENTATIONS

275

p with p = 128. (b) Representation ΨT θ∗ in
Figure 10.4 (a) Original signal θ∗ ∈ R
the Haar basis. (c) Representation ΦT θ∗ in the discrete cosine basis. (d) Coeﬃcients
p of the optimally sparse joint representation obtained by solving basis
(bα, bβ) ∈ R
pursuit linear program (10.11).

p ×R

the problem more precisely, given a pair of orthonormal bases
φj
{

p
j=1, let us consider reconstructions of the form

}

p
j=1 and

ψj

{

}

p
X

αjφj

+

p
X

βjψj

such that

j=1
|

{z
Φα

}

j=1
|

{z
Ψβ

}

and the associated optimization problem

α

0 +
k

β
k

0

k

k

≤

k,

(10.8)

minimize
(α,β)∈Rp×Rp k

θ∗

−

Φα

Ψβ

2
2
k

−

such that

0 +

α
k

k

β
k

0
k

≤

k.

(10.9)

Despite its superﬁcial similarity to our earlier k-term approximation prob-
lem (10.5), the optimization problem (10.9) is actually very diﬃcult to solve.
Unlike the earlier case, we are now working in an overcomplete basis described
by the union of the two bases Φ and Ψ.

IndexSignal1163248648096112128−0.050.050.150.25(a) Mixed Signal0.00.10.20.30.40.5IndexWavelet Coefficient1163248648096112128(b) Representation in Haar Basis−0.20.00.20.40.6IndexWavelet Coefficient1163248648096112128(c) Representation in Cosine Basis0.00.10.20.30.40.5IndexCoefficient1326496128160192224256HaarCosine(d) Optimal Joint Representation276

SIGNAL APPROXIMATION AND COMPRESSED SENSING

Nonetheless, we can resort to our usual relaxation of the ‘0-“norm,” and

consider the following convex program

minimize
(α,β)∈Rp×Rp k

θ∗

−

Φα

Ψβ

2
2

k

−

such that

α

1 +
k

β
k

1
k

k

≤

R,

(10.10)

where R > 0 is a user-deﬁned radius. This program is a constrained version
of the lasso program, also referred to as the relaxed basis-pursuit program.
When seeking a perfect reconstruction, we can also consider the even simpler
problem

minimize
(α,β)∈Rp×Rp k

α

1 +
k

k

β

1

k

such that θ∗ = (cid:2)Φ Ψ(cid:3)

(cid:21)
.

(cid:20)α
β

(10.11)

This problem is a linear program (LP), often referred to as the basis-pursuit
linear program.

∈

Rp

Returning to the example discussed in Figure 10.4, panel (d) shows the
Rp obtained by solving the basis pursuit
optimal coeﬃcients (bα, bβ)
LP (10.11). We thus ﬁnd that the original signal in panel (a) can be generated
by an extremely sparse combination, with only six nonzero coeﬃcients, in
the overcomplete basis formed by combining the Haar and discrete cosine
representations. In fact, this is the sparsest possible representation of the
signal, so that in this case, solving the basis pursuit LP (10.11) is equivalent
to solving the ‘0-constrained problem (10.9).

×

Naturally,

the reader might wonder about

this
phenomenon—namely, when does the solution to the basis pursuit LP co-
incide with the computationally diﬃcult ‘0-problem (10.9)? As it turns out,
the answer to this question depends on the degree of incoherence between the
two bases Φ and Ψ, as we explore at more length in Section 10.4.

the generality of

10.3 Random Projection and Approximation

In the previous sections, we discussed approximating a signal by computing
its projection onto each of a ﬁxed set of basis functions. We now turn to
the use of random projections in signal approximation. This allows one to
use a smaller number of (random) basis functions than is required under a
ﬁxed basis. We will combine this with an ‘1-penalty on the coeﬃcient of each
projection, leading to the idea of compressed sensing.

A random projection of a signal θ∗ is a measurement of the form

yi =

zi, θ∗
h

i

=

p
X

j=1

zijθ∗
j ,

(10.12)

Rp is a random vector. The idea of using random projections for
where zi
dimensionality reduction and approximation is an old one, dating back (at
least) to classical work on metric embedding and spherical sections of convex

∈

RANDOM PROJECTION AND APPROXIMATION

277

bodies (see the bibliographic section for more details). We begin by describ-
ing a classical use of random projection, namely for embedding data while
preserving distances between points, and then move on to discuss compressed
sensing, which combines random projections with ‘1-relaxation.

10.3.1 Johnson–Lindenstrauss Approximation

As one application of random projection, let us consider how they can be used
to approximate a ﬁnite collection of vectors, say representing some dataset.
The technique that we describe is often known as Johnson–Lindenstrauss em-
bedding, based on the authors who pioneered its use in studying the more
general problem of metric embedding (see the bibliographic section for more
lying in Rp.
details). Suppose that we are given M data points
If the data dimension p is large, then it might be too expensive to store the
dataset. In this setting, one approach is to design a dimension-reducing map-
ping F : Rp
p that preserves some “essential” features of the
dataset, and then store only the projected dataset
. For
example, since many algorithms operate on datasets by computing pairwise
distances, we might be interested in a mapping F with the guarantee that for
some tolerance δ

F (u1), . . . , F (uM )
}
{

u1, . . . , uM
{

RN with N

(0, 1), we have

(cid:28)

→

}

−

−

δ)

(1

ui0

ui
k

F (ui)

2
= i0.
2 ≤
k
(10.13)
Of course, this is always possible if the projected dimension N is large enough,
but the goal is to do it with relatively small N .

2
2 for all pairs i
k

ui
(1+δ)
k

F (ui0)

ui0

−

−

k

As shown in the seminal work of Johnson and Lindenstrauss, random
projections provide one method for designing such approximate distance-
preserving embeddings. The construction is straightforward:
(a) Form a random matrix Z

N (0, 1), i.i.d., and

RN ×p with each Zij

deﬁne the linear mapping F : Rp

∈

∼

∈
2
2 ≤ k

→

RN via
1
√N

F (u) : =

Zu.

(10.14)

F (u1), F (u2), . . . , F (uM )
{

(b) Compute the projected dataset
.
}
An interesting question is the following: for a given tolerance δ
(0, 1) and
number of data points M , how large should we choose the projected dimension
N to ensure that approximate distance-preserving property (10.13) holds with
high probability? In Exercises 10.1 and 10.2, we show that this property holds
with high probability as long as N > c
δ2 log M for some universal constant c.
Thus, the dependence on the number M of data points scales logarithmically,
and hence is very mild.

∈

representation of all Boolean vectors u

As a particular example, suppose that our goal is to obtain a compressed
p that are k-sparse.1 By a
}

∈ {−

1, 1

1A vector u ∈ R

p is k-sparse if only k ≤ p elements are nonzero.

6
SIGNAL APPROXIMATION AND COMPRESSED SENSING
278
(cid:1) such vectors. Noting that
simple counting argument, there are M = 2k (cid:0)p
(cid:1)
δ2 k log (cid:0) e2p
log M
suﬃces to preserve pairwise distances up to δ-accuracy between all k-sparse
Boolean vectors. This example provides a natural segue to the method of
compressed sensing, which combines random projections with ‘1-relaxation.

(cid:1), we see that a projection dimension N > c

k log (cid:0) e2p

≤

k

k

k

10.3.2 Compressed Sensing

Compressed sensing is a combination of random projection and ‘1-regular-
ization that was introduced in independent work by Candes and Tao (2005)
and Donoho (2006); since this pioneering work, an extensive literature on the
topic has developed, with numerous applications including medical imaging
and single-pixel cameras, among others. In this section, we provide a brief
introduction to the basic ideas.

The motivation for compressed sensing is the inherent wastefulness of the
standard method for compressing signals in an orthogonal basis. As described
in Section 10.2.2, this approach involves ﬁrst computing the full vector β∗
Rp
of basis coeﬃcients (step 1 on page 274), and then discarding a large fraction of
them in order to obtain the k-sparse approximation bθk of the underlying signal
θ∗ (step 2). Given that we end up discarding most of the basis coeﬃcients,
is it really necessary to compute all of them? Of course, if one knew a priori
which subset of k coeﬃcients were to be retained for the sparse approximation
bθk, then one could simply compute this subset of basis coeﬃcients. We refer
to this approach as the oracle technique. Of course, it is unimplementable in
practice, since we don’t know a priori which coeﬃcients are the most relevant
for a given signal.

∈

The power of compressed sensing is that it enables one to mimic the behav-
ior of the oracle with very little computational overhead. It combines random
projection with ‘1-minimization in the following way. Instead of pre-computing
all of the basis coeﬃcients β∗ = ΨT θ∗, suppose that we compute some number
, for i = 1, 2, . . . , N . We
N of random projections, say of the form yi =
i
Rp, and we
are free to choose the form of the random projection vectors zi
discuss a number of reasonable choices shortly.

zi, θ∗

∈

h

Thus, the setup of our problem is as follows: we are given an N -vector y
of random projections of the signal θ∗. Also known to us is the N
p random
matrix Z with ith row zi, used to compute the random projections; we refer
to Z as the design matrix or measurement matrix. The observation vector y
and design matrix Z are linked to the unknown signal θ∗
RN by the matrix-
vector equation y = Zθ∗, and our goal is to recover (exactly or approximately)
the signal θ∗

Rp. See Figure 10.5(a) for an illustration of this setup.

At ﬁrst sight, the problem seems very simple, since determining θ∗ amounts
to solving a linear system. However, for this method to be cheaper than the
standard approach (and therefore of practical interest), it is essential that the
number of projections (or sample size) N be much smaller than the ambient
dimension p. For this reason, the linear system y = Zθ∗ is highly under-

×

∈

∈

RANDOM PROJECTION AND APPROXIMATION

279

(a)

(b)

Figure 10.5 (a) An under-determined linear system y = Zθ∗: Each row zi of the
N × p measurement matrix Z deﬁnes the random projection yi = hzi, θ∗i. The signal
p need not be sparse in the canonical basis. (b) Equivalent representation of
θ∗ ∈ R
the linear system: Basis coeﬃcients β∗ = ΨT θ∗ are assumed to be k-sparse. This
transformation deﬁnes an equivalent linear system y = eZβ∗ with sparsity that can
be exploited.

determined: there are many signals θ that are consistent with the observed
random projections.

However, if we also have the additional side-information that ΨT θ∗ is
sparse, then it could be possible to recover θ∗ exactly, even though the linear
system on its own is under-determined. In an ideal world, we would like to
exploit this sparsity by solving the ‘0-based problem

minimize
θ∈Rp

ΨT θ
k

0

k

such that y = Zθ.

(10.15)

The ‘0-problem is combinatorial, and known to be computationally intractable
(NP-hard) in general; thus, we are led to consider the ‘1-relaxation

minimize
θ∈Rp

ΨT θ
k

1

k

such that y = Zθ.

(10.16)

Equivalently, we can write this problem in terms of the transform coeﬃcient
vector β

Rp, namely as

∈

minimize
β∈Rp

β
k

1
k

such that y = eZβ,

(10.17)

=yN×pZθ∗=yN×pZΨβ∗p−kk280

SIGNAL APPROXIMATION AND COMPRESSED SENSING

where we have deﬁned the transformed matrix eZ : = ZΨ
ure 10.5(b) for an illustration of this transformed linear system.

∈

RN ×p. See Fig-

In summary, then, the method of compressed sensing operates as follows:
zi, θ∗
h

1. For a given sample size N , compute the random projections yi =

i

for i = 1, 2, . . . , N .

2. Estimate the signal θ∗ by solving the linear program (10.16) to obtain
bθ. (Equivalently, solve the linear program (10.17) to obtain bβ, and set
bθ = Ψ bβ.)

To be clear, we have actually described a family of procedures, depending
N
i=1, or equivalently the
on our choice of the random projection vectors
}
transformed design matrix Z. A variety of diﬀerent design matrices Z have
been studied for the purposes of compressed sensing. Perhaps the simplest
choice is to choose its entries zij
N (0, 1) in an i.i.d. manner, leading to a
standard Gaussian random matrix. Other choices of matrices for compressed
sensing include random Bernoulli matrices formed with i.i.d. entries drawn
as zij
with equal probability, as well as random submatrices of
1, +1
}
∈ {−
Fourier matrices.

zi

∼

{

When can compressed sensing succeed using a number of projections N less
than the signal dimension p? As we discuss in Section 10.4.2, it is suﬃcient that
the columns of the transformed design matrix eZ be “incoherent”, and there are
diﬀerent measures of such incoherence. The simplest measure of incoherence
is pairwise, based on the inner products between the columns of eZ. A more
sophisticated notion of incoherence is the restricted isometry property (RIP),
based on looking on the conditioning of submatrices of eZ consisting of up to
k columns. An important fact is that the random design matrices discussed
above satisfy RIP with high probability using a relatively small number of
projections N . For instance, for the standard Gaussian or Bernoulli cases,
it can be shown that RIP holds with high probability with as few as N =
Ω(cid:0)k log p
(cid:1) samples, where k < p is the sparsity of the basis coeﬃcient vector
β∗. Note that any method—even the unimplementable oracle that already
knew the support of β∗—would require at least N = k random projections for
exact recovery. Thus, compressed sensing incurs a multiplicative overhead of
only

(cid:0) log(p/k)(cid:1) relative to oracle performance.

k

O

10.4 Equivalence between ‘0 and ‘1 Recovery

Thus far, we have discussed a number of applications of ‘1-norm regular-
ization in signal processing, including sparse approximation in overcomplete
bases (Section 10.2.3), and compressed sensing (Section 10.3.2). In both cases,
the ‘1-norm is introduced as a computationally tractable surrogate to opti-
mization problems involving the intractable ‘0-“norm.” Up to this point, we
have not addressed in any depth an important question: when is solving the
‘1-relaxation equivalent to solving the original ‘0-problem?

More precisely, given an observation vector y

∈

Rp and a design matrix

EQUIVALENCE BETWEEN ‘0 AND ‘1 RECOVERY

281

X

∈

and

RN ×p, let us consider the two problems

minimize
β∈Rp

β
k

0
k

minimize
β∈Rp

β
k

1
k

such that Xβ = y,

(10.18)

such that Xβ = y.

(10.19)

This setup includes as a special case the problem of sparse approximation in
an overcomplete basis, as discussed in Section 10.2.3; in this case, the obser-
vation y is equal to the signal θ∗ to be approximated, and the design matrix
X = (cid:2)Φ Ψ(cid:3). It also includes the case of compressed sensing, where X is the
transformed version of the random projection matrix (namely, eZ in our earlier
notation).

10.4.1 Restricted Nullspace Property

∈

Suppose that the ‘0-based problem (10.18) has a unique optimal solution, say
β∗
Rp. Our interest is in understanding when β∗ is also the unique optimal
solution of the ‘1-based problem (10.19), in which case we say that the basis
pursuit LP is equivalent to ‘0-recovery. Remarkably, there exists a very simple
necessary and suﬃcient condition on the design matrix X for this equivalence
1, 2, . . . , p
to hold. For a given subset S

⊆ {

C(S) : = (cid:8)β

p

R

, it is stated in terms of the set
}
βSc

(cid:9).

βS

(10.20)

1
k

1
k

∈

≤ k

| k
The set C(S) is a convex cone, containing all vectors that are supported on
S, and other vectors as well. Roughly, it corresponds to the cone of vectors
RN ×p, its
that have most of their mass allocated to S. Given a matrix X
nullspace is given by null(X) = (cid:8)β
∈
Deﬁnition 10.1. Restricted nullspace property. For a given subset S
1, 2, . . . , p
{
∈
nullspace property over S, denoted by RN(S), if

⊆
RN ×p satisﬁes the restricted

, we say that the design matrix X

Xβ = 0(cid:9).

Rp

∈

}

|

null(X)

C(S) =

0
{

.
}

∩

(10.21)

In words, the RN(S) property holds when the only element of the cone C(S)
that lies within the nullspace of X is the all-zeroes vector. The following
theorem highlights the signiﬁcance of this property:
Theorem 10.1. ‘0 and ‘1 equivalence. Suppose that β∗
Rp is the unique
solution to the ‘0 problem (10.18), and has support S. Then the basis pursuit
relaxation (10.19) has a unique solution equal to β∗ if and only if X satisﬁes
the RN(S) property.

∈

The proof of Theorem 10.1 is relatively short, and is provided in Sec-

tion 10.4.3.

Since the subset S is not known in advance—indeed, it is usually what we

282

SIGNAL APPROXIMATION AND COMPRESSED SENSING

are trying to determine—it is natural to seek matrices that satisfy a uniform
version of the restricted nullspace property. For instance, we say that the
uniform RN property of order k holds if RN(S) holds for all subsets of size
at most k. In this case, we are guaranteed that the ‘1-relaxation succeeds for
any vector supported on any subset of size at most k.

10.4.2 Suﬃcient Conditions for Restricted Nullspace

Of course, in order for Theorem 10.1 to be useful in practice, we need to verify
the restricted nullspace property. A line of work has developed various con-
ditions for certifying the uniform RN property. The simplest and historically
earliest condition is based on the pairwise incoherence

ν(X) : = max

j,j0=1,2,...,p

xj, xj0
xj0

2
k

k

|h
xj
k

i|
2
k

.

(10.22)

For centered xj this is the maximal absolute pairwise correlation. When X
is rescaled to have unit-norm columns, an equivalent representation is given
by ν(X) = maxj6=j0
, which illustrates that the pairwise incoherence
measures how close the Gram matrix XT X is to the p-dimensional identity
matrix in an element-wise sense.

xj, xj0

|h

i|

The following result shows that having a low pairwise incoherence is suf-

ﬁcient to guarantee exactness of the basis pursuit LP:

Proposition 10.1. Pairwise incoherence implies RN. Suppose that for some in-
, the pairwise incoherence satisﬁes the bound ν(X) < 1
3k .
teger k
}
Then X satisﬁes the uniform RN property of order k, and hence, the basis
pursuit LP is exact for all vectors with support at most k.

1, 2, . . . , p

∈ {

See Section 10.4.3 for the proof of this claim.

O

An attractive feature of the pairwise incoherence is that it is easily com-
(N p2) time. A disadvantage is that it provides very
puted; in particular, in
conservative bounds that do not always capture the actual performance of
‘1-relaxation in practice. For instance, consider the matrix X = (cid:2)Φ Ψ(cid:3), as
arises in the overcomplete basis problem (10.11). We can numerically com-
pute the incoherence, say for the discrete cosine and Haar bases in dimension
p = 128, as illustrated in Figure 10.4. We ﬁnd that Proposition 10.1 guaran-
tees exact recovery of all signals with sparsity k = 1, whereas in practice, the
‘1-relaxation works for much larger values of k.

For random design matrices, such as those that arise in compressed sens-
ing, one can use probabilistic methods to bound the incoherence. For instance,
RN ×p with i.i.d. N (0, 1/N ) entries. Here we
consider a random matrix X
have rescaled the variance so that the columns of X have expected norm equal
to one. For such a matrix, one can show that ν(X) (cid:45)
N with high prob-
ability as (N, p) tend to inﬁnity (see Exercise 10.5). Combined with Proposi-
tion 10.1, we conclude that the ‘1-relaxation (10.16) will exactly recover all

q log p

∈

k

XT

S XS

Ik×k

op

−

≤
of cardinality k.

k

EQUIVALENCE BETWEEN ‘0 AND ‘1 RECOVERY

283

signals with sparsity at most k as long as the number of projections scales as
N (cid:37) k2 log p.

In fact, for random designs and compressed sensing, this scaling can be
sharpened using the restricted isometry property (RIP). Recall that the in-
coherence condition (10.22) is a measure of the orthonormality of pairs of
columns of the design matrix X. The notion of restricted isometry is to con-
strain much larger submatrices of X to have nearly orthogonal columns.

Deﬁnition 10.2. Restricted isometry property. For a tolerance δ
integer k

1, 2, . . . , p

, we say that RIP(k, δ) holds if
}

∈ {

(0, 1) and

∈

δ

(10.23)

for all subsets S

1, 2, . . . , p

⊂ {

}

We recall here that

k · k
value of a matrix. Due to the symmetry of XT
representation

op denotes the operator norm, or maximal singular
S XS, we have the equivalent

XT
k

S XS

−

Ik×k

op = sup
k

kuk2=1

(cid:12)
(cid:12)uT (cid:0)XT
(cid:12)

S XS

Ik×k

−

(cid:12)
(cid:1)u
(cid:12)
(cid:12) = sup
kuk2=1

(cid:12)
(cid:12)
(cid:12)k

XS u
k

(cid:12)
(cid:12)
(cid:12).
1

2
2 −

Thus, we see that RIP(k, δ) holds if and only if for all subsets S of cardinality
k, we have

2
XS u
2
k
k
2
u
2 ∈
k

k

[1

−

δ, 1 + δ]

for all u

Rk

0
\{

,
}

∈

hence the terminology of restricted isometry.

The following result shows that RIP is a suﬃcient condition for the re-

stricted nullspace to hold:
Proposition 10.2. RIP implies restricted nullspace. If RIP(2k, δ) holds with
δ < 1/3, then the uniform RN property of order k holds, and hence the ‘1-
relaxation is exact for all vectors supported on at most k elements.

We work through the proof of a slightly weaker version of this claim in Ex-
ercise 10.8. Observe that the RIP(2k, δ) condition imposes constraints on a
huge number of submatrices, namely (cid:0) p
(cid:1) in total. On the other hand, as op-
2k
posed to the pairwise incoherence condition, the actual RIP constant δ has no
dependence on k.

From known results in random matrix theory, various choices of ran-
dom projection matrices X satisfy RIP with high probability as long as
N (cid:37) k log e p
k . Among other matrix ensembles, this statement applies to a stan-
dard Gaussian random matrix X with i.i.d. N (0, 1
N ) entries; see Exercise 10.6
for details. Thus, we see that the RIP-based approach provides a certiﬁcate for
exact recovery based on far fewer samples than pairwise incoherence, which
as previously discussed, provides guarantees when N (cid:37) k2 log p. On the other
hand, a major drawback of RIP is that—in sharp contrast to the pairwise
incoherence—it is very diﬃcult to verify in practice due to the number (cid:0) p
(cid:1)
of submatrices.

2k

bβ
1
k
k

≤ k
β∗
1
Sk

1 =
k

k

β∗
Sk
1 =
bβ
k

284

SIGNAL APPROXIMATION AND COMPRESSED SENSING

10.4.3 Proofs

We conclude the chapter by providing proofs of the claims given in the pre-
ceding section.

10.4.3.1 Proof of Theorem 10.1

−

Rp be any op-
First, suppose that X satisﬁes the RN(S) property. Let bβ
timal solution to the basis pursuit LP (10.19), and deﬁne the error vector
β∗. Our goal is to show that ∆ = 0, and in order to do so, it suﬃces
∆ : = bβ
C(S). On the one hand, since β∗ and bβ are optimal
to show that ∆
(and hence feasible) solutions to the ‘0 and ‘1 problems, respectively, we are
guaranteed that Xβ∗ = y = X bβ, showing that X∆ = 0. On the other hand,
since β∗ is also feasible for the ‘1-based problem (10.19), the optimality of bβ
implies that

1. Writing bβ = β∗ + ∆, we have

null(X)

β∗

∈

∩

∈

k

≥ k

β∗
S + ∆S
k
β∗
1
Sk
where the ﬁnal bound follows by triangle inequality. Rearranging terms, we
C(S); since X satisﬁes the RN(S) condition by assumption, we
ﬁnd that ∆
conclude that ∆ = 0 as required.

1
k
∆Sc
k

1 +
k
∆S

k
1 +

∆Sc

≥ k

− k

1,

∈

k

k

We lead the reader through a proof of the converse in Exercise 10.4.

10.4.3.2 Proof of Proposition 10.1

We may assume without loss of generality (rescaling as needed) that
2 = 1
k
for all j = 1, 2, . . . , p. To simplify notation, let us assume an incoherence
condition of the form ν(X) < δ
k for some δ > 0, and verify the suﬃciency of
δ = 1/3 in the course of the argument.

xj
k

For an arbitrary subset S of cardinality k, suppose that β

suﬃces to show that

k

Xβ
k
Xβ

k

0
}
\{
2
2 > 0, and so we begin with the lower bound
k
2
2 ≥ k

2 + 2βT
2
k

S XScβSc.

S XT

XSβS

C(S)

∈

(10.24)

. It

On one hand, we have

2 (cid:12)
(cid:12)βT

S XT

S XSc βSc

(cid:12)
(cid:12)

≤

(i)

X

2 (cid:12)
(cid:12)

i∈S

X
j∈Sc |

βi

βj

||

xi, xj

||h

i|

1 ν(X)

k

2

βS
k
2δ

1
k
βS
k
k

βSc
k
2
1
k

2 δ

βS
k

2
2,
k

≤
(ii)

≤
(iii)

≤

where inequality (i) uses the deﬁnition (10.22) of the pairwise incoherence;

BIBLIOGRAPHIC NOTES

285

inequality (ii) exploits the assumed bound on ν(X) combined with the fact
2
that β
2, by
Cauchy–Schwarz, since the cardinality of S is at most k. Consequently, we
have established that

C(S); and inequality (iii) uses the fact that

2
1 ≤

βS

βS

∈

k

k

k

k

k

2
2 ≥ k
2
2. Letting
In order to complete the proof, it remains to lower bound
op denote the operator norm (maximum singular value) of a matrix, we

Xβ
k

(10.25)

2
2 −

βS
k

XSβS

XSβS

2
2.

2δ

k

k

k

k

k

k · k
have

XT
k

S XS

−

Ik×k

op
k

≤

max
i∈S

X

j∈S\{i}

xi, xj

|h

i| ≤

k

δ
k

= δ.

Consequently,
we conclude that
claimed.

XSβS
k

2
(1
2 ≥
k
−
2
Xβ
2 > (1
k
k

δ)

2
2, and combined with the bound (10.25),
βS
k
k
2
βS
3δ)
2, so that δ = 1/3 is suﬃcient as
k
k
−

Bibliographic Notes

There is an extensive literature on the sparsity of images and other signal
classes when represented in wavelet and other multiscale bases (Field 1987,
Ruderman 1994, Wainwright, Simoncelli and Willsky 2001, Simoncelli 2005).
Sparse approximation in overcomplete bases is discussed in various pa-
pers (Donoho and Stark 1989, Chen et al. 1998, Donoho and Huo 2001, Elad
and Bruckstein 2002, Feuer and Nemirovski 2003). The multiscale basis il-
lustrated in Figure 10.2 is known as the steerable pyramid (Simoncelli and
Freeman 1995). Random projection is a widely used technique in computer
science and numerical linear algebra (Vempala 2004, Mahoney 2011, Pilanci
and Wainwright 2014, e.g.). Johnson and Lindenstrauss (1984) proved the
lemma that now bears their name in the context of establishing the existence
of metric embeddings, using random projection as a proof technique. Com-
pressed sensing was introduced independently by Cand`es, Romberg and Tao
(2006) and Donoho (2006). Lustig, Donoho, Santos and Pauly (2008) discuss
the applications of compressed sensing to medical imaging, whereas Cand`es
and Wakin (2008) discuss various applications in signal processing.

The restricted nullspace property is discussed in Donoho and Huo (2001),
Feuer and Nemirovski (2003), and Cohen, Dahmen and DeVore (2009). Var-
ious authors (Donoho and Huo 2001, Elad and Bruckstein 2002, Feuer and
Nemirovski 2003) have studied the pairwise incoherence of overcomplete bases
and other design matrices, as a suﬃcient condition for the restricted nullspace
property. Cand`es and Tao (2005) introduced the restricted isometry prop-
erty as a milder suﬃcient condition for the restricted nullspace property. For
random matrices with i.i.d. sub-Gaussian rows, it follows from a combination
of union bound and standard results in random matrix theory (Davidson and
(cid:1) suﬃces to
Szarek 2001, Vershynin 2012) that a sample size N > ck log (cid:0) ep

k

286

SIGNAL APPROXIMATION AND COMPRESSED SENSING

ensure that the RIP is satisﬁed with high probability. Baraniuk, Davenport,
DeVore and Wakin (2008) point out connections between the RIP and the
Johnson–Lindenstrauss lemma; see also Exercise 10.6 for some related cal-
culations. Krahmer and Ward (2011) establish a partial converse, showing
that restricted isometry can be used to establish Johnson–Lindenstrauss type
guarantees.

Exercises

(10.26)

(10.27)

If Y1, . . . , YN are i.i.d

(0, 1) variates,
i has a chi-squared distribution with N degrees

N

Ex. 10.1 Chi-squared concentration.
then the variable Z : = PN
i=1 Y 2
of freedom. (In short, we write Z
(a) Show that for all λ

[

χ2
N .)
, 1/2), we have

∼

∈

−∞

E[exp(λ(Z

d))] =

−

(b) Use the bound (10.26) to show that

id

.

h

e−λ

√1

2λ

−

(cid:2)
P
|

Z

−

N

| ≥

tN (cid:3)

≤

2e− N t2

32

for all t

∈

(0, 1/2).

Ex. 10.2 Johnson–Lindenstrauss approximation. Recall from Section 10.3.1
the problem of distance-preserving embedding.
(a) Show that for each index j = 1, 2, . . . , M , the variable N

F (uj)
k

2
2 follows
k

a chi-squared distribution with N degrees of freedom.

(b) For any δ

∈
(cid:26)

(δ) : =

k

E

(0, 1), deﬁne the event

F (ui)
ui

k

F (uj)
k
2
uj
2

k

−
−

2
2

[1

−

∈

δ, 1 + δ]

for all pairs i

= j.

.

(cid:27)

Use the results of Exercise 10.1 and the union bound to show that

as long as N > 64

δ2 log M .

P

(cid:2)
E

(δ)]

1

−

≥

2e−N .

of elements of

Ex. 10.3 For a given compact set
u1, . . . , uM
{
}
index j
1, . . . , M
∈ {
v1, . . . , vM 0
{
i
= j in
(a) Show that any minimal (cid:15)-covering set must be a (cid:15)-packing set.

Rp, an (cid:15)-covering set is a subset
, there is some
(cid:15). A (cid:15)-packing set is a subset
2 > (cid:15) for all pairs
k

uj
2
k
such that such that

}
of elements of
.

with the property for any u

}
1, . . . , M 0
{

such that

vi
k

A ⊂

u
k

∈ A

vj

A

A

≤

−

−

}

(b) Show that any maximal 2(cid:15)-packing set must be a (cid:15)-covering set.
(c) Consider the Euclidean ball B2(1) =

. For each
2 = 1
u
}
k
(0, 1), show that there exists an (cid:15)-covering set with at most M = (1/(cid:15))c p
(cid:15)
elements, for some universal constant c > 0. (Hint: Use part (b) and consider
the volumes of Euclidean balls in p-dimensions.)

Rp

| k

∈

∈

u

{

6
6
EXERCISES

287

Ex. 10.4 In this exercise, we work through the proof of the converse of The-
orem 10.1, in particular showing that if the ‘1-relaxation has a unique opti-
mal solution, equal to the ‘0-solution, for all S-sparse vectors, then the set
null(X)
(a) For a given vector β∗

has no intersection with C(S).

, consider the basis-pursuit problem
0
}

null(X)

0
\{

\{

∈

}

minimize
β∈Rp

β

k

1
k

such that Xβ = X

(cid:21)
.

(cid:20)β∗
S
0

What is the link between its unique optimal solution bβ and the vector
(cid:20) 0
β∗
Sc

(cid:21)
?

(b) Use part (a) to show that β∗ /
∈

−
C(S).

(cid:0)0, 1/N (cid:1) entries.
RN ×p be a random matrix with i.i.d.
Ex. 10.5 Let X
Show that it satisﬁes the pairwise incoherence condition (10.22) as long as
N > c k2 log p for a universal constant c. (Hint: The result of Exercise 10.1
may be useful.)

N

∈

∈

RN ×p be a random matrix with i.i.d.

(cid:0)0, 1/N (cid:1) entries. In
Ex. 10.6 Let X
this exercise, we show that the restricted isometry property (RIP) holds with
high probability as long as N > ck log(e p/k) for a suﬃciently large constant
c > 0.
(a) Explain why it is suﬃcient to prove that there are constants c1, c2 such

N

that

XT

S XS

k

I2k×2k

t

op
k

≤

−

(10.28)

c1e−c2N t2

−

, for any ﬁxed subset S of cardinality

with probability at least 1
2k, and any t
(b) Let B2(1; S) =

(0, 1).

∈

Rp

∈

u
{

denote the inter-
2 = 1
section of the Euclidean ball with the subspace of vectors supported on a
given subset S. Let
be an (cid:15)-covering of the set B2(1; S), as
previously deﬁned in Exercise 10.3. Show that the bound (10.28) is implied
by a bound of the form

and uSc = 0
}

u1, . . . , uM
{

u
k

| k

}

max
j=1,...,M

(cid:12)
(cid:12)

k

XSuj

1(cid:12)
(cid:12)

2
2 −
k

≤

(cid:15),

with probability at least 1

c3ec4N (cid:15)2

, for any (cid:15)

(0, 1).

−
(c) Use part (b) and Exercise 10.3 to complete the proof.

∈

288

SIGNAL APPROXIMATION AND COMPRESSED SENSING

Ex. 10.7 ‘0 and ‘1-balls. In this exercise, we consider the relationship between
‘0 and ‘1-balls, and prove a containment property related to the success of
, consider the following two subsets:
‘1-relaxation. For an integer r
}

1, . . . , p

L0(r) : = B2(1)
L1(r) : = B2(1)

∩

∩

∈ {
B0(r) = (cid:8)θ
∈
B1(√r) = (cid:8)θ

p

R

R

∈

θ

| k
p

2
k
θ

≤
2
k

| k

≤

1, and

θ

k
1, and

r(cid:9),

√r(cid:9).

≤

0

k
θ
k

≤
1
k

Let conv denote the closure of the convex hull (when applied to a set).
(a) Prove that conv(cid:0)
L1(r).
L0(r)(cid:1).
(b) Prove that L1(r)
(Hint: Part (b) is a more challenging problem: you may ﬁnd it useful to con-
sider the support functions of the two sets. )

⊆
2 conv(cid:0)

L0(r)(cid:1)

⊆

Ex. 10.8 In this exercise, we work through a proof of (a slightly weaker version
of) Proposition 10.2.
(a) For any subset S of cardinality k, the set C(S)

B2(1) is contained within

∩

the set L1(r) with r = 4k.

(b) Now show that if RIP(8k, δ) holds with δ < 1/4, then the restricted
nullspace property holds. (Hint: Part (b) of Exercise 10.7 could be useful.)

Chapter 11

Theoretical Results for the Lasso

In this chapter, we turn our attention to some theoretical results concern-
ing the behavior of the lasso. We provide non-asymptotic bounds for the ‘2
and prediction error of the lasso, as well as its performance in recovering the
support set of the unknown regression vector.

11.1

Introduction

Consider the standard linear regression model in matrix-vector form

y = Xβ∗ + w,

(11.1)

RN ×p is the model (design) matrix, w

RN is a vector of noise
where X
Rp is the unknown coeﬃcient vector. In this chapter, we
variables, and β∗
develop some theoretical guarantees for both the constrained form of the lasso

∈

∈

∈

minimize

kβk1≤R k

y

Xβ

2
2,

k

−

as well as for its Lagrangian version

minimize
β∈Rp

(cid:8) 1

y

Xβ

k

−

2
2 + λN

(cid:9).

β
k

1
k

2N k

(11.2)

(11.3)

As we have discussed previously, by Lagrangian duality, there is a correspon-
dence between these two families of quadratic programs, where λN can be in-
R.
terpreted as the Lagrange multiplier associated with the constraint

β
k

1
k

≤

11.1.1 Types of Loss Functions

Rp, we can assess its quality in various ways. In
Given a lasso estimate bβ
some settings, we are interested in the predictive performance of bβ, so that
we might compute a prediction loss function of the form

∈

Lpred( bβ; β∗) =

1
N k

X bβ

Xβ∗

2
2,

k

−

(11.4)

289

290

THEORETICAL RESULTS FOR THE LASSO

corresponding to the mean-squared error of bβ over the given samples of X. In
other applications—among them medical imaging, remote sensing, and com-
pressed sensing—the unknown vector β∗ is of primary interest, so that it is
most appropriate to consider loss functions such as the ‘2-error

2( bβ; β∗) =

L

bβ

k

−

β∗

2
2,
k

(11.5)

which we refer to as a parameter estimation loss. Finally, we might actually be
interested in variable selection or support recovery, and so use the loss function

(

Lvs( bβ; β∗) =

0 if sign( bβi) = sign(β∗
1 otherwise.

i ) for all i = 1, . . . , p,

(11.6)

This assesses whether or not the estimate bβ shares the same signed support as
β∗. In this chapter, we provide theoretical results for all three types of losses.

11.1.2 Types of Sparsity Models

A classical analysis of a method such as the lasso would ﬁx the number of
covariates p, and then take the sample size N to inﬁnity. Although this type
of analysis is certainly useful in some regimes, there are many settings in
which the number of covariates p may be of the same order, or substantially
larger than the sample size N . Examples include microarray gene expression
analysis, which might involve N = 100 observations of p = 10, 000 genes,
or social networks, in which one makes relatively few observations of a large
number of individuals. In such settings, it is doubtful whether theoretical
results based on “ﬁxed p, large N ” scaling would provide useful guidance to
practitioners.

Accordingly, our aim in this chapter is to develop theory that is applicable
to the high-dimensional regime, meaning that it allows for the scaling p
N .
Of course, if the model lacks any additional structure, then there is no hope
of recovering useful information about a p-dimensional vector with limited
samples. Indeed, whenever N < p, the linear model (11.1) is unidentiﬁable;
for instance, it is impossible to distinguish between the models β∗ = 0 and
β∗ = ∆, where ∆
N -dimensional nullspace of
X.

Rp is any element of the p

(cid:29)

−

∈

∈

For this reason, it is necessary to impose additional constraints on the
unknown regression vector β∗
Rp, and here we focus on various types of
sparsity constraints. The ﬁrst setting is that of hard sparsity, in which we as-
sume that β∗ has at most k
p nonzero entries. For such hard-sparse models,
it makes sense to consider the prediction and ‘2-norm losses as well as the
variable selection loss (11.6). Assuming that the model is exactly supported
on k coeﬃcients may be overly restrictive, so that we also consider the case
of weakly sparse models, meaning that β∗ can be closely approximated by
vectors with few nonzero entries. For instance, one way of formalizing this

≤

BOUNDS ON LASSO ‘2-ERROR

291

Figure 11.1 Left: For q = 1, the set B(Rq) corresponds to the ‘1-ball, which is a
convex set. Right: Setting q = 0.75 yields a nonconvex set, with spikes along the
coordinate axes.

notion is by deﬁning, for a parameter q

[0, 1] and radius Rq > 0, the set

∈

B(Rq) = (cid:8)β

p

R

∈

|

p
X

j=1

βi
|

q
|

≤

(cid:9).

Rq

(11.7)

This set is known as the ‘q-“ball” of radius1 Rq; as illustrated in Figure 11.1,
for q
[0, 1), it is not a ball in the strict sense of the word, since it is a
nonconvex set. In the special case q = 0, imposing the constraint β∗
B(R0)
∈
is equivalent to requiring that β∗ has at most k = R0 nonzero entries.

∈

11.2 Bounds on Lasso ‘2-Error

We begin by developing some results on the ‘2-norm loss (11.5) between a lasso
solution bβ and the true regression vector β∗. We focus on the case when β∗ is
k-sparse, meaning that its entries are nonzero on a subset S(β∗)
1, 2, . . . , p
of cardinality k =
to the case of weakly-sparse coeﬃcient vectors.

}
. In the exercises, we work through some extensions

S(β∗)
|
|

⊂ {

11.2.1 Strong Convexity in the Classical Setting

We begin by developing some conditions on the model matrix X that are
needed to establish bounds on ‘2-error. In order to provide some intuition for
these conditions, we begin by considering one route for proving ‘2-consistency
in the classical setting (i.e., p ﬁxed, N tending to inﬁnity). Suppose that we
estimate some parameter vector β∗ by minimizing a data-dependent objective

1Strictly speaking, the radius would be R

1
q
q , but we take this liberty so as to simplify

notation.

β2β1β31β2β1β31292

THEORETICAL RESULTS FOR THE LASSO

function fN (β) over some constraint set. (For instance, the lasso minimizes
the least-squares loss fN (β) = 1
2
2 subject to an ‘1-constraint.) Let
k
fN (β∗)
us suppose that the diﬀerence in function values ∆fN =
|
converges to zero as the sample size N increases. The key question is the
following: what additional conditions are needed to ensure that the ‘2-norm
of the parameter vector diﬀerence ∆β =

fN ( bβ)
|

N k

Xβ

β∗

−

−

y

bβ
k

−

2 also converges to zero?
k

Figure 11.2 Relation between diﬀerences in objective function values and diﬀer-
ences in parameter values. Left: the function fN is relatively “ﬂat” around its opti-
mum bβ, so that a small function diﬀerence ∆fN = |fN (bβ) − fN (β∗)| does not imply
that ∆β = kbβ − β∗k2 is small. Right: the function fN is strongly curved around its
optimum, so that a small diﬀerence ∆fN in function values translates into a small
diﬀerence in parameter values.

To understand the issues involved, suppose that for some N , the objec-
tive function fN takes the form shown in Figure 11.2(a). Due to the relative
“ﬂatness” of the objective function around its minimum bβ, we see that the
fN (β∗)
in function values is quite small while at
diﬀerence ∆fN =
|
the same time the diﬀerence ∆β =
2 in parameter values is relatively
bβ
k
−
k
large. In contrast, Figure 11.2(b) shows a more desirable situation, in which
the objective function has a high degree of curvature around its minimum
fN (β∗)
bβ. In this case, a bound on the function diﬀerence ∆fN =
translates directly into a bound on ∆β =

fN ( bβ)

fN ( bβ)

β∗

β∗

−

−

|

|

|

How do we formalize the intuition captured by Figure 11.2? A natural
way to specify that a function is suitably “curved” is via the notion of strong
convexity. More speciﬁcally, given a diﬀerentiable function f : Rp
R, we
Rp if the inequality
say that it is strongly convex with parameter γ > 0 at θ

→

bβ
k

−

2.
k

∈

f (θ0)

f (θ)

−

f (θ)T (θ0

≥ ∇

θ) +

−

γ
2 k

θ0

θ

2
2
k

−

(11.8)

hold for all θ0
Rp. Note that this notion is a strengthening of ordinary
convexity, which corresponds to the case γ = 0. When the function f is twice
continuously diﬀerentiable, an alternative characterization of strong convexity

∈

β∗bβ∆fN∆ββ∗bβ∆fN∆βBOUNDS ON LASSO ‘2-ERROR

293

2f : in particular, the function f is strongly convex
is in terms of the Hessian
∇
with parameter γ around β∗
Rp if and only if the minimum eigenvalue of the
2f (β) is at least γ for all vectors β in a neighborhood of β∗.
Hessian matrix
2f (β∗) is
If f is the negative log-likelihood under a parametric model, then
the observed Fisher information matrix, so that strong convexity corresponds
to a uniform lower bound on the Fisher information in all directions.

∇

∇

∈

11.2.2 Restricted Eigenvalues for Regression

y

−

Xβ

2N k

2f (β) = XT X/N for all β

Let us now return to the high-dimensional setting, in which the number of
parameters p might be larger than N . It is clear that the least-squares objective
function fN (β) = 1
2
2 is always convex; under what additional
k
conditions is it also strongly convex? A straightforward calculation yields that
Rp. Thus, the least-squares loss is strongly
∇
p positive semideﬁnite matrix
convex if and only if the eigenvalues of the p
XT X are uniformly bounded away from zero. However, it is easy to see that
any matrix of the form XT X has rank at most min
, so it is always
rank-deﬁcient—and hence not strongly convex—whenever N < p. Figure 11.3
illustrates the situation.

N, p

×

∈

{

}

Figure 11.3 A convex loss function in high-dimensional settings (with p (cid:29) N ) can-
not be strongly convex; rather, it will be curved in some directions but ﬂat in others.
As shown in Lemma 11.1, the lasso error bν = bβ − β∗ must lie in a restricted subset C
p. For this reason, it is only necessary that the loss function be curved in certain
of R
directions of space.

For this reason, we need to relax our notion of strong convexity. It turns
out, as will be clariﬁed by the analysis below, that it is only necessary to
Rp of possible
impose a type of strong convexity condition for some subset

C ⊂

Cνbadνgood294

THEORETICAL RESULTS FOR THE LASSO

perturbation vectors ν
∈
restricted strong convexity at β∗ with respect to
such that

Rp. In particular, we say that a function f satisﬁes
if there is a constant γ > 0

C

νT

2f (β)ν
∇
2
ν
2
k
k

γ for all nonzero ν

,

∈ C

≥

(11.9)

Rp in a neighborhood of β∗. In the speciﬁc case of linear re-
and for all β
gression, this notion is equivalent to lower bounding the restricted eigenvalues
of the model matrix—in particular, requiring that

∈

1

N νXT Xν
ν
k

γ for all nonzero ν

.

(11.10)

≥

2
2
k
are relevant? Suppose that the parameter vector β∗
What constraint sets
C
is sparse—say supported on the subset S = S(β∗). Deﬁning the lasso error
R|S| denote the subvector indexed by elements of S,
bν = bβ
with bνSc deﬁned in an analogous manner. For appropriate choices of the ‘1-
ball radius—or equivalently, of the regularization parameter λN —it turns out
that the lasso error satisﬁes a cone constraint of the form

β∗, let bνS

∈ C

−

∈

kbνSc

1

k

α

kbνS

k

1,

≤

(11.11)

≥

for some constant α
1. This fact is easiest to see for the lasso in its con-
strained version. Indeed, assuming that we solve the constrained lasso (11.2)
1, then since bβ is feasible for the program, we have
with ball radius R =
k
β∗
1
Sk
k

β∗
k
R =

β∗ + bν
1
k
β∗
S + bνS
k
β∗
1
Sk

1 +
k
− kbνS

≥ k
=

≥ k

kbνSc
1 +
k

1
k
kbνSc

1.

k

Rearranging this inequality, we see that the bound (11.11) holds with α = 1.
If we instead solve the regularized version (11.3) of the lasso with a “suitable”
choice of λN , then it turns out that the error satisﬁes the constraint

≤
(We establish this fact during the proof of Theorem 11.1 to follow.) Thus, in
either its constrained or regularized form, the lasso error is restricted to a set
of the form

k

kbνSc

1
k

kbνS
3

1.

(11.12)

(S; α) : = (cid:8)ν

p

R

∈

νSc

| k

1
k

≤

α

νS
k

1
k

(cid:9),

C

(11.13)

for some parameter α

≥

1; see Figure 11.3 for an illustration.

11.2.3 A Basic Consistency Result

With this intuition in place, we now state a result that provides a bound on
2, based on the linear observation model y = Xβ∗ + w,
the lasso error
where β∗ is k-sparse, supported on the subset S.

bβ
k

β∗

−

k

BOUNDS ON LASSO ‘2-ERROR

295

Theorem 11.1. Suppose that the model matrix X satisﬁes the restricted eigen-
value bound (11.10) with parameter γ > 0 over
(a) Then any estimate bβ based on the constrained lasso (11.2) with R =

(S; 3).

C

β∗
k

1 satisﬁes the bound
k

β∗

bβ
k

−

2
k

≤

r

k
N

4
γ

(cid:13)
(cid:13)∞.

(cid:13)
(cid:13)

2

XT w
√N
XT w
k

≥

(11.14a)

(b) Given a regularization parameter λN

bβ from the regularized lasso (11.3) satisﬁes the bound

∞/N > 0, any estimate
k

β∗

bβ

k

−

2
k

≤

r

3
γ

k
N

√N λN .

(11.14b)

Before proving these results, let us discuss the diﬀerent factors in the
bounds (11.14a) and (11.14b), and then illustrate them with some examples.
First, it is important to note that these results are deterministic, and apply
to any set of linear regression equations with a given observed noise vector
w. Below we obtain results for speciﬁc statistical models, as determined by
assumptions on the noise vector w and/or the model matrix. These assump-
tions will aﬀect the rate through the restricted eigenvalue constant γ, and the
∞ and λN in the two bounds. Based on our earlier discussion of
terms
k
the role of strong convexity, it is natural that lasso ‘2-error is inversely pro-
portional to the restricted eigenvalue constant γ > 0. The second term pk/N
is also to be expected, since we are trying to estimate unknown regression
vector with k unknown entries based on N samples. As we have discussed,
the ﬁnal term in both bounds, involving either
∞ or λN , reﬂects the
k
interaction of the observation noise w with the model matrix X.

XT w
k

XT w
k

It is instructive to consider the consequences of Theorem 11.1 for some

linear regression models that are commonly used and studied.

Example 11.1. Classical linear Gaussian model. We begin with the classical
RN is Gaussian,
linear Gaussian model, for which the observation noise w
with i.i.d. N (0, σ2) entries. Let us view the design matrix X as ﬁxed, with
, a simple calcula-
columns
. For any given column j
}
}
tion shows that the random variable xT
N ).
Consequently, if the columns of the design matrix X are normalized (mean-
2/√N = 1 for all j = 1, . . . , p), then this variable is stochastically
ing
k
dominated by a N (0, σ2

1, . . . , p
j w/N is distributed as N (0, σ2
N ·

N ) variable, so that we have the Gaussian tail bound

x1, . . . , xp
{

xj
k

kxj k2
2

∈ {

∈

"

P

xT

j w
|
N ≥

|

#

t

≤

2e− N t2
2σ2 .

Since kXT wk∞
bound yields

N

corresponds to the maximum over p such variables, the union

h
P

k

XT w
N

∞

k

i

t

≥

≤

2e− N t2

2σ2 +log p = 2e− 1

2 (τ −2) log p,

296

THEORETICAL RESULTS FOR THE LASSO

where the second equality follows by setting t = σ
Consequently, we conclude that the lasso error satisﬁes the bound

for some τ > 2.

q τ log p
N

β∗

bβ
k

−

2
k

≤

r

c σ
γ

τ k log p
N

.

(11.15)

2e− 1

2 (τ −2) log p. This calculation has also given us
probability at least 1
a choice of the regularization parameter λN that is valid for the La-
grangian lasso in Theorem 11.1(b). In particular, from our calculations, set-
N for some τ > 2 will be a valid choice with the same high

τ log p

q

−

ting λN = 2σ
probability.

It should also be noted that the rate (11.15) is intuitively reasonable.
Indeed, if support set S(β∗) were known, then estimation of β∗ would re-
quire approximating a total of k parameters—namely, the elements β∗
i for all
S(β∗). Even with knowledge of the support set, since the model has k free
i
∈
parameters, no method can achieve squared ‘2-error that decays more quickly
than k
N . Thus, apart from the logarithmic factor, the lasso rate matches the
best possible that one could achieve, even if the subset S(β∗) were known a
priori. In fact, the rate (11.15)—including the logarithmic factor—is known to
be minimax optimal, meaning that it cannot be substantially improved upon
by any estimator. See the bibliographic section for further discussion.

Example 11.2. Compressed sensing. In the domain of compressed sensing
(Chapter 10), the design matrix X can be chosen by the user, and one standard
choice is to form a random matrix with i.i.d. N (0, 1) entries, and model the
noise vector w
σ.)
Under these assumptions, each variable 1
j w is a zero-mean Gaussian with
variance at most σ2
N . Thus, by following the same argument as in the preceding
example, we conclude that the lasso error will again obey the bound (11.15)
with high probability for this set-up.

RN as deterministic, say with bounded entries (
k
N xT

∞
k

w

≤

∈

By a more reﬁned argument, one can derive a strengthening of the error

bound (11.15), namely:

β∗

bβ
k

−

2

k

≤

c σ

r

k log(ep/k)
N

.

(11.16)

where e
the sample size N should satisfy the lower bound

2.71828, and c is a universal constant. This bound suggests that

≈

k log(ep/k)

N

≥

(11.17)

in order for the lasso to have small error.

Following Donoho and Tanner (2009), let us consider the ratios ρ = k/N

and α = N/p, in which form the bound (11.17) can be rewritten as

ρ(1

−

log(ρ α))

1.

≤

(11.18)

BOUNDS ON LASSO ‘2-ERROR

297

In order to study the accuracy of this prediction, we generated random ensem-
bles of the linear regression problem in dimension p = 200 and sample sizes
N ranging from 10 and 200, where each feature xij
N (0, 1) was generated
independently. Given this random design, we then generated outcomes from
a linear model yi = ν
N (0, 1) and σ = 4. For a
+ σwi where wi
given sparsity level k, we chose a random subset S of size k, and for each
N (0, 1) independently at random. In all cases, the
j
pre-factor ν was chosen for each N and k, so that the signal-to-noise ratio
was approximately equal to 10. We then solved the Lagrangian lasso using

xi, β∗
h
S, we generated β∗

j ∼

∼

∼

∈

i

N . Figure 11.4 is a heatmap of
the regularization parameter λN = 2σ
2 over 10 realizations, with the
bβ
the median of the Euclidean error
k
boundary (11.18) super-imposed. We see that there is a fairly sharp change at
the theoretical boundary, indicating that more samples are needed when the
underlying model is more dense.

−

k

k

q

3 log ep
β∗

Figure 11.4 Simulation experiment: median of the error kbβ − β∗k2 over 10 realiza-
tions, with the boundary (11.18) super-imposed.

Equipped with this intuition, we now turn to the proof of Theorem 11.1.

Proof of Theorem 11.1: The proof is very straightforward for the constrained
lasso bound (11.14a), and requires a bit more work for the regularized lasso
bound (11.14b).

Constrained Lasso.
we have the inequality
bν : = bβ

In this case, since β∗ is feasible and bβ is optimal,
2
2. Deﬁning the error vector
k
β∗, substituting in the relation y = Xβ∗ + w, and performing some

2
y
2 ≤ k

X bβ
k

Xβ∗

y
k

−

−

−

0.00.20.40.60.81.00.00.20.40.60.81.02468101214α=N/pρ=k/N298

THEORETICAL RESULTS FOR THE LASSO

algebra yields the basic inequality

2
Xbν
2
k
2N ≤

k

wT Xbν
N

.

(11.19)

Applying a version of H¨older’s inequality to the right-hand side yields the
1
upper bound 1
wT Xbν
XT w
1. As shown in Chapter 10, the in-
kbν
N k
N |
| ≤
k
β∗
1 implies that bν
R =
equality
k
≤
k
kbνS
kbν
k

(S; 1), whence we have

∈ C
kbνS
2

1 +
k

kbνSc

kbν
k

bβ
1
k

2 √k

∞
k

1 =

1
k

2.

≤

≤

k

k

1

On the other hand, applying the restricted eigenvalue condition (11.10) to
the left-hand side of the inequality (11.19) yields 1
2
2. Putting
kbν
N k
k
together the pieces yields the claimed bound (11.14a).

2
Xbν
2 ≥
k

γ

Lagrangian Lasso. Deﬁne the function

G(ν) : =

1
2N k

y

X(β∗ + ν)
k

−

2
2 + λN

β∗ + ν
k

k

1.

Noting that bν : = bβ
Some algebra yields the modiﬁed basic inequality

β∗ minimizes G by construction, we have G(bν)

−

2
Xbν
2
k
2N ≤

k

wT Xbν
N

+ λN

(cid:8)

β∗
k

1
k

β∗ + bν
k

− k

(cid:9).

1

(11.20)

G(0).

≤

(11.21)

Now since β∗

Sc = 0, we have

β∗
k
β∗
S + bνS

k
1 +
k

1 =

k
kbνSc

1, and

β∗
Sk

β∗ + bν
1 =
k
k

− kbνS
Substituting these relations into inequality (11.21) yields

β∗
1
Sk

≥ k

1
k

k

1 +
k

kbνSc

k

1.

2
Xbν
2
k
k
2N ≤

≤

wT Xbν
N
XT w
k
N

+ λN

(cid:9)

1
k

1
k

(cid:8)
kbνS
1 + λN
kbν
k

− kbνSc
(cid:8)
kbνS

1
k

∞
k

− kbνSc

1

k

(cid:9),

(11.22)

where the second step follows by applying H¨older’s inequality with ‘1 and ‘∞
norms. Since 1

λN
2 by assumption, we have

XT w

∞

k

≤

kbνS

1 +
k

kbνSc

1
k

(cid:9) + λN

(cid:8)

kbνS

1
k

− kbνSc

1

k

(cid:9)

3
2

≤

√kλN

2,
kbν
k
(11.23)

N k
λN
2

(cid:8)

2
Xbν
2
k
k
2N ≤

where the ﬁnal step uses the fact that

kbνS
In order to complete the proof, we require the following auxiliary result:
XT w
β∗
N k

Lemma 11.1. Suppose that λN
associated with any lasso solution bβ belongs to the cone set

∞ > 0. Then the error bν : = bβ

2.
kbν
k

(S; 3).

−

≤

≥

k

k

2

1

√k

C

BOUNDS ON PREDICTION ERROR

299

Taking this claim as given for the moment, let us complete the proof of the
bound (11.14b). Lemma 11.1 allows us to apply the γ-RE condition (11.10)
to bν, which ensures that 1
2
2
2. Combining this lower bound with
kbν
2 ≥
N k
k
our earlier inequality (11.23) yields

Xbν
k

γ

γ
2
2 kbν
2 ≤
k

3
2

λN √k

2,
kbν
k

and rearranging yields the bound (11.14b).

It remains to prove Lemma 11.1. Since kXT wk∞

N

λN
2 , inequality (11.22)

≤

implies that

λN
1 + λN
2 kbν
k
Rearranging and then dividing out by λN > 0 yields that
claimed.

− kbνSc

kbνS

1
k

≤

(cid:9),

(cid:8)

0

k

1

kbνSc

1
k

kbνS
3

k

≤

1 as

Some extensions. As stated, Theorem 11.1 applies to regression models in
which β∗ has at most k nonzero entries, an assumption that we referred to as
hard sparsity. However, a similar type of analysis can be performed for weakly
sparse models, say with β∗ belonging to the ‘q-ball Bq(Rq) previously deﬁned
in Equation (11.7). Under a similar set of assumptions, it can be shown that
the lasso error will satisfy the bound

bβ
k

−

β∗

2
2 ≤

k

c Rq

(cid:19)1−q/2

(cid:18) σ2 log p
N

(11.24)

with high probability. We work through portions of this derivation in Exer-
cise 11.3. In the special case q = 0, assuming that β∗ belongs to the ‘0 ball is
equivalent to the assumption of hard sparsity (with radius R0 = k), so that
this rate (11.24) is equivalent to our previous result (11.16) derived as a con-
sequence of Theorem 11.1. Otherwise, note that the rate slows down as the
weak sparsity parameter q increases away from zero toward one, reﬂecting the
fact that we are imposing weaker conditions on the true regression vector β∗.
The rate (11.24) is known to be minimax-optimal over the ‘q-ball, meaning
that no other estimator can achieve a substantially smaller ‘2-error; see the
bibliographic section for further discussion.

11.3 Bounds on Prediction Error

Thus far, we have studied the performance of the lasso in recovering the
true regression vector, as assessed by the Euclidean error
2. In other
settings, it may suﬃce to obtain an estimate bβ that has a relatively low (in-
2
β∗)
sample) prediction error
2. In this section, we
k
develop some theoretical guarantees on this form of loss. For concreteness,
we focus on the Lagrangian lasso (11.3), although analogous results can be
derived for other forms of the lasso.

Lpred( bβ, β∗) = 1
N k

X( bβ

bβ
k

β∗

−

−

k

300

THEORETICAL RESULTS FOR THE LASSO

Theorem 11.2. Consider the Lagrangian lasso with a regularization parameter
λN

XT w

∞.
k
R1, then any optimal solution bβ satisﬁes

≥
(a) If

2
N k
β∗
k

1

k

≤

X( bβ

k

−
N

β∗)

2
2
k

≤

12 R1 λN

(11.25a)

(b) If β∗ is supported on a subset S, and the design matrix X satisﬁes the
(S; 3), then any optimal solution bβ satisﬁes

γ-RE condition (11.10) over

C
X( bβ

k

β∗)

2
2
k

144
γ |

S

|

≤

λ2
N .

(11.25b)

−
N

As we have discussed, for various statistical models, the choice λN = c σ
is valid for Theorem 11.2 with high probability, so the two bounds take the
form

q log p
N

X( bβ
k

X( bβ
k

−
N

−
N

β∗)

β∗)

2
2
k

2
2
k

≤

≤

r

c1 σ R1

c2

σ2
γ

S

|

|

log p
N
log p
N

.

,

and

(11.26a)

(11.26b)

The bound (11.26a), which depends on the ‘1-ball radius R1, is known as the
“slow rate” for the lasso, since the squared prediction error decays as 1/√N .
On the other hand, the bound (11.26b) is known as the “fast rate,” since it
decays as 1/N . Note that the latter is based on much stronger assumptions:
namely, the hard sparsity condition that β∗ is supported on a small subset
S, and more disconcertingly, the γ-RE condition on the design matrix X. In
principle, prediction performance should not require an RE condition, so that
one might suspect that this requirement is an artifact of our proof technique.
Remarkably, as we discuss in the bibliographic section, this dependence turns
out to be unavoidable for any polynomial-time method.

Proof of Theorem 11.2: The proofs of both claims are relatively straightfor-
ward given our development thus far.

Proof of bound (11.25a): Beginning with the modiﬁed basic inequal-
ity (11.21), we have

XT w
k
N
XT w
N
n

(cid:8) k

λN

1
2

0

≤

≤
(i)

≤

∞
k

1 + λN

kbν
k

β∗

(cid:8)
k

1
k

− k

β∗ + bν
1
k

(cid:9)

∞

k

λN

−

(cid:9)

− kbν
k

1 + 4

1 + 2λN
kbν
k
β∗
k

o
,

1
k

β∗

k

1
k

SUPPORT RECOVERY IN LINEAR REGRESSION

301

where step (i) uses the fact that 1
N k
≤
together the pieces, we conclude that
4
k
to the modiﬁed basic inequality (11.21), we have

XT w
kbν
1
k

k
≤

∞

λN
2 by assumption. Putting
4R1. Returning again
1
k

≤

β∗

2
Xbν
2
k
k
2N ≤

n

XT w
k
N

∞
k

+ λN

o
kbν
1
k

≤

6λN R1,

which establishes the claim (11.25a).
Proof of bound (11.25b): Given the stated choice of λN , inequality (11.22)
is valid, whence

2
Xbν
2
k
k
N ≤

n
2
k

XT w

N k

∞ + λN

o
kbν
k

By Lemma 11.1, the error vector bν belongs to the cone
γ-RE condition guarantees that
yields the claim (11.25b).

2
kbν
2 ≤
k

1
N γ k

1

≤

2.

12λN √k

kbν
k
(S; 3), so that the
2
Xbν
2. Putting together the pieces
k

C

11.4 Support Recovery in Linear Regression

Thus far, we have focused on bounds on either the ‘2-error or the prediction
error associated with a lasso solution. In other settings, we are interested in
a somewhat more reﬁned question, namely whether or not a lasso estimate
bβ has nonzero entries in the same positions as the true regression vector β∗.
More precisely, suppose that the true regression vector β∗ is k-sparse, meaning
that it is supported on a subset S = S(β∗) of cardinality k =
. In such a
|
setting, a natural goal is to correctly identify the subset S of relevant variables.
In terms of the lasso, we ask the following question: given an optimal lasso
solution bβ, when is its support set—denoted by bS = S( bβ)—exactly equal to
the true support S? We refer to this property as variable selection consistency
or sparsistency.

S

|

β∗

−

bβ
k

Note that it is possible for the ‘2 error

2 to be quite small even if bβ
k
and β∗ have diﬀerent supports, as long as bβ is nonzero for all “suitably large”
entries of β∗, and not “too large” in positions where β∗ is zero. Similarly, it
β∗)
2/√N to be small even when
is possible for the prediction error
X( bβ
k
bβ and β∗ have very diﬀerent supports. On the other hand, as we discuss in
the sequel, given an estimate bβ that correctly recovers the support of β∗, we
can estimate β∗ very well—both in ‘2-norm and the prediction semi-norm—
simply by performing an ordinary least-squares regression restricted to this
subset.

−

k

11.4.1 Variable-Selection Consistency for the Lasso

We begin by addressing the issue of variable selection in the context of deter-
ministic design matrices X. It turns out that variable selection requires a con-
dition related to but distinct from the restricted eigenvalue condition (11.10).

302

THEORETICAL RESULTS FOR THE LASSO

In particular, we assume a condition known either as mutual incoherence or
irrepresentability: there must exist some γ > 0 such that

max
j∈Sc k

(XT

S XS)−1XT

S xj

1
k

≤

γ.

1

−

(11.27)

RN ×k corresponds
To interpret this condition, note that the submatrix XS
to the subset of covariates that are in the support set. For each index j in
the complementary set Sc, the k-vector (XT
S xj is the regression
coeﬃcient of xj on XS; this vector is a measure of how well the column xj
aligns with the columns of the submatrix XS. In the most desirable case, the
columns
would all be orthogonal to the columns of XS, and we
would be guaranteed that γ = 1. Of course, in the high-dimensional setting
(p
N ), this complete orthogonality is not possible, but we can still hope
for a type of “near orthogonality” to hold.

S XS)−1XT

xj, j

Sc

(cid:29)

∈

∈

}

{

In addition to this incoherence condition, we also assume that the design

matrix has normalized columns

max
j=1,...,p k

xj

k

2/√N

≤

Kclm.

(11.28)

xj
For example, we can take
k
the submatrix XS is well-behaved in the sense that

2 = √N and Kclm = 1. Further we assume that
k

λmin(XT

S XS/N )

Cmin.

≥

(11.29)

Note that if this condition were violated, then the columns of XS would be
linearly dependent, and it would be impossible to estimate β∗ even in the
“oracle case” when the support set S were known.

The following result applies to the regularized lasso (11.3) when applied to
an instance the linear observation model (11.1) such that the true parameter
β∗ has support size k.
Theorem 11.3. Suppose that the design matrix X satisﬁes the mutual incoher-
ence condition (11.27) with parameter γ > 0, and the column normalization
condition (11.28) and the eigenvalue condition (11.29) both hold. For a noise
RN with i.i.d. N (0, σ2) entries, consider the regularized lasso pro-
vector w
gram (11.3) with

∈

λN

≥

8 Kclm σ
γ

r

log p
N

.

(11.30)

Then with probability greater than 1
properties:
(a) Uniqueness: The optimal solution bβ is unique.
(b) No false inclusion: The unique optimal solution has its support S( bβ)

N , the lasso has the following

−

c1e−c2N λ2

contained within the true support S(β∗).

SUPPORT RECOVERY IN LINEAR REGRESSION

303

(c) ‘∞-bounds: The error bβ

bβS
k

−

β∗
Sk

∞

≤

−
(cid:2)

λN

|

β∗ satisﬁes the ‘∞ bound

4σ
√Cmin

S XS/N )−1(cid:13)
(cid:13)∞

+ (cid:13)

(cid:13)(XT
{z
B(λN ,σ;X)

(cid:3)

}

(11.31)

(d) No false exclusion: The lasso solution includes all indices j

S(β∗) such
β∗
> B(λN , σ; X), and hence is variable selection consistent as long
that
j |
|
β∗
as min
j |
j∈S |

> B(λN , σ; X).

∈

Before proving this result, let us try to interpret its main claims. First,
the uniqueness claim in part (a) is not trivial in the high-dimensional setting,
because as discussed previously, although the lasso objective is convex, it can
never be strictly convex when p > N . The uniqueness claim is important,
because it allows us to talk unambiguously about the support of the lasso
estimate bβ. Part (b) guarantees that the lasso does not falsely include variables
that are not in the support of β∗, or equivalently that bβSc = 0, whereas part
(c) guarantees that bβS is uniformly close to β∗
S in the ‘∞-norm. Finally, part
(d) is a consequence of this uniform norm bound: as long as the minimum value
S is not too small, then the lasso is variable-selection
over indices j
of
consistent in the full sense.

β∗
j |

∈

|

11.4.1.1 Some Numerical Studies

In order to learn more about the impact of these results in practice, we ran a
few small simulation studies. We ﬁrst explore the impact of the irrepresentabil-
ity condition (11.27). We ﬁxed the sample size to N = 1000, and for a range of
problem dimensions p, we generated p i.i.d standard Gaussian variates, with
a fraction f = k/p of them being in the support set S. For correlations ρ
ranging over the interval [0, 0.6], for each j
S we randomly chose a predic-
xj with c chosen so that corr(xj, x‘) = ρ.
tor ‘
Figure 11.5 shows the average value of 1
γ, the value of the irrepresentability
condition (11.27), over ﬁve realizations. We see for example with ρ = 0, we
γ < 1 when p
fall into the “good” region 1
2%
sparsity or p
5% sparsity. However the maximum size of p
≤
and sparsity level f decrease as the correlation ρ increases.

1000 and there is f

Sc, and set x‘

500 with f

x‘ + c

←

−

≤

≤

−

≤

∈

∈

·

We also ran a small simulation study to examine the false discovery and
false exclusion rates for a lasso regression. We set N = 1000 and p = 500 with
k = 15 predictors in S having nonzero coeﬃcients. The data matrices XS and
XSc were generated as above, with diﬀerent values for the correlations ρ. We
then generated a response y according to y = XSβS + w, with the elements
of w i.i.d. N (0, 1).

We tried two diﬀerent values for the nonzero regression coeﬃcients in βS:
all 0.25 or all 0.15, with randomly selected signs. These result in “eﬀect sizes”
(absolute standardized regression coeﬃcients) for the 15 true predictors of 7.9

304

THEORETICAL RESULTS FOR THE LASSO

Figure 11.5 Irrepresentability condition in practice. Each plot shows values for
1 − γ in (11.27) for simulated Gaussian data. Values less than one are good, and the
smaller the better. The sample size N = 1000 is ﬁxed, and the number of predictors
p varies along the horizontal axis. The fraction f = k/p of true nonzero coeﬃcients
(the sparsity level) varies within each panel, and ﬁnally, the correlation between each
true predictor and its null predictor partner (as described in the text) varies across
the four panels. A horizontal broken line is drawn at 1 − γ = 1, below which the
irrepresentability condition holds. Each point is a mean of 1−γ over ﬁve simulations;
the standard errors of the means are small, averaging about 0.03.

50100200500100020000.050.200.502.005.00Number of Variables pMaximum Inner Product 1−γρ=0f = 0.02f = 0.05f = 0.1f = 0.250100200500100020000.050.200.502.005.00Number of Variables pMaximum Inner Product 1−γρ=0.250100200500100020000.050.200.502.005.00Number of Variables pMaximum Inner Product 1−γρ=0.450100200500100020000.050.200.502.005.00Number of Variables pMaximum Inner Product 1−γρ=0.6SUPPORT RECOVERY IN LINEAR REGRESSION

305

and 4.7, respectively. Finally, we chose λN in an “optimal” way in each run:
we used the value yielding the correct number of nonzero coeﬃcients (15).

The top row of Figure 11.6 shows the results. In the top left panel (the
best case), the average false discovery and false exclusion probabilities are zero
until ρ is greater than about 0.6. After that point, the lasso starts to include
false variables and exclude good ones, due to the high correlation between
signal and noise variables. The value γ from the irrepresentability condition
is also shown, and drops below zero at around the value ρ = 0.6. (Hence
the condition holds below correlation 0.6.) In the top right panel, we see error
rates increase overall, even for small ρ. Here the eﬀect size is modestly reduced
from 7.9 to 4.7, which is the cause of the increase.

The lower panel of Figure 11.6 shows the results when the sample size
N is reduced to 200 (p < N ) and the size k of the support set is increased
to 25. The values used for the nonzero regression coeﬃcients were 5.0 and
0.5, yielding eﬀect sizes of about 71 and 7, respectively. The irrepresentability
condition and other assumptions of the theorem do not hold. Now the error
rates are 15% or more irrespective of ρ, and recovery of the true support set
seems unrealistic in this scenario.

11.4.2 Proof of Theorem 11.3

We begin by developing the necessary and suﬃcient conditions for optimality
in the lasso. A minor complication arises because the ‘1-norm is not diﬀeren-
tiable, due to its sharp point at the origin. Instead, we need to work in terms
of the subdiﬀerential of the ‘1-norm. Here we provide a very brief introduc-
tion; see Chapter 5 for further details. Given a convex function f : Rp
R,
Rp is a subgradient at β, denoted by z
we say that z
for all ∆
f (β + ∆)

→
∂f (β), if we have
Rp.

f (β) +

∈

∈

≥

z, ∆
h

i

β
k

1, it can be seen that z
k

When f (β) =
1 if and only if zj = sign(βj)
k
for all j = 1, 2, . . . , p, where we allow sign(0) to be any number in the interval
Rp
[
−
1. Any such pair must
is primal-dual optimal if bβ is a minimizer and bz
satisfy the zero-subgradient condition

1, 1]. In application to the lasso program, we say that a pair ( bβ, bz)

bβ
k
k

β
k

Rp

×

∈

∈

∈

∂

∂

∈

1
N

XT (y

−

X bβ) + λN bz = 0,

(11.32)

which is the analogue of a zero gradient condition in this nondiﬀerentiable
setting.

Our proof of Theorem 11.3 is based on a constructive procedure, known
as a primal-dual witness method (PDW). When this procedure succeeds, it
Rp that are primal-dual optimal, and act as
constructs a pair ( bβ, bz)
a witness for the fact that the lasso has a unique optimal solution with the
correct signed support. Using S = supp(β∗) to denote the support set of β∗,
this procedure consists of the following steps:

Rp

×

∈

306

THEORETICAL RESULTS FOR THE LASSO

Figure 11.6 Average false discovery and exclusion rates (with ± one standard er-
ror) from simulation experiments with p = 500 variables. In the top row N = 1000,
and the size of S is k = 15. In the second row N = 200 and the subset size is
k = 25. The eﬀect size is the strength of real coeﬃcients, as measured by an absolute
Z statistic. Overall conclusion: when γ is favorable, and the signal is strong, recovery
is good (top left). All other situations are problematic.

0.00.20.40.60.81.00.00.20.40.60.81.0ProportionFalse Discovery RateFalse Exclusion Rateγ0.00.20.40.60.81.00.00.20.40.60.81.0ProportionN=10000.00.20.40.60.81.00.00.20.40.60.81.0Proportion0.00.20.40.60.81.00.00.20.40.60.81.0ProportionN=200ρρρρEﬀectSize=7.9,k=15EﬀectSize=4.7,k=15EﬀectSize=70.7,k=25EﬀectSize=7.1,k=25SUPPORT RECOVERY IN LINEAR REGRESSION

307

Primal-dual witness (PDW) construction.
1. Set bβSc = 0.
2. Determine ( bβS, bzS) by solving the k-dimensional oracle subproblem

bβS

arg min
βS ∈Rk

∈

2N k

(cid:26) 1

y

XSβS

2
2 + λN

k

βS

k

1

k

−

(cid:27)

.

(11.33)

Thus bzS is an element of subdiﬀerential ∂
N XT
XS bβS) + λN bzS = 0.

S (y

1

−

bβS
k

k

1 satisfying the relation

k

kbzSc

3. Solve for bzSc via the zero-subgradient Equation (11.32), and check whether

∞ < 1 holds.

or not the strict dual feasibility condition
To be clear, this procedure is not an implementable method for actu-
ally solving the lasso program (since it pre-supposes knowledge of the true
support); rather, it is a proof technique for certifying variable-selection con-
sistency of the lasso. Note that the subvector bβSc is determined in step 1,
whereas the remaining three subvectors are determined in steps 2 and 3. By
construction, the subvectors bβS, bzS and bzSc satisfy the zero-subgradient con-
dition (11.32). We say that the PDW construction succeeds if the vector bzSc
constructed in step 3 satisﬁes the strict dual feasibility condition. The follow-
ing result shows that this success acts as a witness for the lasso:
Lemma 11.2. If the PDW construction succeeds, then under the lower eigen-
Rp is the unique optimal solution
value condition (11.29), the vector ( bβS, 0)
of the regularized lasso (11.3).

∈

=

hbz, bβ
i

Proof: When the PDW construction succeeds, then bβ = ( bβS, 0) is an optimal
solution with associated subgradient vector bz
∞ < 1,
kbzSc
Rp be any other optimal solution of the lasso.
and
1. Now let eβ
bβ
k
k
If we introduce the shorthand notation F (β) = 1
2
y
2, then we are
guaranteed that F ( bβ) + λN
hbz, eβ

2N k
−
k
1, and hence
eβ
k
k
(cid:1).
(cid:0)
− hbz, eβ
eβ
= F ( eβ) + λN
i
k

∈
hbz, bβ
i
bβ
i

Rp satisfying

= F ( eβ) + λN

F ( bβ)

Xβ

λN

−

−

∈

k

k

1

But by the zero-subgradient conditions for optimality (11.32), we have
λN bz =

F ( bβ), which implies that

−∇

F ( bβ) +

F ( bβ), eβ

h∇

bβ

i −

−

F ( eβ) = λN

(cid:0)

eβ
k
k

1

(cid:1).
− hbz, eβ
i

1

1 =

By convexity of F , the left-hand side is negative, so that we must have
. Applying H¨older’s inequality with the ‘1 and ‘∞ norms yields
≤ hbz, eβ
eβ
k
i
k
the upper bound
1. These two inequalities together imply
hbz, eβ
k
that
∞ < 1, this equality can occur only if eβj = 0
. Since
hbz, eβ
eβ
k
i
k
for all j
∈

Thus, all optimal solutions are supported only on S, and hence can be
obtained by solving the oracle subproblem (11.33). Given the lower eigen-
value bound (11.29), this subproblem is strictly convex, and so has a unique
minimizer.

i ≤ kbz
k
kbzSc

eβ
k

Sc.

∞

k

308

THEORETICAL RESULTS FOR THE LASSO

Based on Lemma 11.2, in order to prove parts (a) and (b) of Theorem 11.3,
it suﬃces to show that the subvector bzSc constructed in step 3 satisﬁes the
strict dual feasibility condition

kbzSc

∞ < 1.
k

Establishing strict dual feasibility. Let us delve into the form of the subvector
bzSc constructed in step 3. By using the fact that bβSc = β∗
Sc = 0 and writing
out the zero-subgradient condition (11.32) in block matrix form, we obtain

1
N

(cid:20) XT
XT

S XS XT
ScXS XT

S XSc
Sc XSc

(cid:21) (cid:20)

bβS

(cid:21)

β∗
S

+

1
N

(cid:21)

(cid:20) XT
XT

S w
Scw

−
0

+ λN

(cid:21)

(cid:20)
bzS
bzSc

=

Solving for the vector bzSc

Rp−k yields
∈
(cid:26) XT
ScXS
N

(cid:0)

bβS

1
λN

bzSc =

(cid:1) +

β∗
S

−

XT
Scw
N

(cid:27)

.

.

(cid:20)0
(cid:21)
0
(11.34)

(11.35)

Similarly, using the assumed invertibility of XT
diﬀerence bβS

β∗
S yields

−

S XS in order to solve for the

bβS

−

β∗
S =

−
|

(cid:19)−1

(cid:18) XT
S XS
N

XT

S w
N −

λN

(cid:18) XT
S XS
N

(cid:19)−1

{z
US

.

sign(β∗
S)
}

(11.36)

Substituting this expression back into Equation (11.35) and simplifying yields

bzSc = XT

ScXS(XT

|

S XS)−1 sign(β∗
S)
}

{z
µ

+ XT
Sc

(cid:2)I

−

|

XS(XT

S XS)−1XT
S

{z
VSc

(cid:18) w

(cid:3)

λN N

(cid:19)

.

}

By triangle inequality, we have

kbzSc

∞
k

∞ +
µ
k

≤ k

VSc
k

∞.
k

Note that the vector µ
by the mutual incoherence condition (11.27), we have
remaining quantity VSc
we need to show that
For an arbitrary j

∈
∞ < γ with high probability.
VSc
k
Sc, consider the random variable

Rp−k is a deterministic quantity, and moreover,
∈
γ. The
Rp−k is a zero-mean Gaussian random vector, and

µ
k
k

≤

−

∞

1

k
∈

Vj : = XT
j

(cid:2)I
|

−

XS(XT
S XS)−1XT
S
{z
ΠS⊥ (X)

(cid:3)

}

(cid:18) w

λN N

(cid:19)

.

Noting that the matrix ΠS⊥(X) is an orthogonal projection matrix and using
the column normalization condition (11.28), we see that each Vj is zero-mean

BEYOND THE BASIC LASSO

309

with variance at most σ2K 2
bounds with the union bound, we ﬁnd that

clm/(λ2

N N ). Therefore, combining Gaussian tail

−

λ2
N
2σ2K2

N (γ/2)2
clm .

(cid:2)
P

γ/2(cid:3)

≤

≥

2 (p

k) e

∞
k

VSc
k
This probability vanishes at rate 2e−2λ2
theorem statement.
Establishing ‘∞ bounds. Next we establish a bound on the ‘∞-norm of the
β∗
diﬀerence vector US = bβS
S from Equation (11.36). By the triangle in-
equality, we have

N N for the choice of λN given in the

−

−

US
k

∞
k

≤

(cid:19)−1

(cid:13)
(cid:18) XT
(cid:13)
S XS
(cid:13)
(cid:13)
N
(cid:13)

XT
S w
N

(cid:13)
(cid:13)
(cid:13)
(cid:13)
(cid:13)∞

+

(cid:13)
(cid:18) XT
(cid:13)
S XS
(cid:13)
(cid:13)
N
(cid:13)

(cid:19)−1(cid:13)
(cid:13)
(cid:13)
(cid:13)
(cid:13)∞

λN ,

(11.37)

where we have multiplied and divided diﬀerent terms by N for later conve-
nience. The second term is a deterministic quantity, so that it remains to
bound the ﬁrst term. For each i = 1, . . . , k, consider the random variable

Zi : = eT
i

(cid:18) 1
N

XT

S XS

(cid:19)−1 1
N

XT

S w.

Since the elements of w are i.i.d. N (0, σ2) variables, the variable Zi is zero-
mean Gaussian with variance at most

σ2
N

(cid:13)
(cid:18) 1
(cid:13)
(cid:13)
(cid:13)
N
(cid:13)

XT

S XS

(cid:19)−1(cid:13)
(cid:13)
(cid:13)
(cid:13)
(cid:13)2

σ2
CminN

,

≤

where we have used the eigenvalue condition (11.29). Therefore, again com-
bining Gaussian tail bounds with the union bound, we ﬁnd that

P[

US
k

∞ > t]
k

≤

2e− t2CminN

2σ2 +log k.

Let us set t = 4σλN /√Cmin and then observe that our choice of λN guarantees
that 8N λ2
log k. Putting together these pieces, we conclude that
N N . Overall, we
US
∞
k
k
conclude that

N > log p
4σλN /√Cmin with probability at least 1

2e−c2λ2

−

≥

≤

bβS

k

−

β∗
Sk

∞

≤

λN

(cid:20) 4σ
√Cmin

+ (cid:13)

(cid:13)(XT

S XS/N )−1(cid:13)
(cid:13)∞

(cid:21)

,

with probability greater than 1

2e−c2λ2

N N , as claimed.

−

11.5 Beyond the Basic Lasso

In this chapter, we have limited ourselves to discussion of the basic lasso,
which involves the least-squares loss function combined with the ‘1-norm as a

310

THEORETICAL RESULTS FOR THE LASSO

regularizer. However, many of the ingredients have straightforward extensions
to more general cost functions, including logistic regression and other types
of generalized linear models, as well as to more exotic forms of regulariza-
tion, including the group lasso, nuclear norm, and other types of structured
regularizers. Here we sketch out the basic picture, referring the reader to the
bibliographic section for links to further details.
Consider an objective function of the form

F (β) =

1
N

N
X

i=1

f (β; zi),

(11.38)

∈

g(β; zi) measures the ﬁt of the parameter vector
Rp to the sample zi. In the context of regression problems, each sample
R, whereas in problems such as the graphical
R

where the function β
β
takes the form zi = (xi, yi)
lasso, each sample corresponds to a vector zi = xi
denote a regularizer, we then consider an estimator of the form

Rp. Letting Φ : Rp

Rp

7→

→

×

∈

∈

bβ

∈

arg min

F (β) + λN Φ(β)

β∈Ω {

.

}

(11.39)

We can view bβ as an estimate of the deterministic vector β∗ that minimizes
the population objective function ¯F (β) : = E[f (β; Z)].

To put our previous discussion in context, the familiar lasso is a special

case of this general M -estimator, based on the choices

1
2

(cid:0)yi

f (β; xi, yi) =

(cid:1)2
i
and with the optimization taking place over Ω = Rp. In the case of random
N (0, Σ), the population objective function
design, say with covariates xi
for linear regression takes the form ¯F (β) = 1
β∗)T Σ(β

and Φ(β) =

β∗) + 1

xi, β

1,
k

β
k

− h

∼

,

Considering the general M -estimator (11.39), our goal here is to provide
some intuition on how to analyze the error
2. When N < p, then the
k
objective function (11.38) can never be strongly convex: indeed, assuming that
it is twice diﬀerentiable, the Hessian is a sum of N matrices in p dimensions,
and so must be rank degenerate. As noted previously, the restricted eigenvalue
condition is a special case of a more general property of cost functions and
regularizers, known as restricted strong convexity. In particular, given a set
Rp, a diﬀerentiable function F satisﬁes restricted strong convexity over

bβ
k

β∗

−

C ⊂
at β∗ if there exists a parameter γ > 0 such that

C

2 (β

−

2 σ2.

−

F (β∗ + ν)

F (β∗)

F (β∗), ν

2
2

γ

ν
k

k

i ≥

− h∇

−

for all ν

.

∈ C

(11.40)

When F is twice diﬀerentiable, then this lower bound is equivalent to con-
trolling the Hessian in a neighborhood of β∗, as in the deﬁnition (11.9)—see
Exercise 11.6 for details. Thus, in the special case of a least-squares problem,
restricted strong convexity is equivalent to a restricted eigenvalue condition.

BIBLIOGRAPHIC NOTES

311

C

For what type of sets

can a condition of this form be expected to hold?
β∗, we need
Since our ultimate goal is to control the error vector bν = bβ
only ensure that strong convexity hold over a subset
that is guaranteed—
typically with high probability over the data—to contain the error vector.
Such sets exist for regularizers that satisfy a property known as decompos-
ability, which generalizes a basic property of the ‘1-norm to a broader family
of regularizers. Decomposability is deﬁned in terms of a subspace
of the
parameter set Ω, meant to describe the structure expected in the optimum
β∗, and its orthogonal complement
⊥, corresponding to undesirable pertur-
bations away from the model structure. With this notation, a regularizer Φ is
said to be decomposable with respect to

M

M

−

if

C

Φ(β + θ) = Φ(β) + Φ(θ)

M
for all pairs (β, θ)

⊥.

(11.41)

∈ M × M

In the case of the ‘1-norm, the model subspace is simply the set of all vectors
⊥
with support on some ﬁxed set S, whereas the orthogonal complement
consists of vectors supported on the complementary set Sc. The decomposabil-
ity relation (11.41) follows from the coordinate-wise nature of the ‘1-norm.
With appropriate choices of subspaces, many other regularizers are decom-
posable, including weighted forms of the lasso, the group lasso and overlap
group lasso penalties, and (with a minor generalization) the nuclear norm for
low-rank matrices. See the bibliographic section for further details.

M

Bibliographic Notes

Knight and Fu (2000) derive asymptotic theory for the lasso and related es-
timators when the dimension p is ﬁxed; the irrepresentable condition (11.27)
appears implicitly in their analysis. Greenshtein and Ritov (2004) were the
ﬁrst authors to provide a high-dimensional analysis of the lasso, in particu-
lar providing bounds on the prediction error allowing for the p
N setting.
The irrepresentable or mutual incoherence condition (11.27) was developed
independently by Fuchs (2004) and Tropp (2006) in signal processing, and
Meinshausen and B¨uhlmann (2006) as well as Zhao and Yu (2006) in statis-
tics. The notion of restricted eigenvalues was introduced by Bickel, Ritov and
Tsybakov (2009); it is a less restrictive condition than the restricted isome-
try property from Chapter 10. van de Geer and B¨uhlmann (2009) provide a
comparison between these and other related conditions for proving estimation
error bounds on the lasso. Cand`es and Tao (2007) deﬁned and developed the-
ory for the “Dantzig selector”, a problem closely related to the lasso. Raskutti,
Wainwright and Yu (2010) show that the RE condition holds with high prob-
ability for various types of random Gaussian design matrices; see Rudelson
and Zhou (2013) for extensions to sub-Gaussian designs.

(cid:29)

The proof of Theorem 11.1 is based on the work of Bickel et al. (2009),
whereas Negahban et al. (2012) derive the lasso error bound (11.24) for ‘q-
sparse vectors. The basic inequality technique used in these proofs is standard
in the analysis of M -estimators (van de Geer 2000). Raskutti, Wainwright and

312

THEORETICAL RESULTS FOR THE LASSO

Yu (2011) analyze the minimax rates of regression over ‘q-balls, obtaining rates
for both ‘2-error and prediction error. Theorem 11.2(a) was proved by Bunea,
Tsybakov and Wegkamp (2007), whereas part (b) is due to Bickel et al. (2009).
The restricted eigenvalue condition is actually required by any polynomial-
time method in order to achieve the “fast rates” given in Theorem 11.2(b),
as follows from the results of Zhang, Wainwright and Jordan (2014). Under
a standard assumption in complexity theory, they prove that no polynomial-
time algorithm can achieve the fast rate without imposing an RE condition.

Theorem 11.3 and the primal-dual witness (PDW) proof is due to Wain-
wright (2009). In the same paper, sharp threshold results are established for
Gaussian ensembles of design matrices, in particular concrete upper and lower
bounds on the sample size that govern the transition from success to failure
in support recovery. The proof of Lemma 11.2 was suggested by Carama-
nis (2010). The PDW method has been applied to a range of other prob-
lems, including analysis of group lasso (Obozinski et al. 2011, Wang, Liang
and Xing 2013) and related relaxations (Jalali, Ravikumar, Sanghavi and
Ruan 2010, Negahban and Wainwright 2011b), graphical lasso (Ravikumar
et al. 2011), and methods for Gaussian graph selection with hidden vari-
ables (Chandrasekaran et al. 2012). Lee, Sun and Taylor (2013) provide a
general formulation of the PDW method for a broader class of M -estimators.
As noted in Section 11.5, the analysis in this chapter can be extended to
a much broader class of M -estimators, namely those based on decomposable
regularizers. Negahban et al. (2012) provide a general framework for analyzing
the estimation error
2 for such M -estimators. As alluded to here, the
k
two key ingredients are restricted strong convexity of the cost function, and
decomposability of the regularizer.

bβ
k

β∗

−

Exercises

Ex. 11.1 For a given q
as a model of soft sparsity.
(a) A related object is the weak ‘q-ball with parameters (C, α), given by

(0, 1], recall the set Bq(Rq) deﬁned in Equation (11.7)

∈

Bw(α)(C) : = (cid:8)θ

p

R

∈

θ

| |

|(j) ≤

Cj−α

for j = 1, . . . , p(cid:9).

(11.42a)

θ
|

Here
largest to smallest (so that

|(j) denote the order statistics of θ in absolute value, ordered from
.)
|
j=1,2,...,p |

|(1) = max
For any α > 1/q, show that there is a radius Rq depending on (C, α) such
that Bw(α)(C)

|(p) = min

Bq(Rq).

j=1,2,...,p |

and

θ
|

θj

θj

θ

|

|

1, 2, . . . , p

, the best k-term approximation to a
}

⊆

(b) For a given integer k

vector θ∗

∈

∈ {
Rp is given by

Πk(θ∗) : = arg min

θ
kθk0≤k k

θ∗

2
2.
k

−

(11.42b)

EXERCISES

313

Give a closed form expression for Πk(θ∗).

(c) When θ∗

imation satisﬁes

∈

Bq(Rq) for some q

(0, 1], show that the best k-term approx-

∈

Πk(θ∗)
k

−

θ∗

2
2 ≤
k

(cid:0)Rq

(cid:1)2/q (cid:0) 1
k

(cid:1) 2

q −1

.

(11.42c)

Ex. 11.2 In this exercise, we analyze an alternative version of the lasso, namely
the estimator

bβ = arg min

β∈Rp k

β

1

k

such that 1

y

Xβ

2
2 ≤
k

−

C,

(11.43)

N k

where the constant C > 0 is a parameter to be chosen by the user. (This form
of the lasso is often referred to as relaxed basis pursuit.)
(a) Suppose that C is chosen such that β∗ is feasible for the convex program.
β∗ must satisfy the cone constraint

Show that the error vector bν = bβ
kbνSc
(b) Assuming the linear observation model y = Xβ∗ +w, show that bν satisﬁes

≤ kbνS

1.
k

1
k

−

the basic inequality

2
Xbν
2
k
k
N ≤

2 k

XT w
N

∞
k

1 +

kbν
k

(cid:26)

C

(cid:27)

.

2
2

w
k
k
N

−

(c) Assuming a γ-RE condition on X, use part (b) to establish a bound on

the ‘2-error

bβ
k

−

β∗

2.
k

Ex. 11.3 In this exercise, we sketch out the proof of the bound (11.24).
In particular, we show that if λN
Bq(Rq), then the
Lagrangian lasso error satisﬁes a bound of the form

kXT wk∞
N

and β∗

≥

∈

bβ
k

−

β∗

2
2 ≤

k

c Rq λ1−q/2
N

.

(11.44a)

(a) Generalize Lemma 11.1 by showing that the error vector bν satisﬁes the

“cone-like” constraint

kbνSc

1
k

≤

kbνS
3

β∗
Sc

1,

1 +
k
k
and its complement.

k

(11.44b)

valid for any subset S

1, 2, . . . , p

}
(b) Suppose that X satisﬁes a γ-RE condition over all vectors satisfying the

⊆ {

cone-like condition (11.44b). Prove that

kbνS
again valid for any subset S of indices.

2
kbν
2 ≤
k

λN

(cid:8)4

1 +
k

β∗
Sc
k

1
k

(cid:9).

(c) Optimize the choice of S so as to obtain the claimed bound (11.44a).

314

THEORETICAL RESULTS FOR THE LASSO

N

RN ×p with each row xi

Rp
Ex. 11.4 Consider a random design matrix X
(0, Σ) distribution, where the covariance matrix Σ is
drawn i.i.d. from a
strictly positive deﬁnite. Show that a γ-RE condition holds over the set
(S; α)
with high probability whenever the sample size is lower bounded as N >
2 log p for a suﬃciently large constant c. (Remark: This scaling of the
c
|
sample size is not optimal; a more reﬁned argument can be used to reduce
2 to
S
|

.)
|

∈

∈

S

S

C

|

|

|

RN ×p with i.i.d. N (0, 1) en-
Ex. 11.5 Consider a random design matrix X
tries. In this exercise, we show that the mutual incoherence condition (11.27)
holds with high probability as long as N > ck log p for a suﬃciently large
it is known that the event
numerical constant c. (Hint: For N > 4k,

∈

=

(cid:0) XT
S XS
λmin
N
E
(a) Show that

{

(cid:1)

1
4 }

≥

holds with high probability.)

γ = 1

max
j∈Sc

max
z∈{−1,+1}k

−

S XS)−1z
j XS(XT
xT
{z
}
|
Vj,z

.

(b) Recalling the event

such that

E

, show that there is a numerical constant c0 > 0

(cid:2)Vj,z
P

t (cid:3)

≤

≥

e−c0

N t2
k + P[

c]

E

valid for each ﬁxed index j

Sc and vector z

(c) Use part (b) to complete the proof.

∈

for any t > 0,

1, +1
}

∈ {−

k.

Ex. 11.6 Consider a twice diﬀerentiable function F : Rp
such that

→

R and a set

Rp

C ⊂

2F (β)
∇
2
ν
2 ≥
k
k

2
2

γ

ν
k

k

for all ν

,

∈ C

uniformly for all β in a neighborhood of some ﬁxed parameter β∗. Show that
the RSC condition (11.40) holds.

Bibliography

Agarwal, A., Anandkumar, A., Jain, P., Netrapalli, P. and Tandon, R. (2014),
Learning sparsely used overcomplete dictionaries via alternating mini-
mization, Journal of Machine Learning Research Workshop 35, 123–137.

Agarwal, A., Negahban, S. and Wainwright, M. J. (2012a), Fast global con-
vergence of gradient methods for high-dimensional statistical recovery,
Annals of Statistics 40(5), 2452–2482.

Agarwal, A., Negahban, S. and Wainwright, M. J. (2012b), Noisy matrix de-
composition via convex relaxation: Optimal rates in high dimensions,
Annals of Statistics 40(2), 1171–1197.

Alizadeh, A., Eisen, M., Davis, R. E., Ma, C., Lossos, I., Rosenwal, A.,
Boldrick, J., Sabet, H., Tran, T., Yu, X., Pwellm, J., Marti, G., Moore,
T., Hudsom, J., Lu, L., Lewis, D., Tibshirani, R., Sherlock, G., Chan,
W., Greiner, T., Weisenburger, D., Armitage, K., Levy, R., Wilson, W.,
Greve, M., Byrd, J., Botstein, D., Brown, P. and Staudt, L. (2000), Iden-
tiﬁcation of molecularly and clinically distinct subtypes of diﬀuse large b
cell lymphoma by gene expression proﬁling, Nature 403, 503–511.

Alliney, S. and Ruzinsky, S. (1994), An algorithm for the minimization of
mixed L1 and L2 norms with application to Bayesian estimation, Trans-
actions on Signal Processing 42(3), 618–627.

Amini, A. A. and Wainwright, M. J. (2009), High-dimensional analysis of
semdeﬁnite relaxations for sparse principal component analysis, Annals
of Statistics 5B, 2877–2921.

Anderson, T. (2003), An Introduction to Multivariate Statistical Analysis, 3rd

ed., Wiley, New York.

Antoniadis, A. (2007), Wavelet methods in statistics: Some recent develop-

ments and their applications, Statistics Surveys 1, 16–55.

Bach, F. (2008), Consistency of trace norm minimization, Journal of Machine

Learning Research 9, 1019–1048.

Bach, F., Jenatton, R., Mairal, J. and Obozinski, G. (2012), Optimization with
sparsity-inducing penalties, Foundations and Trends in Machine Learn-
ing 4(1), 1–106.

Banerjee, O., El Ghaoui, L. and d’Aspremont, A. (2008), Model selection
through sparse maximum likelihood estimation for multivariate Gaussian
or binary data, Journal of Machine Learning Research 9, 485–516.

315

316

BIBLIOGRAPHY

Baraniuk, R. G., Davenport, M. A., DeVore, R. A. and Wakin, M. B. (2008),
A simple proof of the restricted isometry property for random matrices,
Constructive Approximation 28(3), 253–263.

Barlow, R. E., Bartholomew, D., Bremner, J. M. and Brunk, H. D. (1972),
Statistical Inference under Order Restrictions: The Theory and Applica-
tion of Isotonic Regression, Wiley, New York.

Beck, A. and Teboulle, M. (2009), A fast iterative shrinkage-thresholding al-
gorithm for linear inverse problems, SIAM Journal on Imaging Sciences
2, 183–202.

Benjamini, Y. and Hochberg, Y. (1995), Controlling the false discovery rate: a
practical and powerful approach to multiple testing, Journal of the Royal
Statistical Society Series B. 85, 289–300.

Bennett, J. and Lanning, S. (2007), The netﬂix prize, in Proceedings of KDD

Cup and Workshop in conjunction with KDD.

Bento, J. and Montanari, A. (2009), Which graphical models are diﬃculty
to learn?, in Advances in Neural Information Processing Systems (NIPS
Conference Proceedings).

Berk, R., Brown, L., Buja, A., Zhang, K. and Zhao, L. (2013), Valid post-

selection inference, Annals of Statistics 41(2), 802–837.

Berthet, Q. and Rigollet, P. (2013), Computational lower bounds for sparse

PCA, Technical report, Princeton University. arxiv1304.0828.

Bertsekas, D. (1999), Nonlinear Programming, Athena Scientiﬁc, Belmont

MA.

Bertsekas, D. (2003), Convex Analysis and Optimization, Athena Scientiﬁc,

Belmont MA.

Besag, J. (1974), Spatial interaction and the statistical analysis of lattice sys-
tems, Journal of the Royal Statistical Society Series B 36, 192–236.

Besag, J. (1975), Statistical analysis of non-lattice data, The Statistician

24(3), 179–195.

Bickel, P. J. and Levina, E. (2008), Covariance regularization by thresholding,

Annals of Statistics 36(6), 2577–2604.

Bickel, P. J., Ritov, Y. and Tsybakov, A. (2009), Simultaneous analysis of
Lasso and Dantzig selector, Annals of Statistics 37(4), 1705–1732.

Bien, J., Taylor, J. and Tibshirani, R. (2013), A Lasso for hierarchical inter-

actions, Annals of Statistics 42(3), 1111–1141.

Bien, J. and Tibshirani, R. (2011), Sparse estimation of a covariance matrix,

Biometrika 98(4), 807–820.

Birnbaum, A., Johnstone, I., Nadler, B. and Paul, D. (2013), Minimax bounds
for sparse PCA with noisy high-dimensional data, Annals of Statistics
41(3), 1055–1084.

Boser, B., Guyon, I. and Vapnik, V. (1992), A training algorithm for optimal

317

margin classiﬁers, in Proceedings of the Annual Conference on Learning
Theory (COLT), Philadelphia, Pa.

Boyd, S., Parikh, N., Chu, E., Peleato, B. and Eckstein, J. (2011), Distributed
optimization and statistical learning via the alternating direction method
of multipliers, Foundations and Trends in Machine Learning 3(1), 1–124.

Boyd, S. and Vandenberghe, L. (2004), Convex Optimization, Cambridge Uni-

versity Press, Cambridge, UK.

Breiman, L. (1995), Better subset selection using the nonnegative garrote,

Technometrics 37, 738–754.

Breiman, L. and Ihaka, R. (1984), Nonlinear discriminant analysis via scaling

and ACE, Technical report, University of California, Berkeley.

B¨uhlmann, P. (2013), Statistical signiﬁcance in high-dimensional linear mod-

els, Bernoulli 19(4), 1212–1242.

B¨uhlmann, P. and van de Geer, S. (2011), Statistics for High-Dimensional

Data: Methods, Theory and Applications, Springer, New York.

Bunea, F., She, Y. and Wegkamp, M. (2011), Optimal selection of reduced

rank estimators of high-dimensional matrices, 39(2), 1282–1309.

Bunea, F., Tsybakov, A. and Wegkamp, M. (2007), Sparsity oracle inequalities

for the Lasso, Electronic Journal of Statistics pp. 169–194.

Burge, C. and Karlin, S. (1977), Prediction of complete gene structures in

human genomic DNA, Journal of Molecular Biology 268, 78–94.

Butte, A., Tamayo, P., Slonim, D., Golub, T. and Kohane, I. (2000), Discov-
ering functional relationships between RNA expression and chemother-
apeutic susceptibility using relevance networks, Proceedings of the Na-
tional Academy of Sciences pp. 12182–12186.

Cand`es, E., Li, X., Ma, Y. and Wright, J. (2011), Robust Principal Component
Analysis?, Journal of the Association for Computing Machinery 58, 11:1–
11:37.

Cand`es, E. and Plan, Y. (2010), Matrix completion with noise, Proceedings of

the IEEE 98(6), 925–936.

Cand`es, E. and Recht, B. (2009), Exact matrix completion via convex opti-
mization, Foundation for Computational Mathematics 9(6), 717–772.

Cand`es, E., Romberg, J. K. and Tao, T. (2006), Stable signal recovery from
incomplete and inaccurate measurements, Communications on Pure and
Applied Mathematics 59(8), 1207–1223.

Cand`es, E. and Tao, T. (2005), Decoding by linear programming, IEEE Trans-

actions on Information Theory 51(12), 4203–4215.

Cand`es, E. and Tao, T. (2007), The Dantzig selector: Statistical estimation
when p is much larger than n, Annals of Statistics 35(6), 2313–2351.

Cand`es, E. and Wakin, M. (2008), An introduction to compressive sampling,

Signal Processing Magazine, IEEE 25(2), 21–30.

318

BIBLIOGRAPHY

Caramanis, C. (2010), ‘Personal communication’.

Chandrasekaran, V., Parrilo, P. A. and Willsky, A. S. (2012), Latent variable
graphical model selection via convex optimization, Annals of Statistics
40(4), 1935–1967.

Chandrasekaran, V., Sanghavi, S., Parrilo, P. A. and Willsky, A. S. (2011),
Rank-sparsity incoherence for matrix decomposition, SIAM Journal on
Optimization 21, 572–596.

Chaudhuri, S., Drton, M. and Richardson, T. S. (2007), Estimation of a co-

variance matrix with zeros, Biometrika pp. 1–18.

Chen, S., Donoho, D. and Saunders, M. (1998), Atomic decomposition by
basis pursuit, SIAM Journal of Scientiﬁc Computing 20(1), 33–61.

Cheng, J., Levina, E. and Zhu, J. (2013), High-dimensional Mixed Graphical

Models, arXiv:1304.2810 .

Chi, E. C. and Lange, K. (2014), Splitting methods for convex clustering,
Journal of Computational and Graphical Statistics (online access) .

Choi, Y., Taylor, J. and Tibshirani, R. (2014), Selecting the number of
principal components: estimation of the true rank of a noisy matrix.
arXiv:1410.8260.

Clemmensen, L. (2012), sparseLDA: Sparse Discriminant Analysis. R package

version 0.1-6.
URL: http://CRAN.R-project.org/package=sparseLDA

Clemmensen, L., Hastie, T., Witten, D. and Ersboll, B. (2011), Sparse dis-

criminant analysis, Technometrics 53, 406–413.

Cliﬀord, P. (1990), Markov random ﬁelds in statistics, in G. Grimmett and
D. J. A. Welsh, eds, Disorder in physical systems, Oxford Science Publi-
cations.

Cohen, A., Dahmen, W. and DeVore, R. A. (2009), Compressed sensing and
best k-term approximation, Journal of the American Mathematical Soci-
ety 22(1), 211–231.

Cox, D. and Wermuth, N. (1996), Multivariate Dependencies: Models, Analysis

and Interpretation, Chapman & Hall, London.

d’Aspremont, A., Banerjee, O. and El Ghaoui, L. (2008), First order methods
for sparse covariance selection, SIAM Journal on Matrix Analysis and its
Applications 30(1), 55–66.

d’Aspremont, A., El Ghaoui, L., Jordan, M. I. and Lanckriet, G. R. G. (2007),
A direct formulation for sparse PCA using semideﬁnite programming,
SIAM Review 49(3), 434–448.

Davidson, K. R. and Szarek, S. J. (2001), Local operator theory, random ma-
trices, and Banach spaces, in Handbook of Banach Spaces, Vol. 1, Elsevier,
Amsterdam, NL, pp. 317–336.

De Leeuw, J. (1994), Block-relaxation algorithms in statistics, in H. Bock,

319

W. Lenski and M. M. Richter, eds, Information Systems and Data Anal-
ysis, Springer-Verlag, Berlin.

Dobra, A., Hans, C., Jones, B., Nevins, J. R., Yao, G. and West, M. (2004),
Sparse graphical models for exploring gene expression data, Journal of
Multivariate Analysis 90(1), 196 – 212.

Donoho, D. (2006), Compressed sensing, IEEE Transactions on Information

Theory 52(4), 1289–1306.

Donoho, D. and Huo, X. (2001), Uncertainty principles and ideal atomic de-

composition, IEEE Trans. Info Theory 47(7), 2845–2862.

Donoho, D. and Johnstone, I. (1994), Ideal spatial adaptation by wavelet

shrinkage, Biometrika 81, 425–455.

Donoho, D. and Stark, P. (1989), Uncertainty principles and signal recovery,

SIAM Journal of Applied Mathematics 49, 906–931.

Donoho, D. and Tanner, J. (2009), Counting faces of randomly-projected
polytopes when the projection radically lowers dimension, Journal of the
American Mathematical Society 22(1), 1–53.

Dudoit, S., Fridlyand, J. and Speed, T. (2002), Comparison of discrimina-
tion methods for the classiﬁcation of tumors using gene expression data,
Journal of the American Statistical Association 97(457), 77–87.

Edwards, D. (2000), Introduction to Graphical Modelling, 2nd Edition,

Springer, New York.

Efron, B. (1979), Bootstrap methods: another look at the jackknife, Annals

of Statistics 7, 1–26.

Efron, B. (1982), The Jackknife, the Bootstrap and Other Resampling plans,
Vol. 38, SIAM- CBMS-NSF Regional Conference Series in Applied Math-
ematics.

Efron, B. (2011), The bootstrap and Markov Chain Monte Carlo, Journal of

Biopharmaceutical Statistics 21(6), 1052–1062.

Efron, B. and Tibshirani, R. (1993), An Introduction to the Bootstrap, Chap-

man & Hall, London.

El Ghaoui, L., Viallon, V. and Rabbani, T. (2010), Safe feature elimination in
sparse supervised learning, Paciﬁc journal of optimization 6(4), 667–698.

El Karoui, N. (2008), Operator norm consistent estimation of

large-
dimensional sparse covariance matrices, Annals of Statistics 36(6), 2717–
2756.

Elad, M. and Bruckstein, A. M. (2002), A generalized uncertainty principle
and sparse representation in pairs of bases, IEEE Transactions on Infor-
mation Theory 48(9), 2558–2567.

Erdos, P. and Renyi, A. (1961), On a classical problem of probability theory,
Magyar Tud. Akad. Mat. Kutat Int. Kzl. 6, 215–220. (English and Russian
summary).

320

BIBLIOGRAPHY

Erhan, D., Bengio, Y., Courville, A., Manzagol, P.-A., Vincent, P. and Ben-
gio, S. (2010), Why does unsupervised pre-training help deep learning?,
Journal of Machine Learning Research 11, 625–660.

Fan, J. and Li, R. (2001), Variable selection via nonconcave penalized likeli-
hood and its oracle properties, Journal of the American Statistical Asso-
ciation 96(456), 1348–1360.

Fazel, M. (2002), Matrix Rank Minimization with Applications, PhD thesis,
Stanford. Available online: http://faculty.washington.edu/mfazel/thesis-
ﬁnal.pdf.

Feuer, A. and Nemirovski, A. (2003), On sparse representation in pairs of
bases, IEEE Transactions on Information Theory 49(6), 1579–1581.

Field, D. (1987), Relations between the statistics of natural images and the
response properties of cortical cells, Journal of the Optical Society of
America A4, 2379–2394.

Fisher, M. E. (1966), On the Dimer solution of planar Ising models, Journal

of Mathematical Physics 7, 1776–1781.

Fithian, W., Sun, D. and Taylor, J. (2014), Optimal inference after model

selection, ArXiv e-prints .

Friedman, J., Hastie, T., Hoeﬂing, H. and Tibshirani, R. (2007), Pathwise
coordinate optimization, Annals of Applied Statistics 1(2), 302–332.

Friedman, J., Hastie, T., Simon, N. and Tibshirani, R. (2015), glmnet: Lasso
and elastic-net regularized generalized linear models. R package version
2.0.

Friedman, J., Hastie, T. and Tibshirani, R. (2008), Sparse inverse covariance

estimation with the graphical Lasso, Biostatistics 9, 432–441.

Friedman, J., Hastie, T. and Tibshirani, R. (2010a), Applications of the Lasso
and grouped Lasso to the estimation of sparse graphical models, Technical
report, Stanford University, Statistics Department.

Friedman, J., Hastie, T. and Tibshirani, R. (2010b), Regularization paths for
generalized linear models via coordinate descent, Journal of Statistical
Software 33(1), 1–22.

Fu, W. (1998), Penalized regressions: the bridge vresus the lasso, Journal of

Computational and Graphical Statistics 7(3), 397–416.

Fuchs, J. (2000), On the application of the global matched ﬁlter to doa es-
timation with uniform circular arrays, in Proceedings of the Acoustics,
Speech, and Signal Processing, 2000. on IEEE International Conference
- Volume 05, ICASSP ’00, IEEE Computer Society, Washington, DC,
USA, pp. 3089–3092.

Fuchs, J. (2004), Recovery of exact sparse representations in the presence
of noise, in International Conference on Acoustics, Speech, and Signal
Processing, Vol. 2, pp. 533–536.

321

Gannaz, I. (2007), Robust estimation and wavelet thresholding in partially

linear models, Statistics and Computing 17(4), 293–310.

Gao, H. and Bruce, A. (1997), Waveshrink with ﬁrm shrinkage, Statistica

Sinica 7, 855–874.

Geman, S. and Geman, D. (1984), Stochastic relaxation, Gibbs distributions,
and the Bayesian restoration of images, IEEE Transactions on Pattern
Analysis and Machine Intelligence 6, 721–741.

Golub, G. and Loan, C. V. (1996), Matrix Computations, Johns Hopkins Uni-

versity Press, Baltimore.

Gorski, J., Pfeuﬀer, F. and Klamroth, K. (2007), Biconvex sets and opti-
mization with biconvex functions: a survey and extensions, Mathematical
Methods of Operations Research 66(3), 373–407.

Gramacy, R. (2011), ‘The monomvn package: Estimation for multivariate nor-
mal and student-t data with monotone missingness’, CRAN. R package
version 1.8.

Grazier G’Sell, M., Taylor, J. and Tibshirani, R. (2013), Adaptive testing for

the graphical Lasso. arXiv: 1307.4765.

Grazier G’Sell, M., Wager, S., Chouldechova, A. and Tibshirani, R. (2015),
Sequential selection procedures and false discovery rate control. arXiv:
1309.5352: To appear, Journal of the Royal Statistical Society Series B.

Greenshtein, E. and Ritov, Y. (2004), Persistency in high dimensional lin-
ear predictor-selection and the virtue of over-parametrization, Bernoulli
10, 971–988.

Greig, D. M., Porteous, B. T. and Seheuly, A. H. (1989), Exact maximum a
posteriori estimation for binary images, Journal of the Royal Statistical
Society Series B 51, 271–279.

Grimmett, G. R. (1973), A theorem about random ﬁelds, Bulletin of the Lon-

don Mathematical Society 5, 81–84.

Gross, D. (2011), Recovering low-rank matrices from few coeﬃcients in any
basis, IEEE Transactions on Information Theory 57(3), 1548–1566.

Gu, C. (2002), Smoothing Spline ANOVA Models, Springer Series in Statistics,

Springer, New York, NY.

Hammersley, J. M. and Cliﬀord, P. (1971), Markov ﬁelds on ﬁnite graphs and

lattices. Unpublished.

Hastie, T., Buja, A. and Tibshirani, R. (1995), Penalized discriminant analy-

sis, Annals of Statistics 23, 73–102.

Hastie, T. and Mazumder, R. (2013), softImpute: matrix completion via iter-

ative soft-thresholded SVD. R package version 1.0.
URL: http://CRAN.R-project.org/package=softImpute

Hastie, T. and Tibshirani, R. (1990), Generalized Additive Models, Chapman

& Hall, London.

322

BIBLIOGRAPHY

Hastie, T. and Tibshirani, R. (2004), Eﬃcient quadratic regularization for

expression arrays, Biostatistics, 5, 329–340.

Hastie, T., Tibshirani, R. and Buja, A. (1994), Flexible discriminant analy-
sis by optimal scoring, Journal of the American Statistical Association
89, 1255–1270.

Hastie, T., Tibshirani, R. and Friedman, J. (2009), The Elements of Statistical
Learning: Data Mining, Inference and Prediction, second edn, Springer
Verlag, New York.

Hastie, T., Tibshirani, R., Narasimhan, B. and Chu, G. (2003), pamr: Predic-

tion Analysis for Microarrays in R. R package version 1.54.1.
URL: http://CRAN.R-project.org/package=pamr

Hocking, T., Vert, J.-P., Bach, F. and Joulin, A. (2011), Clusterpath: an al-
gorithm for clustering using convex fusion penalties., in L. Getoor and
T. Scheﬀer, eds, Proceedings of the Twenty-Eighth International Confer-
ence on Machine Learning (ICML), Omnipress, pp. 745–752.

Hoeﬂing, H. (2010), A path algorithm for the fused Lasso signal approximator,
Journal of Computational and Graphical Statistics 19(4), 984–1006.

Hoeﬂing, H. and Tibshirani, R. (2009), Estimation of sparse binary pairwise
Markov networks using pseudo-likelihoods, Journal of Machine Learning
Research 19, 883–906.

Horn, R. A. and Johnson, C. R. (1985), Matrix Analysis, Cambridge University

Press, Cambridge.

Hsu, D., Kakade, S. M. and Zhang, T. (2011), Robust matrix decomposi-
tion with sparse corruptions, IEEE Transactions on Information Theory
57(11), 7221–7234.

Huang, J., Ma, S. and Zhang, C.-H. (2008), Adaptive Lasso for sparse high-

dimensional regression models, Statistica Sinica 18, 1603–1618.

Huang, J. and Zhang, T. (2010), The beneﬁt of group sparsity, The Annals of

Statistics 38(4), 1978–2004.

Hunter, D. R. and Lange, K. (2004), A tutorial on MM algorithms, The Amer-

ican Statistician 58(1), 30–37.

Ising, E. (1925), Beitrag zur theorie der ferromagnetismus, Zeitschrift f¨ur

Physik 31(1), 253–258.

Jacob, L., Obozinski, G. and Vert, J.-P. (2009), Group Lasso with overlap
and graph Lasso, in Proceeding of the 26th International Conference on
Machine Learning, Montreal, Canada.

Jalali, A., Ravikumar, P., Sanghavi, S. and Ruan, C. (2010), A dirty model
for multi-task learning, in Advances in Neural Information Processing
Systems 23, pp. 964–972.

Javanmard, A. and Montanari, A. (2013), Hypothesis testing in high-
dimensional regression under the Gaussian random design model: Asymp-

323

totic theory. arXiv: 1301.4240.

Javanmard, A. and Montanari, A. (2014), Conﬁdence intervals and hypothe-
sis testing for high-dimensional regression, Journal of Machine Learning
Research 15, 2869–2909.

Jerrum, M. and Sinclair, A. (1993), Polynomial-time approximation algo-
rithms for the Ising model, SIAM Journal of Computing 22, 1087–1116.

Jerrum, M. and Sinclair, A. (1996), The Markov chain Monte Carlo method:
An approach to approximate counting and integration, in D. Hochbaum,
ed., Approximation algorithms for NP-hard problems, PWS Publishing,
Boston.

Johnson, N. (2013), A dynamic programming algorithm for the fused Lasso
and ‘0-segmentation, Journal of Computational and Graphical Statistics
22(2), 246–260.

Johnson, W. B. and Lindenstrauss, J. (1984), Extensions of Lipschitz map-
pings into a Hilbert space, Contemporary Mathematics 26, 189–206.

Johnstone, I. (2001), On the distribution of the largest eigenvalue in principal

components analysis, Annals of Statistics 29(2), 295–327.

Johnstone, I. and Lu, A. (2009), On consistency and sparsity for principal
components analysis in high dimensions, Journal of the American Statis-
tical Association 104, 682–693.

Jolliﬀe, I. T., Trendaﬁlov, N. T. and Uddin, M. (2003), A modiﬁed principal
component technique based on the Lasso, Journal of Computational and
Graphical Statistics 12, 531–547.

Kaiser, H. (1958), The varimax criterion for analytic rotation in factor anal-

ysis, Psychometrika 23, 187–200.

Kalisch, M. and B¨uhlmann, P. (2007), Estimating high-dimensional directed
acyclic graphs with the PC algorithm, Journal of Machine Learning Re-
search 8, 613–636.

Kastelyn, P. W. (1963), Dimer statistics and phase transitions, Journal of

Mathematical Physics 4, 287–293.

Keshavan, R. H., Montanari, A. and Oh, S. (2010), Matrix completion from
noisy entries, Journal of Machine Learning Research 11, 2057–2078.

Keshavan, R. H., Oh, S. and Montanari, A. (2009), Matrix completion from
a few entries, IEEE Transactions on Information Theory 56(6), 2980–
2998.

Kim, S., Koh, K., Boyd, S. and Gorinevsky, D. (2009), L1 trend ﬁltering,

SIAM Review, problems and techniques section 51(2), 339–360.

Knight, K. and Fu, W. J. (2000), Asymptotics for Lasso-type estimators, An-

nals of Statistics 28, 1356–1378.

Koh, K., Kim, S. and Boyd, S. (2007), An interior-point method for large-scale
‘1-regularized logistic regression, Journal of Machine Learning Research

324

8, 1519–1555.

BIBLIOGRAPHY

Koller, D. and Friedman, N. (2009), Probabilistic Graphical Models, The MIT

Press, Cambridge MA.

Koltchinskii, V., Lounici, K. and Tsybakov, A. (2011), Nuclear-norm penal-
ization and optimal rates for noisy low-rank matrix completion, Annals
of Statistics 39, 2302–2329.

Koltchinskii, V. and Yuan, M. (2008), Sparse recovery in large ensembles of
kernel machines, in Proceedings of the Annual Conference on Learning
Theory (COLT).

Koltchinskii, V. and Yuan, M. (2010), Sparsity in multiple kernel learning,

Annals of Statistics 38, 3660–3695.

Krahmer, F. and Ward, R. (2011), New and improved Johnson-Lindenstrauss
embeddings via the restricted isometry property, SIAM Journal on Math-
ematical Analysis 43(3), 1269–1281.

Lang, K. (1995), Newsweeder: Learning to ﬁlter netnews., in Proceedings of the
Twelfth International Conference on Machine Learning (ICML), pp. 331–
339.

Lange, K. (2004), Optimization, Springer, New York.

Lange, K., Hunter, D. R. and Yang, I. (2000), Optimization transfer using sur-
rogate objective functions (with discussion), Computational and Graphi-
cal Statistics 9, 1–59.

Laurent, M. (2001), Matrix completion problems, in The Encyclopedia of Op-

timization, Kluwer Academic, pp. 221–229.

Lauritzen, S. L. (1996), Graphical Models, Oxford University Press.

Lauritzen, S. L. and Spiegelhalter, D. J. (1988), Local computations with
probabilities on graphical structures and their application to expert sys-
tems (with discussion), Journal of the Royal Statistical Society Series B
50, 155–224.

Le Cun, Y., Boser, B., Denker, J., Henderson, D., Howard, R., Hubbard,
W. and Jackel, L. (1990), Handwritten digit recognition with a back-
propogation network, in D. Touretzky, ed., Advances in Neural Informa-
tion Processing Systems, Vol. 2, Morgan Kaufman, Denver, CO, pp. 386–
404.

Le, Q., Ranzato, M., Monga, R., Devin, M., Chen, K., Corrado, G., Dean, J.
and Ng, A. (2012), Building high-level features using large scale unsu-
pervised learning, in Proceedings of the 29th International Conference on
Machine Learning, Edinburgh, Scotland.

Lee, J. and Hastie, T. (2014), Learning the structure of mixed graphical mod-
els, Journal of Computational and Graphical Statistics . advanced online
access.

Lee, J., Sun, D., Sun, Y. and Taylor, J. (2013), Exact post-selection inference,

325

with application to the Lasso. arXiv:1311.6238.

Lee, J., Sun, Y. and Saunders, M. (2014), Proximal newton-type meth-
ods for minimizing composite functions, SIAM Journal on Optimization
24(3), 1420–1443.

Lee, J., Sun, Y. and Taylor, J. (2013), On model selection consistency of m-
estimators with geometrically decomposable penalties, Technical report,
Stanford University. arxiv1305.7477v4.

Lee, M., Shen, H., Huang, J. and Marron, J. (2010), Biclustering via sparse

singular value decomposition, Biometrics pp. 1086–1095.

Lee, S., Lee, H., Abneel, P. and Ng, A. (2006), Eﬃcient L1 logistic regression,
in Proceedings of the Twenty-First National Conference on Artiﬁcial In-
telligence (AAAI-06).

Lei, J. and Vu, V. Q. (2015), Sparsistency and Agnostic Inference in Sparse

PCA, Ann. Statist. 43(1), 299–322.

Leng, C. (2008), Sparse optimal scoring for multiclass cancer diagnosis and
biomarker detection using microarray data, Computational Biology and
Chemistry 32, 417–425.

Li, L., Huang, W., Gu, I. Y. and Tian, Q. (2004), Statistical modeling of
complex backgrounds for foreground object detection, IEEE Transactions
on Image Processing 13(11), 1459–1472.

Lim, M. and Hastie, T. (2014), Learning interactions via hierarchical group-
Lasso regularization, Journal of Computational and Graphical Statistics
(online access) .

Lin, Y. and Zhang, H. H. (2003), Component selection and smoothing in
smoothing spline analysis of variance models, Technical report, Depart-
ment of Statistics, University of Wisconsin, Madison.

Lockhart, R., Taylor, J., Tibshirani2, R. and Tibshirani, R. (2014), A signiﬁ-
cance test for the Lasso, Annals of Statistics (with discussion) 42(2), 413–
468.

Loftus, J. and Taylor, J. (2014), A signiﬁcance test for forward stepwise model

selection. arXiv:1405.3920.

Lounici, K., Pontil, M., Tsybakov, A. and van de Geer, S. (2009), Taking ad-
vantage of sparsity in multi-task learning, Technical report, ETH Zurich.

Lustig, M., Donoho, D., Santos, J. and Pauly, J. (2008), Compressed sensing

MRI, IEEE Signal Processing Magazine 27, 72–82.

Lykou, A. and Whittaker, J. (2010), Sparse CCA using a Lasso with positiv-
ity constraints, Computational Statistics & Data Analysis 54(12), 3144–
3157.

Ma, S., Xue, L. and Zou, H. (2013), Alternating direction methods for la-
tent variable Gaussian graphical model selection, Neural Computation
25, 2172–2198.

326

BIBLIOGRAPHY

Ma, Z. (2010), Contributions to high-dimensional principal component anal-

ysis, PhD thesis, Department of Statistics, Stanford University.

Ma, Z. (2013), Sparse principal component analysis and iterative thresholding,

Annals of Statistics 41(2), 772–801.

Mahoney, M. W. (2011), Randomized algorithms for matrices and data, Foun-
dations and Trends in Machine Learning in Machine Learning 3(2).

Mangasarian, O. (1999), Arbitrary-norm separating plane., Operations Re-

search Letters 24(1-2), 15–23.

Mazumder, R., Friedman, J. and Hastie, T. (2011), Sparsenet: Coordinate
descent with non-convex penalties, Journal of the American Statistical
Association 106(495), 1125–1138.

Mazumder, R. and Hastie, T. (2012), The Graphical Lasso: New insights and

alternatives, Electronic Journal of Statistics 6, 2125–2149.

Mazumder, R., Hastie, T. and Friedman, J. (2012), sparsenet: Fit sparse linear
regression models via nonconvex optimization. R package version 1.0.
URL: http://CRAN.R-project.org/package=sparsenet

Mazumder, R., Hastie, T. and Tibshirani, R. (2010), Spectral regularization
algorithms for learning large incomplete matrices, Journal of Machine
Learning Research 11, 2287–2322.

McCullagh, P. and Nelder, J. (1989), Generalized Linear Models, Chapman &

Hall, London.

Meier, L., van de Geer, S. and B¨uhlmann, P. (2008), The group Lasso for
logistic regression, Journal of the Royal Statistical Society B 70(1), 53–
71.

Meier, L., van de Geer, S. and B¨uhlmann, P. (2009), High-dimensional additive

modeling, Annals of Statistics 37, 3779–3821.

Meinshausen, N. (2007), Relaxed Lasso, Computational Statistics and Data

Analysis pp. 374–393.

Meinshausen, N. and B¨uhlmann, P. (2006), High-dimensional graphs and vari-
able selection with the Lasso, Annals of Statistics 34, 1436–1462.

Meinshausen, N. and B¨uhlmann, P. (2010), Stability selection, Journal of the

Royal Statistical Society Series B 72(4), 417–473.

M´ezard, M. and Montanari, A. (2008), Information, Physics and Computa-

tion, Oxford University Press, New York, NY.

Negahban, S., Ravikumar, P., Wainwright, M. J. and Yu, B. (2012), A uniﬁed
framework for high-dimensional analysis of M -estimators with decom-
posable regularizers, Statistical Science 27(4), 538–557.

Negahban, S. and Wainwright, M. J. (2011a), Estimation of (near) low-rank
matrices with noise and high-dimensional scaling, Annals of Statistics
39(2), 1069–1097.

Negahban, S. and Wainwright, M. J. (2011b), Simultaneous support recovery

327

in high-dimensional regression: Beneﬁts and perils of ‘1,∞-regularization,
IEEE Transactions on Information Theory 57(6), 3481–3863.

Negahban, S. and Wainwright, M. J. (2012), Restricted strong convexity and
(weighted) matrix completion: Optimal bounds with noise, Journal of
Machine Learning Research 13, 1665–1697.

Nelder, J. and Wedderburn, R. (1972), Generalized linear models, J. Royal

Statist. Soc. B. 135(3), 370–384.

Nemirovski, A. and Yudin, D. B. (1983), Problem Complexity and Method

Eﬃciency in Optimization, John Wiley and Sons, New York.

Nesterov, Y. (2004), Introductory Lectures on Convex Optimization, Kluwer

Academic Publishers, New York.

Nesterov, Y. (2007), Gradient methods for minimizing composite objective
function, Technical Report 76, Center for Operations Research and
Econometrics (CORE), Catholic University of Louvain (UCL).

Netrapalli, P., Jain, P. and Sanghavi, S. (2013), Phase retrieval using alternat-
ing minimization, in Advances in Neural Information Processing Systems
(NIPS Conference Proceedings), pp. 2796–2804.

Obozinski, G., Wainwright, M. J. and Jordan, M. I. (2011), Union support
recovery in high-dimensional multivariate regression, Annals of Statistics
39(1), 1–47.

Oldenburg, D. W., Scheuer, T. and Levy, S. (1983), Recovery of the acoustic
impedance from reﬂection seismograms, Geophysics 48(10), 1318–1337.

Olsen, S. (2002),

‘Amazon blushes over sex link gaﬀe’, CNET News.

http://news.cnet.com/2100-1023-976435.html.

Olshausen, B. and Field, D. (1996), Emergence of simple-cell receptive ﬁeld
properties by learning a sparse code for natural images, Nature 381.

Park, T. and Casella, G. (2008), The Bayesian Lasso, Journal of the American

Statistical Association 103(482), 681–686.

Parkhomenko, E., Tritchler, D. and Beyene, J. (2009), Sparse canonical cor-
relation analysis with application to genomic data integration, Statistical
Applications in Genetics and Molecular Biology 8, 1–34.

Paul, D. and Johnstone, I. (2008), Augmented sparse principal component

analysis for high-dimensional data, Technical report, UC Davis.

Pearl, J. (2000), Causality: Models, Reasoning and Inference, Cambridge Uni-

versity Press.

Pelckmans, K., De Moor, B. and Suykens, J. (2005), Convex clustering shrink-
age, in Workshop on Statistics and Optimization of Clustering (PAS-
CAL), London, UK.

Phardoon, D. and Shawe-Taylor, J. (2009), Sparse canonical correlation anal-

ysis. arXiv:0908.2724v1.

Pilanci, M. and Wainwright, M. J. (2014), Randomized sketches of convex

328

BIBLIOGRAPHY

programs with sharp guarantees, Technical report, UC Berkeley. Full
length version at arXiv:1404.7203; Presented in part at ISIT 2014.

Puig, A., Wiesel, A. and Hero, A. (2009), A multidimensional shrinkage
thresholding operator, in Proceedings of the 15th workshop on Statistical
Signal Processing, SSP’09, IEEE, pp. 113–116.

Raskutti, G., Wainwright, M. J. and Yu, B. (2009), Lower bounds on minimax
rates for nonparametric regression with additive sparsity and smoothness,
in Advances in Neural Information Processing Systems 22, MIT Press,
Cambridge MA., pp. 1563–1570.

Raskutti, G., Wainwright, M. J. and Yu, B. (2010), Restricted eigenvalue
conditions for correlated Gaussian designs, Journal of Machine Learning
Research 11, 2241–2259.

Raskutti, G., Wainwright, M. J. and Yu, B. (2011), Minimax rates of estima-
tion for high-dimensional linear regression over ‘q-balls, IEEE Transac-
tions on Information Theory 57(10), 6976–6994.

Raskutti, G., Wainwright, M. J. and Yu, B. (2012), Minimax-optimal rates
for sparse additive models over kernel classes via convex programming,
Journal of Machine Learning Research 12, 389–427.

Ravikumar, P., Liu, H., Laﬀerty, J. and Wasserman, L. (2009), Sparse additive
models, Journal of the Royal Statistical Society Series B. 71(5), 1009–
1030.

Ravikumar, P., Wainwright, M. J. and Laﬀerty, J. (2010), High-dimensional
ising model selection using ‘1-regularized logistic regression, Annals of
Statistics 38(3), 1287–1319.

Ravikumar, P., Wainwright, M. J., Raskutti, G. and Yu, B. (2011),
High-dimensional covariance estimation by minimizing ‘1-penalized log-
determinant divergence, Electronic Journal of Statistics 5, 935–980.

Recht, B. (2011), A simpler approach to matrix completion, Journal of Ma-

chine Learning Research 12, 3413–3430.

Recht, B., Fazel, M. and Parrilo, P. A. (2010), Guaranteed minimum-rank
solutions of linear matrix equations via nuclear norm minimization, SIAM
Review 52(3), 471–501.

Rennie, J. and Srebro, N. (2005), Fast maximum margin matrix factoriza-
tion for collaborative prediction, in Proceedings of the 22nd International
Conference on Machine Learning, Association for Computing Machinery,
pp. 713–719.

Rish, I. and Grabarnik, G. (2014), Sparse Modeling: Theory, Algorithms, and

Applications, Chapman and Hall/CRC.

Rockafellar, R. T. (1996), Convex Analysis, Princeton University Press.

Rohde, A. and Tsybakov, A. (2011), Estimation of high-dimensional low-rank

matrices, Annals of Statistics 39(2), 887–930.

329

Rosset, S. and Zhu, J. (2007), Adaptable, eﬃcient and robust methods for
regression and classiﬁcation via piecewise linear regularized coeﬃcient
paths, Annals of Statistics 35(3).

Rosset, S., Zhu, J. and Hastie, T. (2004), Boosting as a regularized path
to a maximum margin classiﬁer, Journal of Machine Learning Research
5, 941–973.

Rothman, A. J., Bickel, P. J., Levina, E. and Zhu, J. (2008), Sparse permu-
tation invariant covariance estimation, Electronic Journal of Statistics
2, 494–515.

Rubin, D. (1981), The Bayesian Bootstrap, Annals of Statistics 9, 130–134.

Rudelson, M. and Zhou, S. (2013), Reconstruction from anisotropic random
measurements, IEEE Transactions on Information Theory 59(6), 3434–
3447.

Ruderman, D. (1994), The statistics of natural images, Network: Computation

in Neural Systems 5, 517–548.

Santhanam, N. P. and Wainwright, M. J. (2008), Information-theoretic lim-
its of high-dimensional model selection, in International Symposium on
Information Theory, Toronto, Canada.

Santosa, F. and Symes, W. W. (1986), Linear inversion of band-limited reﬂec-
tion seismograms, SIAM Journal of Scientiﬁc and Statistical Computing
7(4), 1307–1330.

Scheﬀ´e, H. (1953), A method for judging all contrasts in the analysis of vari-

ance, Biometrika 40, 87–104.

Schmidt, M., Niculescu-Mizil, A. and Murphy, K. (2007), Learning graphical
model structure using l1-regularization paths, in AAAI proceedings.
URL: http://www.cs.ubc.ca/ murphyk/Papers/aaai07.pdf

Shalev-Shwartz, S., Singer, Y. and Srebro, N. (2007), Pegasos: Primal esti-
mated sub-gradient solver for SVM, in Proceedings of the 24th interna-
tional conference on Machine learning, pp. 807–814.

She, Y. and Owen, A. B. (2011), Outlier detection using nonconvex pe-
the American Statistical Association

nalized regression, Journal of
106(494), 626–639.

Simon, N., Friedman, J., Hastie, T. and Tibshirani, R. (2011), Regulariza-
tion paths for Cox’s proportional hazards model via coordinate descent,
Journal of Statistical Software 39(5), 1–13.

Simon, N., Friedman, J., Hastie, T. and Tibshirani, R. (2013), A sparse-group
Lasso, Journal of Computational and Graphical Statistics 22(2), 231–245.

Simon, N. and Tibshirani, R. (2012), Standardization and the group Lasso

penalty, Statistica Sinica 22, 983–1001.

Simoncelli, E. P. (2005), Statistical modeling of photographic images,

in
Handbook of Video and Image Processing, 2nd Edition, Academic Press,

330

BIBLIOGRAPHY

Waltham MA, pp. 431–441.

Simoncelli, E. P. and Freeman, W. T. (1995), The steerable pyramid: A ﬂexible
architecture for multi-scale derivative computation, in Int’l Conference
on Image Processing, Vol. III, IEEE Sig Proc Soc., Washington, DC,
pp. 444–447.

Singer, Y. and Dubiner, M. (2011), Entire relaxation path for maximum en-
tropy models, in Proceedings of the Conference on Empirical Methods in
Natural Language Processing (EMNPL 2011), pp. 941–948.

Srebro, N., Alon, N. and Jaakkola, T. (2005), Generalization error bounds
for collaborative prediction with low-rank matrices, Advances in Neural
Information Processing Systems .

Srebro, N. and Jaakkola, T. (2003), Weighted low-rank approximations, in
Twentieth International Conference on Machine Learning, AAAI Press,
pp. 720–727.

Srebro, N., Rennie, J. and Jaakkola, T. (2005), Maximum margin matrix fac-
torization, Advances in Neural Information Processing Systems 17, 1329–
1336.

Stein, C. (1981), Estimation of the mean of a multivariate normal distribution,

Annals of Statistics 9, 1131–1151.

Stone, C. J. (1985), Additive regression and other non-parametric models,

Annals of Statistics 13(2), 689–705.

Taylor, J., Lockhart, R., Tibshirani2, R. and Tibshirani, R. (2014), Post-
selection adaptive inference for least angle regression and the Lasso.
arXiv: 1401.3889; submitted.

Taylor, J., Loftus, J. and Tibshirani2, R. (2013), Tests in adaptive regression

via the Kac-Rice formula. arXiv:1308.3020; submitted.

Thodberg, H. H. and Olafsdottir, H. (2003), Adding curvature to minimum
description length shape models, in British Machine Vision Conference
(BMVC), pp. 251–260.

Thomas, G. S. (1990), The Rating Guide to Life in America’s Small Cities,
http://college.cengage.com/mathematics/

Prometheus books.
brase/understandable_statistics/7e/students/datasets/mlr/
frames/frame.html.

Tibshirani, R. (1996), Regression shrinkage and selection via the Lasso, Jour-

nal of the Royal Statistical Society, Series B 58, 267–288.

Tibshirani, R., Bien, J., Friedman, J., Hastie, T., Simon, N., Taylor, J. and
Tibshirani2, R. (2012), Strong rules for discarding predictors in Lasso-
type problems, Journal of the Royal Statistical Society Series B. pp. 245–
266.

Tibshirani, R. and Efron, B. (2002), Pre-validation and inference in microar-
rays, Statistical Applications in Genetics and Molecular Biology pp. 1–15.

331

Tibshirani, R., Hastie, T., Narasimhan, B. and Chu, G. (2001), Diagnosis of
multiple cancer types by shrunken centroids of gene expression, Proceed-
ings of the National Academy of Sciences 99, 6567–6572.

Tibshirani, R., Hastie, T., Narasimhan, B. and Chu, G. (2003), Class predic-
tion by nearest shrunken centroids, with applications to DNA microar-
rays, Statistical Science pp. 104–117.

Tibshirani, R., Saunders, M., Rosset, S., Zhu, J. and Knight, K. (2005), Spar-
sity and smoothness via the fused Lasso, Journal of the Royal Statistical
Society, Series B 67, 91–108.

Tibshirani2, R. (2013), The Lasso problem and uniqueness, Electronic Journal

of Statistics 7, 1456–1490.

Tibshirani2, R. (2014), Adaptive piecewise polynomial estimation via trend

ﬁltering, Annals of Statistics 42(1), 285–323.

Tibshirani2, R., Hoeﬂing, H. and Tibshirani, R. (2011), Nearly-isotonic re-

gression, Technometrics 53(1), 54–61.

Tibshirani2, R. and Taylor, J. (2011), The solution path of the generalized

Lasso, Annals of Statistics 39(3), 1335–1371.

Tibshirani2, R. and Taylor, J. (2012), Degrees of freedom in Lasso problems,

Annals of Statistics 40(2), 1198–1232.

Trendaﬁlov, N. T. and Jolliﬀe, I. T. (2007), DALASS: Variable selection in
discriminant analysis via the LASSO, Computational Statistics and Data
Analysis 51, 3718–3736.

Tropp, J. A. (2006), Just relax: Convex programming methods for identify-
ing sparse signals in noise, IEEE Transactions on Information Theory
52(3), 1030–1051.

Tseng, P. (1988), Coordinate ascent for maximizing nondiﬀerentiable concave
functions, Technical Report LIDS-P ; 1840, Massachusetts Institute of
Technology. Laboratory for Information and Decision Systems.

Tseng, P. (1993), Dual coordinate ascent methods for non-strictly convex min-

imization, Mathematical Programming 59, 231–247.

Tseng, P. (2001), Convergence of block coordinate descent method for nondif-
ferentiable maximization, Journal of Optimization Theory and Applica-
tions 109(3), 474–494.

van de Geer, S. (2000), Empirical Processes in M-Estimation, Cambridge Uni-

versity Press.

van de Geer, S. and B¨uhlmann, P. (2009), On the conditions used to prove
oracle results for the Lasso, Electronic Journal of Statistics 3, 1360–1392.

van de Geer, S., B¨uhlmann, P., Ritov, Y. and Dezeure, R. (2013), On asymp-
totically optimal conﬁdence regions and tests for high-dimensional mod-
els. arXiv: 1303.0518v2.

van Houwelingen, H. C., Bruinsma, T., Hart, A. A. M., van’t Veer, L. J. and

332

BIBLIOGRAPHY

Wessels, L. F. A. (2006), Cross-validated Cox regression on microarray
gene expression data, Statistics in Medicine 45, 3201–3216.

Vandenberghe, L., Boyd, S. and Wu, S. (1998), Determinant maximization
with linear matrix inequality constraints, SIAM Journal on Matrix Anal-
ysis and Applications 19, 499–533.

Vapnik, V. (1996), The Nature of Statistical Learning Theory, Springer, New

York.

Vempala, S. (2004), The Random Projection Method, Discrete Mathemat-
ics and Theoretical Computer Science, American Mathematical Society,
Providence, RI.

Vershynin, R. (2012), Introduction to the non-asymptotic analysis of random
matrices, in Compressed Sensing: Theory and Applications, Cambridge
University Press.

Vu, V. Q., Cho, J., Lei, J. and Rohe, K. (2013), Fantope projection and
selection: A near-optimal convex relaxation of sparse PCA, in Advances in
Neural Information Processing Systems (NIPS Conference Proceedings),
pp. 2670–2678.

Vu, V. Q. and Lei, J. (2012), Minimax rates of estimation for sparse PCA
in high dimensions, in 15th Annual Conference on Artiﬁcial Intelligence
and Statistics, La Palma, Canary Islands.

Waaijenborg, S., Vers´elewel de Witt Hamer, P. and Zwinderman, A. (2008),
Quantifying the association between gene expressions and DNA-markers
by penalized canonical correlation analysis, Statistical Applications in
Genetics and Molecular Biology 7, Article 3.

Wahba, G. (1990), Spline Models for Observational Data, SIAM, Philadelphia,

PA.

Wainwright, M. J. (2009), Sharp thresholds for noisy and high-dimensional
recovery of sparsity using ‘1-constrained quadratic programming (Lasso),
IEEE Transactions on Information Theory pp. 2183–2202.

Wainwright, M. J. and Jordan, M. I. (2008), Graphical models, exponential
families and variational inference, Foundations and Trends in Machine
Learning 1(1–2), 1–305.

Wainwright, M. J., Simoncelli, E. P. and Willsky, A. S. (2001), Random cas-
cades on wavelet trees and their use in modeling and analyzing natural
images, Applied Computational and Harmonic Analysis 11, 89–123.

Wang, H. (2014), Coordinate descent algorithm for covariance graphical Lasso,

Statistics and Computing 24(4), 521–529.

Wang, J., Lin, B., Gong, P., Wonka, P. and Ye, J. (2013), Lasso screening
rules via dual polytope projection, in Advances in Neural Information
Processing Systems (NIPS Conference Proceedings), pp. 1070–1078.

Wang, L., Zhu, J. and Zou, H. (2006), The doubly regularized support vector

333

machine, Statistica Sinica 16(2), 589.

Wang, W., Liang, Y. and Xing, E. P. (2013), Block regularized Lasso for
multivariate multiresponse linear regression, in Proceedings of the 16th
International Conference on Artiﬁcal Intelligence and Statistics, Scotts-
dale, AZ.

Welsh, D. J. A. (1993), Complexity: Knots, Colourings, and Counting, LMS

Lecture Note Series, Cambridge University Press, Cambridge.

Whittaker, J. (1990), Graphical Models in Applied Multivariate Statistics, Wi-

ley, Chichester.

Winkler, G. (1995), Image Analysis, Random Fields, and Dynamic Monte

Carlo methods, Springer-Verlag, New York, NY.

Witten, D. (2011), penalizedLDA: Penalized classiﬁcation using Fisher’s linear

discriminant. R package version 1.0.
URL: http://CRAN.R-project.org/package=penalizedLDA

Witten, D., Friedman, J. and Simon, N. (2011), New insights and faster com-
putations for the graphical Lasso, Journal of Computational and Graph-
ical Statistics 20, 892–200.

Witten, D. and Tibshirani, R. (2009), Extensions of sparse canonical correla-
tion analysis, with application to genomic data, Statistical Applications
in Genetics and Molecular Biology 8(1), Article 28.

Witten, D. and Tibshirani, R. (2010), A framework for feature selec-
the American Statistical Association

tion in clustering, Journal of
105(490), 713–726.

Witten, D. and Tibshirani, R. (2011), Penalized classiﬁcation using Fisher’s
linear discriminant, Journal of the Royal Statistical Society Series B
73(5), 753–772.

Witten, D., Tibshirani, R. and Hastie, T. (2009), A penalized matrix decom-
position, with applications to sparse principal components and canonical
correlation analysis, Biometrika 10, 515–534.

Wu, T., Chen, Y. F., Hastie, T., Sobel, E. and Lange, K. (2009), Genomewide
association analysis by Lasso penalized logistic regression, Bioinformatics
25(6), 714–721.

Wu, T. and Lange, K. (2007), The MM alternative to EM. unpublished.

Wu, T. and Lange, K. (2008), Coordinate descent procedures for Lasso penal-

ized regression, Annals of Applied Statistics 2(1), 224–244.

Xu, H., Caramanis, C. and Mannor, S. (2010), Robust regression and Lasso,

IEEE Transactions on Information Theory 56(7), 3561–3574.

Xu, H., Caramanis, C. and Sanghavi, S. (2012), Robust PCA via outlier pur-
suit, IEEE Transactions on Information Theory 58(5), 3047–3064.

Yi, X., Caramanis, C. and Sanghavi, S. (2014), Alternating minimization for
mixed linear regression, in Proceedings of The 31st International Confer-

334

BIBLIOGRAPHY

ence on Machine Learning, pp. 613–621.

Yuan, M., Ekici, A., Lu, Z. and Monteiro, R. (2007), Dimension reduction
and coeﬃcient estimation in multivariate linear regression, Journal of
the Royal Statistical Society Series B 69(3), 329–346.

Yuan, M. and Lin, Y. (2006), Model selection and estimation in regression
with grouped variables, Journal of the Royal Statistical Society, Series B
68(1), 49–67.

Yuan, M. and Lin, Y. (2007a), Model selection and estimation in the Gaussian

graphical model, Biometrika 94(1), 19–35.

Yuan, M. and Lin, Y. (2007b), On the non-negative garrotte estimator, Journal

of the Royal Statistical Society, Series B 69(2), 143–161.

Yuan, X. T. and Zhang, T. (2013), Truncated power method for sparse eigen-
value problems, Journal of Machine Learning Research 14, 899–925.

Zhang, C.-H. (2010), Nearly unbiased variable selection under minimax con-

cave penalty, Annals of Statistics 38(2), 894–942.

Zhang, C.-H. and Zhang, S. (2014), Conﬁdence intervals for low-dimensional
parameters with high-dimensional data, Journal of the Royal Statistical
Society Series B 76(1), 217–242.

Zhang, Y., Wainwright, M. J. and Jordan, M. I. (2014), Lower bounds on the
performance of polynomial-time algorithms for sparse linear regression,
in Proceedings of the Annual Conference on Learning Theory (COLT),
Barcelona, Spain. Full length version at http://arxiv.org/abs/1402.1918.

Zhao, P., Rocha, G. and Yu, B. (2009), Grouped and hierarchical model
selection through composite absolute penalties, Annals of Statistics
37(6A), 3468–3497.

Zhao, P. and Yu, B. (2006), On model selection consistency of Lasso, Journal

of Machine Learning Research 7, 2541–2567.

Zhao, Y., Levina, E. and Zhu, J. (2011), Community extraction for social net-
works, Proceedings of the National Academy of Sciences 108(18), 7321–
7326.

Zhou, S., Laﬀerty, J. and Wasserman, L. (2008), Time-varying undirected
graphs, in Proceedings of the Annual Conference on Learning Theory
(COLT), Helsinki, Finland.

Zhu, J., Rosset, S., Hastie, T. and Tibshirani, R. (2004), 1-norm support
vector machines, in Advances in Neural Information Processing Systems,
Vol. 16, pp. 49–56.

Zou, H. (2006), The adaptive Lasso and its oracle properties, Journal of the

American Statistical Association 101, 1418–1429.

Zou, H. and Hastie, T. (2005), Regularization and variable selection via the
elastic net, Journal of the Royal Statistical Society Series B. 67(2), 301–
320.

335

Zou, H., Hastie, T. and Tibshirani, R. (2006), Sparse principal component
analysis, Journal of Computational and Graphical Statistics 15(2), 265–
286.

Zou, H., Hastie, T. and Tibshirani, R. (2007), On the degrees of freedom of

the Lasso, Annals of Statistics 35(5), 2173–2192.

Zou, H. and Li, R. (2008), One-step sparse estimates in nonconcave penalized

likelihood models, The Annals of Statistics 36(4), 1509–1533.

Author Index

Abneel, P. 116
Agarwal, A. 176, 195
Alizadeh, A. 42
Alliney, S. 23
Alon, N. 195
Amini, A. A. 213, 232
Anandkumar, A. 195
Anderson, T. 261
Antoniadis, A. 27
Armitage, K. 42

Bach, F. 87, 195, 233
Banerjee, O. 248, 249, 262
Baraniuk, R. G. 285
Barlow, R. E. 83
Bartholomew, D. 83
Beck, A. 108
Bengio, S. 212
Bengio, Y. 212
Benjamini, Y. 162
Bennett, J. 170
Bento, J. 263
Berk, R. 160, 162
Berthet, Q. 232
Bertsekas, D. 131, 133
Besag, J. 261, 263
Beyene, J. 233
Bickel, P. J. 262, 263, 311
Bien, J. 68, 128, 130, 263
Birnbaum, A. 213, 232
Boldrick, J. 42
Boser, B. 37, 52
Botstein, D. 42
Boyd, S. 32, 35, 81, 121, 131, 206,

248, 262, 263

Breiman, L. 20, 23, 225
Bremner, J. M. 83
Brown, L. 160, 162
Brown, P. 42
Bruce, A. 87
Bruckstein, A. M. 285
Bruinsma, T. 43
Brunk, H. D. 83
B¨uhlmann, P. 142, 250, 263, 311
Buja, A. 160, 162, 218, 222, 225
Bunea, F. 186, 311
Burge, C. 60
Butte, A. 263
Byrd, J. 42

Cand`es, E. 311
Caramanis, C. 26, 195, 312
Casella, G. 139, 161
Chan, W. 42
Chandrasekaran, V. 195, 260, 261,

312

Chaudhuri, S. 263
Chen, K. 211, 233
Chen, S. 23, 285
Chen, Y. F. 52
Cheng, J. 263
Chi, E. C. 232
Cho, J. 210
Choi, Y. 161
Chouldechova, A. 161, 163
Chu, E. 121
Chu, G. 219, 233
Clemmensen, L. 225, 226, 233, 239
Cliﬀord, P. 261
Cohen, A. 285

337

338

Corrado, G. 211, 233
Courville, A. 212
Cox, D. 261

Dahmen, W. 285
d’Aspremont, A. 205, 206, 210, 232,

248, 249, 262

Davenport, M. A. 285
Davidson, K. R. 285
Davis, R. E. 42
De Leeuw, J. 127
De Moor, B. 233
Dean, J. 211, 233
Denker, J. 37
Devin, M. 211, 233
DeVore, R. A. 285
Dezeure, R. 158, 159, 162
Dobra, A. 262
Donoho, D. 23, 278, 285, 296
Drton, M. 263
Dubiner, M. 40
Dudoit, S. 233

Eckstein, J. 121
Edwards, D. 261
Efron, B. 45, 52, 142, 146, 147, 161
Eisen, M. 42
Ekici, A. 186
El Ghaoui, L. 131, 205, 206, 210,

232, 248, 249, 262

El Karoui, N. 263
Elad, M. 285
Erdos, P. 177
Erhan, D. 212
Ersboll, B. 225, 226, 233, 239

Fan, J. 84
Fazel, M. 174, 195
Feuer, A. 285
Field, D. 211, 233, 285
Fisher, M. E. 261
Fithian, W. 161
Freeman, W. T. 285
Fridlyand, J. 233
Friedman, J. 24, 36, 37, 43, 46, 48,

AUTHOR INDEX

130, 184, 217, 221, 225, 227, 230,
248–251, 255, 262, 263

Friedman, N. 261
Fu, W. J. 311
Fuchs, J. 23, 311

Gannaz, I. 27
Gao, H. 87
Geman, D. 262
Geman, S. 262
Golub, G. 127, 169
Golub, T. 263
Gong, P. 127, 131, 132
Gorinevsky, D. 81
Gorski, J. 131
Grabarnik, G. 23
Gramacy, R. 141
Grazier G’Sell, M. 161, 163
Greenshtein, E. 20, 311
Greig, D. M. 262
Greiner, T. 42
Greve, M. 42
Grimmett, G. R. 261
Gross, D. 178, 195
Gu, C. 87
Gu, I. Y. 192
Guyon, I. 52

Hammersley, J. M. 261
Hans, C. 262
Hart, A. A. M. 43
Hastie, T. 18, 19, 24, 34, 36, 37, 43,
46–50, 52, 56, 58, 67, 69, 71, 77,
79, 86, 87, 113, 128, 130, 170, 175,
176, 182, 184, 195, 206, 208,
217–219, 221, 222, 225–228, 230,
232, 233, 239, 248–251, 255,
260–263, 266
Henderson, D. 37
Hero, A. 87
Hochberg, Y. 162
Hocking, T. 233
Hoeﬂing, H. 52, 77, 79, 83, 87, 257,

260, 263

50, 52, 58, 77, 79, 86, 87, 113, 128,

Horn, R. A. 265

Howard, R. 37
Hsu, D. 195
Huang, J. 86, 190
Huang, W. 192
Hubbard, W. 37
Hudsom, J. 42
Hunter, D. R. 124, 131, 233
Huo, X. 285

Ihaka, R. 225
Ising, E. 244, 262

Jaakkola, T. 195
Jackel, L. 37
Jacob, L. 66, 67, 87
Jain, P. 195
Jalali, A. 312
Javanmard, A. 158, 159, 162
Jenatton, R. 87
Jerrum, M. 261
Johnson, C. R. 265
Johnson, N. 81, 87
Johnson, W. B. 285
Johnstone, I. 23, 204, 212, 213, 232
Jolliﬀe, I. T. 204, 232, 233
Jones, B. 262
Jordan, M. I. 86, 205, 206, 210, 232,

261, 311, 312

Joulin, A. 233

Kaiser, H. 236
Kakade, S. M. 195
Kalisch, M. 263
Karlin, S. 60
Kastelyn, P. W. 261
Keshavan, R. H. 178, 180, 182, 183,

195

Kim, S. 32, 35, 81, 263
Klamroth, K. 131
Knight, K. 87, 311
Koh, K. 32, 35, 81, 263
Kohane, I. 263
Koller, D. 261
Koltchinskii, V. 87, 180
Krahmer, F. 285

339

Laﬀerty, J. 70, 87, 90, 263
Lanckriet, G. R. G. 205, 206, 210,

232

Lang, K. 32
Lange, K. 52, 124, 131, 232, 233
Lanning, S. 170
Laurent, M. 169
Lauritzen, S. L. 261
Le Cun, Y. 37
Le, Q. 211, 233
Lee, H. 116
Lee, J. 35, 116, 151, 154, 161, 260,

263, 312
Lee, M. 190
Lee, S. 116
Lei, J. 210, 213, 232
Leng, C. 225, 233
Levina, E. 262, 263
Levy, R. 42
Levy, S. 23
Lewis, D. 42
Li, L. 192
Li, R. 84, 87
Li, X. 195
Liang, Y. 312
Lim, M. 67
Lin, B. 127, 131, 132
Lin, Y. 20, 21, 59, 63, 72–74, 86, 87,

262

Lindenstrauss, J. 285
Liu, H. 70, 87, 90
Loan, C. V. 127, 169
Lockhart, R. 151, 156, 157, 161
Loftus, J. 161
Lossos, I. 42
Lounici, K. 86, 180
Lu, A. 212, 213, 232
Lu, L. 42
Lu, Z. 186
Lustig, M. 285
Lykou, A. 233

Ma, C. 42
Ma, S. 86, 261, 266
Ma, Y. 195

340

AUTHOR INDEX

Ma, Z. 195, 213, 232
Mahoney, M. W. 285
Mairal, J. 87
Mangasarian, O. 50
Mannor, S. 26
Manzagol, P.-A. 212
Marron, J. 190
Marti, G. 42
Mazumder, R. 86, 87, 170, 175, 176,
182, 195, 249, 251, 261, 262, 266

McCullagh, P. 30, 52
Meier, L. 60, 86, 87
Meinshausen, N. 12, 142, 250, 263,

311

M´ezard, M. 261
Monga, R. 211, 233
Montanari, A. 158, 159, 162, 178,
180, 182, 183, 195, 261, 263

Monteiro, R. 186
Moore, T. 42
Murphy, K. 262

Nadler, B. 213, 232
Narasimhan, B. 219, 233
Negahban, S. 86, 176, 179, 186, 195,

311, 312

Nelder, J. 30, 52
Nemirovski, A. 176, 285
Nesterov, Y. 105, 107, 108, 131
Netrapalli, P. 195
Nevins, J. R. 262
Ng, A. 116, 211, 233
Niculescu-Mizil, A. 262

Obozinski, G. 66, 67, 86, 87, 312
Oh, S. 178, 180, 182, 183, 195
Olafsdottir, H. 226
Oldenburg, D. W. 23
Olsen, S. 193
Olshausen, B. 211, 233
Owen, A. B. 27

Paul, D. 213, 232
Pauly, J. 285
Pearl, J. 261
Pelckmans, K. 233
Peleato, B. 121
Pfeuﬀer, F. 131
Phardoon, D. 233
Pilanci, M. 285
Plan, Y. 195
Pontil, M. 86
Porteous, B. T. 262
Puig, A. 87
Pwellm, J. 42

Rabbani, T. 131
Ranzato, M. 211, 233
Raskutti, G. 75, 87, 252, 262, 311,

312

Ravikumar, P. 70, 86, 87, 90, 252,

262, 263, 311, 312

Recht, B. 178, 195
Rennie, J. 181, 182, 195
Renyi, A. 177
Richardson, T. S. 263
Rigollet, P. 232
Rish, I. 23
Ritov, Y. 20, 158, 159, 162, 311
Rocha, G. 86
Rockafellar, R. T. 131
Rohde, A. 186, 195
Rohe, K. 210
Romberg, J. K. 285
Rosenwal, A. 42
Rosset, S. 19, 47, 49, 87, 121
Rothman, A. J. 262
Ruan, C. 312
Rubin, D. 146, 161
Rudelson, M. 311
Ruderman, D. 285
Ruzinsky, S. 23

Parikh, N. 121
Park, T. 139, 161
Parkhomenko, E. 233
Parrilo, P. A. 195, 260, 261, 312

Sabet, H. 42
Sanghavi, S. 195, 261, 312
Santhanam, N. P. 263
Santos, J. 285

Santosa, F. 23
Saunders, M. 23, 35, 87, 116, 285
Scheﬀ´e, H. 160
Scheuer, T. 23
Schmidt, M. 262
Seheuly, A. H. 262
Shalev-Shwartz, S. 47
Shawe-Taylor, J. 233
She, Y. 27, 186
Shen, H. 190
Sherlock, G. 42
Simon, N. 37, 43, 50, 58, 63, 86, 87,

128, 130, 251, 262
Simoncelli, E. P. 285
Sinclair, A. 261
Singer, Y. 40, 47
Slonim, D. 263
Sobel, E. 52
Speed, T. 233
Spiegelhalter, D. J. 261
Srebro, N. 47, 181, 182, 195
Stark, P. 23, 285
Staudt, L. 42
Stein, C. 25
Stone, C. J. 87
Sun, D. 151, 154, 161
Sun, Y. 35, 116, 151, 154, 161, 312
Suykens, J. 233
Symes, W. W. 23
Szarek, S. J. 285

Tamayo, P. 263
Tandon, R. 195
Tanner, J. 296
Tao, T. 278, 285, 311
Taylor, J. 18, 68, 79–81, 87, 128, 130,

151, 154, 156, 157, 161, 312

Teboulle, M. 108
Thodberg, H. H. 226
Thomas, G. S. 9
Tian, Q. 192
Tibshirani, R. 7, 18, 23, 24, 34, 36,
37, 42, 43, 45–48, 50, 52, 58, 63,
68, 69, 71, 77, 79, 83, 86, 87, 113,
128, 130, 142, 151, 156, 157, 161,

341

163, 170, 175, 176, 182, 184, 195,
206, 208, 217–219, 221, 222, 225,
227, 228, 230, 232, 233, 239,
248–250, 255, 257, 260–263

Tibshirani2, R. 18, 19, 25, 79–83, 87,

128, 130, 151, 156, 157, 161

Tran, T. 42
Trendaﬁlov, N. T. 204, 232, 233
Tritchler, D. 233
Tropp, J. A. 311
Tseng, P. 62, 110, 111
Tsybakov, A. 86, 180, 186, 195, 311

Uddin, M. 204, 232

van de Geer, S. 20, 60, 86, 87, 158,

159, 162, 311

van Houwelingen, H. C. 43
Vandenberghe, L. 131, 206, 248, 262
van’t Veer, L. J. 43
Vapnik, V. 52
Vempala, S. 285
Vers´elewel de Witt Hamer, P. 233
Vershynin, R. 285
Vert, J.-P. 66, 67, 87, 233
Viallon, V. 131
Vincent, P. 212
Vu, V. Q. 210, 213, 232

Waaijenborg, S. 233
Wager, S. 161, 163
Wahba, G. 87
Wainwright, M. J. 75, 86, 87, 176,
179, 186, 195, 213, 232, 252,
261–263, 285, 311, 312

Wakin, M. 4, 285
Wakin, M. B. 285
Wang, H. 263
Wang, J. 127, 131, 132
Wang, L. 47
Wang, W. 312
Ward, R. 285
Wasserman, L. 70, 87, 90, 263
Wedderburn, R. 52
Wegkamp, M. 186, 311
Weisenburger, D. 42

342

Welsh, D. J. A. 261
Wermuth, N. 261
Wessels, L. F. A. 43
West, M. 262
Whittaker, J. 233, 261
Wiesel, A. 87
Willsky, A. S. 195, 260, 261, 285, 312
Wilson, W. 42
Winkler, G. 262
Witten, D. 195, 222, 225, 226, 228,

230, 232, 233, 239, 251, 262

Wonka, P. 127, 131, 132
Wright, J. 195
Wu, S. 248, 262
Wu, T. 52, 124

Xing, E. P. 312
Xu, H. 26, 195
Xue, L. 261, 266

Yang, I. 233
Yao, G. 262
Ye, J. 127, 131, 132

AUTHOR INDEX

Yi, X. 195
Yu, B. 75, 86, 87, 252, 262, 263, 311,

312
Yu, X. 42
Yuan, M. 20, 21, 59, 63, 86, 87, 186,

262

Yuan, X. T. 195, 213, 232
Yudin, D. B. 176

Zhang, C.-H. 84, 86, 158, 162
Zhang, H. H. 72–74, 87
Zhang, K. 160, 162
Zhang, S. 158, 162
Zhang, T. 86, 195, 213, 232
Zhang, Y. 311
Zhao, L. 160, 162
Zhao, P. 86, 263, 311
Zhao, Y. 262
Zhou, S. 263, 311
Zhu, J. 263
Zou, H. 18, 20, 21, 47, 56, 86, 87,

206, 208, 232, 261, 266

Zwinderman, A. 233

Index

ACS, see alternate convex search
Adaptive hypothesis test, 157
Adaptive lasso, 86
Additive

matrix decomposition, 190–194
model, 69–76

ADMM, 121

applied to lasso, 122

Aliased, 60
Alternate convex search, 126
Alternating

algorithm, 205
direction method of multipliers

see ADMM, 121
minimization, 124

partial optimum, 126

regression, 237
subspace algorithm, 126

Analysis of deviance, 33
ANOVA, 68
Applications

20-newsgroups corpus, 32
air pollution, 71
arterial pressure, 271
comparative genomic hybridiza-

tion (CGH), 76

crime, 10
diabetes data, 140, 149, 159
face silhouettes, 226
handwritten digits, 37, 209
helicopter data, 184, 193
image processing, 271
lymphoma, 42, 219
mammal dentition, 232
natural images, 271
Netﬂix challenge, 170, 187, 215
splice-site detection, 60

video denoising, 184
voting, 244, 257

Augmented SPCA algorithm, 213
Autoencoder, 236

sparse, 210, 236

Auxiliary variables, 79
Average linkage, 227

Backﬁtting, 69–72
Base class, 36
Baseline hazard, 43
Basic inequality, 298, 313
Basis functions, 71
Haar, 270
multiscale, 271
orthogonal, 269
overcomplete, 274
Basis pursuit, 23, 276
Bayes

decision boundary, 217
rule, 217
Bayesian, 23

lasso, 139, 144
methods, 22, 139

Bellkor’s Pragmatic Chaos, 172
Benjamini–Hochberg (BH) procedure,

163

Best-additive approximation, 69
Best-subset selection, 22
Bet-on-sparsity principle, 24
Bias term (intercept), 7
Bias-variance tradeoﬀ, 7
Biclustering , 190
Biconvex

function, 124, 189, 207
set, 125
Biconvexity, 124

343

344

Binomial, 29
Binomial log-likelihood, 29
Biological pathway, 60, 64
Block separable, 63
Block-wise coordinate descent, 63, 65
Bonferroni adjustment, 160
Bootstrap, 12

methods, 142–147
nonparametric, 143
parametric, 146

Bottleneck, 211

Canonical correlation analysis, 214,

237
low-rank, 238
sparse, 213–215, 238
via optimal scoring, 237

Canonical variates
sparse, 201

Cardinality constraint, 192
Categorical predictor, 19, 68
Cauchy-Schwarz inequality, 235
CCA, see Canonical correlation anal-

ysis

Chi-squared statistic, 148
Chronic lymphocytic lymphoma, 219
Cinematch score, 173
Clique-based factorization, 243
Clustering, 227
convex, 231
hierarchical , 227
sparse, 201, 227–232

Coeﬃcient paths, 33
Coherence of a matrix, 177
Collaborative ﬁltering, 169
Combinatorial optimization, 22
Compatibility function, 242
Complementary slackness, 98
Complete linkage, 227
Composite gradient, 63
Compressed sensing, 4, 278, 288

‘2-error bound, 296
noisy case, 296

Concentration matrix, 246, 261
Conditional

INDEX

independence, 243
inference, 254
likelihood, 254

Cone constraint

lasso analysis, 294
Constrained lasso, 276, 289

‘2-bound, 295
Constraint region, 12
Contrasts, 60
Convergence rate, 76
Convex

relaxation, 23
clustering, 231
constrained program, 95
function, 95

strongly, 106

matrix approximation, 168
matrix completion

noisy setting, 178

relaxation, 248
relaxation of matrix rank, 174
set, 95
spectral regularization, 173

Convexity, 14
Coordinate descent, 14, 16–17, 35, 40,

109
blockwise, 63
convergence guarantee, 111
failure of, 110
regularity condition, 112

Correlated

features, 55
genes, 60

Corrupted matrix entries, 192
COSSO, 72
Coupon collector problem, 177, 198
Covariance graph, 263
Covariance model

spiked, 212

Covariance test, 147–150

statistic, 149
Covering set, 286
Cox proportional-hazards model, 31,

42–43

INDEX

Cross-validation, 13–14, 34, 43, 142,

144

curve, 144
tenfold, 34

Cubic smoothing spline, 72–74
Cumulative distribution function, 152
Curse of dimensionality, 69
Cut set, 243
Cyclical coordinate descent, 16

Debiased Lasso, 158–160
Debiasing, 12
Decomposable regularizer, 311
Deep learning, 210
Degrees of freedom, 17–19
Deviance, 33, 51
Diﬀuse large B-cell lymphoma, 219
Directed acyclic graphs, 241
Discriminant analysis
Fisher’s, 221
ﬂexible, 222
penalized, 222

Document classiﬁcation, 31, 32
Double exponential distribution, 140
Dual-path algorithm, 79–80
Dummy variables, 58, 60
Dynamic programming, 80–81

Eﬀective degrees of freedom, see de-

grees of freedom

Eﬀective number of parameters, see
degrees of freedom

Eigenvector computation, 127
Elastic net, 51, 55–58

ball, 57
coeﬃcient path, 57

‘1 ball, 57
‘1 exactness, 280–283, 287

equivalent to restricted nullspace,

281

suﬃciency of pairwise incoher-

ence, 282

suﬃciency of RIP, 283

‘1 penalty, 30
‘1-regularized linear SVM, 31, 47

345

‘1-regularized logistic regression, 50
‘q penalty, 22
‘q “ball”, 290, 313

best k-term approximation, 313
weak and strong, 312

‘2 ball, 57
EM algorithm, 124
Equivariant, 36
Expectation-maximization algorithm,
see EM algorithm

Exponential

family, 31, 246
limiting distribution, 149, 150

Factor analysis, 191
False discovery rate, 149
Fantope projection, 210
FDR, see False discovery rate
Feature vector, 7
First-order optimality conditions, 96
Fisher’s

between-to-within variance crite-

rion, 221

linear discriminant analysis, 221

Flexible discriminant analysis, 222
Follicular lymphoma, 219
Forward stepwise
methods, 86
regression, 118, 147, 158

ForwardStop rule, 163
Fraction of deviance explained, 33, 34
Frobenius norm, 167
Fused lasso, 55, 76–81, 189

dual path algorithm, 79–80
dynamic programming, 80–81
signal approximator, 76

Gamma distribution, 141
Garrote, see nonnegative garrote
Gene-expression arrays, 60
General matrix regression framework,

185
General position, 19
Generalization, 13
Generalized linear models, 29–54, 115

346

Generalized penalties, 55–93
Genome-wide association studies, 32
Geometric convergence, 107, 177
Gibbs sampler, 244
glmnet, 33, 35, 50–52
Gradient descent, 100

accelerated, 107
momentum, 108
projected, 102
proximal method, 103, 108
steepest, 101
unconstrained, 101

Gram matrix, 73
Graph clique, 241
maximal, 242

Graphical lasso, 248, 250
asymptotics, 252
Graphical model, 241–267

selection, 241
block-diagonal structure, 251
factorization property, 242–243
Gaussian, 245–246
graph selection, 254–260
hidden variables, 261
Markov property, 243
maximum likelihood, 247
mixed (continuous and discrete),

259

neighborhood-based likelihood,

255–258

pseudo-likelihood, 259–260

Group lasso, 55, 58–68, 260

ball, 64
overlap, 55, 65–68
sparse, 64–65
Grouped response, 37
Groups of variables, 55

Hammersley–Cliﬀord theorem, 261
Hard sparsity, 290
Hard thresholding, 22
Hard-impute, 173

algorithm, 176
Hazard function, 31, 43
Hierarchical clustering, 227

INDEX

sparse, 228

Hierarchy, 67, 68
Hilbert-space norm, 72
Hinge loss, 31
Homotopy methods, 17
Huber loss function, 194
Human DNA, 61
Hyperparameters, 141

Implicit penalty, 66
Incoherence, 178

maximal, 179
Indicator response, 37
Inference for lasso, 154
Inner products, 151
Interaction models, 67–68
IRLS, see iteratively reweighted least-

squares

Irrepresentability, 302
Ising model, 244
Isotonic regression, 83
Iterative Lanczos methods, 176
Iteratively reweighted least-squares,

40

Jensen’s algorithm, 124
Johnson–Lindenstrauss approximation,

277, 286

sparse Boolean vectors, 277

K-means clustering
sparse, 230

Karush–Kuhn–Tucker conditions, 9,

97, 165
Kernel Gram matrix, 75
Kernel trick, 34, 46
KKT conditions, see Karush–Kuhn–
Tucker conditions

Knots, 71, 72, 82
Kullback–Leibler divergence, 41

Lagrange

function, 97
multipliers, 97
optimality conditions, 97

Lagrange dual, 41

INDEX

Lagrangian, 70
duality, 9
form, 9

Lagrangian lasso, 289
‘2-bound, 295
‘2-bound for weak sparsity, 299,

313

‘∞-bounds, 303
fast rate for prediction error, 300
slow rate for prediction error, 300
variable selection guarantee, 302

Lanczos iteration, 176
Laplacian

distribution, 23, 140
prior, 139

Lasso, 7–12

ﬁxed-λ inference, 154
necessary and suﬃcient condi-

tions for solution, 9

uniqueness, 19

Least angle regression, 118–121, 147
Lifted problem, 79
Line search

Armijo rule, 102
limited minimization, 102

Linear

logistic regression, 29
discriminant analysis

sparse, 201, 217–227
via optimal scoring, 225

model, 7–8

Linear convergence, 107
Link function, 29
Linkage measure for clustering, 227
Loading vectors, 204
Local minima, 16
Log-determinant program, 248
Log-linear model, 30, 40–42
Log-odds ratio, see logistic regression
Logistic regression, 29, 31–36, 115,

217

coeﬃcient path, 49
logit, 29
multiclass, 36
with separable data, 49–50

347

Loss

parameter estimation, 290
prediction error, 289
variable selection, 290

Low-rank CCA, 238
Lower bounds, 51

Majorization, 123
Majorization-minimization algorithm,
see MM algorithm

Majorizing function, 123
Margin, 31, 32, 46–48
Markov chain Monte Carlo, 140
Markov property, 241, 243
Matrix Completion
theory, 177

Matrix completion, 167, 169–183

nuclear norm, 174
robust, 193
Matrix decomposition
additive, 190

Matrix decompositions, 167–199
Matrix lasso, 186
Matrix trace, 205
Maximal variance, 202
sparsity, 204

Maximal-margin classiﬁer, 48–49
Maximum entropy, 53
Maximum likelihood, 30
Maximum Margin Matrix Factoriza-

tion, 181

Maximum margin matrix factoriza-

tion, 168

MCMC, see Markov chain Monte

Carlo

MDL, see minimum description length
Mean-squared-error consistency, 20
Metric entropy, 286
Mill’s ratio, 164
Minimax-optimal, 76
Minimum description length, 226
Minorization-majorization algorithm,
see MM algorithm
Minorization-maximization algorithm,

348

INDEX

see MM algorithm, see MM
algorithm

Missing data, 169–183
Mixed models, 259
MM algorithm, 123

lasso, 74

Nonparametric

bootstrap, 146
regression, 69
Nuclear norm, 174

EM as example, 124
proximal gradient as example,

as an SDP, 197
subgradient, 197

124
MMMF, 181

relationship to spectral regular-

ization, 182
Model selection, 8–14
Monotone, 83
fusion, 79
Movie ratings, 170
Multiclass logistic regression, 36–40
Multilevel factors, 60
Multinomial, 30

distribution, 36
grouped lasso, 39–40
regression, 54

Multitask learning, 51, 61, 184
Multivariate

methods, 201–239
regression, 61, 184
Multivariate regression, 194
Mutual incoherence, 302
random designs, 314

Naive Bayes classiﬁer, 218, 239
Nearest shrunken centroids, 218, 239
Nearly-isotonic regression, 83–84
Neighborhood

based likelihood, 254
penalty, 77
set, 254

Nesterov’s method, 107–109, 176, 197
Netﬂix data, 176
Newton’s method, 101, 116
Newton–Raphson algorithm, 101
Node potentials, 259
Noisy subspace’ model, 191
Nonconvex penalties, 84–86
Nonnegative

garrote, 20, 86

Null deviance, 51
Null hypothesis

complete, 157
incremental, 157

Oﬀset, 40, 51
One versus all, 36
One versus one, 36
One-standard-error rule, 13, 144
Optimal scoring, 225, 237
Optimal separating hyperplane, 49
Optimization, 95
Order statistics, 273
Orthogonal

bases, 17
features, 63

OvA, see one versus all
OvO, see one versus one

Pairwise incoherence, 287
Pairwise plots, 144
Pairwise-Markov model, 245
PAM package, 219
Parameter estimation loss, 290
classical linear model, 296

Parametric bootstrap, 146
Partial likelihood, 43
Partial optimum, 126
Partial regression coeﬃcient, 156
Partial residual, 65, 69
Path algorithm, 77, 118–121
Pathwise coordinate descent, 17, 249
PCA, 169

robust, 192

PDW method

see primal dual witness method,

305

Penalized discriminant analysis, 222

INDEX

Penalized Fisher’s discriminant, 239
Penalized matrix decomposition, 187–

190, 201
multifactor, 190

Penalized optimal scoring, 239
Poisson

log-likelihood, 30
model, 40–42

Polyhedral constraint region, 188
Polyhedral lemma, 151, 152
Pool adjacent violators algorithm, 83
PoSI method, 160
Post-selection inference, 147–158
Posterior

distribution, 22, 139, 140
mode, 140

Power method, 127, 190
Precision matrix, 246, 247
Prediction error

computational lower bounds, 300,

312
Prediction loss, 289
Pretraining, 212
Prevalidation, 42, 45
Primal-dual witness method, 305
Principal components, 169, 202–204

higher ranks, 207
nonlinear, 210
robust, 192
sparse, 201, 204–210

Prior distribution, 139
Probabilistic graphical model, 241
Probe set, 173
Procrustes problem, 209
Projection, 71
Prototypes, 231
Proximal gradient descent
momentum, 108
nuclear norm, 105

Proximal gradient method, 103

‘1-norm, 104
as MM algorithm, 124
lasso, 107
Proximal map, 104
Pseudo-likelihood, 254

349

Quadratic program, 14
Qualitative factors, 58
Quantile-quantile plot, 148

Random design matrix

mutual incoherence, 314
restricted eigenvalue, 314

Random matrices, 283, 287
Random projection, 276
Rank-minimization problem, 170
Rank-r SVD, 169
Recommender systems, 169
Reconstruction error, 203, 206, 234
Recovery of matrix entries, 177
Reduced-Rank Regression, 184
Regression, 7

multivariate, 194
reduced rank, 184

Regularization, 8
Relaxed basis pursuit

analysis of, 313
program, 276
Relaxed lasso, 12
Relevance network, 263
Reparametrization, 78
Reproducing-kernel Hilbert space, 72,

73

Resampling, 142
Residual sum of squares, 147
Response variable, 7
Restricted eigenvalues, 294

random designs, 314

Restricted isometry property, 283,

287
Restricted nullspace

implied by pairwise incoherence,

282

implied by RIP, 283, 288
property, 281

Restricted strong convexity, 294, 314
Ridge

penalty, 57
regression, 10, 34
regularized logistic regression, 49

Right censored, 42

350

INDEX

RIP, see restricted isometry property
RKHS, see reproducing kernel Hilbert

Sparse backﬁtting, 70, 73
Sparse canonical correlation analysis,

space

Robust

Huber loss, 194, 198
matrix completion, 193
PCA, 192, 193, 199

Rug plot, 144

Sample splitting, 148
SCoTLASS

criterion, 235
procedure, 204
Screening rules, 35, 127
SDP, see semideﬁnite program, see
semideﬁnite program

Second-order cone, 75
Selection event, 150
Self-inﬂuence, 18
Semideﬁnite program, 174, 205, 206
Separability of penalty, 66, 77, 110
Separable data, 49, 53
Sequential control of FDR, 163
Shrinkage, 149

methods, 22

Signal approximation and compressed

sensing, 269

Single linkage, 227
Singular value decomposition, 169

singular values, 169
singular vector, 126
singular vectors, 169
sparse, 201

Smoothing spline, 71–74
Soft margin, 31
Soft thresholding, 15, 189
operator, 58, 205
Soft-impute, 173, 176, 181

algorithm, 175
Spacing test, 156–157
Sparse additive model, 69–76
Sparse approximation

best k-term, 273, 313
orthogonal bases, 271
overcomplete bases, 274

238

Sparse clustering, 227–232
hierarchical, 228
K-means, 230

Sparse LDA, 222
Sparse matrix approximation, 168
Sparse plus low rank, 191, 261
Sparse principal components
higher ranks, 207
theory, 212
Sparsistency, 20, 301
Sparsity, 12
Spectral regularization, 175
Spiked covariance model, 212
Spikiness ratio, 179
Spline, 72–74
Squared hinge loss, 48
Stability selection, 144
Standardize, 8
Statistical inference, 139–165
Strictly convex, 57
Strong convexity, 106, 292

Fisher information, 293
Hessian-based, 293

Strong duality, 98
Strong rules, 35, 130
Subdiﬀerential, 63, 99
Subgradient, 15, 99, 305
‘1-norm, 100
equations, 62, 64
nuclear norm, 100
Sublinear convergence, 106
Subset selection, 23
Summation constraint, 68, 88
Support recovery, 290
Support set, 47
Support-vector machine, 31, 46–48
Survival

time, 42
curves, 43
models, 31

SVD, see Singular value decomposi-

tion

INDEX

351

SVM, see support-vector machine

Upper bounds, 51

Variable selection, 301

incoherence

irrepresentability condition, 302
loss, 290
mutual
302
Varimax rotation, 236
Vertex set, 241
Video

condition,

denoising, 193
sequences, 194
surveillance data, 193

Warm starts, 36
Wavelets, 17
Weak sparsity, 290, 299, 312
Wide data, 49
Within-class covariance matrix, 218
Within-group sparsity, 64

Tail bounds

χ2 variables, 286
Gaussian variables, 309

Theory, 289–314

‘2-error bound for lasso, 294
basic inequality, 298, 311, 313
general M -estimators, 309
group lasso, 310
minimax rates for sparse regres-

sion, 296, 299, 312

nuclear norm, 310
prediction error bound for lasso,

299

primal-dual witness method, 305
variable selection guarantee for

lasso, 302
Total-variation denoising, 77
Trace norm, 174
Trace regression framework, 185
Training error, 34
Trend ﬁltering, 81–83
Truncated normal distribution, 152
Type I error, 148

