All models

CheXzero

A CLIP-style image-text model that reads chest X-rays against text prompts, trained on reports instead of labels.

Medical imaging · 966 operations Checked

100%

Showing the top corner; full diagram not loaded yetShowing a small copy; full diagram not loaded yetLarge diagram, not loaded yet

Open SVG

Loading diagram (14 KB)

Open in a new tab

Click or tap a spot to read it up close. Scroll or drag inside the diagram to move through it. Zoom with + and − or Ctrl and scroll. Press 0 for the whole graph. Swipe inside the diagram to move through it. Use + and − to zoom.

At a glance

Parameters
151.3M
Operations
966
Framework
PyTorch
Recurrent
No
Published
2022, Nature Biomedical Engineering
Cited by
432 (as of 17 October 2026)
Authors
Ekin Tiu, Ellie Talius, Pujan Patel and others
License
MIT
Checked
Passed: the trace was replayed operation by operation and matched the model's own output for this input.

Files

The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.

Details
Stable ID
m340
Graph hash
8debcf5be7948edc74044e1d6759fa32655a6918cca5c2544fe1f548873fa0eb
Skeleton hash
b3d5d782efbf94d71381f784fd8a32f47eb5778e7a79c9d4075c1c7480919801
Architecture hash
26af5841c627b9e1198ad34d265619e8f0ffc5d12aa9d968d873079e72a1e907
Diagram SHA-256
83e88ed4ca3ef9788ebf7911c29f73fd05e84b1d9d612fd21d32e7ca1d528d69
TorchLens version
2.36.0
Renderer
graphviz 2.43.0+pyvips 3.2.0+libvips 8.18.7+render-opts@06c1f0d3
Check
Forward pass replayed in PyTorch

What it is

CheXzero is a chest X-ray model that was never shown a pathology label. It is a zero-shot method using a fully self-supervised-learning procedure that does not require explicit manual or annotated labels for chest X-ray image interpretation. The authors leveraged the fact that radiology images are naturally labelled through corresponding clinical reports and that these reports can offer a natural source of supervision, and trained the model with 377,110 pairs of a chest X-ray image and the corresponding raw radiology report from the MIMIC-CXR dataset.

The traced graph is a two-stream encoder. The architecture consists of a Vision Transformer, ViT-B/32, for the image encoder, and a Transformer for the text encoder, with the text encoder at a base size of 63 million parameters, 12 layers and a width of 512 with 8 attention heads. Both were initialized with pre-trained weights from OpenAI's CLIP model, and the paper shows that weights learned from natural images can be carried over to a domain-specific medical task. The model learned to predict which chest X-ray corresponds to which radiology report, using contrastive learning with image-text pairs.

At test time, each pathology becomes a pair of prompts. The method computes logits with positive prompts, such as atelectasis, and negative prompts, that is, no atelectasis, then takes the softmax between the positive and negative logits and keeps the positive probability as the probability that the disease is present. Unlike CLIP, this normalizes against the negated version of the same disease rather than across diseases, since a single image may have multiple associated labels. On an external validation dataset of chest X-rays, the self-supervised model outperformed a fully supervised model in the detection of three pathologies out of eight.

Key idea. CheXzero fine-tunes a CLIP image-text model on chest X-rays paired with their raw radiology reports and classifies pathologies zero-shot by comparing positive and negative text prompts, reaching accuracies comparable to radiologists without any explicit labels.

  • chexzero
  • chest x-ray
  • zero-shot pathology classification
  • clip
  • self-supervised
  • radiology reports
  • mimic-cxr
  • chexpert
  • image-text contrastive
  • medical imaging

AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.

Cite the paper

@article{Tiu_2022, title={Expert-level detection of pathologies from unannotated chest X-ray images via self-supervised learning}, volume={6}, ISSN={2157-846X}, url={http://dx.doi.org/10.1038/s41551-022-00936-9}, DOI={10.1038/s41551-022-00936-9}, number={12}, journal={Nature Biomedical Engineering}, publisher={Springer Science and Business Media LLC}, author={Tiu, Ekin and Talius, Ellie and Patel, Pujan and Langlotz, Curtis P. and Ng, Andrew Y. and Rajpurkar, Pranav}, year={2022}, month=Sept, pages={1399–1406} }