The time our model kept flagging every photo of a dog in a snowy yard, and how I traced it
Back in February I was testing a small image model I built for a client in Minneapolis, and it kept labeling every picture of a dog in snow as a wolf, no matter what I did. I was up at 11pm scrolling through 200 training images when I noticed most of the wolf shots had white backgrounds, so the model had basically learned snow equals wolf. I pulled out half the snowy wolf images and added about 60 dog-in-snow photos, then retrained it over the weekend. Accuracy on that test set went from 61 percent to 89 percent. Has anyone else run into a model that latched onto the background instead of the actual subject?
This is such a classic shortcut-learning problem and it pops up way more than people admit. Read a writeup a while back about a medical imaging model that did the same thing, it keyed on the little ruler markers some techs left in the frame instead of the actual tissue, so it looked amazing until they tried it at a different hospital. Backgrounds and stray artifacts are sneaky like that. Your fix was smart though, mixing up the wolf shots so snow stopped being the giveaway. 61 to 89 is a huge jump for a weekend of retraining.