Artificial intelligence (AI) can predict how well patients with rectal cancer will respond to treatment by analyzing standard tissue samples taken during diagnosis, finds a new study from researchers at UCL and UCLH.
In most cancers, the immune landscape surrounding a tumor plays a major role in determining how cancer progresses and how patients respond to therapy, yet the complex interactions between immune cells, tumor cells, and treatment often remain poorly understood.
The new study, published in eBioMedicine, examined routine pathology images using AI to measure the types and abundance of key immune cells surrounding rectal cancer tumors, in order to predict how this 'tumor microenvironment' influences survival and disease recurrence in patients.
These images, created from tumor tissue biopsies to make a diagnosis, are manually examined by a pathologist under a microscope. But the researchers wanted to see if AI could be trained to spot key immune cell 'signatures' in the images and link them to patient outcomes in a fraction of the time.
Pathology slides are already part of routine care, so they're an abundant source of data. We predicted that we could extract valuable information about a patient's tumor from these slides using AI, which has become very good at analysing medical images in recent years, and link this to patient outcomes.
We found that AI can pick up important immune signals from these slides. Importantly, it can do this in minutes, rather than days as would be the case for slower and more expensive methods such as whole-genome sequencing or spatial transcriptomics. This could make it practical and affordable to offer more personalized diagnosis and treatment, which is likely to improve patient outcomes."
Dr. Charles-Antoine Collins-Fekete, senior author of the study from UCL Medical Physics & Biomedical Engineering
The team studied samples from three groups of patients, including participants in the ARISTOTLE clinical trial. They found that patients with more immune cells called lymphocytes - which fight infection and diseases, including cancer - in and around their tumors tended to live longer and were less likely to see their cancer return.
However, patients with more macrophages - another type of immune cell whose usual role is to clean up harmful invaders such as viruses, but which can inadvertently help tumors to grow - had worse outcomes.
These immune features are not currently used in standard clinical decision-making for rectal cancer, but they could provide a new way to personalize chemoradiotherapy treatment and identify which patients are at higher risk of recurrence.
The AI system was trained using millions of pathology images and then tested on 900 patient samples. It was able to measure immune cell levels before and after treatment. Patients who showed an increase in tumor-infiltrating lymphocytes, indicating a more active anti-tumor immune response, tended to have better outcomes (chemoradiotherapy can stimulate the immune system by causing tumor cells to die and release signals that attract and activate immune cells). In contrast, patients whose tumors remained immunologically 'cold' after therapy were more likely to experience earlier recurrence.
The study also looked at how genetic changes in the cancer affected immune response. For example, patients with a normal KRAS gene and high lymphocyte levels had better survival rates than those with KRAS mutations and fewer lymphocytes. Similarly, high macrophage levels were especially harmful in patients with TP53 gene mutations.
Dr. Zhuoyan Shen, the first author of the study from UCL Medical Physics & Biomedical Engineering, said: "While experienced pathologists can recognise some immune features of the tumor microenvironment, this information is not routinely used to inform treatment. The AI approach identifies these hidden immune 'signatures' directly, offering a level of biological insight normally only attainable through methods like whole-genome sequencing, which is expensive, technically demanding, and not currently used in the clinic except for late-stage rectal cancer patients.
"By combining immune cell data with genetic information, we can get a clearer picture of how each patient's cancer will behave before and after treatment. This could help divide patients into high and low risk groups when deciding on the best treatment, for example using a more aggressive treatment to help slow disease in high-risk patients, while reducing exposure to chemoradiotherapy in low-risk patients."
The researchers also found that tumors with a high rate of cell division - known as high mitotic activity - tended to suppress the immune system and lead to worse outcomes. This suggests that fast-growing cancers may be harder for the body to fight off.
To make their findings more accessible to doctors, the team has created a free online tool, Octopath, where clinicians can upload pathology slides and receive automated immune analysis.
However, the researchers caution that more work is needed to confirm their results in larger and more diverse patient groups, which they are planning to do in a future clinical study. They also hope to explore more detailed immune cell types and use advanced techniques to better understand how cancer interacts with the immune system.
Professor Maria Hawkins, a senior author of the study from UCL Medical Physics & Biomedical Engineering and a UCLH consultant clinical oncologist, said: "This is an early step towards the use of AI to aid the further classification of cancer but it is promising and very exciting for clinicians like me to start to understand what it may lead to in future.
"Here, we investigate AI to identify potential biomarkers on the rectal cancer biopsies. In future, clinicians and patients will discuss personalization of treatment using timely information provided by AI. However, further research is required to understand how best to integrate these biomarkers in everyday clinical practice."
This study was funded by Cancer Research UK, the UKRI Future Leaders Fellowship, UK Research and Innovation (UKRI), and The Pathological Society of Great Britain and Ireland.
Source:
Journal reference:
Shen, Z., et al. (2025). AI-powered immune profiling from histopathology slides for chemo-radiotherapy outcome prediction in rectal cancer: a study using clinical trial and real-world cohorts. eBioMedicine. doi: 10.1016/j.ebiom.2025.105993. https://www.thelancet.com/journals/ebiom/article/PIIS2352-3964(25)00437-2/fulltext