Tuning Image Classifiers using Human-In-The-Loop
AutoThreshold is an Expectation-Maximization procedure that re-tunes an image classifier's class-confidence threshold when product photos drift out of distribution and no labelled validation set exists. Predictions are sorted by confidence. Each iteration, human annotators label a window of m images centred on the current threshold estimate, starting from 1. The threshold is then re-estimated by maximizing a metric such as f-beta on those annotations, repeating until it converges. For a leopard-print classifier, the estimated threshold lands just before negatives start appearing among positives, as confirmed by cumulative-annotation slope plots. Only a small number of labels is needed, and those labels also seed a new training set.
Related posts
- Machine Learning in Content Moderation at Etsy
Etsy Code as Craft mediumAdeptEtsy's Trust & Safety team detects policy-violating listings with a supervised multimodal classifier that combines an ALBERT text encoder and an EfficientNet image encoder. The two embeddings are fused EmbraceNet-style by late concatenation, followed by a softmax over violation classes plus a neutral no-violation class, and the model is trained with focal loss to handle class imbalance. Training data pairs annotated violations with hard negatives (items reviewed and found not violating) and randomly sampled easy negatives, split by time for progressive evaluation. Because true recall can't be measured at Etsy's listing volume, the team uses an annotated recall proxy, rolls out new challenger models against the champion via canary A/B tests, and retrains when monitoring shows performance degrading. The system has removed over 100,000 violations in a year.
- How to train your model dynamically using adversarial data
Hugging Face mediumAdeptDynamic adversarial data collection (DADC) has humans craft inputs that fool a trained model, then retrains the model on those examples over repeated rounds, countering the saturation and blind spots of static benchmarks. A walkthrough applies it to MNIST: a small PyTorch CNN (89% test accuracy after 20 epochs) is deployed in a Hugging Face Space where users draw digits, and a custom flag function saves misclassified samples and retrains once a threshold is reached. Cited work on natural language inference suggests standard data collection wins in the short term while DADC yields higher accuracy over many rounds.
- Opinion Classification with Kili and HuggingFace AutoTrain
Hugging Face mediumAdeptKili's annotation platform and Hugging Face AutoTrain combine into an active-learning pipeline that classifies about 40,000 Google Play reviews of the Medium app into Subscription, Content, Interface and User Experience, then applies sentiment analysis to the classified reviews. The walkthrough covers creating a Kili labeling project through the web UI and the Python API, uploading data in batches of at most 100, and flagging changed samples between dataset versions for re-review. It then exports the labels to CSV and trains a model with AutoTrain and a second one without it.
- Agile Deliberation: How AI helps humans define the gray areas
Google Research easyNoviceAgile Deliberation is a human-in-the-loop framework for building image classifiers for subjective categories like "healthy food" or pay-to-play clickbait. Users first scope the concept into in-scope sub-concepts and explicit exclusions, then VLMs mine borderline images that challenge the current definition, and the user's feedback drives an automatic prompt optimization loop. In 18 live 1.5-hour user sessions, it produced more consistent labels and classifiers that beat zero-shot, automated-decomposition and manual-deliberation baselines. Participants also reported lower effort, stress and mental demand than with manual prompt engineering. The code is open-sourced.
- Introducing GIST: The next stage in smart sampling
Google Research hardMasterGIST (Greedy Independent Set Thresholding) selects training-data subsets that balance max-min diversity in embedding space against monotone submodular utility, with a provable guarantee of at least half the optimal value; reaching above 0.56 of optimal is proven NP-hard. It sweeps candidate distance thresholds, builds a graph linking points closer than each threshold, and greedily approximates a maximum-utility independent set for each one, achieving utility comparable to the optimum at half the optimal minimum distance. On single-shot ImageNet downsampling with ResNet-56, GIST variants beat random, margin, k-center and submodular baselines on top-1 accuracy, and the selection step's runtime is negligible next to model training.