Large Language Models for Structured Information Extraction from German Histopathology Reports - Hepatocellular Carcinoma
- 1Institute of Pathology, University Hospital Carl Gustav Carus, Technical University Dresden, Dresden, Germany
Abstract
BackgroundClinical registries and institutional quality control (QC) in pathology heavily depend on complex histopathological data. However, critical tumor characteristics are mostly locked in unstructured free-text reports. We hypothesize that locally deployed, resource-eWicient language models operating within a secure institutional network can reliably extract relevant variables from German reports of hepatocellular carcinoma (HCC), thereby enabling automated data curation without transferring sensitive patient data.
MethodsWe developed a local, privacy-preserving open-weight Large Language Model (LLM) pipeline consisting of two consecutive stages: Stage 1 utilizes a lightweight gatekeeper model to isolate the target cohort of confirmed Hepatocellular Carcinoma cases from a screening pool of N = 2,864 reports. Stage 2 deploys a high-capacity model to extract 15 predefined histopathological variables, including tumor-node-metastasis staging, histological grading, vascular invasion, and selected immunohistochemical features into structured JSON format. For both Stages, pipeline performance was evaluated using Accuracy, Macro F1-scores, and Cohens kappa compared to expert-curated reference annotations.
ResultsThe top-performing Stage 1 gatekeeper isolated the target patient cohort with zero classification errors, effectively reaching complete agreement with the reference standard (ground truth) and correcting inaccurate administrative metadata. For Stage 2 feature extraction, current-generation models demonstrated robust structural reliability, reducing the burden of manual post-processing. The 31B model configuration (Gemma 4) virtually eliminated objective factual errors, achieving near-perfect agreement with the reference standard (Macro F1 > 0.99).
ConclusionLocal two-stage pipelines offer a highly accurate, resource-efficient, and secure solution for clinical text processing. This framework serves as a privacy-preserving engine for institutional quality control and the scalable curation of pathology registries.
Related
- Structured information extraction from geoscientific literature with GeoExtractor
- MUTYH knockdown suppresses the growth of hepatocellular carcinoma cells and modulates their response to chemotherapy
- B Cell Deficiency Protects Against the Development of c‐MET and Beta‐Catenin Driven Hepatocellular Carcinoma in Mice
- Thymidylate synthase expression identifies hepatocellular carcinoma vulnerable to fluoropyrimidine-based therapy
- SLC35A3 remodels site-specific N-glycosylation and defines a druggable glycosylation target in hepatocellular carcinoma
BibTeX
@misc{koch2026large,
title = {{Large Language Models for Structured Information Extraction from German Histopathology Reports - Hepatocellular Carcinoma}},
author = {N. Koch and N. Hartmann and A. Maennel and G. Baretton and D. Aust and P. Hoenscheid},
howpublished = {medRxiv},
year = {2026},
month = oct,
doi = {10.64898/2026.10.07.26364402},
url = {https://www.medrxiv.org/content/10.64898/2026.10.07.26364402v1},
note = {CC BY-NC-ND},
}
RIS
TY - UNPB
TI - Large Language Models for Structured Information Extraction from German Histopathology Reports - Hepatocellular Carcinoma
AU - N. Koch
AU - N. Hartmann
AU - A. Maennel
AU - G. Baretton
AU - D. Aust
AU - P. Hoenscheid
PY - 2026
DA - 2026/10/07
PB - medRxiv
DO - 10.64898/2026.10.07.26364402
UR - https://www.medrxiv.org/content/10.64898/2026.10.07.26364402v1
AB - BackgroundClinical registries and institutional quality control (QC) in pathology heavily depend on complex histopathological data. However, critical tumor characteristics are mostly locked in unstructured free-text reports. We hypothesize that locally deployed, resource-eWicient language models operating within a secure institutional network can reliably extract relevant variables from German reports of hepatocellular carcinoma (HCC), thereby enabling automated data curation without transferring sensitive patient data. MethodsWe developed a local, privacy-preserving open-weight Large Language Model (LLM) pipeline consisting of two consecutive stages: Stage 1 utilizes a lightweight gatekeeper model to isolate the target cohort of confirmed Hepatocellular Carcinoma cases from a screening pool of N = 2,864 reports. Stage 2 deploys a high-capacity model to extract 15 predefined histopathological variables, including tumor-node-metastasis staging, histological grading, vascular invasion, and selected immunohistochemical features into structured JSON format. For both Stages, pipeline performance was evaluated using Accuracy, Macro F1-scores, and Cohens kappa compared to expert-curated reference annotations. ResultsThe top-performing Stage 1 gatekeeper isolated the target patient cohort with zero classification errors, effectively reaching complete agreement with the reference standard (ground truth) and correcting inaccurate administrative metadata. For Stage 2 feature extraction, current-generation models demonstrated robust structural reliability, reducing the burden of manual post-processing. The 31B model configuration (Gemma 4) virtually eliminated objective factual errors, achieving near-perfect agreement with the reference standard (Macro F1 > 0.99). ConclusionLocal two-stage pipelines offer a highly accurate, resource-efficient, and secure solution for clinical text processing. This framework serves as a privacy-preserving engine for institutional quality control and the scalable curation of pathology registries.
ER -