Back to the notebook

Research / 2 min read

From tumour masks to cancer staging

I went into HECKTOR thinking mostly about segmentation. The part that ended up being more interesting was what came after the mask.

HECKTOR Medical AI article cover

Segmentation was not the finish line

The first half of the project was familiar in the way ML problems often are: take PET and CT volumes, preprocess them, run a 3D segmentation pipeline, and evaluate the tumour mask.

The project reached around 0.70 Dice, which gave us something useful to work with. But the mask itself was not really the end goal.

The more interesting question was whether that segmentation could tell us anything about cancer stage. That changed the project from "can we find the tumour?" to "can the tumour representation support another prediction task?"

The pipeline mattered more than one model

Once we had tumour masks, I worked with tumour-burden and imaging-derived features that could be used for downstream staging.

That forced me to think about the whole pipeline at once. Preprocessing affects the segmentation. The segmentation affects the extracted features. Those features affect the staging model.

It sounds simple when written as a diagram, but it changed how I debugged experiments. A bad downstream result did not automatically mean the final model was the problem.

Evaluation got more serious

The staging labels were imbalanced, so raw accuracy was not enough. We used balanced accuracy to compare T-stage and N-stage predictions.

The project experiments improved T-stage balanced accuracy from roughly 0.312 to 0.585, and N-stage from roughly 0.197 to 0.678.

Those numbers are research results under a particular setup, not clinical claims. The part I care about is that I became much more careful about what a metric actually says and what it does not.

What stayed with me

This was probably the project that pushed me furthest toward ML engineering.

The neural network mattered, but so did data handling, preprocessing, reproducibility, feature extraction, experiment design, and evaluation.

The more I worked on it, the less I thought of machine learning as "train a model" and the more I thought of it as building a system where every stage has to make sense.

Read the source

This note covers the project as described in my portfolio. The linked source and demo are the best places to look at the implementation.

Another noteWhat does a prompt actually mean?