Quiz: domain shift
Before this unit: Few labels: annotation and the human in the loop (previous unit); Day 43: Networks for cells and objects; Day 42: Learning without labels.
See also: Day 38: Evaluation and statistics.
Short questions on models that meet new microscopes. Try each on paper first, then open the answer.
Q1. Name three things that change between two microscopes and one that changes between two experiments on the same microscope.
Light, optics, camera; and the sample.
Microscopes: brightness and background (lamp, exposure, gain), blur and pixel size (objective, focus), noise (camera, exposure time), or the whole modality. Experiments: stain batch, cell line, treatment, the share of each cell class, confluence.
Q2. How can you notice a shift before you have any labels of the new images?
Compare something you can compute on every image.
Compare statistics of the old and new images: intensity histograms, means and spreads of measured features or of a network’s internal features. A large difference (in units of the old spread) signals a shift. The network’s confidence is not a reliable signal: it can be confidently wrong.
Q3. You standardise each microscope’s intensities with its own mean and SD. When does this hurt?
What else moves the mean intensity?
When the new images differ for a biological reason, e.g. fewer bright mitotic cells: their lower mean is real, but normalisation removes it and shifts every cell. In the demo: 83 % instead of 92 % with no microscope change at all.
Q4. What does “re-estimating the normalisation statistics” of a network change, and what does it need?
Which numbers are stored in a normalisation layer?
It replaces the stored means and variances of the normalisation layers by those measured on the new images; no weights are trained. It needs unlabelled images of the new microscope (enough for stable statistics), and it has the same trap as normalising the inputs.
Q5. Why is augmentation during training not a complete answer to domain shift?
Which variations does the model see?
It only teaches invariance to the variations you simulate (gain, offset, blur, noise); a new modality or a new cell line is not one of them. And ignoring a variation that was informative (intensity) costs accuracy on the original images (96 % → 90 % in the demo).
Q6. You fine-tuned your model on 20 labelled images of the new microscope and report 94 % on those 20 images. What is wrong?
Which images were used to adapt?
The test images were used for fine-tuning: the score is optimistic. Test on other images of the new microscope, from other wells or days, and report the old microscope’s score separately too.