When Cats, Dogs, and Birds Become One: Understanding Soft Labels and Monte Carlo Conformal Predictions
Have you ever looked at a picture and thought, “Is that a cat, or maybe a dog… or wait, it has feathers?” Probably not, because that is an oversimplification to the idea I am writing about today.
I am using this example, because it is an abstract way of explaining the complex identification of industry problems like https://arxiv.org/pdf/2312.07460 classifying skin lesions. This is a tough problem, even for AI algorithms. Instead, we will break down the new Monte Carlo Conformal Predictions as it relates to simple classification. But in the back of your mind, think medical imaging.?
If you want to jump to the code, bippity-boppity, Google's code is now your property: uncertain_ground_truth/monte_carlo.py at main · google-deepmind/uncertain_ground_truth · GitHub
Label Confusion
This confusion in labeling objects is exactly what soft labels capture—except we use numbers (probabilities) to describe the uncertainty instead of just saying “I’m not sure.”
In a typical classification problem, you might tell the computer:
and each training example comes with a single hard label like 0, 1, or 2. But there are times when you’re not 100% sure, or maybe multiple people offered different opinions. That’s where soft labels come in. Multiple opinions happen quite frequently in medical imaging, that is why people seek a second opinion!
What Exactly Are Soft Labels?
Soft labels (sometimes called “smooth labels” or “probabilistic labels”) represent the fact that an image might be:
Each line above is a distribution over the three classes. Instead of shouting “it’s a dog,” we say, “the data suggests it’s probably a dog, but it could be something else.”
Here’s where Monte Carlo Conformal Prediction enters the stage. Conformal prediction is a mathematical tool that helps us wrap a “guarantee” around our guesses. It says something like: “We’ll output a set of labels for this new image, and we can guarantee that the correct label is inside this set at least 90% of the time” (or however confident we want to be).
But how do you do that confidently if each example has a range of possible labels rather than just one?
Monte Carlo Conformal Prediction—The Big Picture
Start with Uncertain Labels We have a bunch of examples—some are easy (100% dog) and others are uncertain (20% cat, 50% dog, 30% bird). These “soft labels” tell us how likely each category is.
Randomly Pick a Label, Repeatedly For each uncertain example, imagine rolling dice that land on dog, cat, or bird according to those probabilities. If you do this multiple times, you’ll end up with different “possible realities” for that example:
领英推荐
Expand the Calibration Data In order to figure out the “confidence threshold” or the “p-values” for our conformal predictions, we need a set of labeled examples (a calibration set). But if each example might have multiple true labels, we handle that by simply duplicating each example for every label we sampled.
Compute Coverage Guarantees Once we have this expanded dataset—where each example is repeated for each sampled label—we can apply standard conformal prediction methods. The math behind conformal predictions ensures that if we produce a set of possible labels for a new, unseen image, there’s a high probability we’re not excluding the correct label.
That’s it. If an image looks part-cat, part-dog, part-bird, Monte Carlo Conformal Predictions will (in a sense) treat each scenario as possible and calibrate accordingly, giving us a final “prediction set” that honestly reflects our uncertainty.
Sneak Peek of a Chimera
Imagine you’re labeling this bizarre (but adorable) mash-up creature. How confident are you that it’s a “cat”? Maybe 20%. A “dog”? Possibly 50%. A “bird”? 30%. The exact percentages come from your intuition, other models, or multiple human annotators. Regardless, if you pass these numbers into a Monte Carlo Conformal method, you’ll get robust set predictions—like “this image is either dog or bird” with 90% certainty.
Why This Matters
Key Takeaways
Conformal prediction doesn’t magically turn uncertainty into certainty—it just helps us formalize “how uncertain we are” and translates that uncertainty into predictive sets. Whether you’re labeling quirky cat-dog-bird hybrids or diagnosing diseases, it’s a powerful framework for honest, reliable predictions.
Thanks for reading!
This sounds like a fascinating topic! Image classification can truly make a difference in many fields, especially in healthcare. How do you see Monte Carlo Conformal Predictions changing the landscape of image processing?