Skip to content
AI.info

Kinds of learning

Classification: Categories, Scores, and Decisions

Learn the major classification forms, the role of scores and thresholds, and how abstention and review protect high-cost decisions.

By the end you can

Key idea

The emergency-call classifier that beat the dispatchers and changed nothing

A machine listened to 169,049 emergency calls and heard cardiac arrest better than the humans did. Copenhagen Emergency Medical Services ran the test as a double-masked randomised clinical trial, from 1 September 2018 to 31 December 2019. A speech-recognition model listened live to calls to the Danish emergency number 112 and flagged 5,242 of them as suspected out-of-hospital cardiac arrests. Blomberg and colleagues reported what happened in JAMA Network Open in 2021.

On the classifier's own terms, it won. “Machine learning alerts alone had a significantly higher sensitivity than dispatchers without alerts for confirmed OHCA (85.0% vs 77.5%; P < .001) but lower specificity (97.4% vs 99.6%; P < .001) and positive predictive value (17.8% vs 55.8%; P < .001).” Read the two numbers together. The model caught 85.0% of the arrests to the dispatchers' 77.5%. But fewer than one alert in five was a real arrest, against more than half of the dispatchers' own suspicions.

Then the part that decides whether the model was worth building. Sending the alert to the dispatcher did not significantly change what the dispatcher recognised: 296 of 318 arrests, 93.1%, with alerts, against 304 of 336, 90.5%, without them; P = .15. A better label arrived. The decision downstream stayed where it was.

A class label is an output format; the operational response is a separate design choice.

Visual

Four classification structures that are often confused

The categories can relate to one another in different ways, changing targets, losses, metrics, and interfaces.

The multilabel case has a public benchmark at scale. CheXpert, released in 2019, is described by its authors in two sentences of the abstract: “We present CheXpert, a large dataset that contains 224,316 chest radiographs of 65,240 patients. We design a labeler to automatically detect the presence of 14 observations in radiology reports, capturing uncertainties inherent in radiograph interpretation.” Fourteen observations, any number of which can be true of one image. Each one is recorded as positive, negative or uncertain rather than forced to a binary. The label set itself carries an abstention value. A separate team confirmed both the counts and that extra category in Scientific Data later the same year.

The ordinal case has a national example, with an abstention rule written into it. Ofqual's 2020 standardisation model produced an ordered calculated grade for every A level candidate in England. Of 718,276 centre assessment grades it adjusted 39.1% downwards, left 58.7% unchanged and raised 2.2%. Where the evidence was too thin it declined to standardise at all: “students in small cohorts received their CAG, since the statistical evidence was not sufficiently reliable to allow standardisation”. On 17 August 2020 the policy was withdrawn and every candidate received the higher of the two grades. An ordered target, an explicit insufficient-evidence branch, and a live demonstration that ordinal decisions are contested on the ladder, not on a single cut.

The binary case is the narrowest of the four, and its whole quality lives in one bit. The Copenhagen model was more sensitive than the dispatchers, 85.0% against 77.5%, and far less precise: positive predictive value 17.8% against 55.8%. Both numbers are properties of that single arrest-or-not output. Neither is visible in the other.

FigureLayers · 4 layers
  1. 01

    Binary

    Each example is assessed for one of two exclusive outcomes.

  2. 02

    Multiclass

    One label is selected from three or more mutually exclusive categories.

  3. 03

    Multilabel

    Several labels may be true for the same example.

  4. 04

    Ordinal

    Categories are ordered, but the distance between levels is not assumed equal.

Scores are not the same as decisions

Many classifiers produce scores for each class. A product then applies thresholds, capacity limits, policies, and fallback rules to convert those scores into action.

A score between zero and one is not automatically a calibrated probability. And even a calibrated probability does not dictate the correct threshold, because consequences and resources differ by setting.

That went to a large-scale test in 2019. Ovadia and eight co-authors took image classifiers on MNIST, CIFAR-10 and ImageNet. They added an LSTM on the 20 Newsgroups text corpus. They also modelled the 37-million-example Criteo ad-click dataset. Each model was given temperature scaling, the standard post-hoc fix, which rescales a model's scores using a held-out validation set. Then they fed the models progressively corrupted inputs. Their finding: “while calibrating on the validation set leads to well-calibrated predictions on the test set, it does not guarantee calibration on shifted data.” On inputs entirely outside the training distribution, most methods still returned low-entropy, high-confidence answers. In the paper's own phrase, they are “confidently wrong about completely OOD data.” The score kept its shape after the world stopped matching it.

One threshold does not yield one error rate either. NIST's face recognition vendor test ran 189 mostly commercial algorithms from 99 developers over 18.27 million images of 8.49 million people, and published in December 2019. Holding the operating threshold fixed, the executive summary reports: “Across demographics, false positives rates often vary by factors of 10 to beyond 100 times.” False positives were highest for West and East African and East Asian faces in application photographs, and highest for American Indians in domestic mugshots. One score, one threshold, and error rates two orders of magnitude apart depending on who was standing in front of the camera. Slice-level reporting is therefore part of setting the threshold, not a fairness appendix written afterwards.

The classifier estimates; the decision policy acts.

Comparison

Three policies for the same risk score

The two-threshold design is not a teaching device. A commercial risk-prediction algorithm running on a live patient population has exactly two cuts on its score. Patients above the 97th percentile are automatically identified for enrolment in the health system's care management programme. Patients above the 55th percentile are referred to their primary care physician, who is given contextual data and asked to consider whether the patient would benefit from enrolment. Below that, nothing happens. Obermeyer and three colleagues dissected the whole arrangement in Science on 25 October 2019.

Both cuts sit on one score, so a defect in the score is inherited by both. At the 97th-percentile threshold, Black patients carried 26.3% more chronic illnesses than White patients — 4.8 versus 3.8 distinct conditions. The automatic branch was demanding more sickness from some patients than from others to fire at all. “Remedying this disparity would increase the percentage of Black patients receiving additional help from 17.7 to 46.5%.” On the same day the paper appeared, the New York State Department of Financial Services and Department of Health wrote jointly to UnitedHealth Group about the Impact Pro algorithm. A threshold is a policy, and a policy can be asked to justify itself.

The low-threshold end of that trade has its own measured case. The Copenhagen model sat there: 85.0% sensitivity bought at a positive predictive value of 17.8%, which is roughly five alerts that were not arrests for every one that was. A two-threshold policy exists to avoid paying that price uniformly. It spends human capacity selectively and separates uncertainty from danger. What it cannot do is escape a distortion in the score both of its cuts are drawn on.

FigureComparison · 3 columns

Low threshold

Flag many transactions to catch more attacks.

  • Higher recall
  • More legitimate cases interrupted
  • Larger review workload
  • Useful when missed attacks are costly

High threshold

Intervene only when evidence is strong.

  • Higher precision
  • More attacks pass unchecked
  • Smaller review queue
  • Useful when intervention is disruptive

Two-threshold policy

Approve low risk, review the middle, block extreme risk.

  • Creates an abstention region
  • Uses human capacity selectively
  • Separates uncertainty from danger
  • Requires clear escalation rules

Case

IDx-DR: an authorised screening device that is allowed to return nothing

The abstention region has been through a regulator. On 11 April 2018 the US Food and Drug Administration authorised IDx-DR, software that grades retinal photographs for diabetic retinopathy. The agency called it “the first device authorized for marketing that provides a screening decision without the need for a clinician to also interpret the image or results”.

The design is three-way, not two-way. “If the images are of sufficient quality”, the software returns either “more than mild diabetic retinopathy detected: refer to an eye care professional” or “negative for more than mild diabetic retinopathy; rescreen in 12 months”. If they are not, it returns neither.

The pivotal trial appeared in npj Digital Medicine on 28 August 2018. It enrolled 900 subjects at ten primary care sites, and 819 could be fully evaluated. On those 819 the observed sensitivity was 87.4% and the observed specificity 89.5%; the enrichment-corrected figures the FDA records are 87.2% and 90.7%. Imageability was 819 of 852, or 96.1%. About one patient in twenty-five was given no classification at all, by design.

Example

Classification tasks with different category logic

The same word—classification—covers several distinct product designs, and the difference is visible in the shape of the label, not in the model.

  • Quality inspection: pass or fail, with an uncertain band sent to a technician.
  • News routing: exactly one desk receives each article, forming a multiclass task.
  • Medical coding: several conditions may apply to one record, forming a multilabel task. CheXpert labels 14 observations per chest radiograph across 224,316 images from 65,240 patients, and each of the 14 is positive, negative or uncertain, so the label set never forces a verdict it does not have.
  • Credit severity: low, medium, and high form an ordered target rather than unrelated classes, as Ofqual's calculated grades did for 718,276 A level entries.
  • Open-set recognition: the system must detect that none of the known categories fits.
  • Hierarchical taxonomy: a prediction moves from a broad family to a specific subtype.

Steps

Design a classifier around the action

A useful classification specification contains more than class names, and Michigan has measured what the missing parts cost.

The state's MiDAS system decided unemployment fraud with no human in the loop. The US Court of Appeals for the Sixth Circuit put it plainly in Cahoo v. SAS Analytics: “From October 2013 to August 2015, MiDAS exclusively determined whether claimants engaged in fraud—no human being took part in this process”. The same opinion records that “the Michigan Auditor General reviewed over 22,000 of MiDAS' fraud determinations and found that 93% of them did not actually involve fraud”.

The agency then reviewed 62,784 penalty cases itself, and announced the result on 11 August 2017. “Of those cases, 40,195 were originally resolved by way of computer program based on available information. As part of the review, 85 percent of these original fraud findings were reversed.” The other 22,589 cases had been flagged by the computer and then examined by a human investigator, and 44% of those were reversed. One classifier, two review paths, and the reversal rate roughly doubled on the path where nobody looked. That is the price of steps 2 to 4 below, written in reversals rather than in principle.

Two of the six steps have their own public numbers. Protecting unknowns is what IDx-DR does when it returns no grade for an image below quality, and what Ofqual did when it left the smallest cohorts unstandardised. Testing by slice is what the NIST face test did at one fixed threshold, where false positive rates varied across demographic groups by factors of 10 to beyond 100. A single threshold that is several different policies depending on who walks up to it.

FigureProcess · 6 steps
  1. 1. Define exclusivity

    Decide whether one, several, ordered, or hierarchical labels can apply.

  2. 2. Protect unknowns

    Create a path for novel, insufficient, or conflicting evidence.

  3. 3. Price errors

    Estimate the consequences of false positives, false negatives, and delayed decisions.

  4. 4. Allocate review

    Match uncertainty regions to available expert capacity.

  5. 5. Test by slice

    Evaluate classes, groups, devices, sites, and rare operating conditions separately.

  6. 6. Monitor thresholds

    Reassess score distributions and intervention rates after deployment.

Classification is not diagnosis or explanation

A classifier can identify patterns associated with a category while remaining wrong about cause, intent, or mechanism. An image label does not explain why a defect formed. A risk class does not establish why a person will act. The commercial risk algorithm above sorted patients accurately on the quantity it was fitted to, and that quantity was not the one the care programme existed to act on.

Claims must match the evidence. The target and the evaluation are what set the level, and classification claims should not exceed it. Causal questions require different evidence, developed later in this path.

Case

A horse classifier that was reading the source tag

A classifier that scored competitively on the PASCAL VOC 2007 “horse” class was not looking at horses. It was reading a source tag. Lapuschkin and five colleagues traced that Fisher-vector model's decisions back to the pixels and published the result in Nature Communications on 11 March 2019.

The watermark sits on about one fifth of the horse photographs — “a striking artifact of the dataset that so far had gone unnoticed”. Cut the tag out and the model's horse decision collapses. Paste that same tag onto a photograph of a Ferrari and, in the authors' words, “the FV's prediction swiftly changes from ‘car’ to ‘horse’”.

The class had been right for years. The mechanism was never horses.

Key takeaways