Sari la conținut
aiqbenchInformații despre AI & calcul cuantic
ȘtiriAnalizeBenchmark-uriSkill-uriÎntreabă AIÎnvațăDespre
...Se încarcă sesiunea
ȘtiriAnalizeBenchmark-uriSkill-uriÎntreabă AIÎnvațăDespre

Română · beta. Traducerea a fost făcută automat și este încă în curs de revizuire. Citește pagina în engleză

  1. Joburile viitorului
  2. ›
  3. Biomedical AI Specialist
  4. ›
  5. Lecția 4 din 8

Lecțiile acestui traseu sunt publicate deocamdată doar în engleză, așa că lecția de mai jos apare în engleză. Restul — module, quiz și materiale — funcționează la fel.

Medical Imaging and Clinical ML

Intermediar¶ Citire · 5 min⚑ Misiune · 43 min◆ Test · 5 întrebări✓ Verificată la 23 nov. 2026

Vei putea să:

You can describe how segmentation (U-Net) and classification models are built and scored for medical images, explain why a model that performs well in one hospital often fails in the next (dataset shift and shortcut learning), and measure whether a model's probabilities can be believed (calibration, reliability diagrams, temperature scaling).

Two tasks, one architecture family

Medical imaging ML mostly does two things. Classification maps an image to a label: pneumonia or not, tumour grade, referable retinopathy. Segmentation maps every pixel (or voxel, in 3D) to a label: this is tumour, this is healthy liver, this is background. Segmentation is the workhorse of radiotherapy planning and organ volumetry, and it is where the U-Net lives.

How a U-Net works

The U-Net paper by Ronneberger and colleagues, in this module's materials, describes an encoder that progressively downsamples the image while increasing feature channels, and a decoder that upsamples back to full resolution. The part that matters is the skip connections: at each resolution, the encoder's feature map is concatenated onto the decoder's. Without them, the decoder must reconstruct fine boundaries from a coarse bottleneck and the edges come out blurry. With them, it gets both "what is here" (from the deep layers) and "exactly where" (from the shallow ones). The original paper trained on about thirty microscopy images using heavy elastic augmentation, which is a reminder that in medical imaging the augmentation and preprocessing choices usually matter more than the architecture. The later nnU-Net work made that point systematically: a plain U-Net with carefully self-configured preprocessing beat most bespoke architectures.

Segmentation is scored with the Dice coefficient — twice the overlap divided by the sum of the two areas — and often with a boundary distance such as the Hausdorff distance, because Dice can be high while a segmentation includes a small but clinically dangerous spur into healthy tissue.

Why the model from hospital A fails at hospital B

Zech and colleagues trained a pneumonia classifier on chest X-rays from two US health systems and tested it on a third. Performance dropped on external data. More telling, a model could identify which hospital an image came from with very high accuracy, and pneumonia prevalence differed between hospitals and between departments. The network had learned that "images that look like they came from the inpatient portable scanner" are more often pneumonia — a true correlation in the training data and a useless one anywhere else. This is shortcut learning: the model finds the cheapest feature that predicts the label.

Related: hidden stratification. A pneumothorax classifier can score well overall while failing on the subset without a chest drain, because in training data the drain (a treatment marker) was the easiest cue. Average metrics hide the subgroup where the model is clinically needed most.

The general name is dataset shift: the joint distribution of images and labels in deployment differs from training. Module 7 covers how to monitor for it; here the lesson is that an internal test set cannot detect it, by construction.

Can the probabilities be believed?

A classifier outputs a score. A clinician will read 0.8 as "80% likely". That is only true if the model is calibrated: among all cases scored 0.8, about 80% should be positive. Guo and colleagues showed that modern deep networks are systematically over-confident — the more capacity and the longer the training, the worse — even as their accuracy improves.

You check calibration with a reliability diagram: bin predictions by score, plot observed positive rate per bin against mean predicted score, and look for the diagonal. Expected calibration error (ECE) summarises the gap as a weighted average over bins. The Brier score combines calibration and discrimination in one number.

The standard fix is temperature scaling: divide the logits by a single scalar T fitted on the validation set to minimise negative log-likelihood. It leaves the ranking — and therefore AUROC — unchanged, and usually brings ECE down substantially. Fit T on validation data, never on the test set, and re-check calibration at each new site, because calibration shifts even when discrimination does not.

Worked procedure: a reliability diagram

  1. Collect the model's predicted probabilities and true labels on the test split.
  2. Split the probability range into ten equal bins.
  3. For each bin, compute the mean predicted probability, the fraction of true positives and the count.
  4. Plot fraction-positive against mean-prediction with a diagonal reference line; make the marker size follow the count.
  5. ECE equals the sum over bins of (count divided by total) times the absolute gap between the two values.
  6. Fit a temperature on the validation split, re-run steps 1–5, and report before and after.

Choosing the metric

AUROC is insensitive to prevalence and is the default in papers. AUPRC is more informative when positives are rare. Neither tells a clinician whether using the model at a given threshold does net good; decision-curve analysis (net benefit across thresholds) does, and it is rarely reported. When you read "radiologist-level AUC", ask which population, which prevalence, and which threshold.

What is still unsettled

Whether imaging foundation models pre-trained on millions of scans reduce dataset shift or merely hide it is an active question. How many "radiologist-level" claims hold under prospective evaluation is, so far, a short list.

What to remember

  • Skip connections give a U-Net both context and precise localisation; preprocessing and augmentation matter more than architectural novelty.
  • Report Dice and a boundary metric; neither alone describes clinical safety.
  • A model learns the easiest predictive feature, which is often the hospital, not the disease; an internal test set cannot reveal this.
  • Deep networks are over-confident by default; check a reliability diagram and fit temperature scaling on validation data.
  • Calibration must be re-checked at every new site.

Materiale selectate

2h

Munca de profunzime se întâmplă aici — lecția este briefingul tău.

  • U-Net: Convolutional Networks for Biomedical Image Segmentation (Ronneberger et al.)Lucrare· 40 min
  • Variable Generalization Performance of a Deep Learning Model to Detect Pneumonia in Chest Radiographs (Zech et al., PLOS Medicine)Lucrare· 40 min
  • On Calibration of Modern Neural Networks (Guo et al.)Lucrare· 40 min

În direct pe aiqbench

Subiectul acestei lecții în restul site-ului, astăzi.

În știri, ultimele 30 de zile

  • Can Registry Revision Histories Improve Point-in-Time Forecasts of Clinical Trial Progression?arXiv · 4 dec.
  • Implementation Variability Makes Sepsis-3 an Inconsistent Measuring Model for Early AI Prediction on Clinical DataarXiv · 4 dec.
  • Spectral Parameterization Reveals a Dissociation Between Chronological Age Prediction and Clinical Discrimination in EEG Brain-Age ModelingarXiv · 4 dec.
Mai multe știri pe acest subiect →

Mergi mai departe

  • Fișele benchmarkurilorCe măsoară fiecare benchmark și unde nu ajunge.
  • Întreabă AI despre această lecțieDeschide Întreabă AI cu o întrebare despre această lecție, cu răspuns din arhiva de știri, cu surse.

Testează-ți cunoștințele

5 întrebări în 100 de secunde, pe o pagină separată. Citește mai întâi tot ce este mai sus.

Testează-ți cunoștințele →

Misiunea modulului

40–45 min

Install the medmnist package (free, pip; the data downloads automatically) and train a small CNN on PneumoniaMNIST for a few epochs on CPU. On the official test split, report AUROC and accuracy, then draw a reliability diagram (ten probability bins) and compute expected calibration error. Apply temperature scaling fitted on the validation split and report the before/after ECE. Save the two plots and a five-line summary.

Se încarcă lucrarea ta…

← Lecția anterioară3. Drug Discovery Pipelines and Where ML HelpsLecția următoare →5. Clinical Language Models and EHR Data
aiqbench
Informații despre AI & calcul cuantic© aiqbench. Toate drepturile rezervate.

Fluxuri:RSS·JSON Feed

LimbăEnglish·Românăbeta
ȘtiriAI & tehnologieCuanticAnalize
ExploreazăBenchmark-uriÎnvață
CompanieDespreÎncredereInformații legaleTermeni și condițiiPolitica de confidențialitateNotificări privind drepturile de autorȘtergerea datelorRaportează conținut

Perspectiva aiqbench, analizele, rezumatul zilnic și răspunsurile din Întreabă sunt scrise de modele AI din sursele afișate, fără revizuire editorială înainte de publicare. Pot conține erori — verifică sursa. Cum este folosit modelul →

  • Știri
  • Analize
  • Întreabă
  • Topuri
  • Cont