DEV Community

Cover image for A cancer drug is a classifier. My body is the dataset.
Chauncey Wang
Chauncey Wang

Posted on

A cancer drug is a classifier. My body is the dataset.

I'm a data scientist with stage IV cancer. I build an AI tool that matches patients to clinical trials — but the model I can't stop thinking about isn't in my code. It's the drug in my arm.

A cancer treatment is a classifier. Not as a metaphor — literally. Every dose of chemo, every round of radiation, every targeted drug makes the same binary call, billions of times over: this cell — kill it, or spare it? The ground truth is malignant or healthy. The whole fight is a classification problem, and my body is the dataset it runs on.

Once you see it that way, the confusion matrix stops being a diagram and becomes a diagnosis.

I'm not the first to see it. In 2014 a group of researchers formalized exactly this — cancer drugs as classifiers — into a framework for designing more selective drugs, treating a therapy as a (suboptimal) classifier that tells malignant cells from healthy ones by their molecular profiles (Lawlor et al., PLOS ONE 2014). They modeled the classifier from the outside, to build better ones. I've spent two years living inside its test set — and the view from in here is different.

The four cells — and they're literal cells

A 2×2 confusion matrix for cancer treatment. Columns are the cell's true identity (cancer cell / healthy cell); rows are what the drug does (killed / spared). Cancer cell killed = true positive (the tumor shrinks); healthy cell killed = false positive (the side effects); cancer cell survives = false negative (recurrence, the one that got away); healthy cell spared = true negative (the rest of me).

True positive — a cancer cell killed. The therapeutic effect. The tumor shrinks. This is the only cell anyone is rooting for.

False positive — a healthy cell killed. This is toxicity. Every false positive has a name: the hair, the crashed blood counts, the mouth sores, the neuropathy in my feet. Side effects aren't a separate thing from the treatment — they are its false-positive rate, made flesh. Not all of it is a cell struck dead; some is healthy tissue damaged, a nerve misfiring, an immune system thrown off balance. But it's the same error at root — the drug acting where it shouldn't, and the body paying for it.

False negative — a cancer cell that survived. The ones that got away. And here is what makes this the most unforgiving classifier I know: it can take just one false negative — a single surviving cell with the capacity to seed new growth — to rebuild the entire tumor. Miss that one positive and, months later, it quietly undoes all the true positives you were so proud of. And the cell that survives needn't be one that was always going to: under the drug's pressure, cells can acquire resistance they didn't start with — so what grows back is often a harder problem to classify than the one you began with.

True negative — a healthy cell, correctly left alone. The silent majority — most of me, on a good day. Nobody celebrates a true negative, but they're the reason I can walk around between infusions.

The metrics are the whole history of oncology

Oncologists don't say precision and recall. But that's what a century of cancer drugs has been chasing.

When the goal is a cure, recall has to be almost perfect. Of all the cancer cells, what fraction did you kill? In most machine-learning problems you can live with 0.9. Here, 0.9999 can still lose — because the 0.0001 that survived is alive and dividing. Cancer is the classification problem where a handful of missed positives regrow into the whole thing. That's why treatment is so brutal: you're not trying to be mostly right, you're trying not to miss a single one.

And no single systemic drug gets there. A drug in the bloodstream reaches everywhere and kills imperfectly — broad coverage, mediocre recall. So a cure, when it's possible, is an ensemble: induction chemo shrinks the tumor to cut the burden, then surgery or radiation takes the bulk with near-perfect recall inside its field, and systemic therapy mops up whatever slipped the net. Each classifier covers another's blind spot. You stack them because not one of them, alone, clears the last cell.

Precision is the part your body pays for — a different question from recall. Not what fraction of the cancer you killed, but: of all the cells you killed, what fraction were actually cancer? Chemotherapy is a catastrophically low-precision classifier. Its decision rule is barely a rule at all — "kill whatever's dividing fast" — so its false positives are precisely your fast-dividing healthy tissues: the gut lining (nausea), the hair follicles (baldness), the bone marrow (the blood counts that crash). The side-effect profile is just a readout of a crude decision boundary.

And the two trade off — that tradeoff is cancer treatment. Push the dose higher to raise recall — kill more cancer, at least until the dose-response flattens — and precision falls: more healthy cells die, more toxicity, until the false positives start threatening to kill the patient themselves. The maximum tolerated dose an oncologist reaches for is, exactly, how far you can trade precision for recall before the false positives turn lethal. Chemo asks you to poison your whole body a little to be more sure you got the cancer.

Two overlapping bell curves — healthy cells and cancer cells — plotted along a

So the entire arc of better cancer drugs is a campaign to raise precision without surrendering recall — to sharpen the boundary so it catches cancer and spares the healthy. Targeted therapies pick a mutation only the cancer carries. Antibody-drug conjugates — the class of the drug in my arm — bolt a targeting antibody onto a chemotherapy warhead: a feature engineered to lower the false-positive rate by carrying the poison closer to the cancer. Closer, not exclusively — the payload still leaks in transit, the target still sits on some healthy cells, and the neuropathy in my feet is proof the false positives never hit zero. A sharper boundary, not a perfect one. A tumor-specific target is nothing but a feature with real area under the ROC curve — one that separates malignant from healthy cleanly. Most targets don't, quite; they're shared with some normal tissue, and that leftover overlap has a clinical name too: on-target, off-tumor toxicity. False positives from an imperfect feature.

Immunotherapy retrains the classifier itself. Cancer survives partly by looking like self — fooling the immune system's own classifier into labeling it "healthy." Checkpoint inhibitors take the brakes off that classifier. And when the retrained immune system starts over-calling — attacking healthy tissue it now flags as foreign — you get colitis, pneumonitis, thyroiditis: autoimmune side effects that are, exactly, the immune classifier's false positives.

And all of it runs on the worst class balance imaginable — which is exactly what makes precision so merciless. Cancer cells are a vanishing fraction of the cells in a body. So a drug can be highly specific — spare the overwhelming majority of healthy cells, hold its false-positive rate low — and still kill more healthy cells than cancer ones in sheer count, simply because the healthy cells so enormously outnumber the targets. High specificity, low precision: that's the signature of a rare positive class, and it's why even a fairly selective drug can feel like it's poisoning your whole body. Put that beside a false-negative cost that's existential and a false-positive cost paid in your own tissue, and I don't know a harder classification problem.

A worked example: the drug in my arm

Put the drug I'm actually on through this lens. Becotatug vedotin is an antibody-drug conjugate: an antibody that recognizes EGFR — a protein my cancer, nasopharyngeal carcinoma, carries at high levels — welded to a cytotoxic warhead called MMAE. MMAE (monomethyl auristatin E) is a microtubule poison: it jams the scaffolding a cell has to build in order to divide, and it's so potent that it would be far too toxic to put into a vein on its own. That toxicity is the point: the antibody is what makes an otherwise-unusable warhead usable, by carrying it only where it's wanted.

And "where it's wanted" isn't a single feature. For the drug to kill a cell, several things all have to be true at once: EGFR on the surface for the antibody to grab, the whole conjugate pulled inside and digested to free the MMAE, the cell dividing when the poison lands, and no pump spitting the drug back out. The real feature is that conjunction — EGFR and internalizing and dividing and not-effluxing, all ANDed together — and that's exactly why it's selective: almost no healthy cell checks every box, so the false positives fall. It's also where resistance hides, because a cell escapes by failing any single clause — shed the antigen, go dormant, or learn to efflux the drug.

Its Phase 3 trial pitted it against the conventional alternative: standard chemotherapy, the doctor's choice of capecitabine or docetaxel — drugs whose decision rule is essentially "attack whatever divides fast." Docetaxel, in fact, goes after the very machinery MMAE does — the microtubules a cell needs to divide — just in mirror image. The warhead wasn't exotic; what changed was the aim: a sharp feature against a crude one.

In classifier terms, the result is exactly what the sharper feature should buy. Against chemotherapy, becotatug vedotin produced about two and a half times the response rate (30.2% vs 11.5%), roughly doubled the time before the cancer regrew (median progression-free survival 5.8 vs 2.8 months; hazard ratio 0.63), and trended toward longer survival at the interim look (17.1 vs 12.0 months; hazard ratio 0.73, not yet conclusive) — all in patients whose disease had already slipped past two or more prior lines of treatment (ASCO 2025, abstract LBA6005). It didn't win with a more violent poison — its warhead is a cytotoxic like the others. It won with a better boundary: a feature, EGFR, that tells my kind of cancer cell from my healthy ones more cleanly than "divides fast" ever could.

A grouped bar chart of the Phase 3 trial — becotatug vedotin (amber) versus chemotherapy (gray) across three endpoints. Objective response rate: 30.2% vs 11.5% (p=0.003). Median progression-free survival: 5.8 vs 2.8 months (hazard ratio 0.63). Median overall survival, interim: 17.1 vs 12.0 months (hazard ratio 0.73, a trend, not yet significant). Becotatug vedotin is higher on all three.

That's the whole thesis in a single trial — and worth stating precisely. Those numbers describe a population, not a prophecy. A median is a fact about a few hundred strangers; what the drug is doing inside me I read off scans and side effects, not off a survival curve. But the reason it's the drug in my arm at all is that, across that population, a sharper feature beat the doctor's best crude one.

The objective function changes when it spreads

Everything above assumes you're playing for a cure — driving recall toward one, because a single survivor regrows the tumor. That's curative intent: early-stage disease, the adjuvant setting, the places where gone is still on the table.

I'm not in that setting. My cancer is metastatic — it spread. For some people even that leaves a narrow path to cure: oligometastatic disease, a few deposits you can still ablate one by one. But mine is widespread, and there the arithmetic changes — not because the drugs got weaker but because the ensemble lost its best member. Surgery and radiation reach near-perfect recall inside a field; they can't touch disease seeded microscopically through the whole body. Take the local step away and only the broad, imperfect systemic classifiers are left — and alone, they don't reach one. Recall of 1.0 isn't a target I keep missing; for disease spread like mine, it's no longer the one I'm realistically playing for. Durable control is.

So the objective function changed. I'm not trying to classify every cell correctly, once. I'm running a control problem — hold the tumor burden down, keep the false positives (the toxicity I'll carry for as long as this lasts) livable, and keep the classifier running as long as the math allows. The false negatives I've stopped trying to zero out. I've conceded them; the fight now is over what they're allowed to do, and how much of me it costs to hold them there.

Two small time-series panels of tumor burden over the course of treatment. Left, curative intent (early-stage): the burden drops steeply to zero and stays there — recall driven to 1, miss nothing once. Right, control (metastatic): the burden drops but levels off in a tolerable band above zero and oscillates there indefinitely, never reaching the

A curative patient is solving a one-shot classification: miss nothing. I'm solving something closer to control — keep a system in a tolerable state, over time. A different loss function entirely. And in mine, a false positive I'll carry for years can weigh more than a false negative I've already made my peace with.

Every new line of treatment is the next split in the tree

A classifier doesn't have to be a single decision. String them together and you get a decision tree: a sequence of splits, each one working only on the data that survived the split before it. That's what lines of treatment are. First-line therapy makes its cut; the cancer that comes back is, by definition, the subset of cells that landed in that drug's false-negative region — the ones it couldn't separate out. So when I choose a next line, I'm choosing the next split in the tree, and it only ever operates on the survivors.

Which quietly dictates a rule every oncologist already follows: don't reach for a drug whose boundary looks like the last one's. A split highly correlated with one you've already made buys almost no information — the cells it could have carved off are already gone, and what's left is precisely the part that kind of feature can't touch. That's cross-resistance, stated in the language of trees: near-zero conditional gain. It's why the next line usually changes mechanism rather than reloading a cousin of the drug that just failed, and why we stack combinations — several splits at once, each covering the cells the others miss — always weighed against what each new cut costs in healthy tissue.

But two things break the tidy picture, and both are why this is the hardest version of the problem. The first: the data isn't fixed. Every split I make changes the distribution. It kills the sensitive cells and leaves behind — enriches — the resistant ones. I'm not fitting one tree to a frozen dataset; I'm splitting a population that reshapes itself, adversarially, in answer to every cut. Each line selects for the clone that beats it. Changing mechanism is the counter-move — a fresh feature the survivors haven't been selected against, which buys back some of the lost ground. How much depends on how independent the new mechanism is: swap one cytotoxic for a close cousin and the survivors' general hardiness — drug efflux, dormancy, a defused self-destruct — carries straight over; hand the killing to something that works on entirely different rules, like the immune system, and the reset can be far deeper. What moves that floor is the overlap between the new mechanism and the ones the tumor has already beaten — not the number of lines you've been through. Overlap keeps it high; a mechanism independent enough can push it back down. It's never guaranteed to be one-way: the right switch can leave the tumor more vulnerable, not less.

A schematic sawtooth line chart. Y-axis: the share of surviving cells resistant to the drug currently in use; x-axis: four successive lines of therapy. Within each line the curve climbs as selection enriches for resistance. At each switch the curve drops, but by different amounts: a similar-mechanism switch (high overlap) gives a small reset and the floor stays high; an independent-mechanism switch (low overlap) gives a big reset and the floor drops; a partial-overlap switch gives a partial reset. A callout notes that a later line can sit at a lower floor than an earlier one when its switch overlapped less — so the floor tracks mechanism overlap, not the number of lines.

The second is that I'm choosing these splits almost blind. In a real decision tree you know every feature value and every label, so you can compute which split gains the most. I can't. I don't fully know which features my tumor is even carrying — the molecular readout is partial, and a snapshot ages. The response odds are borrowed from trial populations that aren't me. So I'm not maximizing information gain; I'm maximizing expected information gain under deep uncertainty — and sometimes choosing a line not because it's the likeliest to work, but because it will tell me something about what I'm fighting. Explore versus exploit, played for the highest stakes there are.

Where it breaks: I can't see the matrix

Here's the part that keeps me up.

You never get to see this confusion matrix. You can't count the cells.

The whole four-box reality is inferred from two blurry shadows. Recall, I read off a scan — a tumor that shrank means a lot of true positives, roughly, in aggregate. Precision, I read off myself — how sick I feel is the false-positive rate, translated into symptoms. And the cell I most need to know is the one I can't see at all: the false negative. The single cancer cell that survived the last infusion and is, as I write this, quietly dividing. Minimal-residual-disease tests are a smudged attempt to glimpse that false-negative rate — did any escape? — and even they can't see one cell.

So the classifier runs across billions of cells in my body; I'm told its approximate recall months later, in a radiology report, and its precision continuously, in how I feel. The confusion matrix that decides how long I live is computed in the dark, and I only ever see its shadows on the wall.

The best classifier may not exist yet

Here's what makes control worth it. The set of classifiers I get to choose from isn't fixed. Every year, oncology ships better ones — drugs with sharper features, mechanisms that didn't exist when I was diagnosed. The drug in my arm now wasn't on the table for me when I started. The frontier — the best boundary anyone can yet draw between my cancer and me — keeps moving outward, slowly and unevenly, but it moves.

So for a metastatic patient, control isn't only holding a tolerable state for its own sake. It's buying time against that moving frontier — staying in the game long enough for a better classifier to arrive. The loss function isn't just "keep the tumor down"; it's "keep the tumor down until the tooling improves." Every month held is a month closer to a feature sharp enough to change the math. It's a bet, not a promise — the better drug may not come in time — but it's the bet the whole strategy rests on.

And you don't wait for it passively. The better classifier might already exist — in a trial that hasn't reached my clinic, in a drug class my oncologist hasn't reached for, in a study running in another country. So part of the job, the part I can actually control, is searching: scanning that frontier, continuously, for a boundary sharper than the ones I've already been offered. It's a discipline of its own — most of what you find won't fit, and a trial is a candidate, not a cure — but when the classifiers you've got are failing, looking is the move with the most upside left. It's not a coincidence that searching for a better one is the thing I decided to build.

The name of the thing

I find it steadying anyway — the way it's steadying to know the name of the thing trying to kill you. My treatment isn't a mystery or a punishment. It's a classifier working the worst class imbalance there is, paying for its false positives in my own healthy cells. Side effects are its precision problem. Recurrence is its recall problem. And with cure no longer the realistic goal for disease spread like mine, mine isn't trying to win the classification outright — only to keep it running, tolerably, for as long as the math allows. "Precision oncology" is the long campaign to sharpen the boundary enough to buy more of that.

Every cancer drug is a classifier. My body is the dataset. And the one cell that matters most — the one that got away — is the one neither of us can see.

Top comments (0)