Table of Contents
The RSNA Knee Abnormality Detection competition is a different animal from the tabular problems I usually work. The task sounds simple: predict 12 binary findings per knee MRI study (ACL tear, meniscus, effusion, fracture, and so on), scored by macro-averaged ROC AUC. The reality is harder:
- 4,407 studies, 24,371 series, roughly 820,000 DICOM slices, 100GB+.
- You do not download any of it. The data is mounted inside a Kaggle notebook and you train on Kaggle’s GPU.
- Only 58 of the 4,407 studies are expert-labeled. The rest come with a free-text radiology report, in a dozen languages.
So before writing a model, I wanted to answer one question: can I even reach the data, read it, and get a valid submission accepted? If that plumbing does not work, a fancy model is worthless.
Everything runs on Kaggle, not my machine
This is the part that surprised me the first time I did it. For a “Code Competition” like this one, you do not download the dataset. You write a notebook, push it to Kaggle, and it runs on their servers with the data mounted read-only at /kaggle/input. Your code trains on their GPU and writes submission.csv. Your own machine is just the text editor.
My RTX 4080 Laptop sat idle for this one. It could not hold 100GB anyway.
De-risking before building
I pushed two tiny kernels before touching a model.
The first just explored the layout: what files exist, what the 12 finding columns are named, how many studies are labeled, and what a single DICOM looks like. That confirmed the findings list, the 58-of-4,407 label scarcity, and that each slice is a 512x512 16-bit MR image with pixel values well outside the usual 0 to 255 range (so it needs percentile windowing, not a fixed scale).
It also taught me an expensive lesson: recursively listing all 820,000 DICOM files stalls the kernel. You have to index images from the provided CSVs instead of walking the directory tree.
The second kernel was a “smoke test” that ran the full shape of the real job with a deliberately dumb predictor: for every finding, just guess the training-set prevalence. No neural network at all. It sampled 8 slices per study (to prove timed DICOM reading works), wrote a properly formatted submission, and I submitted it. Across the visible test studies it read 24 slices in a couple of seconds, and the leaderboard accepted the file.
That is the whole point. Once the smoke test scores, I know four things work: data access, timed DICOM reads, the exact submission format, and the submit flow. Writing the model is now low-risk instead of a leap of faith.
The conservative baseline
With the path proven, the baseline model is intentionally boring:
- Sample a few evenly-spaced slices per study and mean-pool them.
- Feed them to a pretrained EfficientNet-B0 with 12 sigmoid outputs, trained with binary cross-entropy on the 58 labeled studies.
- If anything fails, or a study can’t be read, fall back to the prevalence guess so the submission is always valid.
No 3D convolutions, no mining the report text, no test-time augmentation, no ensembles. Those are all real levers, and the report-text angle is almost certainly where the winning solutions will find their edge. But none of that matters until the simple version reliably finishes inside Kaggle’s GPU time limit and produces a legal submission.
One gotcha
Kaggle picks your GPU model from a metadata field called machine_shape, not the one you would guess (accelerator). Leave it unset and you silently get an older P100 that modern PyTorch refuses to run on, which produces a dead kernel with a confusing error. Set "machine_shape": "NvidiaTeslaT4" and you get a T4 that works.
Why do it this way
The instinct on a big, intimidating competition is to start with the impressive model. But the failure modes here are almost all plumbing: can’t reach the data, reads time out, submission format is wrong, kernel gets the wrong GPU. Proving the boring path first turns a scary project into a series of small, safe steps. The model is the fun part, but it is also the part least likely to be what stops you.
Where the baseline stalled, and why
The baseline landed at 0.533 on the leaderboard. Barely above the 0.500 coin-flip, with the leaders sitting near 0.95. Two experiments told me exactly why:
- Training an image model on 58 labeled studies scored about 0.52 against a held-out gold set. That is chance. Fifty-eight examples is not a training set, it is noise.
- Mean-pooling several slices into one image, then classifying that, throws away the signal. A torn ACL shows up on a couple of slices; averaging washes it out into a gray blur.
So I tested where the signal actually lives. A rule-based miner of the radiology reports scored 0.607 against gold. A zero-shot language model scored 0.556. The image model scored 0.52. The radiologist’s words carry the answer. The catch: the test set ships with no reports, so text can never be a model input. It can only ever be a way to manufacture training labels for the image model.
The insight that reframes the whole competition
Every image-side trick you can name tops out at the quality of the labels you feed it. Label quality is the ceiling; the image model just converts it into a score. That single idea explains the whole leaderboard:
- Turn each report into 12 probabilities instead of 12 yes/no answers, so a hedged “tear suspected” becomes a 0.8 and not a hard 1. Reading the reports carefully (a language model does this well) reaches roughly 0.83 to 0.89 label accuracy against gold, where a keyword regex tops out near 0.81.
- Feed those soft labels to a multiple-instance-learning image model: run a shared backbone over each slice, then pool the per-slice features with max or attention. Never mean-pool slices into one image, which was exactly my baseline’s mistake.
- Encode the clinical rules that matter. An unmentioned finding is a 0, not “unknown”: radiologists write down positives and stay silent on negatives. Negation is a 0. The Impression section counts most. And never horizontally flip an augmentation: five of the twelve findings are left-versus-right specific, so a flip corrupts the label.
The second insight: don’t rebuild what the community already published
Here is the part that felt almost like cheating until I checked the licenses. On a public competition, people publish their building blocks. For this one, most of the hard work is already sitting on Kaggle, and much of it is CC0 (public domain, use it for anything):
- Report-derived label sets, the best measuring 0.8927 against gold, released CC0.
- Preprocessed image datasets that skip the entire 100GB DICOM conversion, released MIT.
- A fully trained twelve-finding model that scores 0.924 on the public leaderboard as a single model, released CC0, with its inference notebook attached.
It would be silly for everyone to redo the same training. So the plan changed: assemble from public, license-cleared parts first to get a real score fast, then improve on top of it. I keep a license audit in the repo (every asset’s source, author, license, and prize-eligibility, verified through Kaggle’s API) so nothing the final model leans on is a surprise.
My first real submission, then, is not my own model at all. It is that CC0 trained model, wrapped in my own internet-off inference kernel, submitted with credit to its author. It is the ceiling a pure-reuse approach reaches, and the number my own work has to beat next.
The plan from here
The rest is tiered, and I submit at every step so progress is always a real leaderboard number:
- Reuse the public parts (labels + images + a trained model) for a fast baseline.
- Train my own MIL model on the best public labels.
- Improve the labels with my own extractor, or a small language-model pass over the reports, cost-estimated before any spend.
- A full five-fold ensemble with a robust inference kernel.
Alongside that: a knee-MRI-pretrained backbone, multi-plane fusion, and a compact model aimed at the competition’s separate “most efficient model” prize.
The code, kernels, unit tests, the license audit, and a running story log of every decision are on GitHub.