Skip to content
AI.info

Evaluation

Robustness, Stress Tests, and Out-of-Distribution Evaluation

Design robustness tests for corruptions, domain shifts, rare conditions, adversarial inputs, missing modalities, and operational degradation.

By the end you can

Robustness is always robustness to something

A vision model may tolerate Gaussian noise and still fail under a different camera, a different compression pipeline, or a different season. Another model may resist one adversarial attack while staying wide open to a changed threat model. Every robustness claim needs a specified perturbation, environment, severity, and success criterion.

Corruption robustness and adversarial robustness are two different axes. Someone has measured how separately they move. ImageNet-C scores classifiers on the corruptions ordinary images arrive with: a benchmark that “standardizes and expands the corruption robustness topic”. A companion dataset, ImageNet-P, covers “robustness to common perturbations”. Hendrycks and Dietterich built both in 2019. The suite “evaluates performance on common corruptions and perturbations not worst-case adversarial perturbations”. Across it they report “negligible changes in relative corruption robustness from AlexNet classifiers to ResNet classifiers”. AlexNet to ResNet is years of accuracy gains. The two axes moved separately.

Medicine supplies the measured version of “a different camera”. Pneumonia-screening CNNs were trained on 158,323 chest radiographs from three hospital systems. Then they were tested at a site whose images the networks had never seen. Inside its own hospitals the jointly trained model scored an AUC of 0.931 (95% CI 0.927–0.936). At the independent one it scored 0.815 (95% CI 0.745–0.885, P = 0.001). Zech and colleagues put the pattern in one line: “In 3 / 5 natural comparisons, performance on chest x-rays from outside hospitals was significantly lower”.

The mechanism is the part worth keeping. The same networks, the paper reports, “robustly identified hospital system and department within a hospital”. Part of what the model had learned was where the x-ray came from. That feature is perfectly predictive inside the tested envelope and worthless one hospital over.

“Robust model” is incomplete without a threat or shift model.

Visual

Sources of distribution change

Different shifts require different tests to be built. Each row below has a measured instance behind it rather than a category name.

Some shifts can only be found in the field. WILDS curates 10 datasets of shifts that occur naturally in deployment: across hospitals, camera traps, and time and location in satellite imagery. Koh, Sagawa and colleagues published it in 2021. The result was the same on every one of the ten. “On each dataset, we show that standard training yields substantially lower out-of-distribution than in-distribution performance. This gap remains even with models trained by existing methods for tackling distribution shifts, underscoring the need for new methods for training models that are more robust to the types of distribution shifts that arise in practice.” The methods built to close the gap did not close it.

Domain shift has a price list. Epic's proprietary Sepsis Model was validated from outside on 38,455 hospitalisations of 27,697 patients at Michigan Medicine, between December 2018 and October 2019. Epic had reported an AUC of 0.76–0.83. The model scored 0.63 (95% CI 0.62–0.64). It alerted on 18% of all hospitalisations. It never identified 1,709 of 2,552 septic patients — 67% of them. Wong and colleagues wrote the conclusion: “The ESM has poor discrimination and calibration in predicting the onset of sepsis. The widespread adoption of the ESM despite its poor performance raises fundamental concerns about sepsis management on a national level.”

A second group repeated the exercise at a different institution. The same model was measured across 145,885 encounters at two Harris Health county emergency departments in 2023. Sensitivity within a six-hour window was 14.7%. Those findings, Ostermayer and his co-authors wrote, “align with previously published external validations for the ESPMv1 and slightly worse than Epic's published analysis”. One deployed model, two independent sites, two collapses.

FigureHierarchy · 5 levels
  • Common corruption

    Blur, noise, missing values, compression, or sensor degradation.

    • Subpopulation shift

      The mixture of existing groups or conditions changes.

      • Domain shift

        A new site, device, language, institution, or acquisition process appears.

        • Temporal shift

          Behavior, policy, prevalence, or environment evolves over time.

          • Adversarial shift

            An actor intentionally selects inputs or manipulations to cause failure.

Comparison

Naturalistic and synthetic tests play different roles

Both are useful when claims stay bounded, and the boundaries have themselves been measured.

Hardening against a synthetic corruption does not transfer to the real world. That has been measured at scale. In 2020 Taori and colleagues ran 204 ImageNet models through 213 different test conditions, putting both kinds of test on the same models: “Informed by an evaluation of 204 ImageNet models in 213 different test conditions, we find that there is often little to no transfer of robustness from current synthetic to natural distribution shift.” The main exception they found was training on larger and more diverse data. A model that survives added blur has not thereby been shown to survive a new site.

The adversarial column has a measured limit of its own. Nine non-certified white-box defenses were published at ICLR 2018, each already evaluated by its own authors. Athalye and colleagues re-attacked them without changing what the attacker was allowed to do: “In a case study, examining non-certified white-box-secure defenses at ICLR 2018, we find obfuscated gradients are a common occurrence, with 7 of 9 defenses relying on obfuscated gradients. Our new attacks successfully circumvent 6 completely, and 1 partially, in the original threat model each paper considers.” The threat model did not move. Only the quality of the search did.

FigureComparison · 3 columns

Naturalistic holdout

Use real data from a later period, new site, or changed environment.

  • High realism
  • Can confound several changes
  • Often expensive
  • Supports external validity

Controlled perturbation

Modify one property such as blur, missingness, or contrast.

  • Isolates a mechanism
  • Supports severity curves
  • May be unrealistic
  • Needs domain bounds

Adversarial test

Search for failures under a stated attacker capability.

  • Tests worst-case behavior
  • Threat-model dependent
  • Can be computationally costly
  • Does not imply every attack is covered

Key idea

Stress suites can become their own benchmark trap

Teams can overfit to a fixed corruption list or a fixed adversarial attack, producing narrow robustness gains. A system that wins one suite may fail a plausible but untested condition.

The documented instance is not a corruption list but a defense list. Thirteen defenses published at ICLR, ICML and NeurIPS had already been evaluated with adaptive attacks — the very method meant to prevent this failure. In 2020 Tramèr and colleagues circumvented all 13. No single attack strategy sufficed for the set: “This underlines our key message that adaptive attacks cannot be automated and always require careful and appropriate tuning to a given defense.”

A federal agency recorded the same result and drew the practitioner's lesson from it. NIST's 2025 taxonomy of adversarial machine learning attacks and mitigations says of that work: “They advocate for designing adaptive attacks to test newly proposed defenses rather than merely testing the defenses against well-known attacks.” A suite that a team can rehearse against is a suite that has stopped measuring.

Use mechanism-based design, rotating scenarios, held-out severities, and real incident data. Report the tested envelope rather than claiming robustness in general.

A robustness suite defines a measured envelope, not the boundary of all future failure.

Case

New test sets built the old way, and the accuracy that did not survive them

Build a famous test set a second time and the accuracy falls. In 2019 Recht and colleagues rebuilt the CIFAR-10 and ImageNet test sets, “closely following the original dataset creation processes”, and re-ran a broad range of models on the results. The models lost ground. The authors “find accuracy drops of 3% - 15% on CIFAR-10 and 11% - 14% on ImageNet”.

This is not the leaderboard-overfitting story it first resembles, and they say so: “the accuracy drops are not caused by adaptivity”. The cause was a failure to generalize to slightly harder images. A decade of tuning against one fixed suite bought less generalization than the leaderboard had been reporting. The only way anyone found that out was by building the test set a second time.

Example

Measure degradation, not only pass/fail

Word error rate swept against signal-to-noise ratio, for Whisper and 14 LibriSpeech-trained models, under white noise and pub noise: the curves cross. Radford and colleagues ran that sweep in 2023. Their appendix on “Robustness to Additive Noise” reports: “There are many models that outperform our zero-shot performance under low noise (40 dB SNR), which is unsurprising given those models are trained primarily on LibriSpeech, but all models quickly degrade as the noise becomes more intensive, performing worse than the Whisper model under additive pub noise of SNR below 10 dB.”

A single endpoint would have picked the wrong system. On LibriSpeech test-clean, wav2vec 2.0 Large without a language model and Whisper Large V2 tie at 2.7 WER. In distribution they are indistinguishable. Across the other datasets of the paper's Table 1 the zero-shot model averages 12.8 WER against 29.3, a 55.2% average relative error reduction. The tie is the control. The curve is the finding.

  • Baseline: the two systems tie at 2.7 WER on LibriSpeech test-clean. In the clean, representative condition no difference is visible at all.
  • Mild shift: at 40 dB SNR many of the 14 LibriSpeech-trained models beat the zero-shot model. That is what training primarily on LibriSpeech buys.
  • Severe shift: below 10 dB of additive pub noise all of them fall behind it. The crossover was measured on the curve, not assumed in advance.
  • Fallback: confidence-based routing sends a fraction of noisy clips to human transcription, an action defined at a stated point on that curve.
  • Recovery: after the noise ends, stateful components are checked for persistent degradation. The curve says nothing about what a system carries forward.

Compound failures deserve attention

Real incidents combine factors: an older device, low light, network delay, and a new user population. Testing one variable at a time may miss the interactions.

On 2 October 2023 in San Francisco, another vehicle's collision left a pedestrian low on the ground in the path of a Cruise driverless vehicle. No single-factor test had held that compound. Cruise filed a recall report with NHTSA on 7 November 2023, covering 950 driverless units. Under “Description of the Defect” it says what the Collision Detection Subsystem then did: “The Cruise ADS inaccurately characterized the collision as a lateral collision and commanded the AV to attempt to pull over out of traffic, pulling the individual forward, rather than remaining stationary.”

Two details in that filing are the lesson. Cruise's own review of the scenario took about three weeks “due to the rarity of the circumstances”. The rarity that delays an investigation is the same rarity that kept the case out of the test suite. And the regulator had already acted. On 24 October 2023 the California Department of Motor Vehicles suspended Cruise's deployment and driverless testing permits, on the ground that “the Department determines the manufacturer's vehicles are not safe for the public's operation”.

Use risk-based combination tests, and avoid a combinatorial explosion by prioritizing credible high-consequence scenarios. Record which combinations remain unevaluated. That list is where the recall gets written.

Single-factor stability does not guarantee stability under compound stress.

Analogy

A bridge tested for several loads and winds

No bridge is certified by one load test. It is taken through weight, crosswind, vibration, and temperature change, and passing any single one of those establishes nothing about the combinations.

Wind does not study the bridge. Some of the inputs a model meets are chosen by someone who has read its failures, so a tested envelope bounds the accidents and not the attacks. A robustness claim has to name its conditions and its margins for both.

Robustness evidence is a map of tested stresses, not a universal shield.

Steps

Create a robustness evidence matrix

Link each test to a mechanism, a severity, and an action. Every failure above was found by someone who ran a test the builders had not run: a new hospital, a rebuilt test set, a stronger attack, a rarer collision.

FigureProcess · 5 steps
  1. 1. Build the shift inventory

    Use deployment analysis, incidents, threat modeling, and stakeholder input.

  2. 2. Define severity

    Specify realistic ranges and failure thresholds for each condition.

  3. 3. Preserve controls

    Keep labels, preprocessing, and comparison baselines consistent where possible.

  4. 4. Measure response

    Report degradation curves, uncertainty, slices, abstention, and recovery.

  5. 5. Maintain the suite

    Add incidents, rotate cases, and retire claims when the environment changes.

Key takeaways