Tag: Data Eng

  • DL0178 SAM: Promptable Segmentation

    This is an IntvML Pro interview question. Upgrade to Pro to unlock the full prompt, diagrams, and solution.

  • DL0175 RLAIF and Constitutional AI

    This is an IntvML Pro interview question. Upgrade to Pro to unlock the full prompt, diagrams, and solution.

  • DL0155 Crowdsourced Teleoperation Quality

    This is an IntvML Pro interview question. Upgrade to Pro to unlock the full prompt, diagrams, and solution.

  • DL0149 World Models from Unlabeled Video

    This is an IntvML Pro interview question. Upgrade to Pro to unlock the full prompt, diagrams, and solution.

  • DL0147 Multi-Task VLA Negative Transfer

    This is an IntvML Pro interview question. Upgrade to Pro to unlock the full prompt, diagrams, and solution.

  • DL0126 Contrastive Learning Pairs

    What is contrastive learning, and what are positive and negative pairs?

    A three-panel whiteboard sketch: a grid of unlabeled product photo frames marked with question marks, three small labeled photos tagged mug, shoe and lamp, and a proposal card for contrastive pretraining with blank positive pair and negative pair fields.

    The Problem: A retail search team has 2,000,000 unlabeled product photos and only 800 labeled ones. A teammate proposes contrastive pretraining for the image encoder ahead of the similar-items launch. No one on the team can yet say what the method optimizes, or which photo pairs it should treat as alike and which as different.

    Answer

    Contrastive learning trains an encoder by comparison instead of by prediction of a label: it pulls the embeddings of things that should mean the same thing together and pushes everything else apart. A positive pair is two views of the same underlying content (two augmentations of one photo in SimCLR, an image and its caption in CLIP, two nearby audio segments in CPC), and a negative pair is an anchor paired with content assumed to be different (any other item in the batch). The standard objective, InfoNCE, turns this into a softmax classification problem: given an anchor, identify its single positive among one positive and K negatives, using scaled cosine similarity as the logit. Positives define what the representation should be invariant to, and negatives are what prevents the trivial solution where the encoder maps every input to the same vector, a failure called representational collapse. The whole design problem of a contrastive system is therefore the pair-construction policy: a positive that is too easy teaches nothing, and a negative that is secretly a positive actively teaches the wrong thing.

    (1) Positives Encode The Invariance You Want: whatever transformation you apply to build a positive pair is exactly the factor the encoder learns to discard, so color jitter buys color invariance and destroys any task where color is the signal.
    (2) Negatives Are The Anti-Collapse Term: without a repulsive term the constant map f(x) = c is a global minimum of the attraction loss, so negatives provide the uniformity pressure that spreads embeddings over the hypersphere.
    (3) InfoNCE Is A K+1-Way Classification: one positive logit in the numerator, the positive plus all negatives in the denominator, which is why the loss is bounded below by \log(K+1) under a random encoder.
    (4) Temperature Sets Hard-Negative Focus: small \tau (0.05 to 0.1 is typical) concentrates almost all repulsive gradient on the few most similar negatives, while large \tau treats all negatives nearly equally.
    (5) Negative Count Is A Systems Problem: SimCLR needs batch sizes of 4096 or more to get enough in-batch negatives, MoCo decouples them with a momentum-encoder queue, and CLIP trained with a 32768 global batch across many GPUs.
    (6) False Negatives Are The Main Bias: in-batch negatives assume every other sample is semantically different, which is false on class-imbalanced or deduplicated-poorly data, and the loss then pushes apart items that should be close.

    Pairs do not have to come from augmentation. The general recipe is: find a cheap source of known agreement and treat everything else as disagreement. Augmentation gives agreement between two crops of one image; multimodal alignment gives agreement between an image and the alt-text scraped alongside it; temporal or spatial context gives agreement between adjacent frames, patches, or sentences; and labels give agreement between any two samples of the same class, which is what SupCon exploits to allow many positives per anchor. The negatives are almost always just the rest of the batch, because sampling them explicitly is expensive and in-batch negatives come for free with the forward pass already computed.

    Two-panel diagram: left panel shows one source image producing two augmented views labeled anchor and positive while two other images in the batch produce negative views; right panel shows the same points on a unit circle with an attraction arrow from anchor to positive and dashed repulsion arrows pushing the negatives away

    Figure 1: Pair construction and its geometric effect. Each anchor has exactly one positive (the other view of the same source) and 2N-2 negatives (all views of the other images in the batch); on the unit hypersphere the loss is a single attractive force toward the positive balanced against repulsive forces from every negative.

    Mathematical Formulation:
    s(u,v) = \frac{u^\top v}{\|u\|\,\|v\|}
    \ell_i = -\log \frac{\exp(s_{i,i^+}/\tau)}{\sum_{k \neq i} \exp(s_{i,k}/\tau)}
    \mathcal{L} = \frac{1}{2N}\sum_{i=1}^{2N} \ell_i
    I(u;v) \geq \log K - \mathcal{L}_{\mathrm{InfoNCE}}

    Where:

    • s(u,v) is the cosine similarity used as the logit, computed on L2-normalized embeddings u = f(v) produced by the encoder (and, in SimCLR, a discarded projection head).
    • \ell_i is the per-anchor NT-Xent loss and \mathcal{L} its average over all 2N views of an N-image batch.
    • i indexes the anchor view, i^{+} its unique positive, and k ranges over every other view, so the denominator holds 1 positive and 2N-2 negatives.
    • \tau > 0 is the temperature; the gradient weight on negative k is its softmax probability, so shrinking \tau sharpens that distribution onto the hardest negatives.
    • I(u;v) is the mutual information between the two views and K the number of negatives, giving the standard InfoNCE lower bound: the bound saturates at \log K, which is one reason large batches help.
    Log-x line chart of the cumulative share of repulsive gradient carried by the hardest fraction of negatives, for temperature 0.05, 0.1 and 0.5 over 1024 negatives; the low-temperature curve rises almost vertically showing that the hardest one percent of negatives absorbs most of the gradient

    Figure 2: Temperature decides which negatives matter. At \tau = 0.05 the hardest 1% of negatives absorbs most of the repulsive gradient, making training an implicit hard-negative miner that is also maximally sensitive to false negatives; at \tau = 0.5 the pressure is spread nearly uniformly and the embedding space stays smoother but less discriminative.

    AspectAugmentation (SimCLR, MoCo)Multimodal (CLIP, ALIGN)Supervised (SupCon)
    AnchorOne augmented view of an imageAn image embeddingA labeled sample
    PositiveA second augmentation of the same image (exactly one)The paired caption text (exactly one, symmetric loss both directions)Every other sample sharing the label (many per anchor)
    NegativesAll 2N-2 other views, or a momentum queue of 65k stale keysAll other captions in the global batch (32k in CLIP)Only samples with a different label, so false negatives vanish
    Invariance learnedTo the augmentation family you chose (crop, color, blur)To modality and phrasing, giving a shared image-text spaceTo everything within a class, which can over-collapse fine detail
    Main failure modeAugmentation removes task-relevant signal; shortcut solutions from crop statisticsNoisy or generic captions produce weak positives; batch size dominates costNeeds labels, so it is not self-supervised and inherits label noise

    Login to view more content
  • DL0098 CLIP Zero-Shot Classification

    What is CLIP, and how does contrastive image-text training enable zero-shot classification?

    A three-panel whiteboard card: one panel shows web photos with casual captions and no class labels, one shows a stack of 12,000 shelter intake photos beside five unchecked breed names with zero labeled examples, and one lists the team's open questions about classifying without training labels.

    The Problem: The PawMatch shelter team has a model pretrained on 400M web image-caption pairs, none carrying a class label. By Friday they must sort 12,000 intake photos into five breeds (golden retriever, boxer, tabby cat, parrot, rabbit) with zero labeled examples per class.

    Answer

    CLIP (Contrastive Language-Image Pre-training) is a dual-encoder model: an image encoder (a ViT or ResNet) and a text encoder (a Transformer) each map their input to a vector in one shared embedding space, and the vectors are L2-normalized so their inner product is a cosine similarity. Training uses a batch of N image-caption pairs scraped from the web (400M pairs for the original model), computes the full N \times N similarity matrix, and applies a symmetric InfoNCE loss that pushes the N diagonal entries up and the N^2 - N off-diagonal entries down. Nothing in that objective mentions class labels, so the learned text encoder is a general classifier generator: at test time you write each candidate class as a sentence such as “a photo of a golden retriever”, encode it, and the resulting unit vectors act as the rows of a linear classifier weight matrix. Classification is then one matrix multiply followed by an argmax over cosine similarities, which is why a new label set costs a text-encoder forward pass rather than a training run. The best original model (ViT-L/14@336px) reaches 76.2% zero-shot top-1 on ImageNet, matching a supervised ResNet-101 with an identical 76.2% ImageNet top-1 that saw 1.28M labeled images, and it is far more robust under distribution shift.

    (1) Two Encoders, One Space: each modality has its own encoder plus a linear projection into a shared d-dimensional space; there is no cross-attention between them, so image and text embeddings can be computed and cached independently.
    (2) Symmetric InfoNCE Over The Batch: the loss is cross-entropy applied twice, once along rows (image picks its caption) and once along columns (caption picks its image), averaged.
    (3) Learned Temperature: the logit scale \exp(\tau) is a trained scalar initialized to a temperature of 0.07 and clipped at 100, which controls how hard the softmax pushes against near-miss negatives.
    (4) Prompts Become Classifier Weights: zero-shot inference replaces the learned classification head with text embeddings of class descriptions, so the label set is defined at inference time, not at training time.
    (5) Batch Size Is Part Of The Objective: negatives come only from the current batch, so the original model trained at N = 32768 across many GPUs with the similarity matrix sharded.

    Diagram of CLIP training: a batch of N images passes through an image encoder to unit-norm vectors, a batch of N captions passes through a text encoder to unit-norm vectors, and both feed an N by N cosine similarity matrix whose diagonal cells are the positive pairs

    Figure 1: Each training step builds the full N \times N similarity matrix; the N diagonal entries are the true pairs and every other entry is an in-batch negative, which is why one step at N = 32768 supplies over a billion contrastive comparisons.

    Three details separate a working CLIP from a broken one. Normalization is load-bearing: without it the model can shrink the loss by inflating embedding norms instead of improving alignment, and the learned temperature then has no fixed scale to calibrate against. Prompt wording matters more than people expect, because captions in the training data are sentences, not bare nouns: using “a photo of a {label}” instead of the raw class name adds about 1.3 points on ImageNet, and ensembling 80 prompt templates by averaging their normalized text embeddings adds roughly 3.5 points for almost no inference cost, since the averaged vectors are computed once and cached. Finally, label naming is part of the model: polysemous class names such as “boxer” (dog breed or athlete) or “crane” (bird or machine) must be disambiguated in the prompt, which is a form of engineering that has no analogue in a supervised classifier with integer labels.

    Mathematical Formulation:
    z_i = f_{\theta}(I_i) / \|f_{\theta}(I_i)\|_2
    t_j = g_{\phi}(T_j) / \|g_{\phi}(T_j)\|_2
    s_{ij} = \exp(\tau)\, z_i^{\top} t_j
    \mathcal{L}_{I} = -\frac{1}{N}\sum_{i} \log \frac{e^{s_{ii}}}{\sum_{j} e^{s_{ij}}}
    \mathcal{L} = \frac{1}{2}\left(\mathcal{L}_{I} + \mathcal{L}_{T}\right)
    \hat{y} = \arg\max_{c} \; z^{\top} t_c

    Where:

    • z_i and t_j are the unit-norm embeddings of image I_i and caption T_j, both in \mathbb{R}^{d} with d = 768 for ViT-L/14.
    • f_{\theta} is the image encoder plus its projection and g_{\phi} the text encoder plus its projection; the two share no weights.
    • s_{ij} is the scaled cosine similarity and \exp(\tau) the learned logit scale; since z_i^{\top} t_j lies in [-1, 1], the scale alone sets the sharpness of the softmax.
    • i, j \in \{1, \ldots, N\} index the batch; \mathcal{L}_{I} normalizes each row and \mathcal{L}_{T} the same expression with the softmax taken over columns.
    • \hat{y} is the zero-shot prediction for a query image with embedding z, and t_c is the (optionally prompt-ensembled and renormalized) text embedding of class c; the temperature drops out of the argmax.
    • Required initial condition: \tau = \log(1/0.07) at step 0, clamped so that \exp(\tau) \leq 100 throughout training to prevent the logits from exploding.
    Grouped bar chart comparing top-1 accuracy of a supervised ResNet-101 and zero-shot CLIP ViT-L/14 on ImageNet and five distribution-shift benchmarks, with CLIP far ahead on ImageNet-R, ObjectNet, Sketch and ImageNet-A

    Figure 2: Matched at 76.2% on the ImageNet validation set, the two models diverge sharply under shift: zero-shot CLIP keeps 77.1% on ImageNet-A and 60.2% on Sketch, where the supervised model drops to 2.7% and 25.2%, evidence that never fitting the ImageNet label distribution is itself a robustness mechanism.

    PropertyZero-shot CLIP (ViT-L/14@336px)Supervised classifier (ResNet-101)
    Task supervisionZero labeled examples for the task, 400M noisy web pairs for pretraining1.28M hand-labeled images for exactly this label set
    Adding a classEncode one more prompt and append the vector, no gradient stepCollect labels, then retrain or refit the head
    ImageNet top-176.2%76.2%
    ImageNet-A top-177.1%2.7%
    Specialized domainsWeak: near chance on tumor-patch classification, poor on counting and satellite land useStrong once in-domain labels exist
    Inference costOne image forward pass plus a d \times C matmul against cached text vectorsOne forward pass through a fixed head

    Login to view more content
  • DL0095 Zero-Shot vs Few-Shot

    How do zero-shot and few-shot prompting differ, and when does few-shot prompting beat fine-tuning?

    Question card with three dashed panels for a support-ticket tagging bot: Draft A sends only an instruction and a new ticket, Draft B adds three solved example tickets before the new ticket, and Option C proposes a LoRA fine-tune on 40 labeled tickets while noting that the schema is revised weekly and the base model is shared by four other tasks.

    The Problem: A support team must tag incoming tickets into a strict JSON schema (queue, urgency) using one frozen base model that already serves four other tasks. They have only 40 labeled tickets and a schema that is revised every week, and they must choose among an instruction-only prompt, a prompt with a few solved tickets, and a LoRA fine-tune.

    Answer

    Both are inference-time conditioning: the weights \theta never change, only the tokens placed before the query. Zero-shot prompting gives an instruction and the input, so the model must map the task description onto a behavior it already learned during pretraining or instruction tuning. Few-shot prompting (in-context learning) prepends K solved demonstrations (x_i, y_i) that pin down the output format, the label space, and the input distribution before the real query arrives, which is why it helps most on tasks with an unusual schema or a strict output contract. In the original GPT-3 study, TriviaQA accuracy for the 175B model moved 64.3% → 71.2% going from zero-shot to 64-shot, and the gap between the two settings shrinks as models get better instruction tuning. Few-shot prompting beats fine-tuning when labeled data is scarce (roughly tens of examples), the task spec is still changing weekly, one frozen base must serve many tasks, or no training infrastructure exists; fine-tuning wins once you have thousands of clean labels, need the lowest possible per-request cost and latency, or need behavior that no prompt reliably elicits. The decision is mostly economics plus label count, not model quality: demonstrations are paid for on every request, while a fine-tune is a one-time cost amortized over traffic.

    (1) Same Weights, Different Context: neither method computes a gradient; few-shot differs from zero-shot only by the demonstration block S_K inserted into the prompt.
    (2) Demonstrations Teach Format, Not Mostly Facts: the label space, input distribution, and output template drive most of the gain, which is why even partly incorrect labels in the exemplars often still work.
    (3) Cost Is Recurring: K exemplars add K T_{ex} prefill tokens per call, inflating time-to-first-token and input spend on every request forever.
    (4) Fine-Tuning Trades Setup For Marginal Cost: a LoRA run costs money once and then serves a short prompt, so it wins above a traffic break-even point.
    (5) Data Volume Decides The Ceiling: with a handful of labels in-context learning is usually ahead; with thousands, parameter updates reach accuracy no prompt matches.

    The mechanism is worth stating precisely because it predicts the failure modes. Demonstrations act as a task locator rather than a training set: replacing gold labels with random ones from the correct label set degrades few-shot accuracy far less than removing the labels entirely, which shows the exemplars are mostly specifying which distribution to condition on. That same conditioning creates strong biases: majority-label bias (a class over-represented in the exemplars gets over-predicted), recency bias (the last exemplar dominates), and ordering sensitivity that can swing accuracy by tens of points across permutations of the same K examples. Calibration on a content-free input and stratified, order-shuffled exemplar selection recover most of that variance, and any prompt tuned on a large validation set is no longer honestly “few-shot” because the selection itself consumed labels.

    Line chart of task accuracy against the number of in-context examples for an 8B and a 70B frozen model, with two dashed horizontal reference lines for an 8B model fine-tuned on 100 and on 5000 labels

    Figure 1: Illustrative shot-scaling behavior: most of the in-context gain arrives by K = 4 and flattens after K = 16, a model fine-tuned on only 100 labels sits near the few-shot curve, and 5,000 labels put the fine-tuned small model above the frozen large model.

    Mathematical Formulation:
    p_{\theta}(y \mid I, x)
    p_{\theta}(y \mid I, S_K, x)
    S_K = ((x_1, y_1), \ldots, (x_K, y_K))
    T_{ctx} = T_I + K T_{ex} + T_x
    40 + 32 \times 60 + 30 = 1990
    R^{*} = \frac{C_{ft}}{K T_{ex} c_{in}}

    Where:

    • y is the generated answer, x the query, and I the instruction text; the first two lines are the zero-shot and few-shot predictive distributions under identical \theta.
    • S_K is the demonstration block and K the shot count, with K = 0 recovering the zero-shot case exactly.
    • T_I, T_{ex}, and T_x are token lengths of the instruction, one exemplar, and the query; T_{ctx} is the prefill length that sets time-to-first-token.
    • The numeric line instantiates T_{ctx} for K = 32 exemplars of 60 tokens each, giving 1,990 prompt tokens against 70 for the zero-shot prompt.
    • c_{in} is the price per input token, C_{ft} the one-time fine-tuning cost, and R^{*} the break-even request volume above which the fine-tune is cheaper; it assumes both options serve the same output length and per-token price.

    Plugging in real numbers makes the trade-off concrete. At c_{in} = \$0.30 per million input tokens, the 1,920 extra tokens from 32 exemplars cost about \$0.00058 per request, so a \$60 LoRA job pays for itself after roughly 104,000 requests. Prompt caching changes that arithmetic sharply: because the exemplar block is a fixed prefix, cached reads billed near 10% of the input rate push the break-even beyond a million requests and also cut the prefill latency penalty. That is why the honest answer to “few-shot or fine-tune” depends on traffic volume, prefix stability, and whether your serving stack caches, not on which technique sounds more advanced.

    Line chart of cumulative extra cost in dollars against requests served, comparing few-shot prompting with and without prompt caching against a flat one-time fine-tuning cost, with the crossover marked near 104 thousand requests

    Figure 2: Illustrative cost crossover: the few-shot line grows linearly with traffic because the exemplar prefix is re-billed per call, the fine-tune is a flat one-time charge, and prompt caching flattens the few-shot slope by roughly an order of magnitude.

    PropertyZero-shotFew-shot (in-context)Fine-tuning (LoRA)
    Labeled examples neededNone, only a clear instructionTypically 4 to 64, plus a small set for prompt selectionHundreds to tens of thousands
    Where task knowledge livesPretraining and instruction tuning onlyIn the prompt, re-sent or cached per requestIn adapter weights, prompt stays short
    Prompt tokens per request70 in the worked example1,990 at K=32, so higher time-to-first-token70, same as zero-shot
    Iteration speedSeconds, edit the instructionSeconds, swap or reorder exemplarsHours per run plus eval and deploy
    Main failure modeWrong output schema, task misreadMajority-label and recency bias, ordering variance, context limitsOverfits small or noisy label sets, forgets off-task behavior
    Multi-task servingOne model, one endpointOne model, per-task prompt templateOne adapter per task over a frozen base

    Login to view more content
  • ML0100 Duplicate Detection

    This is an IntvML Pro interview question. Upgrade to Pro to unlock the full prompt, diagrams, and solution.

  • ML0099 Noisy Labels

    How would you detect and correct inconsistent or noisy labels in training data?

    A three-panel question card. The first panel shows a sample of image records with their given class labels. The second shows three annotators giving different sentiment labels to the same sarcastic review. The third shows training accuracy reaching 99 percent while validation accuracy stalls near 84 percent.

    The Problem: A 50,000-image dataset has suspicious entries, and annotators disagree on the same item. The model fits the training labels almost perfectly while validation accuracy stalls. How would you find which labels are wrong and correct them before retraining?

    Answer

    Noisy labels are training labels that are wrong or inconsistent: a dog image labeled “cat,” a sentiment review labeled “positive” that is clearly negative, or the same entity labeled differently by different annotators. Detection starts with Confident Learning, a model-agnostic framework that uses cross-validated predicted probabilities to estimate the joint distribution between noisy labels and true labels, then flags examples where the model’s confident prediction disagrees with the given label. The open-source Cleanlab library implements this and has surfaced over 100,000 label issues in ImageNet. Correction ranges from simple relabeling (flip the label if the model is very confident) to weak supervision (using foundation models as labeling functions and denoising their outputs via a label model), to noise-robust training (CANOLA, 2026, achieves 19-52% improvement over SOTA label correction via noise-aware learning and iterative soft label refinement). Confident Learning is now taught as a core data-centric AI technique, and the original framework was published in JAIR 2021.

    (1) Detection via Confident Learning: cross-validate the model to get out-of-sample predicted probabilities, estimate the joint distribution of noisy vs true labels, and flag examples where the predicted label confidently disagrees with the given label; Cleanlab surfaced 100,000+ label issues in ImageNet this way.
    (2) Correction via Weak Supervision: foundation models (Llama 3.1, GPT-4, CLIP) serve as labeling functions that produce noisy labels, then a label model denoises them by learning each function’s precision and correlations, achieving 19.5% error reduction over zero-shot on the WRENCH benchmark.
    (3) Correction via Noise-Aware Training: instead of hard relabeling, use soft labels (probability distributions over classes) refined iteratively during training; CANOLA (2026) achieves 19-52% relative improvement over SOTA, and the Relabeler framework (2026) achieves 58% improvement in label correction precision by jointly leveraging local and global data relationships.

    Pipeline: cross-validated model produces out-of-sample probabilities, Confident Learning estimates the noisy-vs-true joint distribution and flags disagreements, then correction routes to relabel, weak supervision, or noise-aware soft-label training

    Figure 1: The noisy-label pipeline: cross-validated predictions feed Confident Learning to detect label errors via the noisy-vs-true joint distribution, then correction routes to manual relabeling, weak supervision, or noise-aware soft-label training.

    The detection step relies on a key insight: if a well-trained model confidently predicts “dog” for an image labeled “cat,” the label is more likely wrong than the model. Confident Learning formalizes this by estimating the joint distribution P(\tilde{y}, y^*) of observed (noisy) labels and true labels using the cross-validated probability matrix, then identifying the most likely mislabeled examples via pruning, counting, and ranking. This requires no hyperparameters and works with any classifier. For correction, the simplest approach is to remove or relabel the flagged examples if you have access to a human annotator. If human annotation is expensive, weak supervision lets you define labeling functions as natural-language prompts to foundation models, and the label model combines their outputs by learning each function’s accuracy and correlations. For training-time correction, noise-aware methods like CANOLA replace hard labels with soft labels (class probability distributions) that are refined iteratively, avoiding the hard commitment of relabeling while reducing the impact of noise. A 2026 paper on spectral signatures showed that the tail index of eigenvalue distributions at network bottleneck layers predicts test accuracy under label noise with R-squared of 0.984, providing a diagnostic that identifies 9% noise in CIFAR-10N with 3% error.

    A three-by-three matrix for classes cat, dog and bird: rows are the given noisy labels and columns the model's confident predictions, each row summing to 1, with green diagonal cells for agreement and red off-diagonal cells marking likely mislabeled examples

    Figure 2: Row-normalized rates of confident predictions given each noisy label: off-diagonal mass is the estimated per-class mislabeling rate, and Confident Learning turns these confident counts into the noisy-versus-true joint distribution used to prune, count, and rank label errors.

    Mathematical Formulation:
    \hat{P}(\tilde{y}=i,\, y^*=j) = \frac{1}{n}\sum_{k=1}^{n} \mathbb{1}[\tilde{y}_k = i] \cdot \mathbb{1}[\hat{p}_j(x_k) \geq t_j]
    \hat{y}^*_k = \arg\max_j \hat{p}_j(x_k)

    Where:

    • \hat{P}(\tilde{y}=i,\, y^*=j) is the estimated joint distribution of the noisy label \tilde{y} and the true label y^*; \hat{p}_j(x_k) is the cross-validated predicted probability of class j for example k.
    • t_j is the average per-class confidence threshold (the average self-confidence for class j); examples where \hat{p}_j(x_k) \geq t_j but \tilde{y}_k \neq j are flagged as likely mislabeled.
    • \hat{y}^*_k is the Confident Learning estimate of the true label: the argmax of the cross-validated probabilities, used for relabeling or soft-label assignment in noise-aware training.
    MethodApproachRequires Labels?
    Confident Learning (Cleanlab)Cross-validated probabilities estimate noisy-vs-true joint distributionNoisy labels only
    Weak SupervisionFoundation models as labeling functions; label model denoisesNo labels needed; optional ground truth
    Noise-Aware Training (CANOLA)Iterative soft-label refinement during trainingNoisy labels only
    Spectral Signatures (2026)Eigenvalue tail index at bottleneck layers predicts noise levelDiagnostic; no labels needed

    Login to view more content