Labels Are the Ceiling: Building a Knee MRI Model on 100GB You Never Download

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:

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:

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:

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:

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):

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:

  1. Reuse the public parts (labels + images + a trained model) for a fast baseline.
  2. Train my own MIL model on the best public labels.
  3. Improve the labels with my own extractor, or a small language-model pass over the reports, cost-estimated before any spend.
  4. 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.