liveBook · Manning

Anomaly score

As explained in Human-in-the-Loop Machine Learning: Active learning and annotation for human-centered AI

A numerical score indicating how strongly an item differs from patterns represented in reference data or a model.

An anomaly score ranks how unusual an item’s model activations are relative to other items. For each neuron, rank activations from largest to smallest: low activations receive high outlier scores, while high activations receive low scores. This uses rank order rather than relying on absolute activation values. section 4.2

Turn an activation rank into a score

Among 10 ranked activations, an item at -0.36 is ninth-lowest, giving it an outlier score of 9/10, or 0.9. For an unlabeled item between ranked values, interpolate: -0.35 halfway between the eighth- and ninth-lowest values scores 85%. section 4.2 section 4.2.1

[2.43, 2.23, 1.74, 1.12, 0.89, 0.44, 0.23, -0.34, -0.36, -0.42]

Example activations ranked from largest to smallest; the low end receives the highest outlier scores. section 4.2

Build the rankings from held-out validation data drawn from the training distribution, not training data, which may be overfit. For an item, average its ranked scores across neurons as a statistically safer choice; alternatively, use the lowest maximum logit score. section 4.2.1

How Human-in-the-Loop Machine Learning: Active learning and annotation for human-centered AI covers it

How deep it goes
Calculates per-neuron ranks, interpolates between validation values, and compares averaging scores with using the lowest maximum logit.
Examples
Uses a 10-item activation ranking, a -0.36 activation scoring 0.9, and interpolation that gives -0.35 a score of 85%.
What it assumes
Requires a trained model, unlabeled items, and held-out validation data from the training distribution.
What you can do after
Apply it via model-based outlier sampling to prioritize unlabeled items for annotation.
How it connects
Connects anomaly scoring to active learning, validation data, neuron activations, logits, and outlier sampling.

Also explained in

Compare how 3 books explain anomaly score →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Human-in-the-Loop Machine Learning: Active learning and annotation for human-centered AI. The section links point to the parts of the book it draws on.