Artificial intelligence can now predict whether cancer patients will respond to immunotherapy drugs before they start treatment, potentially sparing thousands from ineffective therapies. A Stanford University study shows that AI analyzing tumor cell patterns from pathology slides achieved 84% accuracy in predicting treatment outcomes for advanced gastroesophageal cancer patients receiving immune checkpoint inhibitors, significantly outperforming the current standard biomarker test. Why Can't Current Tests Predict Immunotherapy Success? Today, doctors rely primarily on a biomarker called PD-L1 combined positive score (CPS) to decide which patients should receive immune checkpoint inhibitors, drugs that have become standard treatment for most solid tumors over the past decade. However, this single measurement is imperfect. In the Stanford study, PD-L1 CPS alone achieved only 65% accuracy in predicting which patients would actually respond to the drugs. That means roughly one-third of patients might receive expensive immunotherapy that won't help them, while others who could benefit might be denied access based on incomplete information. The problem lies in what doctors cannot see with current tests. They measure one protein on tumor cells, but they miss the complex ecosystem surrounding the cancer, called the tumor microenvironment. This includes immune cells like lymphocytes, neutrophils, and macrophages that determine whether the body's immune system can actually attack the cancer. How Does the AI Model Analyze Tumor Samples? Researchers led by Ruijiang Li, PhD, Associate Professor of Radiation Oncology at Stanford University, developed a fully automated approach that transforms standard pathology slides into detailed cellular maps. The process works in three key steps: - Cell Identification: The AI uses deep learning to classify individual cell nuclei from routine tissue stains into four categories: tumor cells, lymphocytes, neutrophils, and macrophages, extracting patterns invisible to the human eye. - Spatial Analysis: Rather than just counting cells, the model measures how cells interact with each other in space, capturing the architecture of the tumor microenvironment that determines immune response. - Predictive Scoring: The AI computes 66 different features describing cell composition and cell-to-cell interactions, then combines them into a single prediction model that forecasts treatment outcomes. The study included 82 patients with advanced gastroesophageal cancer treated at Stanford University for initial discovery, plus 189 patients with advanced gastric cancer treated at a hospital in China for external validation. The multivariate AI model achieved an area under the curve (AUC) of 0.81 for predicting objective response, compared to 0.65 for the standard PD-L1 test. When researchers combined the AI model with PD-L1 CPS, accuracy improved further to 0.84. In practical terms, this means the AI-enhanced approach correctly identified treatment responders and non-responders with substantially higher certainty than current clinical practice. "Immune checkpoint inhibitors are the most exciting development in cancer treatment in the past decade, and they have become the standard of care for patients, not just in the treatment of gastrointestinal cancers, but in most solid tumor cancers as well," said Ruijiang Li, PhD. "What we were able to show in our study with this AI-based single-cell approach is that for predicting objective response in the validation cohort, a multivariate model combining the spatial features achieved an area under the curve of 0.81 compared with an area under the curve of 0.65 for PD-L1 combined positive score." Ruijiang Li, PhD, Associate Professor of Radiation Oncology, Stanford University Is This Technology Ready for Patient Care? Not yet, but the timeline is accelerating. Dr. Li emphasized that while the research shows tremendous promise, several critical steps remain before hospitals can use this AI in routine clinical practice. The technology must move from retrospective studies (analyzing past patient data) to prospective validation (testing on new patients in real time). The AI model must then be locked down and rigorously tested, followed by either laboratory development or FDA approval before deployment. Dr. Li estimates this pathway will take three to five years, assuming continued progress and institutional collaboration. His team is already in discussions with multiple U.S. hospitals to expand validation efforts beyond the initial gastroesophageal cancer cohort. The AI approach has already been successfully applied to non-small cell lung cancer and is being explored for kidney cancer, bladder cancer, and melanoma. This expansion suggests the underlying technology may work across multiple cancer types, potentially affecting treatment decisions for hundreds of thousands of patients annually. What Are the Real-World Implications for Patients? If validated and approved, this AI could reshape oncology practice in several ways. Patients who would not benefit from immunotherapy could avoid months of treatment with significant side effects, including immune-related inflammation affecting the lungs, heart, or other organs. Conversely, patients predicted to respond could receive treatment with greater confidence. Healthcare systems could reduce costs by avoiding ineffective therapies, though this depends on how the test is priced and reimbursed. The broader significance lies in what this represents: a shift from treating all patients the same to tailoring therapy based on the unique biology of each person's tumor. This is the long-promised vision of precision oncology, and AI is finally making it practical. However, Dr. Li cautioned that truly personalized cancer care remains a work in progress. "The Holy Grail of AI is to achieve personalized treatments for patients with cancer and improve outcomes, which will have the biggest clinical impact," he noted, but acknowledged that "not at this time" can we fully deliver on that promise for all patients. Dr. Li The convergence of three factors has made this breakthrough possible: advances in AI algorithms and deep learning methods, the availability of powerful computing hardware, and access to large volumes of cancer data including imaging, genomics, and clinical records. Similar progress is happening elsewhere in oncology. Researchers at the National Cancer Institute developed a separate AI model called PERCEPTION that predicts how individual tumor cells will respond to cancer drugs, including drug combinations, with accuracy demonstrated in clinical trials for multiple myeloma and breast cancer. For patients facing immunotherapy decisions in the next few years, this research signals that more precise treatment selection is coming. The question is no longer whether AI can improve cancer care, but how quickly hospitals and regulators will adopt these tools and whether they will be accessible to all patients or only those at major academic medical centers.