TRACE: Deployable Tree-Relational Structure Enhancement for Oncology LLMs
Organizations: Pharmaron, China · AI Starfish, China
Abstract
Large language models are increasingly used in oncology applications, but their predictions are often weakly grounded in explicit medical structure. We present TRACE, a deployable tree-relational enhancement framework for oncology LLMs. TRACE separates expensive offline structure learning from lightweight online inference: oncology concepts and relations are organized into an updatable tree-relational structure, refined using LM-loss-derived evidence, and retrieved at inference time as compact prompt evidence. This design supports task-adaptive evidence selection without requiring supervised labels in the zero-shot setting. Across ten oncology classification tasks and one MedQuAD CancerGov QA benchmark, TRACE improves both label-free evaluation and supervised fine-tuning. Additional analyses show that TRACE improves over vanilla RAG and generic GraphRAG, remains useful under leakage-controlled METABRIC inputs, and produces interpretable evidence paths aligned with clinical reasoning. These results suggest that explicit, updatable medical structure is a practical path toward more accurate and auditable oncology LLM deployment.
Figures & tables
| Task | Baichuan- M2-32B | Baichuan- M3- 235B | Llama-4- Scout | HuatuoGPT- 3-32B | Qwen3- 32B | DeepSeek- V4- Flash | Qwen3.5- 27B | TRACE |
| Oncology examination QA | ||||||||
| Professional Practice | 0.785 | 0.840 | 0.774 | 0.796 | 0.807 | 0.840 | 0.818 | 0.906 |
| Oncology Attending | 0.727 | 0.787 | 0.628 | 0.740 | 0.749 | 0.815 | 0.781 | 0.807 |
| Related Knowledge | 0.792 | 0.833 | 0.657 | 0.790 | 0.794 | 0.853 | 0.836 | 0.845 |
| Private clinical records | ||||||||
| Common Cancer Dx. | 0.701 | 0.733 | 0.649 | 0.710 | 0.718 | 0.725 | 0.718 | 0.725 |
| Model / Method | Overall Acc. | Overall F1 | Task-macro Acc. | Task-macro F1 |
| Qwen3-32B LoRA | 0.755 | 0.389 | 0.758 | 0.546 |
| HuatuoGPT-3-32B LoRA | 0.748 | 0.364 | 0.751 | 0.526 |
| Baichuan-M2-32B LoRA | 0.744 | 0.359 | 0.744 | 0.526 |
| Qwen3.5-27B LoRA | 0.757 | 0.361 | 0.760 | 0.528 |
| Llama-4-Scout LoRA | 0.758 | 0.360 | 0.761 | 0.528 |
| TRACE | 0.797 | 0.480 | 0.797 | 0.579 |
| Method | Exam QA | Clinical records | METABRIC | 10-task Avg. |
| Qwen3.5-27B | 0.811 | 0.604 | 0.728 | 0.728 |
| + Concept Query LoRA | 0.816 | 0.610 | 0.714 | 0.723 |
| + Tree-Relational RAG | 0.847 | 0.615 | 0.736 | 0.745 |
| TRACE | 0.853 | 0.622 | 0.735 | 0.748 |
| Vanilla RAG | 0.817 | 0.623 | 0.727 | 0.733 |
| Generic GraphRAG | 0.828 | 0.624 | 0.725 | 0.736 |
Appendix figures & tables17 assets
Supplementary material from the paper’s appendix.
Appendix
| Stage | Input | Output | GPUs | Wall-clock | GPU-hours |
| Initial structure construction | Answer-blind task/corpus text and oncology literature | 300 concepts / 280 relations | N/A | Not separately logged | N/A |
| Retrieval and update-data preparation | 300 concepts / 280 relations | LM-loss training/scoring corpus | 2 | 3.3 min | 0.11 |
| LoRA warmup training | LM-loss corpus | Structure-adapted LoRA adapter | 2 | 87.8 min | 2.93 |
| LM-loss scoring and Bayesian update | Initial tree/graph and LoRA adapter | Updated tree/graph weights | 1 | 6.1 min | 0.10 |
| Total refinement | 300 concepts / 280 relations | Refined structure | – | 97 min | 3.1–3.3 |
| Metric | Median | P90 | P95 | Mean |
| Retrieval latency (ms) | 2.71 | 5.54 | 7.43 | 3.43 |
| Base latency (ms) | 304.99 | 439.31 | 517.84 | 338.01 |
| TRACE latency (ms) | 404.24 | 619.67 | 669.72 | 447.14 |
| TRACE overhead (ms) | 101.50 | 137.89 | 236.90 | 109.12 |
| Base prompt tokens | 147.5 | 630.4 | 848.3 | 328.9 |
| TRACE prompt tokens | 795.5 | 1230.2 | 1438.6 | 942.7 |
| Dataset | # examples | Description |
| Oncology examination QA | ||
| Professional Practice | 181 | Chinese examination-style oncology questions. |
| Oncology Attending Physician | 1,581 | Chinese oncology attending-physician examination questions. |
| Related Professional Knowledge | 708 | Chinese medical professional-knowledge examination questions. |
| Private de-identified clinical records | ||
| Common Cancer Diagnosis | 131 | De-identified clinical records labeled with major cancer type. |
| Setting | Input fields |
| Default METABRIC | All non-target structured fields, including clinical, pathological, molecular, treatment, and outcome fields. |
| Leakage-controlled | Target field removed as before; treatment and outcome fields are additionally removed, including endocrine therapy, chemotherapy, radiotherapy, surgery, recurrence, survival, follow-up, and death-related fields. |
| Model / Method | ROUGE-L | BERTScore Tiny | BERTScore RoBERTa |
| Baichuan-M2-32B LoRA | 0.175 | 0.809 | 0.847 |
| HuatuoGPT-3-32B LoRA | 0.135 | 0.791 | 0.835 |
| Qwen3-32B LoRA | 0.155 | 0.805 | 0.845 |
| Qwen3.5-27B LoRA | 0.254 | 0.828 | 0.872 |
| Llama-4-Scout LoRA | 0.201 | 0.823 | 0.860 |
| TRACE | 0.278 | 0.848 | 0.884 |
| Noise | Method | Acc. | Macro-F1 | Retention | Tokens | Latency (ms) |
| Clean | LoRA-only | 0.6779 | 0.5033 | 1.0000 | 392.6 | 0.0 |
| Clean | Tree-Relational RAG | 0.6840 | 0.5030 | 1.0000 | 644.3 | +590.6 |
| Clean | TRACE | 0.6918 | 0.5063 | 1.0000 | 990.2 | +1420.9 |
| Moderate | LoRA-only | 0.6686 | 0.4914 | 0.9899 | 390.3 | 0.0 |
| Moderate | Tree-Relational RAG | 0.6775 | 0.4939 | 0.9926 | 643.5 | +595.6 |
| Moderate | TRACE | 0.6921 | 0.5101 | 1.0022 | 990.2 | +1425.7 |
| Top- | Acc. | Macro-F1 | Tokens | Latency (ms) |
| 0 | 0.7213 | 0.5296 | 186.6 | 698.2 |
| 2 | 0.7282 | 0.5278 | 355.7 | 1184.1 |
| 4 | 0.7313 | 0.5317 | 494.7 | 1592.3 |
| 8 | 0.7371 | 0.5330 | 709.7 | 2231.2 |
| 12 | 0.7414 | 0.5393 | 819.2 | 2547.3 |
| 16 | 0.7449 | 0.5408 | 871.1 | 2701.7 |
| Model / Method | Exam QA | Clinical records | METABRIC | 10-task Macro Avg. |
| Baichuan-M2-32B | 0.725 | 0.370 | 0.463 | 0.523 |
| Baichuan-M3-235B | 0.774 | 0.396 | 0.453 | 0.538 |
| Llama-4-Scout | 0.677 | 0.331 | 0.326 | 0.432 |
| HuatuoGPT-3-32B | 0.731 | 0.463 | 0.441 | 0.532 |
| Qwen3-32B | 0.739 | 0.469 | 0.452 | 0.542 |
| DeepSeek-V4-Flash | 0.790 | 0.474 | 0.480 | 0.572 |
| Method | Exam QA Acc. (95% CI) | Clinical records Acc. (95% CI) | METABRIC Acc. (95% CI) | 10-task Macro Acc. (95% CI) |
| Baichuan-M2-32B | 0.768 [0.744, 0.791] | 0.582 [0.533, 0.630] | 0.692 [0.683, 0.700] | 0.693 [0.680, 0.705] |
| Baichuan-M3-235B | 0.820 [0.798, 0.840] | 0.617 [0.568, 0.664] | 0.697 [0.688, 0.706] | 0.718 [0.706, 0.730] |
| Llama-4-Scout | 0.686 [0.661, 0.710] | 0.461 [0.413, 0.509] | 0.640 [0.631, 0.649] | 0.618 [0.605, 0.631] |
| HuatuoGPT-3-32B | 0.775 [0.751, 0.798] | 0.604 [0.555, 0.652] | 0.668 [0.659, 0.676] | 0.687 [0.674, 0.700] |
| Qwen3-32B | 0.783 [0.760, 0.805] | 0.610 [0.561, 0.658] | 0.673 [0.665, 0.682] | 0.694 [0.681, 0.706] |
| DeepSeek-V4-Flash | 0.836 [0.815, 0.856] | 0.615 [0.567, 0.663] | 0.688 [0.679, 0.697] | 0.718 [0.706, 0.730] |
| Task | Qwen3.5 -27B | TRACE | |
| Professional Practice | 0.818 | 0.906 | +0.088 |
| Oncology Attending | 0.781 | 0.807 | +0.026 |
| Related Knowledge | 0.836 | 0.845 | +0.009 |
| Common Cancer Dx. | 0.718 | 0.725 | +0.007 |
| Breast Stage Pred. | 0.491 | 0.519 | +0.028 |
| METABRIC Stage | 0.729 | 0.718 | -0.011 |
| Evidence | Prof. Practice | Oncology Attending | Related Knowledge | Common Cancer Dx. | Breast Stage Pred. | 5-task Macro Avg. |
| Base | 0.818 | 0.781 | 0.836 | 0.718 | 0.491 | 0.729 |
| Tree only | 0.823 | 0.791 | 0.838 | 0.725 | 0.516 | 0.739 |
| Graph only | 0.879 | 0.807 | 0.843 | 0.710 | 0.547 | 0.757 |
| Tree+Graph | 0.906 | 0.807 | 0.845 | 0.725 | 0.519 | 0.760 |
| Update rule | Exam QA | Clinical records | 5-task Macro Avg. |
| Initial weight | 0.838 | 0.624 | 0.753 |
| Linear update | 0.841 | 0.615 | 0.751 |
| Beta-Bernoulli | 0.843 | 0.617 | 0.752 |
| Model | Variant | Oncology examination QA | Private clinical records | METABRIC | 10-task Macro Avg. |
| Baichuan-M2-32B | Base | 0.768 | 0.582 | 0.692 | 0.693 |
| + Tree-Relational RAG | 0.779 (+0.012) | 0.578 (-0.004) | 0.705 (+0.013) | 0.702 (+0.009) | |
| Baichuan-M3-235B | Base | 0.820 | 0.617 | 0.697 | 0.718 |
| + Tree-Relational RAG | 0.845 (+0.025) | 0.601 (-0.016) | 0.705 (+0.008) | 0.726 (+0.008) | |
| Llama-4-Scout | Base | 0.686 | 0.461 | 0.640 | 0.618 |
| + Tree-Relational RAG | 0.785 (+0.099) | 0.559 (+0.098) | 0.647 (+0.007) | 0.671 (+0.053) |
| Method | Overall Acc. | Overall F1 | Task-macro Acc. | Task-macro F1 |
| TRACE w/o task-branch weighting | 0.7614 | 0.3853 | 0.7628 | 0.5376 |
| TRACE | 0.7969 | 0.4802 | 0.7968 | 0.5792 |
| Method | Prof. Practice | Oncology Attending | Related Knowledge | Common Cancer Dx. | Breast Stage Pred. | Task-macro |
| Vanilla RAG | 0.1380 | 0.7038 | 0.8624 | 0.4729 | 0.4546 | 0.5263 |
| Generic GraphRAG | 0.1365 | 0.7286 | 0.8815 | 0.4915 | 0.4495 | 0.5375 |
| Method | Stage | Histology | ER | PR | Relapse | Avg. |
| Accuracy | ||||||
| Qwen3.5-27B | 0.662 | 0.762 | 0.755 | 0.744 | 0.594 | 0.704 |
| Vanilla RAG | 0.656 | 0.762 | 0.758 | 0.745 | 0.611 | 0.707 |
| Generic GraphRAG | 0.671 | 0.762 | 0.737 | 0.744 | 0.611 | 0.705 |
| TRACE | 0.741 | 0.763 | 0.777 | 0.744 | 0.620 | 0.729 |
| Macro-F1 | ||||||
Medical LLMs
Medical large language models are AI systems adapted to clinical and biomedical data for health reasoning, information extraction, and communication.
See all 397 papers