Beyond Final Answers: Interpretable Tumor Immune Microenvironment Reasoning from H&E and mIF
Organizations: Rice University · University of Pennsylvania
Abstract
Readouts of the tumor immune microenvironment (TIME), such as CD8+ T-cell density, intra-epithelial infiltration and the Ki67 index, combine tissue architecture from H&E with cell phenotypes from multiplex immunofluorescence (mIF). Multimodal large language models (MLLMs) could automate these readouts with an explanation, but two gaps remain. Pathology MLLMs read H&E alone, while these readouts need the cell phenotypes that mIF measures. And their reasoning has no step-level truth to be checked against, so R1-style reinforcement learning rewards only the final answer and leaves the reasoning unverified. Same-section H&E and mIF provide what both gaps lack: mIF measures every cell without manual annotation, which gives cell-level ground truth for each step that clinical guidelines prescribe, from delineating a tissue compartment to counting and normalizing the marker-positive cells within it. We therefore present HERMES (H&E-mIF Reasoning with Multimodal Evidence Supervision), an R1-style MLLM that reasons jointly over paired H&E and mIF in guideline steps and is trained with a process reward that checks every stated quantity against this truth. Across four field-level TIME tasks in colorectal cancer, HERMES (4B) reaches an average accuracy of 84.5%, compared with 74.7% for the strongest of twelve proprietary, general, medical and pathology MLLMs, and a higher share of its intermediate quantities is correct than for the strongest open-weight baseline. Without the process reward, reinforcement learning barely improves on supervised fine-tuning (80.0% vs. 78.8%) and fewer stated quantities are correct; editing a decisive stated quantity changes the answer as implied in all 885 test questions. Without retraining, it keeps the highest average accuracy on an external cohort imaged with CODEX (76.4% vs. 67.3%) and on head and neck cancer, a cancer type absent from training (76.7% vs. 72.5%).
Figures & tables
| Trained with | General MLLM | Medical MLLM | Pathology MLLM | HERMES |
|---|---|---|---|---|
| Pathology-specific data | ✗ | ✓ | ✓ | |
| mIF images | ✗ | ✗ | ✗ | ✓ |
| Same-section H&E + mIF | ✗ | ✗ | ✗ | ✓ |
| Guideline-structured reasoning | ✗ | ✗ | ✗ | ✓ |
| Reward on intermediate quantities | ✗ | ✗ | ✗ | ✓ |
| Answer accuracy | Clinical grade agreement | New cancer | ||||||||
| Model | Density | Regions | Ki67 source | Ki67 fraction | Average | Macro- F1 | Ki67 | Intra-epithelial CD8 | Stromal CD8 | HNSCC average |
| Proprietary MLLMs | ||||||||||
| Gemini 3.7 Flash | 66.4 | 58.1 | 82.8 | 62.0 | 67.3 | 68.1 | 77.3 | 32.1 | 58.9 | 72.5 |
| General MLLMs | ||||||||||
| Gemma-4-31B | 38.8 | 60.5 | 79.2 | 54.0 | 58.1 | 62.1 | 71.9 | 4.0 | 32.9 | 64.5 |
| Qwen3.8-27B | 58.8 | 59.7 | 72.0 | 56.0 | 61.6 | 62.4 | 67.8 | 29.6 | 33.1 | 59.8 |
| Answer accuracy | Clinical grade agreement | |||||||||
| Model | Density | Regions | Ki67 source | Ki67 fraction | Average | Macro- F1 | Ki67 | Intra-epi. CD8 | Stromal CD8 | Output tokens |
| Proprietary MLLMs | ||||||||||
| GPT-5.6 Sol | 64.8 | 66.8 | 73.2 | 80.8 | 71.4 | 69.6 | 85.7 | 49.2 | 73.4 | – |
| Gemini 3.7 Flash | 68.0 | 69.9 | 85.6 | 75.2 | 74.7 | 75.5 | 87.8 | 53.3 | 71.3 | – |
| Claude Opus 5 | 56.0 | 56.1 | 66.0 | 52.4 | 57.6 | 56.9 | 63.7 | 29.9 | 50.1 | – |
| General MLLMs | ||||||||||
| Model | Dens. | Reg. | Src. | Frac. | Avg | Stated |
|---|---|---|---|---|---|---|
| Extracted from free-form reasoning by an LLM judge | ||||||
| Gemma-4-31B | .273 | .146 | .057 | .181 | .164 | 35.8% |
| Qwen3.8-27B | .238 | .116 | .026 | .192 | .143 | 28.4% |
| Ministral-3-14B | .060 | .109 | .005 | .056 | .058 | 24.6% |
| HuatuoGPT-3-27B | .195 | .086 | .012 | .134 | .107 | 23.6% |
| MedGemma-27B | .043 | .003 | .000 | .032 | .019 | 18.7% |
| Reasoning | Task | Question | Clinical readout |
|---|---|---|---|
| Quantitative (how much?) | Density | CD8 + cells per mm 2 of epithelium or stroma | Immunoscore density |
| Ki67 fraction | % Ki67 + among epithelial nuclei | Ki67 index (IKWG) | |
| Localization (where?) | Regions | boxes around intra-epithelial CD8 + cells, or “none” | intra-epithelial TILs |
| Attribution (which cells?) | Ki67 source | are Ki67 + cells mainly epithelial or non-epithelial? | gate for the Ki67 index |
| Model | Density | Regions | Ki67 source | Ki67 fraction | Average |
|---|---|---|---|---|---|
| Proprietary MLLMs | |||||
| GPT-5.6 Sol | 42.3 | 44.1 | 73.2 | 72.0 | 57.9 |
| Gemini 3.7 Flash | 44.4 | 44.7 | 85.6 | 68.0 | 60.7 |
| Claude Opus 5 | 32.5 | 24.3 | 66.0 | 46.7 | 42.4 |
| General MLLMs | |||||
| Gemma-4-31B | 30.0 | 43.1 | 80.4 | 61.1 | 53.6 |
| Answer accuracy | Intermediate quantities | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Model | Density | Regions | Ki67 source | Ki67 fraction | Avg. | Density | Regions | Ki67 source | Ki67 fraction | Correct | Stated |
| HERMES (SFT) | 65.2 | 74.5 | 94.4 | 81.2 | 78.8 | 66.1 | 62.0 | 57.1 | 48.5 | 58.4 | 100.0 |
| GRPO without | 66.4 | 79.4 | 92.4 | 81.6 | 80.0 | 59.2 | 42.6 | 24.1 | 22.8 | 37.2 | 83.7 |
| HERMES (RL) | 76.0 | 81.3 | 94.4 | 86.4 | 84.5 | 75.7 | 67.8 | 64.2 | 57.0 | 66.2 | 100.0 |
| Model | Orion | Schürch | Haist |
|---|---|---|---|
| HERMES (SFT) | 78.8 | 70.9 | 73.7 |
| GRPO without | 80.0 | 73.3 | 74.8 |
| HERMES (RL) | 84.5 | 76.4 | 76.7 |
| Orion | Schürch | Haist | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Model | Density | Regions | Ki67 source | Ki67 fraction | Avg. | Density | Regions | Ki67 source | Ki67 fraction | Avg. | Avg. |
| HERMES (RL) | 76.0 | 81.3 | 94.4 | 86.4 | 84.5 | 69.6 | 67.7 | 92.4 | 76.0 | 76.4 | 76.7 |
| GigaPath + KRONOS2, task heads | 67.1 | 72.1 | 98.0 | 84.3 | 80.4 | 66.5 | 50.5 | 69.6 | 51.6 | 59.6 | 43.5 |
| Gemini 3.7 Flash | 68.0 | 69.9 | 85.6 | 75.2 | 74.7 | 66.4 | 58.1 | 82.8 | 62.0 | 67.3 | 72.5 |
| Cohort | Patients | Questions | HERMES (RL) | Gemini 3.7 Flash | Difference | W / L / T |
|---|---|---|---|---|---|---|
| Orion | 5 | 1,000 | 84.5 [81.8, 86.8] | 74.7 [67.9, 83.2] | 9.9 [2.8, 17.3] | 4 / 1 / 0 |
| Schürch | 34 | 874 | 76.4 [72.9, 80.3] | 67.3 [63.5, 71.3] | 9.1 [6.3, 12.0] | 22 / 2 / 10 |
| Haist | 76 | 1,000 | 76.7 [73.1, 80.2] | 72.5 [69.2, 75.9] | 4.2 [0.9, 7.6] | 30 / 21 / 25 |
| Edit and outcome | HERMES | Gemma- 4-31B | Qwen3.8- 27B |
|---|---|---|---|
| Density | |||
| Delete 1: change correct | 93.0 | 50.2 | 50.0 |
| Delete 3: count drops | 89.7 | 69.6 | 54.4 |
| Delete 3: change correct | 65.3 | 36.1 | 27.2 |
| Delete all: count drops | 98.3 | 90.5 | 74.8 |
| Sham: unchanged | 73.3 | 5.1 | 16.4 |
| Box F1 | ||
| Model | IoU | IoU |
| Proprietary MLLMs | ||
| GPT-5.6 Sol | 48.9 | 35.4 |
| Gemini 3.7 Flash | 46.9 | 38.3 |
| Claude Opus 5 | 30.2 | 15.1 |
| General MLLMs | ||
| GRPO seed | Orion | Schürch | Haist | IQ |
|---|---|---|---|---|
| Seed 0 (reported) | 84.5 | 76.4 | 76.7 | 66.2 |
| Seed 1 | 83.4 | 77.2 | 77.6 | 66.8 |
| Seed 2 | 82.7 | 74.1 | 75.4 | 65.4 |
| Mean SD | 83.5 0.9 | 75.9 1.6 | 76.6 1.1 | 66.1 0.7 |
| Strongest baseline | 74.7 | 67.3 | 72.5 | 16.4 |
Computational Pathology
Computational pathology uses algorithms to analyze digitized tissue images for diagnosis, prognosis, biomarker discovery, and clinical decision support.
See all 321 papers