Search

Search papers and lessons

Neyman Orthogonality

Level 4 · 12 min read

Neyman orthogonality is a property of an estimating equation: small errors in the nuisance parameters barely move it, so the target estimate stays accurate even when those nuisance models are imperfect.

On this page

  • Colour = topic mix
  • Probability
  • Calculus
  • Discrete math
  • Inference
  • Linear algebra
  • ReadReady to readNot yet

TL;DR

Many estimates are found by solving an estimating equation, a sum over the data set equal to zero. When that equation also depends on a nuisance parameter, which is a quantity the model needs but that is not the target, a poor estimate of the nuisance can bias the target. A Neyman orthogonal score is built so that the equation does not change to first order when the nuisance estimate moves, which keeps the target estimate accurate even when the nuisance model is only approximately right.

Builds on: Estimating Equation, Nuisance Parameter, Conditional Expectation · Leads to: Cross-Fitting, Double Machine Learning

Where it's used

Estimating an effect when many controls are needed. An economist wants the effect of a training program on wages, and has hundreds of background variables such as age, schooling and region to adjust for. Flexible machine learning models predict wages and program take-up from those controls well, but plugging their predictions straight into the effect formula gives a biased answer. An orthogonal score uses the same predictions and removes that bias from the effect estimate.

Causal parameters in general. The double machine learning paper lists the parameters this affects: individual regression coefficients, average treatment effects, average lifts, and demand or supply elasticities. In each case a low-dimensional target sits beside a high-dimensional nuisance, which is the setting the orthogonal score is built for.

Classical likelihood testing. Neyman's own construction, from 1959, produces an orthogonal score in a maximum likelihood setting, and it gives the C(α)C(\alpha) test statistic. That statistic is still used for testing in high-dimensional sparse models.

How it works

We use the partially linear model. Each person has an outcome YY, a treatment DD and controls XX. The model says Y=θD+g(X)+UY = \theta D + g(X) + U and D=m(X)+VD = m(X) + V, where θ\theta is the target, and gg and mm are nuisance functions. The terms UU and VV are the unexplained noise in each equation. Here E[V∣X]=0E[V \mid X] = 0 and E[U∣D,X]=0E[U \mid D, X] = 0. Take θ=2\theta = 2 and m(1)=2m(1) = 2, g(1)=0.5g(1) = 0.5, and look at two people who both have X=1X = 1.

Person a has D=3D = 3 and Y=7Y = 7. Person b has D=1D = 1 and Y=2.5Y = 2.5. For person a, V=3−2=1V = 3 - 2 = 1. For person b, V=1−2=−1V = 1 - 2 = -1.

flowchart LR
  A[Data: Y, D, X] --> N[Estimate nuisance m and g]
  N --> R[Form residuals D minus m and Y minus g]
  R --> S[Orthogonal score: average of residual times residual]
  S --> T[Solve for theta]
  1. Set up the true values. Check: for person a, Y−2D−g(1)=7−6−0.5=0.5Y - 2D - g(1) = 7 - 6 - 0.5 = 0.5, which is UU for a. For person b it is 2.5−2−0.5=02.5 - 2 - 0.5 = 0. Both residuals are the true noise.
  2. Make the nuisance estimate wrong. Suppose the estimate of gg at X=1X = 1 is g^(1)=0.9\hat g(1) = 0.9, which is 0.4 too high. The conventional score for each person is (Y−2D−g^)D(Y - 2D - \hat g) D. For a it is (7−6−0.9)⋅3=0.3(7 - 6 - 0.9) \cdot 3 = 0.3, and for b it is (2.5−2−0.9)⋅1=−0.4(2.5 - 2 - 0.9) \cdot 1 = -0.4. Check: the average is −0.05-0.05, while with the true gg it was (1.5+0)/2=0.75(1.5 + 0)/2 = 0.75. The conventional average has moved by −0.8-0.8.
  3. Use the orthogonal score. Each person's score is (Y−2D−g^)(D−m)(Y - 2D - \hat g)(D - m). With the true m=2m = 2 and g^=0.9\hat g = 0.9: for a it is 0.1⋅1=0.10.1 \cdot 1 = 0.1, and for b it is (−0.4)⋅(−1)=0.4(-0.4) \cdot (-1) = 0.4. The average is 0.250.25.
  4. Compare with the truth. With the true gg, the orthogonal score gives (0.5⋅1+0⋅(−1))/2=0.25(0.5 \cdot 1 + 0 \cdot (-1)) / 2 = 0.25. Check: the average is still 0.250.25, so the error in g^\hat g did not move it.
  5. Why it works. The error in g^\hat g enters the orthogonal score multiplied by D−mD - m, the residual VV. Among people with X=1X = 1, the residuals are +1+1 and −1-1, which average to zero. The error cancels in the average, while in the conventional score it multiplies DD, whose average is 2, and does not cancel.

The math

Write W=(Y,D,X)W = (Y, D, X) for one observation, θ\theta for the target, and η=(m,g)\eta = (m, g) for the nuisance functions. An estimating equation is 1n∑iψ(Wi;θ^,η^)=0\frac{1}{n} \sum_{i} \psi(W_i; \hat\theta, \hat\eta) = 0, as in the estimating equation lesson.

Definition: Neyman orthogonality

A score ψ(W;θ,η)\psi(W; \theta, \eta) is Neyman orthogonal at the true values (θ0,η0)(\theta_0, \eta_0) if its expectation has zero derivative in the nuisance direction at the truth:

∂r E[ψ(W;θ0,η0+r(η−η0))]∣r=0=0for all η.\partial_r \, E\big[\psi\big(W; \theta_0, \eta_0 + r(\eta - \eta_0)\big)\big]\Big|_{r=0} = 0 \quad \text{for all } \eta.

Here ∂r\partial_r is the derivative with respect to a small step rr taken from the true nuisance towards a candidate η\eta. The derivative is called the Gateaux derivative, which is the rate of change of an expectation along one direction.

Step 2 in symbols: the conventional score

The conventional score is φ(W;θ,g)=(Y−θD−g(X))D\varphi(W; \theta, g) = (Y - \theta D - g(X)) D. Perturb gg by rh(X)r h(X). Its derivative is

∂rE[φ]=−E[h(X)D]=−E[h(X)m0(X)]−E[h(X)V].\partial_r E[\varphi] = -E[h(X) D] = -E[h(X) m_0(X)] - E[h(X) V].

The second term is zero because E[V∣X]=0E[V \mid X] = 0, but the first term is not zero in general. So a wrong gg shifts the conventional score at first order. This is the bias in step 2 of the walkthrough.

Step 3 in symbols: the orthogonal score

Use ψ(W;θ,η)=(Y−θD−g(X))(D−m(X))\psi(W; \theta, \eta) = (Y - \theta D - g(X))(D - m(X)). At the truth, Y−θ0D−g0(X)=UY - \theta_0 D - g_0(X) = U, so the expectation is E[UV]=0E[UV] = 0, because E[U∣D,X]=0E[U \mid D, X] = 0.

Perturb gg by rh(X)r h(X). The derivative is −E[h(X)(D−m0(X))]=−E[h(X)V]=0-E[h(X)(D - m_0(X))] = -E[h(X) V] = 0, since E[V∣X]=0E[V \mid X] = 0.

Perturb mm by rv(X)r v(X). The factor D−mD - m becomes V−rv(X)V - r v(X), and the derivative is −E[U v(X)]=0-E[U \, v(X)] = 0, since E[U∣X]=0E[U \mid X] = 0.

Both derivatives vanish, so ψ\psi is Neyman orthogonal. This is the calculation behind walkthrough steps 3 and 5.

Step 4 in symbols: solving for the target

Set the sample version of ψ\psi to zero and solve for θ\theta:

θ^=∑i(Yi−g^(Xi))(Di−m^(Xi))∑iDi(Di−m^(Xi)).\hat\theta = \frac{\sum_i \big(Y_i - \hat g(X_i)\big)\big(D_i - \hat m(X_i)\big)}{\sum_i D_i \big(D_i - \hat m(X_i)\big)}.

The numerator uses the residual of YY on the controls, and the denominator uses the residual of DD on the controls. In the walkthrough, θ^\hat\theta depends on g^\hat g and m^\hat m only through these residuals, and the first-order effect of their errors is removed.

Caution: with machine learning nuisance estimates, the remaining error is a product of the two nuisance errors, and it can still bias the estimate if both are poor. Cross-fitting, in Cross-Fitting, is used to stop the nuisance fits from overfitting the same data they are used on.

Worked examples

Example
Example 1: the slope of each score

Use one person with X=1X = 1, D=3D = 3, m(1)=2m(1) = 2, so V=1V = 1.

  1. The conventional score is (Y−θD−g)D(Y - \theta D - g) D. An error δ\delta in gg changes it by −δD=−3δ-\delta D = -3\delta.
  2. The orthogonal score is (Y−θD−g)(D−m)(Y - \theta D - g)(D - m). The same error changes it by −δ(D−m)=−δV=−δ-\delta (D - m) = -\delta V = -\delta.
  3. With δ=0.4\delta = 0.4: the conventional score moves by −1.2-1.2, and the orthogonal score moves by −0.4-0.4.
  4. The orthogonal score for this person is three times less sensitive, because its slope is the residual VV instead of DD.

Interpretation: the single person is not an average, so the slopes alone do not show the cancellation. That comes next.

Example
Example 2: a wrong estimate of both nuisances

Use the two people from the walkthrough, with θ=2\theta = 2, g^(1)=0.9\hat g(1) = 0.9 and m^(1)=1.5\hat m(1) = 1.5 instead of the true m(1)=2m(1) = 2.

  1. Person a: D−m^=3−1.5=1.5D - \hat m = 3 - 1.5 = 1.5, and Y−2D−g^=0.1Y - 2D - \hat g = 0.1. The product is 0.150.15.
  2. Person b: D−m^=1−1.5=−0.5D - \hat m = 1 - 1.5 = -0.5, and Y−2D−g^=−0.4Y - 2D - \hat g = -0.4. The product is 0.20.2.
  3. The average of the orthogonal score is (0.15+0.2)/2=0.175(0.15 + 0.2) / 2 = 0.175.
  4. The true-nuisance average was 0.250.25, so the shift is −0.075-0.075.
  5. The conventional score under the same g^\hat g shifts by −0.8-0.8, as before, and the orthogonal score shifts by −0.075-0.075.

Interpretation: when both nuisances are wrong, the orthogonal score still moves, but only by a second-order amount, which is smaller than the first-order shift of the conventional score. Check: −0.075-0.075 is about a tenth of −0.8-0.8.

Example
Example 3: a wage study with a plug-in estimate

A wage study has a binary program indicator DD, which is 1 for a quarter of workers, so E[D]=0.25E[D] = 0.25, and E[D2]=0.25E[D^2] = 0.25 because DD is 0 or 1. The true effect is θ=2\theta = 2. A random forest fit of gg is off by 0.12 for the workers in the program and is right for the rest.

  1. The plug-in estimate of θ\theta is ∑Di(Yi−g^i)/∑Di2\sum D_i (Y_i - \hat g_i) / \sum D_i^2. Its error from the nuisance is −E[D(g^−g)]/E[D2]-E[D (\hat g - g)] / E[D^2].
  2. Compute the numerator: E[D(g^−g)]=0.25⋅0.12=0.03E[D (\hat g - g)] = 0.25 \cdot 0.12 = 0.03, because only program workers carry the error.
  3. Divide by E[D2]=0.25E[D^2] = 0.25: the shift is −0.03/0.25=−0.12-0.03 / 0.25 = -0.12.
  4. So the plug-in estimate moves from 2 to about 1.88, from the nuisance error alone.
  5. The orthogonal score does not carry this first-order term, so the same nuisance error moves its estimate only at second order.
  6. Try it: suppose take-up is 0.4 and the error is 0.05 for program workers. What is the shift in the plug-in estimate? Answer: E[D(g^−g)]=0.4⋅0.05=0.02E[D(\hat g - g)] = 0.4 \cdot 0.05 = 0.02, and E[D2]=0.4E[D^2] = 0.4, so the shift is −0.02/0.4=−0.05-0.02 / 0.4 = -0.05.

Interpretation: a modest nuisance error produces a visible bias in the plug-in estimate, and it does not shrink with more workers. The orthogonal score is built so that this first-order term cannot appear.

Common mistakes and tradeoffs

It is tempting to think a good nuisance model is enough, so the plug-in estimator is safe. In fact the conventional score inherits the nuisance error at first order, and with regularised machine learning fits that error does not average out. The paper shows that the naive plug-in estimator generally fails to converge at the 1/n1/\sqrt{n} rate.

It is tempting to read "orthogonal" as the geometric idea that two vectors are at right angles. In fact here it is a derivative condition: the expectation of the score must not change to first order when the nuisance changes. The two ideas are related through the residual, but the definition is the derivative.

It is tempting to think Neyman orthogonality removes all bias. In fact it removes the first-order effect of nuisance errors, and what remains is their product. This is small only when both nuisance estimates are reasonably accurate, and cross-fitting is needed to prevent overfitting from making them look better than they are.

Orthogonal scores suit a low-dimensional target with a high-dimensional nuisance, where machine learning is needed for the nuisance. They are unnecessary when the nuisance is known or a simple parametric model is correct, because the plug-in estimator is then fine. Alternatives include maximum likelihood with a parametric nuisance, which is simpler but relies on the model being right.

History

In 1959, Neyman derived an orthogonal score in a maximum likelihood setting, which led to his C(α)C(\alpha) test statistic. He returned to the idea in 1979. For decades it was used in classical semiparametric statistics, where the nuisance parts were estimated by conventional nonparametric methods.

Machine learning changed the problem: flexible nuisance fits converge more slowly and carry regularisation bias. In 2016, Chernozhukov, Chetverikov, Demirer, Duflo and coauthors showed that an orthogonal score combined with cross-fitting gives a valid estimator of low-dimensional causal parameters, even when the nuisance is estimated by modern machine learning. That paper made the idea standard in applied econometrics.

Recap

  • An estimating equation for a target can depend on a nuisance parameter, and errors in that nuisance can bias the target.
  • A Neyman orthogonal score has zero derivative with respect to the nuisance at the truth, so its expectation does not move to first order.
  • The partially linear model gives a concrete orthogonal score: the product of the outcome residual and the treatment residual.
  • The first-order bias from a regularised nuisance can grow with the sample size, and an orthogonal score removes it.
  • Read next: Cross-Fitting for how the nuisance fits are kept honest, and Double Machine Learning for the method built from these pieces.

Check yourself

QuestionRecall: what does it mean for a score to be Neyman orthogonal?Show answer
The expectation of the score has zero derivative with respect to the nuisance parameter at the true values. Small errors in the nuisance estimate therefore change the expected score only at second order, not first order.
QuestionComputation: for one person with D = 4 and m(X) = 3, what are the slopes with respect to an error in g of the conventional score (Y - theta D - g) D and of the orthogonal score (Y - theta D - g)(D - m)?Show answer
The conventional slope is −D=−4-D = -4. The orthogonal slope is −(D−m)=−1-(D - m) = -1.
QuestionWhy: why does the orthogonal score use the residual D minus m(X), rather than D itself?Show answer
Because the expectation of the residual given X is zero. An error in the nuisance is multiplied by a quantity that averages to zero within each value of the controls, so the first-order error cancels in the expectation. Using D itself would leave an average that does not cancel.
QuestionApplied: a team plugs in random forest predictions of the outcome and treatment into a simple effect formula. What should it change, and what should it check?Show answer
It should use an orthogonal score built from the residuals of the outcome and treatment, rather than the plug-in formula. It should use cross-fitting so the predictions are not made on the same data they are used to fit. It should check that the nuisance predictions have small error, since the remaining bias is their product, and report confidence intervals from the orthogonal estimator.

Sources