AI Safety Compendium

Releasing and running it safely

ConstrainingAlso: Evaluating

Anomaly detection

Flag statistically unusual behaviour as a proxy for an unknown hazard.

Open in the compendium

Anomaly detection flags moments when an AI system's inputs or internal workings look statistically unusual, as a stand-in for hazards nobody has yet named. Most safety monitors are trained on examples of known bad behaviour. Anomaly detection instead learns what 'normal' looks like and raises an alarm at anything that departs from it. The most dangerous failures, such as a new kind of jailbreak or a model acting on a hidden goal, may look like nothing anyone has seen before.

How it works

The basic version comes from ordinary machine learning. In 2016 Dan Hendrycks and Kevin Gimpel showed that a classifier tends to be less confident on inputs unlike its training data, so low confidence can flag out-of-distribution inputs (inputs that differ from what the system was trained on). Modern versions look inside the model. A detector records the model's internal activations on a trusted set of normal inputs, then scores each new input by how far its activations fall from that normal pattern. A flagged input can be blocked, sent to a human, or labelled and added to a supervised monitor's training data.

In November 2022 the Alignment Research Center (ARC) set out 'mechanistic' anomaly detection, which asks whether the model reached its output for the usual internal reasons. ARC's example is a model that predicts what security cameras in a vault will show. Normally the cameras show the diamond because the diamond is there. If a thief tampers with the cameras so the diamond only appears to stay put, the prediction looks the same, but the reason behind it has changed. A mechanistic detector should flag that case even though the input looks ordinary.

Where research stands

Anomaly detection is a mature field for images and simple classifiers, but early-stage for catching dangerous behaviour in large language models. Anthropic's 2025 research agenda lists it as a recommended direction and calls one version of the problem, detecting big differences between two models, unexplored. Results so far are mixed. EleutherAI's experiments in 2024 and 2025 found that mechanistic detectors did not consistently beat simple activation-based baselines, and that no detector worked across all models and tasks. Redwood Research built benchmarks for a related task, detecting when a model tampers with the measurements used to judge it, and found that methods beat baselines on most datasets but did not reach maximum performance. A 2026 method based on influence functions reports strong results on image backdoor benchmarks.

The main weakness is adversarial robustness. A December 2024 study showed that latent out-of-distribution detectors, like probes, can be fooled by inputs crafted to keep the model's activations looking normal.

Key results

Open problems

See all open problems in this group

Criticisms

Who works on it

Status

Anthropic lists anomaly detection as an unsupervised monitoring approach, and calls one sub-problem, automatically flagging inputs where a strong and a weak model differ sharply, "as far as we know, an unexplored problem setting"

Start reading

Related approaches

In their own words

Many approaches to monitoring are supervised: they involve training a classifier on a curated dataset of positive and negative examples of bad model behaviors. However, we may not know what dangerous failures look like ahead of time. Thus, another unsupervised approach to monitoring is anomaly detection: trying to detect when a model's computation is unusual or out of distribution in certain ways.

Anthropic Alignment Science team, Recommendations for Technical AI Safety Research Directions, 2025

When such anomalies are detected, the detector can trigger a fail-safe policy in the system and also flag the example for human intervention. ... Anomaly detection is integral not just for promoting reliability but also for preventing novel misuses.

Dan Hendrycks, Nicholas Carlini, John Schulman, Jacob Steinhardt, Unsolved Problems in ML Safety, 2021

Suggest a correction Something wrong, out of date or missing, such as an organisation? Opens a GitHub issue (free account needed).