Deeya Kotecha

·7 min read·writing

COMPASS turns tumor's RNA into an immunotherapy prediction

Explaining one of the most interesting papers I read this week.

A very interesting paper was just published in Nature Medicine last week. Checkpoint inhibitors like Keytruda and Opdivo have transformed oncology, producing durable responses in patients who previously had no options. They work but releasing the brakes on the T cells can attack tumors. The problem is that only 30% of patients with solid tumors respond to them and we are bad at predicting who that will be.

The two FDA approved biomarkers are PD-L1 expression and tumor mutational burden (TMB - see the glossary section). Both have real limitations. PD-L1 is inconsistent across assays and antibodies and a high-TMB tumor can still evade the immune system through dozens of other mechanisms.

Over the past decade, researchers have tried to build better predictors using transcriptomics. Simple immune signatures like Teff (T-effector) measure cytotoxic T cell activity but miss everything else, TIDE modeled both T cell dysfunction and T cell exclusion as two mechanisms of IO failure, but it did not generalize well across cancer types because it was calibrated on specific datasets. Machine learning approaches like NetBio use network biology to capture gene interactions, getting better accuracy but at the cost of interpretability,

The concept bottleneck: forcing AI to explain itself.

Most machine learning models in oncology are black boxes but oncologists need to understand the biological rationale behind a prediction to trust and regulators need interpretability to approve it.

COMPASS (published in Nature) is a pan-cancer foundation model that predicts whether or not a patient will respond to immune checkpoint inhibitors (ICI) using bulk RNA-seq data. It uses a concept bottleneck transformer, which is an architecture that forces every prediction to pass through 44 named biological concepts before reaching a final answer. The model literally cannot make a prediction without first scoring the tumor on dimensions like IFNγ signaling, CD8+ T cell infiltration, TGFβ activity, angiogenesis, antigen presentation, and dozens of others.

Here is how this works in practice as the architecture has 3 main components.

The encoder is a Generalized Linear Model (GLM) transformer, pretrained on TCGA data using self-supervised contrastive learning. It takes raw gene expression and compresses it into a learned representation that captures the relationships between genes.

The hierarchical concept projector is the bottleneck and takes the encoder’s output and maps it through 132 curated gene sets down to 44 biological concepts. This is a two-level hierarchy: gene sets are grouped into concept families, and the model learns how to weight them. Every piece of information the classifier receives must pass through these named concepts.

The classifier takes the 44 concept scores and makes a binary prediction: responder or non-responder. Because it only sees concept scores, you can look at any prediction and say exactly which biological programs drove it.

How did they train COMPASS

COMPASS follows a two-stage training pipeline that borrows from the large language model playbook:

Stage 1: Self-supervised pretraining. They took 10,184 tumors from TCGA across 33 cancer types. The model learns about what the tumor immune microenvironment looks like across all human cancers using contrastive learning. This teaches the encoder and projector to build meaningful immune representations without ever seeing IO outcome data.

Stage 2: Supervised fine-tuning. The full model (encoder + concept projector + classifier) is then fine-tuned on clinical cohorts of patients who actually received immune checkpoint inhibitors, using response as the label. The authors tested 4 fine-tuning strategies: full fine-tuning (FFT), partial fine-tuning (PFT), linear fine-tuning (LFT), and no fine-tuning (NFT). PFT and LFT performed best, consistent with the transfer learning literature showing that freezing early layers preserves pretrained features. Less updating = less overfitting = better generalization.

There is also a third strategy called Multi-Stage Fine-Tuning (MSFT), which adds a drug-specific adaptation step. After pretraining and pan-cancer fine-tuning, MSFT does a final round of fine-tuning on cohorts treated with a specific drug. This is meant for clinical deployment, where you want the model tuned to the exact therapy a patient will receive.

The results and resistance mechanisms

COMPASS was benchmarked against 22 existing IO response prediction methods across 7 independent validation cohorts.

Accuracy: 72.6% balanced accuracy versus 64.1% for the best prior method (an 8.5% improvement).

Precision-recall: AUPRC of 0.617 versus 0.460 for the best prior method, a 15.7% relative improvement. AUPRC matters more than ROC-AUC in this setting because the classes are imbalanced (more non-responders than responders), and AUPRC specifically measures how well the model identifies the minority class.

Survival separation: When patients were stratified by COMPASS predictions, the hazard ratio between predicted responders and non-responders was 4.37 (p < 0.001). Patients the model called non-responders had 4.37 times higher risk of death than those it called responders.

COMPASS also resolved the inflamed non responder paradox. These are patients whose tumors look inflamed, they have T cells present and IFNγ is active but still fail IO. They identified three distinct resistance clusters shown below.

What are the limitations here?

  1. Retrospective: selection bias and data leakage risk You do not know what biases are baked into the dataset (the patients in the 16 cohorts were selected for various reasons by various investigators at various institutions). To use this as a clinical decision-making tool, you need a prospective study where there is set enrollment criteria and everyone goes through the same process.
  2. Use of bulk RNA-seq: single-cell RNA seq tells you what each individual cell is doing. Spatial transcriptomics (like Visium, CosMx) tells you where each cell is relative to the tumor. COMPASS tries to work around this with the concept architecture, but it limited by the input data.
  3. No non-ICI control arm. For treatment selection questions, this could be interesting but will need a randomizer trial with a non-ICI control arm.

Conclusion: what does this all mean?

For investors, COMPASS represents a significant proof of concept that explainable AI can match or exceed black-box performance in clinical oncology. The concept bottleneck architecture is licensable and applicable beyond IO prediction and any domain where interpretability is a regulatory or clinical requirement could benefit from this approach.

The question now is prospective validation. The model needs to be tested in real-time clinical workflows, ideally in a randomized trial comparing COMPASS-guided treatment selection against standard of care. Until then, it’s an elegant proof of concept with strong retrospective data.

Glossary

TMB (Tumor mutational burden) - how many mutations a tumor has per megabase of DNA. The idea is that the more mutations a tumor has, the more targets for the immune system to recognize which means that patients are more likely to respond to checkpoint inhibitors. It is one of two FDA-approved companion biomarkers for IO (the other is PD-L1 expression).

TPM (transcripts per million): used to normalize RNA-seq data so that you can compare gene expression across samples.

Encoder (transformer): The component that reads the gene expression values and learns how they interact with each other in context. Each gene attends to every other gene, so the model understands that what three genes all being high together means.

Projector (hierarchical concept projector): The component that compresses the encoder’s gene-level representations into 44 named biological concepts. Works in two steps: first maps genes onto 132 curated gene signatures (granular concepts), then aggregates those into 44 high-level concepts.

Classifier: The simplest component. Takes the 44 concept scores and outputs a single probability between 0 and 1. A small neural network with one hidden layer.

Contrastive learning: A self-supervised training method where the model learns by pulling similar things together and pushing different things apart in a representation space. COMPASS uses this during pretraining: augmented versions of the same tumor are pulled together, while different tumors are pushed apart, in the 44-concept space.

Fine-tuning (FFT/PFT/LFT/NFT): Strategies for adapting a pretrained model to a new task. FFT updates all parameters (most flexible, most prone to overfitting). PFT updates only the projector and classifier. LFT updates only the classifier. NFT updates nothing and uses cosine similarity to prototypes. PFT and LFT performed best because they prevent overfitting on small clinical datasets.

Read next

Subscribe

New essays on biotech and the history of medicine, sent when they are ready.

Subscribe on Substack →