Prediction of pathological complete response (pCR) to neoadjuvant therapy from the composition of pretreatment tumor biopsies. Models of pCR on the inferred composition were trained on TransNEO, separately for ER+/HER2− and HER2+ tumors, and applied unchanged to four external cohorts. Each column is a patient. Composition: inferred shares of malignant subtypes and other cells. pCR: observed (filled). Prediction rows: each predictor's ranking of the patients within the cohort (darker, higher), with its AUC and 95% confidence interval; right: each predictor's ROC curve. Click a predictor's name to sort the patients by it; hover a patient for its composition and ranks. *Expression-based surrogates of the clinical assays. HER2 expression: ERBB2 mRNA. DFCI IBC: inflammatory breast cancer. Sorted by the model's score, patients with pCR concentrate at the high-score end, and the model's AUC is higher than each comparator's in all four cohorts.