Auditing Training Labels With Out-of-Fold Predictions
I used out-of-fold predictions to select label disagreements for review. The model's confidence narrowed the list without deciding which label was correct.
A document classifier kept failing on records that should have been straightforward. Tuning the model did not explain why, so I inspected the rows where its prediction strongly disagreed with the assigned label.
The disagreements could point to a mislabeled row, an unclear category rule, or a model error. I wanted a review list that kept those possibilities open.
Keep the scored fold out of training
The audit assigned records to folds and called a temporary classifier to score each one. For an out-of-fold prediction, that classifier must be trained without the record's entire held-out fold. Training on the same row would make its score a poor basis for this check.
Training and prediction are delegated to a helper whose implementation isn't included here. Check its split, and keep related documents and near-duplicates in the same fold. Otherwise, a held-out row can still be scored against nearly identical training examples.
training data
→ fold split
→ out-of-fold predictions
→ high-confidence disagreements
→ review queue
Use disagreement to direct the review
The selection checks whether the predicted label differs from the original, clears a confidence threshold, and belongs to the approved category list. Each prediction carries the record ID, original label, proposed label, fold, audit run, and model version.
A high score doesn't prove that the original label is wrong. The model may have learned a common labeling mistake or struggle with a rare category. The reviewer needs the source document and category rules to make the decision.
Keep corrections separate from source labels
The review can keep the original label, accept a correction, or flag the category definition for clarification. An accepted correction should retain the old and new labels, reviewer, timestamp, and audit run, so it can be inspected or reversed.
A correction table and approval handler would take those decisions beyond the candidate list shown here. They need to preserve the source labels and apply only accepted changes when building the next training dataset.
Have a similar project?
Talk to Me