Your Model Learned to Find Cracked Tiles by Looking at the Table They Were Photographed On
The returns desk wanted help. Customers send photos of tiles they say arrived cracked. Could a model sort the real claims from the rest? You needed training photos. The cracked ones were easy. The returns team had p
The returns desk
wanted help.
Customers send photos
of tiles they say
arrived cracked.
Could a model
sort the real claims
from the rest?
You needed training photos.
The cracked ones
were easy.
The returns team
had photographed
every damaged tile
for two years.
On the same grey bench.
Under the same light.
The good ones
came from the product photography.
White studio background.
You trained,
held out twenty percent,
and tested.
Ninety eight percent.
Then the first real week.
Photos from kitchen floors,
van beds,
car boots.
The model called
almost all of them
undamaged.
Including the one
that was in three pieces.
Here is the mechanism.
A model learns
whatever separates
your labels
most cheaply.
You meant it to learn
cracks.
But in your data
there was something
much easier.
Grey bench: cracked.
White background: fine.
A whole image of evidence,
versus a thin dark line.
The test set
came from the same two piles,
so it had the same shortcut.
It could only confirm it.
Researchers call this
shortcut learning.
Geirhos and colleagues
wrote the standard paper on it
in 2020.
Medical models
have learned
which hospital took the X-ray.
Yours learned
which room took the photo.
Here is what to do.
Collect both classes
in the same conditions.
Good tiles on the grey bench too.
Cracked tiles
on floors and in boxes.
Build your test set
from the place
the model will actually work.
Real customer photos,
labelled by hand,
even if it is only two hundred.
Look at what the model looks at.
A saliency map
lighting up the table edge
tells you more
than any accuracy figure.
And try one cruel test.
Put a good tile
on the grey bench.
If the model calls it cracked,
you have trained
a bench detector.
The model did not fail
at the job you gave it.
It did the job
your data described.
– Serguey Asael Shinder
Originally published by Dev.to AI. Aggregated on AIWithGhost for educational purposes — full credit and traffic to the original publisher.