Quiz: self-supervised denoising
Before this unit: Self-distillation and foundation models (previous unit); Day 41: Modern deep learning; Day 37: Training networks in practice.
See also: Denoising and what you may measure (day 5).
Short questions on Noise2Noise, Noise2Void and their limits. Try each on paper first, then open the answer.
Q1. Why can a network learn to denoise from pairs of noisy images, when it never sees a clean one?
What is the best prediction of a target whose noise you cannot know?
The target’s noise is independent of the input, so the network cannot predict it; the best it can do (with a squared error) is the average of all possible targets, which is the clean image. The noise only adds a constant σ² to the loss.
Q2. You train a denoiser on single noisy images, with each image as its own target and no blind spot. What does it learn?
Which output gives a training loss of exactly 0?
To copy its input (the identity): output = input reproduces the target exactly. Nothing is denoised. The blind spot removes the pixel from the input, so it can only be predicted from its neighbours.
Q3. A blind-spot denoiser predicts a pixel from its neighbours. What assumption about the noise makes the noisy target as good as a clean one?
What must the neighbours not know?
The pixel’s noise has mean 0 and is independent of the noise of its neighbours (independent from pixel to pixel). Then the neighbours carry only the signal about this pixel, and the noisy-target loss is the clean-target loss plus a constant.
Q4. Images from a camera that compresses its output (JPEG) are denoised with Noise2Void. The result keeps a blotchy texture. Why?
What does compression do to the noise of neighbouring pixels?
Compression (like demosaicing, resampling or camera-side denoising) makes the noise correlated between neighbours. The blind-spot network then predicts part of the noise from the neighbours and reproduces it. Use the raw data.
Q5. Name what the blind spot costs, and one way to recover it.
What is the single most informative pixel about a pixel?
It throws away the pixel’s own value. Recover it by mixing the noisy pixel back into the prediction, weighted by the reliabilities of the two: c = 1 - \sigma^2/\text{mean}(\text{pixel} - \text{prediction})^2, which needs the noise level σ (from a camera calibration). In the demo this lifts Noise2Void from 21.10 to 23.75 dB.
Q6. How can you check whether a camera’s noise is independent from pixel to pixel?
Use a region without structure.
Take a background region (or a dark frame), subtract its mean, and correlate it with itself shifted by one pixel horizontally and vertically. Independent noise gives about 0; correlated noise a clearly positive value (0.78 for the demo’s blurred noise). Look at it too: stripes and blobs are correlated noise.
Q7. (math) With target y = s + n, \mathbb E[n] = 0, \mathrm{Var}(n) = \sigma^2, n independent of the input, show that \mathbb E[(f - y)^2] = \mathbb E[(f - s)^2] + \sigma^2.
Expand (f - s - n)^2.
(f - s - n)^2 = (f - s)^2 - 2(f - s)n + n^2. The cross term has expectation \mathbb E[f - s]\,\mathbb E[n] = 0 by independence, and \mathbb E[n^2] = \sigma^2.
Q8. After Noise2Void denoising, can you compare the mean intensity of nuclei between two conditions on the denoised images?
Recall what a restored image is.
Only with care: the denoised image is an estimate that depends on the trained network, and smoothing changes peaks and small structures. Segment on the denoised image, measure intensities on the raw image, and never compare images denoised by differently trained networks.