Researchers have developed a pan-cancer AI model that predicts how patients will respond to immunotherapy more accurately than the standard biomarkers doctors rely on today. The model, called COMPASS, was described in a study published in Nature Medicine on July 3, 2026, and it generalizes across different tumor types, treatment regimens, and clinical cohorts.

Immunotherapy, particularly a class of drugs known as immune checkpoint inhibitors, has transformed cancer care, but only a minority of patients benefit. For the AI industry coverage following how machine learning is reshaping medicine, COMPASS offers a detailed look at how foundation-model techniques are moving from language and images into oncology.

The Problem COMPASS Tackles

Immune checkpoint inhibitors, or ICIs, have dramatically improved outcomes for some cancers by releasing the brakes on the immune system so it can attack tumors. The catch is that responses are uneven. Only a subset of patients achieve durable remission, while many others see no benefit at all, and doctors have limited tools for telling in advance who will respond.

Today's clinically validated predictors, chiefly tumor mutational burden (TMB) and the expression of a protein called PD-L1, are imperfect. A pan-cancer analysis of more than 27,000 ICI-treated patients found only weak or inconsistent links between those markers and actual patient responses. The result is that patients may be exposed to drugs that will not help them, while others who might benefit are never identified.

COMPASS aims to close that gap by learning interpretable, biologically grounded concepts about the tumor immune microenvironment (TIME), the complex interplay between a tumor and the immune cells around it.

A Concept Bottleneck Foundation Model

COMPASS is built as a concept bottleneck model, an architecture designed to be explainable rather than a black box. It processes a patient's tumor RNA sequencing data through a transformer-based gene encoder that reads the expression of 15,672 protein-coding genes. Those gene embeddings are then projected onto 132 curated gene signatures and aggregated into 43 high-level immune and microenvironment concepts, producing a compact representation of each patient's tumor-immune dynamics.

The model was pretrained using self-supervised contrastive learning on 10,184 tumors across 33 cancer types from The Cancer Genome Atlas (TCGA). By learning from large amounts of unlabeled data first, COMPASS builds generalizable representations that can then be fine-tuned on much smaller clinical cohorts, an important property given how scarce labeled immunotherapy data is.

Because the architecture passes information through human-readable concepts, clinicians can inspect which biological signals, such as T cell exhaustion, myeloid programs, or immunoregulatory signaling, drove a given prediction. That stands in contrast to many deep-learning models that output a score without explaining the reasoning behind it.

Strong Results Across Cancers

The researchers evaluated COMPASS on 1,133 patients drawn from 16 clinical cohorts spanning seven cancer types, using pretreatment tumor transcriptomes to predict response to checkpoint inhibitors including anti-PD-1/PD-L1, anti-CTLA-4, and combination therapies.

In a demanding leave-one-cohort-out evaluation, where the model is repeatedly tested on a cohort it has never seen, COMPASS achieved the best average performance among 22 competing models. It improved prediction accuracy by 8.5 percent and the area under the precision-recall curve (AUPRC), a key metric when one outcome is much rarer than the other, by 15.7 percent.

The most striking result came in a held-out phase 2 trial of metastatic urothelial carcinoma, a cancer of the bladder and urinary tract. Patients that COMPASS predicted would respond survived significantly longer than those it predicted would not, with a hazard ratio of 4.7 and a P value of 1.7 × 10⁻⁷. On this measure, the AI model outperformed both TMB and PD-L1 testing, the biomarkers currently used in the clinic.

Explaining Why Patients Respond, or Do Not

Beyond raw accuracy, COMPASS generates personalized response maps that connect a patient's gene expression to specific immune concepts. These maps help explain the mechanism behind a prediction, and they expose cases where the conventional categories mislead.

For instance, doctors often classify tumors using three immune phenotypes: inflamed, excluded, and desert. But COMPASS showed this coarse sorting can be deceptive. Some patients with "inflamed" tumors, which should predict a good response, did not respond because of suppressing signals driven by a protein called TGFβ, vascular exclusion, or dysfunction in certain immune cells. Conversely, some patients whose tumors did not look inflamed still responded, because they retained cytotoxic immune activity or carried high mutational burden without immunosuppressive signals.

By resolving those hidden distinctions, COMPASS identifies functional immune states that complement, rather than simply replace, existing biomarkers.

What Comes Next

The study underscores both the promise and the limits of AI in oncology. COMPASS generalizes across cancer types and treatments and can adapt to small clinical cohorts through parameter-efficient transfer learning, including a zero-shot mode that matches new patients to similar cases without additional training. But the authors note that immunotherapy response depends on many factors beyond the transcriptome, and clinical adoption will require further validation across larger and more diverse populations.

The work also reflects a broader trend: foundation models pretrained on vast datasets and then adapted to specialized medical tasks are moving closer to the clinic. Whether concepts learned from tumor immune biology can translate into better, faster treatment decisions for individual patients is the question the next round of trials will have to answer.

Stay Ahead of AI

Foundation models are increasingly moving from text and images into medicine and the sciences. Track the latest AI developments shaping healthcare and research.

Read more AI news →