Why Separate the Sources of Thresholding Error?
Thresholding estimates many coefficients by setting small noisy observations to zero. This can remove noise when a true coefficient is zero, but it can also discard a real signal. If a coefficient survives thresholding, its estimate may still be inaccurate because of the noise; soft thresholding adds shrinkage even when the signal is retained. A useful risk calculation therefore distinguishes noise-driven error at zero coefficients from shrinkage and missed-signal error at nonzero coefficients.
We work coordinate by coordinate in the Gaussian sequence model. A vector estimate’s total squared-error risk is the sum of its coordinatewise risks, by additivity of expectation; independence between coordinates is not required for that identity. The calculations below help identify which part of the risk is controlled by thresholding and which part is paid for by shrinking or missing signals.
Hard Thresholding: Exact Risk and Its Two Components
Hard thresholding either keeps \(Y\) unchanged or replaces it by zero. Let \(A=\{|Y|>\lambda\}\) be the selection event. On \(A\), the estimation error is \(Y-\theta=\sigma Z\); on \(A^c\), it is \(-\theta\). Thus the exact risk decomposition is
The first term is the squared signal lost when the coefficient is thresholded to zero. The second is the noise error on the event that the coefficient is retained. At a zero coefficient the first term vanishes, and the remaining risk is exactly the cost of false inclusion.
To obtain this formula, use symmetry and the standard normal tail-moment identity \(\int_t^\infty z^2\phi(z)\,dz=t\phi(t)+\bar\Phi(t)\). This identity follows by integration by parts, since \(\phi'(z)=-z\phi(z)\).
Worked Example: False-Inclusion Risk at a Zero Coefficient
Take \(\sigma=1\), \(\lambda=2\), and \(\theta=0\). Hard thresholding has risk \(E[Z^2\mathbf{1}\{|Z|>2\}]\). Using \(\phi(2)\approx0.053990967\) and \(\bar\Phi(2)\approx0.022750132\),
The estimate is wrong only when noise pushes the observation outside \([-2,2]\), but on those occasions the retained noise can be substantial. The risk is the second moment of the noise on that tail event, not merely the probability of selection.
Hard-Thresholding Bounds for Nonzero Signals
For a nonzero coefficient, the exact decomposition immediately gives useful bounds. If \(|\theta|>\lambda\), thresholding can miss the signal only when the noise moves \(Y\) toward or across the threshold. By symmetry, the probability of this event is at most \(\Phi((\lambda-|\theta|)/\sigma)\). Also, the selected-noise contribution is at most \(E[\sigma^2Z^2]=\sigma^2\). Therefore
For \(\theta>0\), the event \(|Y|\leq\lambda\) implies \(Z\leq(\lambda-\theta)/\sigma\), so its probability is at most that normal lower-tail probability. For \(\theta<0\), apply the same argument to \(-Y\). This proves the claimed miss-probability bound. When \(|\theta|\leq\lambda\), the general decomposition still applies, but the signal is not separated from the threshold by a positive margin; a simple bound is \(R_H(\theta)\leq\theta^2+\sigma^2\).
Worked Example: Exact Hard-Threshold Risk for a Signal
Let \(\sigma=1\), \(\lambda=2\), and \(\theta=1\). The coefficient is rejected when \(-2\leq Y\leq2\), equivalently \(-3\leq Z\leq1\). Thus the missed-signal contribution is
When selected, \(Z>1\) or \(Z<-3\). The selected-noise contribution is
Here the tail-moment identity is used on each side, with symmetry for the lower tail. Adding the two contributions gives \(R_H(1)\approx0.415271421+0.839994848=1.255266270\), or approximately \(1.255266\). The large missed-signal term reflects that the signal \(1\) lies below the threshold \(2\).
Soft Thresholding: Shrinkage and a Uniform Risk Bound
Soft thresholding also sets observations inside \([-\lambda,\lambda]\) to zero, but outside that interval it moves the observation \(\lambda\) units toward zero. Define \(A=\{|Y|>\lambda\}\). On \(A^c\), the squared error is \(\theta^2\). On \(A\), the error is \(\sigma Z-\lambda\operatorname{sgn}(Y)\). This gives the exact decomposition
For \(\theta=0\), symmetry and integration of \((z-\lambda/\sigma)^2\) over the upper tail give the exact expression below. For nonzero \(\theta\), the formula separates the squared error from rejecting the coefficient and the error—including shrinkage—when it is retained.
Worked Example: Soft-Threshold Risk at a Zero Coefficient
Again take \(\sigma=1\), \(\lambda=2\), and \(\theta=0\). On the event \(Z>2\), the estimate is \(Z-2\); the negative tail contributes the same risk. Therefore
The integral expansion uses \(\int_2^\infty z\phi(z)\,dz=\phi(2)\) and \(\int_2^\infty z^2\phi(z)\,dz=2\phi(2)+\bar\Phi(2)\). The soft rule’s false-inclusion error is small here because even selected observations are pulled toward zero.
Proof. Write \(\delta(y)=\eta_S(y;\lambda)\). The function \(\delta\) is absolutely continuous, has at most linear growth, and has derivative \(\delta'(y)=\mathbf{1}\{|y|>\lambda\}\) except at the two threshold points, which have probability zero under a Gaussian distribution. Expanding the squared error and applying integration by parts to the Gaussian density gives
For the second equality, Gaussian integration by parts states \(E[(Y-\theta)g(Y)]=\sigma^2E[g'(Y)]\) for absolutely continuous \(g\) of suitable integrability. Apply it to \(g(y)=\delta(y)-y\), whose derivative is bounded almost everywhere. Since \(\delta(y)-y\) is the amount removed from \(y\), its magnitude is at most \(\lambda\). Also \(E[\delta'(Y)]\leq1\). Consequently,
All expectations in this calculation are finite because \(\delta\) has at most linear growth and \(Y\) is Gaussian. This proves the bound. \(\square\)
Comparing the Rules on a Strong Signal
For a signal well above the threshold, hard thresholding has no systematic shrinkage when it selects the coefficient; its main extra risk is the rare event that noise pushes the observation below threshold. Soft thresholding avoids a discontinuous jump at the threshold, but on a strong positive signal its estimate is approximately \(Y-\lambda\), so it incurs a shrinkage error of approximately \(\lambda^2\) in addition to noise variance. The following example shows both effects through the exact event decomposition.
Worked Example: A Signal Well Above the Threshold
Take \(\sigma=1\), \(\lambda=2\), and \(\theta=4\). For hard thresholding, rejection means \(-6\leq Z\leq-2\), with probability \(\Phi(-2)-\Phi(-6)\). Hence
The missed-signal term is \(16(0.022750132-0.000000001)\approx0.364002\). The selected-noise term is at most \(E[Z^2]=1\), so \(R_H(4)\leq1.364003\). This bound retains the two distinct costs: a small chance of losing the signal and at most one unit of selected-noise risk.
For soft thresholding the exact decomposition has \(a=-6\) and \(b=-2\). Its rejection contribution is the same, \(16\{\Phi(-2)-\Phi(-6)\}\). On the left selected tail the estimate is \(Y+2\), and on the right selected tail it is \(Y-2\), giving
For example, the right-tail integral is \(\int_{-2}^\infty(z-2)^2\phi(z)\,dz=5\Phi(2)-6\phi(2)\); the left-tail integral is \(\int_{-\infty}^{-6}(z+2)^2\phi(z)\,dz=5\Phi(-6)+2\phi(6)\). The soft-threshold risk is larger here because the retained estimate is pulled two units toward zero. This is not a contradiction of its uniform bound: that bound is \(\sigma^2+\lambda^2=5\), which the calculated risk satisfies.
Common Pitfall and Practical Interpretation
A common mistake is to count only the probability that a coefficient is selected and call that the risk at a zero coefficient. Risk is expected squared error, not selection probability. At \(\theta=0\), hard thresholding’s risk is \(E[Y^2\mathbf{1}\{|Y|>\lambda\}]\), which weights a false inclusion by its squared magnitude. Soft thresholding instead weights the selected observation by \((|Y|-\lambda)^2\). Confusing these quantities can badly misstate the cost of thresholding.
For nonzero coefficients, it is equally important not to treat the thresholded estimate as if selection were certain. The exact decompositions include a missed-signal term \(\theta^2P(|Y|\leq\lambda)\); omitting it is particularly serious when \(|\theta|\) is near or below \(\lambda\). Conversely, a signal far above threshold has a small miss probability, and the main difference between the rules is then hard thresholding’s retained noise versus soft thresholding’s shrinkage. These coordinatewise bounds can be summed across a sequence to study total squared-error risk.
Check Your Understanding
Use the event decompositions and Gaussian tail identities to answer the following.
- For hard thresholding, identify the two terms in the risk when \(\theta\neq0\), and explain what each measures.
- Why is hard-threshold risk at \(\theta=0\) not equal to \(P(|Y|>\lambda)\)?
- In the hard-threshold signal bound, what happens to the missed-signal term as \(|\theta|-\lambda\) becomes large relative to \(\sigma\)?
- Explain why soft thresholding’s error on a selected observation contains a shrinkage term as well as Gaussian noise.
- For \(\sigma=1\), \(\lambda=1\), and \(\theta=0\), write the exact formula for soft-threshold risk using \(\phi\) and \(\bar\Phi\).