Q1: Can such a method work?
Yes. If only a few labels in your training data are incorrect and you've used early stopping, your model should halt before overfitting and still generalize well.
To find mislabeled data:
- Run inference on your training set.
- Compare predictions with labels.
- Calculate the loss for each sample.
- Either:
- Use a fixed loss threshold, or
- Sort samples by loss (descending) and review the top entries — these are likely mislabeled.
You can also plot loss vs. sample index. A sudden "jump" often indicates where the suspicious entries begin.
Cleaning these up typically gives your model a small performance boost.
Note: If you don't want to fully train a model on the non-cleaned data, it might work if you just use a smaller model trained on a smaller subset of the dataset or with fewer epochs. This will result in more false positives, but might still work for you to sort out easy to spot faulty entries.
Sidenote
The per-sample loss (after training) reflects how "difficult" a sample is — i.e., how much it deviates from the learned pattern.
You can use this to:
- Sort data by loss (ascending), and
- Skip shuffling during an initial pretraining phase.
This forms a curriculum-like learning setup: the model sees easy examples first, then harder ones — usually more stable and efficient.
Later, reintroduce randomization or gradually add harder samples to avoid forgetting the basics. This can enable higher learning rates and faster convergence.
Q2: What are keywords to search for (anything I tried just talks about errors in the model)? I'm mostly looking for references or examples.
Keywords:
- data cleaning
- data cleansing
Topic "anomaly detection" is related, but not the same. Anomaly detection is more about detecting unexpected input data. For example, you trained your model for images of cats and dogs to label them correctly and then you want to detect cases where this look like neither cat or dog... e.g. an image of a horse or human is presented to the model. Anomaly detection can help to detect such cases, but while it is similar, it does not really detect wrongly labeled data. It would help however with entries which do not fit any of the predefined 100 categories.
cleanlab
is a useful library for discovering and remediating label errors in a fixed dataset, using methods described in peer-reviewed publications. github.com/cleanlab/cleanlab$\endgroup$