Exact values where possible; six decimal places otherwise.
STATEMENT
Find the linear map that best removes noise of variance σ2 from four
points, with and without a bottleneck, and follow it as the noise goes to
zero and to infinity.
GIVEN
The four points of
I.12.B01, with
eigenvalues λ=(4,1) and eigenvectors u1=(0.8,0.6),
u2=(−0.6,0.8). The input is corrupted as
x~=x+ε, where ε is
independent of x with mean zero and covariance σ2I. The
loss is E∥Mx~−x∥2.
FIND
(a) The optimal gain on each principal direction and the loss it leaves.
(b) The optimal map and its loss at σ2=1.
(c) The same when M must have rank one.
(d) The limits σ2→0 and σ2→∞, with values at
σ2=0.01 and 100.
(e) A check of (I.12.8) for Gaussian data.
STRATEGY
Use the decomposition in (I.12.7). The optimal map shares the eigenvectors
of S, so the problem separates into one scalar problem per direction.
SOLUTION
(a) By (I.12.7) the loss is the clean reconstruction loss of
M plus σ2∥M∥F2, and its minimiser
S(S+σ2I)−1 has the eigenvectors of S. Write
M=∑igiuiuiT. The loss becomes
∑i[(1−gi)2λi+σ2gi2]. Each term is a parabola
in its own gi, with derivative −2(1−gi)λi+2σ2gi:
gilossi=λi+σ2λi,=λi+σ2λiσ2.
A direction is kept at exactly one half when the noise variance equals its
own.
(b) At σ2=1 the gains are 4/5 and 1/2. The two
projections are
(c) A rank-one map keeps one direction. Keeping direction i costs
λiσ2/(λi+σ2) there and the full λj on
the other. Keeping u1 costs 0.8+1=1.8; keeping u2 costs
0.5+4=4.5. So the best rank-one map is
0.8u1u1T, with loss 1.8.
The bottleneck chooses the direction, as in I.12.T1. The noise then shrinks
what is kept.
(d) As σ2→0 each gain tends to 1, the map tends to the
identity and the loss to 0. Without noise, nothing stops the copy. As
σ2→∞ each gain behaves like λi/σ2 and tends
to 0; the map outputs the mean, and the loss tends to
trS=5.
σ2
0.01
1
100
g1
0.997506
0.8
0.038462
g2
0.990099
0.5
0.009901
loss
0.019876
1.3
4.836253
(e) If x is Gaussian with mean zero and covariance S, then
x~ is Gaussian with covariance S+σ2I and
score −(S+σ2I)−1x~. Then (I.12.8) gives
x~−σ2(S+σ2I)−1x~=S(S+σ2I)−1x~,
which is the map of (a). For Gaussian data the best denoiser is linear, and
the two results are one.
Answer
Gains λi/(λi+σ2) with loss
∑iλiσ2/(λi+σ2). At σ2=1:
M⋆=[0.6920.1440.1440.608] with
loss 1.3, or 0.8u1u1T with loss 1.8 at rank
one. The map tends to the identity as σ2→0 and to zero as
σ2→∞.
Check — sanity
At σ2=1, copying the corrupted input costs
σ2∥I∥F2=2 and outputting the mean costs
trS=5. The optimum, 1.3, is below both. Every gain
lies strictly between 0 and 1.
Where this breaks
Noise with a general covariance N gives
S(S+N)−1, which shares eigenvectors with S only
if the two matrices commute. And for data that are not Gaussian the best
denoiser is not linear at all:
I.12.X08 finds a
tanh.
Variation
At σ2=4 the gains are (0.5,0.2) and the loss is 2+0.8=2.8.
The script also confirms the decomposition of (I.12.7) exactly, by
averaging over the four points and four noise vectors
(±σ2,0), (0,±σ2), whose covariance is
σ2I.