Paper · 2019-01-21 · cs.CV, cs.AI, cs.LG, eess.IV
CheXpert: A Large Chest Radiograph Dataset with Uncertainty Labels and Expert Comparison
CheXpert is a dataset of 224,316 chest radiographs labeled for 14 observations as positive, negative or uncertain, with labels extracted from reports by a rule-based tool. A DenseNet121 study compares uncertain-label handling methods. On a 500-study test set, the model's ROC and PR curves lie above all 3 radiologists' operating points on Cardiomegaly, Edema and Pleural Effusion (author-reported).
Multi-label classificationLearning with noisy labelsConvolutional neural networkdatasetmedical-imagingradiology-reportsweak-labels
arXivPDFCodeMarkdown13 min read
AI-compiled by claude-haiku-5-5 on 2026-10-19, not yet reviewed by a human. Every claim cites its source; check it when a detail matters.
In plain words
CheXpert is a large public collection of chest X-rays. Each image comes with a set of labels saying which findings it shows, such as an enlarged heart or fluid around the lungs, and each label is yes, no, or maybe. Nobody labeled the whole collection by hand. A rule-based program read the radiologists' written reports and turned them into labels. When a report hedges, such as "possible" or "cannot exclude", the label is marked as uncertain instead of being forced to yes or no.
The paper then asks how a neural network should learn from those maybes. It compares a few simple choices, and it checks the trained model against radiologists on a small test set that several of them labeled carefully.
TL;DR
- The dataset has chest radiographs from one hospital, with 14 labeled observations per study. Labels come from the report's Impression section through a rule-based labeler § Dataset § Label Extraction from Radiology Reports.
- A DenseNet121 classifier is trained with five ways of handling uncertain labels. The best way depends on the observation § Validation Results tab. 3.
- On a 500-study test set, the model's ROC and PR curves lie above all three radiologists' operating points for Cardiomegaly, Edema and Pleural Effusion. These are author-reported results § Test Results fig. 3.
- The labeler code is released under MIT. The image model's training code is not linked, and the paper states no terms for the dataset itself.
Problem
Chest radiography is the most common imaging exam. Automated interpretation needs large labeled datasets with strong reference standards and expert performance figures to compare against § Introduction.
Labels mined from reports have two problems. Radiologists write uncertain phrases, so a label is not always yes or no. And the paper reports that a MetaMap- and DNorm-based labeler gave weak extractions on its reports, so it built its own phrase lists § Comparison to NIH labeler.
Assumptions: reports are available, and only the Impression section is used § Mention Extraction.
Dataset
- Source. A retrospective collection at Stanford Hospital. The span runs from October 2002 to July 2017 and covers inpatient and outpatient imaging, each study paired with its report § Data Collection and Label Selection.
- Size. 224,316 chest radiographs of 65,240 patients § Dataset. The paper uses "studies" and "radiographs" for the same count, and labels are assigned per study tab. 1.
- Observations. 14 observations: 12 pathologies, "Support Devices" and "No Finding". They were chosen by prevalence and clinical relevance, following the Fleischner glossary where it applies. "Pneumonia" is included as the image pattern suggesting primary infection § Data Collection and Label Selection.
- Views. Models take a single view. Multi-view studies output the maximum probability across views § Model.
- Label counts (training set). Positive, uncertain and negative study counts per observation tab. 1:
| Observation | Positive | Uncertain | Negative |
|---|---|---|---|
| No Finding | 16627 (8.86%) | 0 (0.0%) | 171014 (91.14%) |
| Enlarged Cardiomediastinum | 9020 (4.81%) | 10148 (5.41%) | 168473 (89.78%) |
| Cardiomegaly | 23002 (12.26%) | 6597 (3.52%) | 158042 (84.23%) |
| Lung Lesion | 6856 (3.65%) | 1071 (0.57%) | 179714 (95.78%) |
| Lung Opacity | 92669 (49.39%) | 4341 (2.31%) | 90631 (48.30%) |
| Edema | 48905 (26.06%) | 11571 (6.17%) | 127165 (67.77%) |
| Consolidation | 12730 (6.78%) | 23976 (12.78%) | 150935 (80.44%) |
| Pneumonia | 4576 (2.44%) | 15658 (8.34%) | 167407 (89.22%) |
| Atelectasis | 29333 (15.63%) | 29377 (15.66%) | 128931 (68.71%) |
| Pneumothorax | 17313 (9.23%) | 2663 (1.42%) | 167665 (89.35%) |
| Pleural Effusion | 75696 (40.34%) | 9419 (5.02%) | 102526 (54.64%) |
| Pleural Other | 2441 (1.30%) | 1771 (0.94%) | 183429 (97.76%) |
| Fracture | 7270 (3.87%) | 484 (0.26%) | 179887 (95.87%) |
| Support Devices | 105831 (56.40%) | 898 (0.48%) | 80912 (43.12%) |
- Splits. The paper gives the validation set (200 studies), the test set (500 studies) and the report evaluation set (1000 reports), with no patient overlap between them § Validation Set § Test Set § Report Evaluation Set. The training split size is not stated. Each row of tab. 1 sums to 187,641 studies, so the training set appears to contain that many studies (derived from the table, not stated in the text).
Method
Labeler: report to labels
The labeler runs in three stages on the Impression section § Label Extraction from Radiology Reports.
- Mention extraction. Radiologists curated a large list of phrases per observation. Any phrase found in the Impression is a mention § Mention Extraction.
- Mention classification. Each mention is parsed and given one of three labels. Rules run in order: pre-negation uncertainty, then negation, then post-negation uncertainty. A match sets the label (uncertain or negative). A mention that matches no rule is positive § Mention Classification. Sentences are split with NLTK, parsed with the Bllip parser (McClosky's biomedical model), and converted to universal dependencies with Stanford CoreNLP § Mention Classification.
- Mention aggregation. The mention labels for one observation become a single label. The "No Finding" rule is applied at the end § Mention Aggregation fig. 2.
# Label one observation from its mention labels [§ Mention Aggregation]
# Input: mention_labels: list of "positive", "uncertain", "negative"
# Output: 1 (positive), -1 (uncertain), 0 (negative), None (blank)
def aggregate_observation(mention_labels):
# Any positive mention makes the label positive [§ Mention Aggregation]
if "positive" in mention_labels:
return 1
# Uncertain mentions without a positive give uncertain [§ Mention Aggregation]
if "uncertain" in mention_labels:
return -1
# Negative mentions with nothing else give negative [§ Mention Aggregation]
if "negative" in mention_labels:
return 0
# No mention at all is blank [§ Mention Aggregation]
return None# "No Finding" is positive when no pathology is positive or uncertain
# [§ Mention Aggregation]
# labels: dict from observation name to its aggregated label
def no_finding(labels):
for observation, label in labels.items():
# Support Devices and No Finding itself do not count [§ Mention Aggregation]
if observation in ["Support Devices", "No Finding"]:
continue
if label in [1, -1]:
return 0
return 1Image model and uncertainty approaches
Input is a 320 × 320 pixel radiograph. Output is one probability per observation, or three class probabilities for U-MultiClass. The architecture is DenseNet121, which the paper chose after comparing ResNet152, DenseNet121, Inception-v4 and SE-ResNeXt101 § Training Procedure. All approaches share this architecture and training recipe § Training Procedure.
The training labels are 0 (negative), 1 (positive) or u (uncertain) § Uncertainty Approaches.
- U-Ignore (baseline). Sum over the 14 observations of the binary cross-entropy, masked for observations marked uncertain § Ignoring. The equation is unnumbered in the source.
- U-Zeros and U-Ones. Every u becomes 0 (U-Zeros) or 1 (U-Ones), then ordinary binary cross-entropy is applied, averaged over observations § Binary Mapping.
- U-SelfTrained. Train U-Ignore to convergence. Use that model to replace each u with its predicted probability. Keep 0 and 1 unchanged. Train with the mean binary cross-entropy over observations § Self-Training.
- U-MultiClass. Each observation has a three-way softmax over negative, positive and uncertain. The loss is the mean multi-class cross-entropy over observations. At test time, the positive probability is taken after a softmax restricted to negative and positive § 3-Class Classification.
# U-Ignore: binary cross-entropy summed over observations [§ Ignoring]
# probs: (14,) predicted P(Y_o = 1 | X)
# labels: (14,) values 1, 0 or "u"
def u_ignore_loss(probs, labels):
loss = 0
for o in range(14):
# Skip observations marked uncertain for this study [§ Ignoring]
if labels[o] == "u":
continue
loss -= labels[o] * log(probs[o])
loss -= (1 - labels[o]) * log(1 - probs[o])
return loss# U-Zeros (replacement 0) or U-Ones (replacement 1) [§ Binary Mapping]
# labels: (14,) values 1, 0 or "u"
def binary_mapping(labels, replacement):
# Map every uncertain label to the replacement value [§ Binary Mapping]
return [replacement if y == "u" else y for y in labels]# U-SelfTrained targets [§ Self-Training]
# labels: (14,) values 1, 0 or "u"
# teacher_probs: (14,) output of the trained U-Ignore model for this study
def self_trained_targets(labels, teacher_probs):
targets = []
for o in range(14):
# Soften each uncertain label to the teacher's probability [§ Self-Training]
if labels[o] == "u":
targets.append(teacher_probs[o])
else:
targets.append(labels[o])
return targets# U-MultiClass: positive probability at test time [§ 3-Class Classification]
# class_probs: (3,) softmax over negative, positive, uncertain
def multiclass_positive_prob(class_probs):
p_negative = class_probs[0]
p_positive = class_probs[1]
# Renormalise over negative and positive [§ 3-Class Classification]
# (inferred from the text; the paper gives no formula)
return p_positive / (p_negative + p_positive)For multi-view studies, the model outputs the maximum probability across views § Model. The paper does not say how a study-level label is used for each view during training.
Model selection
For each approach, the paper trains three runs and keeps the best 10 checkpoints per run, ranked by the mean AUC over the five competition tasks. The 30 checkpoints are averaged on the validation set § Model Selection.
On the test set, each task uses the approach whose validation ensemble scored best § Test Results:
- Atelectasis and Edema: U-Ones.
- Cardiomegaly and Pleural Effusion: U-MultiClass.
- Consolidation: U-SelfTrained.
Hyperparameters
| Name | Value | Where | Notes |
|---|---|---|---|
| Architecture | DenseNet121 | § Training Procedure | Chosen over ResNet152, Inception-v4, SE-ResNeXt101 |
| Input size | 320 × 320 px | § Training Procedure | Resize method and intensity normalisation not stated |
| Optimiser | Adam, β1 = 0.9, β2 = 0.999 | § Training Procedure | Default betas |
| Learning rate | 1e-4, fixed | § Training Procedure | No schedule |
| Batch size | 16 | § Training Procedure | |
| Epochs | 3 | § Training Procedure | |
| Checkpoint interval | every 4800 iterations | § Training Procedure | |
| Runs per approach | 3 | § Model Selection | |
| Checkpoints kept per run | best 10 by mean AUC over the 5 competition tasks | § Model Selection | |
| Ensemble | mean of the 30 checkpoint probabilities | § Model Selection | Per competition task on the test set |
| U-Ignore loss | masked BCE, summed over observations | § Ignoring | |
| U-Zeros / U-Ones / U-SelfTrained loss | BCE, averaged over observations | § Binary Mapping § Self-Training | |
| U-MultiClass loss | 3-class cross-entropy, averaged over observations | § 3-Class Classification | |
| U-SelfTrained rounds and stop rule | not stated | § Self-Training | "To convergence" is not defined |
| Pretrained initialisation | not stated | — | |
| Data augmentation | not stated | — | |
| Weight decay | not stated | — | |
| Hardware and wall-clock time | not stated | — |
Labeler parameters are the phrase lists and rule sets, not numeric hyperparameters. The phrase lists are in the code repository .
Results
Author-reported throughout.
Labeler versus NIH labeler (report evaluation set, 1000 reports)
The ground truth comes from two radiologists who labeled each report, with disagreements resolved by discussion § Report Evaluation Set. Scores are F1 for mention extraction, negation detection and uncertainty detection tab. 2.
| Category | Mention NIH | Mention Ours | Negation NIH | Negation Ours | Uncertain NIH | Uncertain Ours |
|---|---|---|---|---|---|---|
| Atelectasis | 0.976 | 0.998 | 0.526 | 0.833 | 0.661 | 0.936 |
| Cardiomegaly | 0.647 | 0.973 | 0.000 | 0.909 | 0.211 | 0.727 |
| Consolidation | 0.996 | 0.999 | 0.879 | 0.981 | 0.438 | 0.924 |
| Edema | 0.978 | 0.993 | 0.873 | 0.962 | 0.535 | 0.796 |
| Pleural Effusion | 0.985 | 0.996 | 0.951 | 0.971 | 0.553 | 0.707 |
| Pneumonia | 0.660 | 0.992 | 0.703 | 0.750 | 0.250 | 0.817 |
| Pneumothorax | 0.993 | 1.000 | 0.971 | 0.977 | 0.167 | 0.762 |
| Enlarged Cardiom. | N/A | 0.935 | N/A | 0.959 | N/A | 0.854 |
| Lung Lesion | N/A | 0.896 | N/A | 0.900 | N/A | 0.857 |
| Lung Opacity | N/A | 0.966 | N/A | 0.914 | N/A | 0.286 |
| Pleural Other | N/A | 0.850 | N/A | 1.000 | N/A | 0.769 |
| Fracture | N/A | 0.975 | N/A | 0.807 | N/A | 0.800 |
| Support Devices | N/A | 0.933 | N/A | 0.720 | N/A | N/A |
| No Finding | N/A | 0.769 | N/A | N/A | N/A | N/A |
| Macro-average | N/A | 0.948 | N/A | 0.899 | N/A | 0.770 |
| Micro-average | N/A | 0.969 | N/A | 0.952 | N/A | 0.848 |
Bold marks the better system in the paper's table, where both systems have a score tab. 2.
Uncertainty approaches (validation set, 200 studies)
Ground truth is the majority vote of three radiologists, binarised so that "present" and "uncertain likely" count as positive and "absent" and "uncertain unlikely" count as negative § Validation Set. AUROC with 95% DeLong intervals tab. 3; bold is the best and italic the worst in the paper's table, for each observation:
| Approach | Atelectasis | Cardiomegaly | Consolidation | Edema | Pleural Effusion |
|---|---|---|---|---|---|
| U-Ignore | 0.818 (0.759, 0.877) | 0.828 (0.769, 0.888) | 0.938 (0.905, 0.970) | 0.934 (0.893, 0.975) | 0.928 (0.894, 0.962) |
| U-Zeros | 0.811 (0.751, 0.872) | 0.840 (0.783, 0.897) | 0.932 (0.898, 0.966) | 0.929 (0.888, 0.970) | 0.931 (0.897, 0.965) |
| U-Ones | 0.858 (0.806, 0.910) | 0.832 (0.773, 0.890) | 0.899 (0.854, 0.944) | 0.941 (0.903, 0.980) | 0.934 (0.901, 0.967) |
| U-SelfTrained | 0.833 (0.776, 0.890) | 0.831 (0.770, 0.891) | 0.939 (0.908, 0.971) | 0.935 (0.896, 0.974) | 0.932 (0.899, 0.966) |
| U-MultiClass | 0.821 (0.763, 0.879) | 0.854 (0.800, 0.909) | 0.937 (0.905, 0.969) | 0.928 (0.887, 0.968) | 0.936 (0.904, 0.967) |
Reported significance: on Atelectasis, U-Ones beats U-Zeros (p = 0.03). On Cardiomegaly, U-MultiClass beats U-Ignore (p < 0.01). No significant difference was found for Consolidation, Edema or Pleural Effusion § Results.
Test set (500 studies, five-radiologist majority ground truth)
Eight radiologists labeled each test study. Five of them form the majority-vote ground truth. The other three are benchmarked against it § Test Set.
- AUC. Best on Pleural Effusion (0.97) and worst on Atelectasis (0.85). The others are at least 0.9 § Comparison to Radiologists.
- AUPRC. Best on Pleural Effusion (0.91) and worst on Consolidation (0.44) § Comparison to Radiologists.
- Versus radiologists. On Cardiomegaly, Edema and Pleural Effusion, the model is above all three radiologists but not their majority vote. On Consolidation it beats two of three. On Atelectasis all three radiologists beat the model § Results fig. 3.
- Labeler bounds. The report labels are shown as lower (LabelL) and upper (LabelU) bounds. The lower bound lies below the model curves on all competition tasks. The upper bound lies on or below them on every task except Atelectasis fig. 3.
- Calibration. Average scaled Brier score is 0.110 before post-processing, 0.107 after isotonic regression and 0.101 after Platt scaling § Results.
- Statistics. No statistical test was run between the model and the radiologists § Limitations.
Figure 4 shows Grad-CAM maps for the final model, as qualitative examples only fig. 4.
Paper vs code
The labeler is at stanfordmlgroup/chexpert-labeler (MIT), linked from the
competition page. It is pinned to 44ddeb3 LICENSE. The paper's footnote
points to the competition page, which links this repository. The competition page
links only third-party leaderboard entries for the image model, and no training
code for the paper's DenseNet121 models. For those, the paper's description is
the only source.
Discrepancies between paper and labeler code:
- Positive, negative and uncertain together. The paper says any positive mention makes the label positive § Mention Aggregation. The code checks the negative-plus-uncertain case first and returns uncertain, even when a positive mention is also present aggregate.py.
- Undocumented "chf" and "heart failure" rule. The code turns mentions of "chf" and "heart failure" into an uncertain Cardiomegaly mention. The paper does not describe this aggregate.py.
- Undocumented unmention phrases. The code excludes Cardiomegaly and Enlarged Cardiomediastinum mentions that follow positional phrases such as "over the" or "in the" with left, right or superior. The paper describes only the curated mention lists extract.py .
- Blank labels. The paper assigns "blank" when an observation is not mentioned § Mention Aggregation. The code writes an empty value there aggregate.py label.py. tab. 1 has no blank column, so blank was mapped to a training value somewhere. The paper does not say how.
- Consistent parts. The three-phase classification order matches the code classify.py. The No Finding rule matches the code's logic aggregate.py.
No official training code for the DenseNet121 models was found. The competition page's model description is the only source for them.
Pitfalls
- Section numbers are suppressed in the source (
secnumdepthis 0). This card cites sections by title, e.g. § Mention Aggregation. Equations, including the masked loss, are unnumbered. Figures and tables are numbered in source order: Figure 1 is the task overview, Figure 2 the labeler example, Figure 3 the radiologist comparison and Figure 4 the Grad-CAMs fig. 1–fig. 4. - Uncertain labels carry clinical meaning, not just missing data. Cardiomegaly uncertainty is mostly borderline phrases such as "minimal cardiac enlargement", and "stable cardiac contours" can fit either an enlarged or a normal heart § Analysis. Atelectasis and Consolidation are often reported together as "atelectasis versus consolidation". The labeler marks both uncertain, but panel review often resolved these as Atelectasis-positive and Consolidation-negative § Analysis.
- Ignoring uncertain labels is a biased choice. For Consolidation the uncertain rate (12.78%) is nearly twice the positive rate (6.78%) § Ignoring tab. 1. The paper's own analysis argues this is why U-Ignore underperforms.
- U-SelfTrained is under-specified. The paper does not give the number of relabelling rounds, the convergence criterion, or whether the teacher runs on unaugmented training images § Self-Training.
- Loss reduction differs between approaches. U-Ignore sums its losses over observations; the other approaches average them § Ignoring § Binary Mapping. The paper does not discuss the effect of this difference.
- Inclusion criteria are missing from the compiled text. The source contains commented-out text about adult studies, one to three views, and manual removal of protected health information. None of this is in the compiled paper, so these rules must not be assumed § Data Collection and Label Selection.
- Training split size is not stated. It is derived from tab. 1 (187,641 studies per row) and is not confirmed by the text.
- Table 2 differs from a commented-out version in the source. The source keeps an older table, commented out, with values such as NIH Atelectasis mention 0.978 and negation 0.556. The compiled tab. 2 uses 0.976 and 0.526. Use the compiled values.
- Table 3 caption says AUROC; the text says AUC. This card treats them as the same metric.
- Reading radiologist numbers. The radiologist operating points appear only in fig. 3, as plotted points. No numeric table is given, so they are not reproduced here.
- Limits on the radiologist comparison. Neither the model nor the radiologists had patient history or prior imaging, which the paper notes is known to lower diagnostic performance § Limitations.
- Multi-view handling is partly stated. Output is the maximum across views § Model. Training on multi-view studies, and any per-view augmentation, are not stated.
- Dataset terms are not in the paper. The paper's CC BY 4.0 licence covers the paper text and its figures. It does not cover the dataset. The competition page links the dataset through Redivis and states no terms, so check the dataset's own access terms before any use.
Lineage
- Builds on: The labeler follows the approach of NegBio (Peng et al., 2018), and the paper cites the parsing approach as similar to NegBio's § Mention Classification. No arXiv ids are linked in this card.
- Compared against: The NIH labeler used for ChestX-ray8 (Wang et al., 2017), as described in § Comparison to NIH labeler and tab. 2. The uncertainty approaches are compared against each other on the validation set tab. 3.
- Superseded by: not stated.
Source and license
Adapted from “CheXpert: A Large Chest Radiograph Dataset with Uncertainty Labels and Expert Comparison” by Jeremy Irvin, Pranav Rajpurkar, Michael Ko, Yifan Yu, Silviana Ciurea-Ilcus, Chris Chute, Henrik Marklund, Behzad Haghgoo, Robyn Ball, Katie Shpanskaya, Jayne Seekins, David A. Mong, Safwan S. Halabi, Jesse K. Sandberg, Ricky Jones, David B. Larson, Curtis P. Langlotz, Bhavik N. Patel, Matthew P. Lungren, Andrew Y. Ng (arXiv:1901.07031), used under CC BY 4.0. Changes: condensed and restructured for implementation, with tables, equations and algorithms taken from the paper and its code, each cited to its source. Not affiliated with or endorsed by the authors. Code citations refer to https://github.com/stanfordmlgroup/chexpert-labeler at commit 44ddeb363149 (MIT). Any quoted code is shown under that license.