On the Pitfalls of Using the Residual Error as Anomaly Score

Felix Meissen, Benedikt Wiestler, Georgios Kaissis, Daniel Rueckert · MIDL (PMLR 172) · 2022

Meissen, Wiestler, Kaissis and Rueckert, On the Pitfalls of Using the Residual Error as Anomaly Score, MIDL 2022.

In one paragraph

A popular recipe for finding lesions without lesion labels: train an autoencoder on healthy scans only, feed it a scan that may contain a lesion, and flag the pixels where the output differs most from the input. The hope is that the network “cannot imagine” the lesion, repaints healthy tissue instead, and the difference (the residual) lights up exactly the lesion. The paper argues this hope ignores a second source of residual: the network is never a perfect copy machine, so healthy pixels also have non-zero residual, and those can be bigger than the residual of a lesion whose brightness is close to normal tissue. The paper shows this with simulated lesions on healthy brain MRI.

The picture, intuition first

Think of the residual map as a noisy alarm. The alarm should ring loudly at the lesion and quietly everywhere else. There are two things that make it ring:

  1. Real signal. The lesion pixel has a value different from what healthy tissue would have there. The ring strength is that difference.
  2. Reconstruction noise. The network smooths edges, loses fine texture, and mis-draws small structures. This rings the alarm at healthy edges even with no lesion at all.

A lesion is found only if its signal rings louder than the noise at the healthy pixels it is being compared with. A lesion that is only slightly brighter or darker than the tissue it replaced gives a quiet signal, and healthy edges drown it out. A very bright lesion on a mostly mid-grey brain gives a loud signal, which is why these methods look good on hyperintense lesions (bright on FLAIR or T2) and are accused of being “white object detectors”.

The authors’ point about the fix is the less obvious one: making the autoencoder reconstruct better does not help much, because a stronger autoencoder also reconstructs the lesion (it generalises), so the lesion signal shrinks along with the noise.

Notation in plain words

What they do (MOOD brain MRI, 256×256 slices, lesion = disc of radius 20 pixels)

Questions and doubts

Takeaways