Matching the Problem to the Approach
A decision framework: given a clinical question (classification, segmentation, prediction, natural language extraction, anomaly detection), which AI approach is most appropriate?
Most AI projects that go wrong probably picked the method first. Someone wants to "do something with deep learning" and goes looking for a question. Start from the other end. Write down the clinical decision you want to support, work out what output would support it, and the approach mostly follows from there.
State the question as an output
Ask what, exactly, the model should hand back for each case. There are only a handful of answers, so we can categorize them.
| You want | Task | Example | Usual approach | Label you need | How it is scored |
|---|---|---|---|---|---|
| One answer for the whole case | Classification | Is there a pneumothorax on this film? | CNN for images, trees or regression for tables | A category per case | Sensitivity, specificity, AUC |
| Where each finding is | Detection | Mark every nodule on this CT | Detection network | A box or point per finding | Sensitivity against false positives per scan |
| The exact outline of a structure | Segmentation | Outline the tumor to measure its volume | U-Net | A mask per image | Dice, Hausdorff distance |
| A number | Regression | Estimate ejection fraction from this echo | CNN or trees, with a numeric output | A measured value per case | Mean absolute error, Bland-Altman agreement |
| A future event | Risk prediction | Will this patient be readmitted within 30 days? | Trees or regression; survival models for time-to-event | An outcome and follow-up time | AUC or C-index, plus calibration |
| Facts from free text | Language extraction | Pull tumor stage from pathology reports | Language model | Annotated reports | Precision and recall per field |
| Cases unlike the rest | Anomaly detection | Flag scans that don't look normal | Unsupervised model trained on normal cases | Normal cases only, plus a labeled test set | Sensitivity and specificity on the test set |
| A new or improved image | Generation, reconstruction | Reconstruct a low-dose CT | Generative model | Paired low- and high-quality images | Image similarity, then reader assessment |
Each row is covered in more depth elsewhere in the knowledge base. What follows is how to choose between them.
The same disease can be several tasks
Take lung nodules. "Does this patient have a nodule?" is classification. "Where are the nodules?" is detection. "How large is this nodule, and has it grown?" is segmentation followed by measurement. "Will this nodule turn out to be malignant?" is risk prediction.
Choose the cheapest task that supports the decision. If the clinical action is "send for follow-up CT or don't", you need a classification, and paying radiologists to outline every nodule buys nothing. If the action depends on volume doubling time, you need segmentation.
Detailed outputs cost more to label when developing the model. A case-level label takes seconds for a radiologist, a bounding box somewhat longer, and a full three-dimensional outline can take most of an hour. Check what you can afford before you commit.
Four questions that inform the approach
What data will the model have at the moment of use? Train only on inputs that exist at decision time. A sepsis model that uses the antibiotic order as an input has learned that clinicians already suspected sepsis. A readmission model cannot use the discharge summary if it has to run on the morning of discharge.
What is the label, and where does it come from? "Pneumonia" could mean a radiologist's read, a discharge code, a positive culture or a consensus panel, and those disagree with each other. The choice of reference standard sets the meaning of every result you report (see 5.7 Reference Standards and Ground Truth in Medical AI).
How many cases do you have, and how many are positive? The count of the rarer class is what limits you. Ten thousand scans with forty positives is a forty-case problem (see 2.2 How Much Data Do You Need? and 2.4 Class Imbalance).
Which error is worse? A screening tool can tolerate false positives to avoid misses, but a tool that triggers an invasive procedure cannot. Decide this before training, because it sets the operating threshold and the sample size.
Start with the simplest thing that could work
Build a baseline before anything ambitious. For tabular data that is logistic regression on the handful of variables a clinician would choose. For images it is a standard pretrained network, fine-tuned with default settings. For segmentation it is nnU-Net as it comes. Tools nowadays (including that of your humble host, Datamint) can do this with several approaches in an afternoon.
The baseline does two jobs. It tells you within days whether there is any signal in the data. And it gives you something to compare against, so that when a more elaborate model scores 0.86 you know whether that is an improvement on 0.85 or on 0.70.
Also compare against what is already in use. If a five-item clinical score reaches an AUC of 0.80, a neural network at 0.82 has to justify its cost and opacity with those two points.
Finally, it's possible that existing architectures can do the work you need already, out of the box. That would be good to know.
Common mismatches
Deep learning on a small table. A few hundred patients and thirty variables call for regression or gradient boosting. A neural network will overfit, and if it appears to win, look for an error in the evaluation.
Classification where the answer is a measurement. Cutting a continuous quantity into "normal" and "abnormal" before training discards information and builds in an arbitrary threshold. Predict the number and apply the threshold afterwards.
Segmentation where a classification would do. This is the most expensive mistake on the list, because of what annotation costs.
A language model for arithmetic or lookup. If the value is in a structured field, put ChatGPT back on the shelf and query the field.
Prediction from a snapshot when timing matters. "Will this patient deteriorate?" needs a time horizon. Deterioration within six hours and within thirty days are different problems with different inputs.
A supervised model for a condition you have five examples of. Consider anomaly detection, pooling data across sites, or a different question.
When the answer is "don't use AI"
Sometimes the exercise ends here. If a clinician can state the rule, write the rule. If an existing score already performs well, validate that. If the label can't be defined consistently, or the data that would be available at decision time doesn't contain the answer, no model will fix it. Finding this out in week one is much cheaper (and less embarrassing) than finding it out after a year of annotation.
A worked example
Here is a made-up but typical case. A hepatology group wants to "use AI on liver ultrasound".
The decision they care about is which patients with fatty liver disease to refer for elastography. The action is refer or don't, so the output is a classification: likely significant fibrosis, or not.
At the moment of use the model would have the ultrasound images and routine bloods. The label would be the elastography result, which exists for the patients who were referred in the past. That raises a problem straight away, because those patients were chosen by clinicians and are not a random sample of everyone scanned. It has to be dealt with in the study design.
They have 2,400 patients with both ultrasound and elastography, of whom about 300 had significant fibrosis. A miss is worse than an unnecessary referral, so they will choose a threshold that favors sensitivity.
The baseline is the FIB-4 score, which uses age, AST, ALT and platelet count and is already in clinical use. The first model is a pretrained CNN on the images, compared against FIB-4 alone and against the two combined.
Notice what was not chosen. They did not segment the liver, because nothing in the decision requires an outline. They did not grade fibrosis into five stages, because the referral is a yes or no. Each of those would have multiplied the labeling work without changing what anyone does.
Key takeaways
- Start from the clinical decision, work out what output would support it, and let that choose the task.
- The main tasks are classification, detection, segmentation, regression, risk prediction, language extraction, anomaly detection and image generation. Each has its own kind of label and its own metrics.
- The same disease can be framed as several tasks. Choose the cheapest one that supports the decision, because label cost rises steeply with detail.
- Settle five things first: the action, the data available at decision time, the source of the label, the number of positive cases, and which error is worse.
- Build a simple baseline and compare against existing clinical tools before trying anything elaborate.
- Sometimes the right conclusion is that a rule, an existing score or a different question is better than a model.
What to read next
- 1.6 What AI Cannot Do: Limitations and Common Misconceptions: what to expect once you have chosen
- 2.2 How Much Data Do You Need?: sizing the dataset for the task
- 3.1 The AI Development Lifecycle: From Hypothesis to Deployment: what happens after the approach is chosen
- 4.1 Classification Metrics: Sensitivity, Specificity, and Beyond: scoring a classifier
- 5.6 Defining Clinically Meaningful Endpoints: making sure the output matters clinically
This article is part of the AI in Clinical Research Knowledge Base.