Tutorials › Generalized Linear Models › Penalized Fisher Scoring and IRLS

Penalized GLM Estimation · Tutorial 905 of 981

Penalized Fisher Scoring and IRLS

Learn how a GLM’s Fisher-scoring step becomes a weighted least-squares subproblem and how coefficient penalties enter that subproblem.

Advanced 10 min read

What You'll Learn

  • Distinguish the observed-Hessian Taylor expansion from the Fisher-scoring quadratic surrogate
  • Derive GLM working responses and Fisher weights for a general link
  • Express a penalized Fisher-scoring iteration as a weighted least-squares optimization
  • Calculate ridge and lasso updates from explicit local quadratic subproblems
  • Recognize when a Fisher-scoring step may need damping or a line search

From a GLM Likelihood to a Quadratic Step

Penalized GLM estimation is usually not a single closed-form calculation. At a current coefficient vector, Fisher scoring replaces the likelihood locally with a quadratic expression; adding the coefficient penalty then gives a penalized quadratic subproblem. For GLMs, that subproblem has the form of weighted least squares, with a working response and weights recalculated at each iteration.

A crucial distinction is that Fisher scoring uses expected information, whereas a second-order Taylor expansion of the log-likelihood uses the observed Hessian. These are generally different matrices. The Fisher-scoring quadratic is a useful local surrogate, not a claim that the observed log-likelihood itself has that exact quadratic expansion.

Definition: Let \(\ell(\beta)\) be a twice continuously differentiable log-likelihood, \(U(\beta)=\nabla\ell(\beta)\) its score, and \(H(\beta)=\nabla^2\ell(\beta)\) its observed Hessian. The expected Fisher information is \(I(\beta)=-E_\beta[H(\beta)]\), when this expectation exists. The Fisher-scoring surrogate at \(\beta\) replaces the observed Hessian in the local quadratic model by \(-I(\beta)\).
Theorem: If \(\ell\) is twice continuously differentiable in a neighborhood of \(\beta\), then as \(\delta\to 0\), \(\ell(\beta+\delta)=\ell(\beta)+U(\beta)^T\delta+\tfrac12\delta^TH(\beta)\delta+o(\|\delta\|^2)\). If \(I(\beta)\) is positive definite, the Fisher-scoring surrogate \(\ell(\beta)+U(\beta)^T\delta-\tfrac12\delta^TI(\beta)\delta\) has the unique maximizer \(\delta=I(\beta)^{-1}U(\beta)\).

Proof. The second-order Taylor theorem for a twice continuously differentiable function gives the displayed expansion, with the observed Hessian \(H(\beta)\). Separately, the Fisher-scoring surrogate has gradient with respect to \(\delta\) equal to \(U(\beta)-I(\beta)\delta\). Setting this gradient to zero gives \(\delta=I(\beta)^{-1}U(\beta)\). Its Hessian is \(-I(\beta)\), which is negative definite when \(I(\beta)\) is positive definite, so this stationary point is the unique maximizer. \(\square\)

The GLM Working Response and Weights

Consider independent observations \(Y_i\) from a GLM with mean \(\mu_i\), variance \(\operatorname{Var}(Y_i)=\phi V(\mu_i)/a_i\), and linear predictor \(\eta_i=o_i+x_i^T\beta\). Here \(x_i^T\) is row \(i\) of the design matrix \(X\), \(o_i\) is a fixed offset, \(a_i\) is a known prior weight, and \(\phi\) is the dispersion parameter. The mean is related to the linear predictor through a differentiable link, so that \(\mu_i=g^{-1}(\eta_i)\). Assume the derivative \(d\mu_i/d\eta_i\) is nonzero at the current iterate.

At iteration \(t\), evaluate \(\eta_i\), \(\mu_i\), and the derivative at \(\beta^{(t)}\). Define the working response \(z_i\) and working weight \(w_i\) by

$$ z_i=\eta_i+\frac{Y_i-\mu_i}{d\mu_i/d\eta_i}, \qquad w_i=\frac{a_i}{\phi}\, \frac{(d\mu_i/d\eta_i)^2}{V(\mu_i)}. $$

The working response is on the linear-predictor scale. It is a local adjustment: it starts at the current \(\eta_i\) and adds a residual multiplied by the local slope \(d\eta_i/d\mu_i\). The weights reflect both the variance of the response and the sensitivity of the mean to changes in the predictor.

Result: Under the usual regularity conditions for the GLM likelihood, the score and expected information at the current iterate can be written \(U(\beta^{(t)})=X^TW(z-o-X\beta^{(t)})\) and \(I(\beta^{(t)})=X^TWX\), where \(W\) is diagonal with entries \(w_i\), \(z=(z_1,\ldots,z_n)^T\), and \(o=(o_1,\ldots,o_n)^T\).

Derivation. For an observation with variance \(\phi V(\mu_i)/a_i\), the score contribution for \(\eta_i\) is \[ \frac{a_i}{\phi}\frac{Y_i-\mu_i}{V(\mu_i)}\frac{d\mu_i}{d\eta_i}. \] Multiplication by \(x_i\) gives its contribution to the coefficient score. On the other hand, \[ w_i(z_i-\eta_i) =\frac{a_i}{\phi}\frac{(d\mu_i/d\eta_i)^2}{V(\mu_i)} \frac{Y_i-\mu_i}{d\mu_i/d\eta_i} =\frac{a_i}{\phi}\frac{Y_i-\mu_i}{V(\mu_i)} \frac{d\mu_i}{d\eta_i}. \] Since \(\eta_i=o_i+x_i^T\beta^{(t)}\), summing these contributions gives \(X^TW(z-o-X\beta^{(t)})\). The expected information has entries obtained from the variance of the score contributions; independence makes cross-observation terms zero, and the resulting matrix is \(X^TWX\). This uses the standard likelihood regularity conditions under which the score has mean zero and expected information equals the score covariance.

Adding a Coefficient Penalty

Suppose the target is to maximize \(\ell(\beta)-\lambda P(\beta)\), where \(\lambda\geq 0\) and \(P\) is a coefficient penalty. For example, ridge uses \(P(\beta)=\tfrac12\|\beta\|_2^2\), while lasso uses \(P(\beta)=\|\beta\|_1\); an unpenalized intercept can be excluded from \(P\). The penalty convention and which coefficients are penalized must be fixed as part of the model specification.

At iteration \(t\), use the Fisher-scoring quadratic surrogate for \(\ell\), then include the penalty evaluated at the candidate coefficient vector \(b\). Up to a term independent of \(b\), maximizing that local penalized surrogate is equivalent to minimizing

$$ Q_t(b)=\frac12(z-o-Xb)^TW(z-o-Xb)+\lambda P(b). $$

The factor \(1/2\) and the definition of \(w_i\) matter: with the weights above, the quadratic part has Hessian \(X^TWX=I(\beta^{(t)})\), matching the Fisher-scoring surrogate. A penalty added on a different likelihood scale would require a correspondingly adjusted \(\lambda\).

Theorem: At a fixed iterate, minimizing \(Q_t(b)\) gives the coefficient update for the penalized Fisher-scoring quadratic surrogate. If \(P\) is differentiable and the minimizer is an interior point, its first-order condition is \(X^TWX(b-\beta^{(t)})-U(\beta^{(t)})+\lambda\nabla P(b)=0\). For a nondifferentiable penalty, the corresponding condition uses the subdifferential of \(P\).

Proof. Write \(\eta^{(t)}=o+X\beta^{(t)}\). The derivative of the weighted least-squares part of \(Q_t\) with respect to \(b\) is \(X^TW(o+Xb-z)\). At \(b=\beta^{(t)}\), this equals \(-X^TW(z-o-X\beta^{(t)})=-U(\beta^{(t)})\). Its Hessian is \(X^TWX=I(\beta^{(t)})\). Thus its quadratic expansion about \(\beta^{(t)}\), up to an additive constant, is \[ -\;U(\beta^{(t)})^T(b-\beta^{(t)}) +\frac12(b-\beta^{(t)})^TI(\beta^{(t)})(b-\beta^{(t)}). \] This is the negative of the Fisher-scoring log-likelihood surrogate, up to a constant. Adding \(\lambda P(b)\) therefore gives precisely the minimization form of the local penalized surrogate. Differentiating when \(P\) is smooth gives the stated condition; for a nonsmooth convex penalty, the gradient condition is replaced by the subgradient condition. \(\square\)

Worked Iterations

Worked Example: Ridge-Penalized Logistic Intercept

Suppose two independent Bernoulli observations are both successes, and fit an intercept-only logistic model at the current value \(\beta^{(t)}=0\). Use the penalty \(\lambda P(\beta)=\tfrac12\beta^2\), so \(\lambda=1\).

At \(\beta^{(t)}=0\), the predictor is \(\eta_i=0\), the fitted probability is \(\mu_i=1/2\), and \(d\mu_i/d\eta_i=\mu_i(1-\mu_i)=1/4\). Each working response is \(z_i=0+(1-1/2)/(1/4)=2\), and each weight is \(w_i=(1/4)^2/[(1/2)(1/2)]=1/4\). Thus \(X=(1,1)^T\), \(W=\operatorname{diag}(1/4,1/4)\), and \(X^TWX=1/2\), \(X^TWz=1\).

The penalized subproblem is \[ Q_t(b)=\frac12\left\{\frac14(2-b)^2+\frac14(2-b)^2\right\}+\frac12b^2 =\frac14(2-b)^2+\frac12b^2. \] Its derivative is \(\tfrac12(b-2)+b=\tfrac32b-1\). Setting it to zero gives \(b=2/3\). Equivalently, the score is \(U=1\), the information is \(I=1/2\), and the ridge-adjusted step solves \((I+\lambda)b=U\), also giving \(b=2/3\). This is one local penalized update, not a claim that the final penalized estimate has already been reached.

Worked Example: Poisson Regression With an Offset

For one Poisson observation \(Y=3\), take the log link, offset \(o=\log 2\), design value \(x=1\), and current coefficient \(\beta^{(t)}=0\). Use the ridge penalty \(\tfrac12\beta^2\).

The current predictor is \(\eta=\log 2\), so \(\mu=2\). For a Poisson model, \(V(\mu)=\mu\) and \(d\mu/d\eta=\mu\). Therefore \(z=\log 2+(3-2)/2=\log 2+1/2\), and \(w=2\). The offset-adjusted working target is \(z-o=1/2\).

With \(\lambda=1\), the subproblem is \[ Q_t(b)=\frac12\{2(1/2-b)^2\}+\frac12b^2 =(1/2-b)^2+\frac12b^2. \] Differentiation gives \(2(b-1/2)+b=0\), hence \(b=1/3\). Directly, the score is \(Y-\mu=1\), the information is \(\mu=2\), and the penalized local equation is \(2(b-0)-1+b=0\), again yielding \(1/3\). The offset remains in the predictor but is not a penalized coefficient.

Worked Example: A Lasso-Penalized Weighted Least-Squares Subproblem

Consider a local working problem with \(X=\begin{pmatrix}1&-1\\1&1\end{pmatrix}\), \(W=\operatorname{diag}(1/4,1/4)\), and \(z=(-2,2)^T\). Penalize only the slope \(b_1\) by \(\lambda|b_1|\), with \(\lambda=1/5\). The first coefficient \(b_0\) is an unpenalized intercept.

First calculate the cross-product: \[ X^TWz=\frac14 \begin{pmatrix}1&1\\-1&1\end{pmatrix} \begin{pmatrix}-2\\2\end{pmatrix} =\frac14\begin{pmatrix}0\\4\end{pmatrix} =\begin{pmatrix}0\\1\end{pmatrix}. \] Also, \(X^TWX=\tfrac12 I_2\). Expanding the weighted least-squares objective and dropping terms independent of \(b\) therefore gives \[ \frac12(z-Xb)^TW(z-Xb)+\frac15|b_1| =\frac14b_0^2+\frac14(b_1-2)^2+\frac15|b_1|+\text{constant}. \]

The intercept minimizer is \(b_0=0\). For \(b_1>0\), the slope derivative is \(\tfrac12(b_1-2)+\tfrac15\); setting it to zero gives \(b_1=8/5\), which is indeed positive. At zero, the left and right derivatives are respectively \(-6/5\) and \(-4/5\), both negative, so zero is not a minimizer. For \(b_1<0\), the derivative is \(\tfrac12(b_1-2)-\tfrac15\), which is negative throughout that region and cannot yield a minimum there. The quadratic is strictly convex, so the unique solution is \((b_0,b_1)=(0,8/5)\). This example illustrates the penalized weighted least-squares step itself; in a GLM, its \(z\) and \(W\) are computed from the current fitted means.

Practical Interpretation and Common Pitfalls

The calculation separates two tasks. The GLM determines the current working response and weights; the penalty determines how the coefficients are chosen within the resulting weighted least-squares problem. As the iteration proceeds, the working quantities are recalculated from the updated coefficients. This is why the overall procedure is called iteratively reweighted least squares, or IRLS.

Common mistake: treating expected information as the Taylor Hessian. The incorrect argument says that the second-order Taylor expansion of \(\ell\) has quadratic term \(-\tfrac12\delta^TI(\beta)\delta\). The Taylor term is instead \(\tfrac12\delta^TH(\beta)\delta\). The expected information gives a different matrix in general; substituting \(-I(\beta)\) defines the Fisher-scoring surrogate. Keeping these statements separate prevents an incorrect claim about the local expansion.

Common mistake: solving an unpenalized weighted least-squares problem and then applying the penalty afterward. In general, shrinking the unpenalized answer does not minimize the stated penalized subproblem, especially when predictors are correlated or a penalty is nonsmooth. The penalty belongs inside \(Q_t(b)\), because the update is the minimizer of the entire local penalized objective.

Finally, a Fisher-scoring step is based on a local approximation. Even if the quadratic subproblem is solved exactly, the actual penalized likelihood need not increase by taking the full step. When a full step is unsuitable, implementations may use step damping or a line search that checks the actual objective. Positive definiteness of the local information ensures a well-defined unpenalized quadratic direction, but by itself does not guarantee global convergence.

Key takeaway: At each iteration, construct \(z\) and \(W\) from the current GLM fit, then minimize \(\tfrac12(z-o-Xb)^TW(z-o-Xb)+\lambda P(b)\). This is the penalized Fisher-scoring/IRLS subproblem; it is distinct from the observed-Hessian Taylor expansion of the likelihood.

Check Your Understanding

Use the definitions and derivations above to answer the following.

  1. Which Hessian appears in the second-order Taylor expansion of the log-likelihood, and which matrix is used in the Fisher-scoring surrogate?
  2. For a GLM with \(d\mu_i/d\eta_i\neq 0\), explain why the working response adds a scaled residual to the current linear predictor.
  3. How does the penalty enter the IRLS subproblem, and why is it generally not equivalent to penalizing an unpenalized solution afterward?
  4. For the Poisson example, identify the working response, its offset-adjusted value, and the working weight.
  5. Why might an exactly minimized Fisher-scoring subproblem still require a damped step when updating the actual penalized likelihood?
Clinical Biostats