Accurate on average, wrong for some.
+ The questionCan a model be accurate overall and still fail one group of patients, and how would anyone find out?
A test set built to compare skin tones
Three published models for telling malignant skin lesions from benign ones had been reported to score areas under the curve between 0.88 and 0.94 on their own test sets. In 2022 a group at Stanford tested the three models on a new collection, the Diverse Dermatology Images set: 656 images from 570 patients seen at Stanford clinics between 2010 and 2020. A biopsy report confirmed every diagnosis, and the images of the lightest and darkest skin tones were matched by diagnosis, age, sex and date.
The scores on the new set come from the group's preprint, the version of its paper shared before peer review. On the whole set, the three models scored between 0.56 and 0.67. Split by skin tone, the drop was steeper for darker skin: the best of the three models scored 0.72 on the lightest skin types and 0.57 on the darkest, and another scored 0.61 and 0.50, no better than chance.
The published paper reports two further findings. Dermatologists read the same images, and when their readings were scored against the biopsy results, they too were less accurate on darker skin. The authors note that dermatologists often label the images in AI datasets, so the same weakness can affect the labels that models are trained and tested on. The group also fine-tuned two of the models: it continued their training on images from the new set. Fine-tuning closed the gap between light and dark skin, which suggests that the original failure came largely from what the models had been trained on.
Averages hide groups
A single accuracy figure for a whole test set is an average over its members, weighted by how many of each kind it contains. If one group is small, the average can be high while that group's performance is poor, and the headline figure does not reveal the poor result. A 2021 study examined chest-radiograph classifiers trained on three large public datasets, which together held more than 700,000 images, and measured how often each classifier called a sick patient's radiograph normal. The rate was higher for female patients, for patients under 20, for Black and Hispanic patients, and for patients insured through Medicaid, the US public health insurance program for people with low incomes. The rate was higher still where these characteristics combined, for example in Hispanic women compared with white women.
The remedy is to look at each group. The IDx-DR trial reported the make-up of its participants: 28.6 percent were African American, 63.4 percent White and 1.6 percent Asian; 16.1 percent were Hispanic, an ethnicity recorded separately from race; and their median age was 59. The investigators analyzed sensitivity by age, sex, race, ethnicity, blood-sugar control, site and lens status, which records whether an eye still has its natural lens. None of these factors had a significant effect on sensitivity, and specificity was somewhat higher in participants over 65. An analysis of this kind cannot prove that no group does worse. It can show that no large difference was detected among the groups present in meaningful numbers, and it tells a reader which groups were too small for any conclusion.
A subgroup result of 90 percent from a few dozen patients is compatible with performance far below the overall figure. Reporting the single figure alone, without its interval, invites the conclusion that the group is served well. A reader needs the interval, and the number of patients behind it, to judge whether the evidence is strong enough to conclude anything.
How many patients a subgroup needs
The precision of a subgroup estimate depends on the number of patients in that subgroup, which is usually a fraction of the whole test set. A study sized for a precise overall sensitivity may give a vague one for every group within it.
A model detects disease in 45 of 50 diseased patients in a subgroup: 90 percent. The Wilson method is a standard formula for the interval of a proportion, and the FDA uses it in the examples of its guidance on diagnostic statistics. By that method the 95 percent confidence interval runs from 78.6 to 95.7 percent; the exact method of Chapter 13 gives a slightly wider 78.2 to 96.7 percent for the same 45 of 50. With 450 detected out of 500, the estimate is still 90 percent, but the interval narrows to 87.1 to 92.3 percent. With 9 out of 10, the interval spans 59.6 to 98.2 percent and leaves the subgroup's sensitivity almost unknown. To show that a subgroup's sensitivity is within a few points of the overall figure, the subgroup needs hundreds of diseased patients of its own. That need is why subgroups are planned when the study is designed, not discovered afterwards.
Looking at many subgroups creates a problem of its own. The usual test calls a difference significant when chance alone would produce one that large less than 1 time in 20, so a study that compares twenty subgroups will usually find one or two that differ by chance alone. Investigators therefore name the subgroups in the protocol before they see the data, and they treat a difference found afterwards as a question for the next study rather than a conclusion. When a planned subgroup does fall short, a maker has three honest responses. It can add data from that group and retrain the model, which is what fine-tuning did for the dermatology models. It can narrow the claim: IDx-DR's labeling covers only the adults its trial enrolled. Or it can tell users plainly where performance is unproven. Each response changes the device or its labeling, and needs the evidence that such a change requires.
Representative data, by rule
Regulators have written representativeness into their expectations. The good machine-learning practice principles of 2021 stated that clinical study participants and data sets should be representative of the intended patient population, and the international version of 2025 states that clinical evaluation should use datasets representative of that population. When the FDA granted the stroke-triage program of Chapter 12 its De Novo in 2018, it created a regulation for radiological triage and notification software in general. Its special controls require results showing effective triage across relevant subgroups, which the decision summary defines by clinical factors and by how the images were acquired.
India's 2026 guidance on medical device software is more demanding for AI. It states that makers should disclose the demographic and geographic composition of their training, validation and test data, justify models trained or validated outside India, and assess bias, generalizability and robustness across relevant Indian sub-populations. The AI Act is the European Union's law on artificial intelligence, and it sets duties according to the risk that a system poses. For high-risk systems, it adds duties of data governance: rules on how the data used to train, validate and test a system are collected, prepared and checked. Those data must be relevant and sufficiently representative, with appropriate statistical properties, where applicable, for the groups of people the system is intended for, and the instructions for use must give the system's performance for those groups where appropriate. For AI in medical devices these duties apply from 2 August 2028, on the timeline that Chapter 29 sets out.
Representative does not mean proportional. A subgroup that is rare in the population but at high risk may need to be over-sampled so that its performance can be measured at all: the study includes more of its members than their share of the population would give. The study then corrects for the over-sampling when it reports overall figures, as the IDx-DR trial did for its enrichment. What a regulator asks to see is that the groups the intended use contains were present, in numbers that support a conclusion, and that their results are reported.
List the subgroups the intended population contains, including those defined by skin tone, sex, age, ethnicity, disease severity, device model and site. Size the study so that each group whose performance matters has enough diseased and healthy patients for a useful interval. Report every planned subgroup with its interval, and say plainly which groups were too small to assess.
- Dermatology models with reported areas under the curve of 0.88 to 0.94 on their own test sets scored 0.50 to 0.57, at or near chance, on the darkest skin in a balanced, biopsy-confirmed set.
- An overall figure can hide poor performance in a small group; chest-radiograph classifiers missed disease more often in several under-served groups.
- A subgroup estimate is only as precise as the number of patients in it: a sensitivity of 90 percent from 50 diseased patients has an interval of about 79 to 96 percent.
- The US and India already expect data representative of the intended population and results across subgroups, and the EU's AI Act will require representative data for high-risk AI in medical devices, with group results where appropriate, from 2 August 2028.
Let's Talk