Privacy-Preserving Classification of German Thoracic CT Reports Under Resource Constraints Using Large Language Models and Fine-Tuned Encoders
Abstract
Purpose: To evaluate local large language models (LLMs) and ModernBERT variants for privacy-preserving retrospective curation of thoracic computed tomography (CT) report datasets in a resource-constrained hospital setting, using a radiologist-defined report-section-based proxy for the actionability of findings.
Materials and Methods: In this retrospective study, German adult thoracic CT reports from 2020 to 2025 were used to create patient-disjoint subsets for model development (n = 1000), internal in-distribution (n = 800), and temporal holdout testing (n = 200). External testing used English CT-RATE reports (n = 1000). Reports were manually labeled as normal, findings-level abnormal, or impression-level abnormal, corresponding to no current lung abnormality, a current lung abnormality mentioned only in the findings, or a current lung abnormality mentioned in the impressions. Fine-tuned ModernBERT models, CPU-based small LLMs, and GPU-based large LLMs were evaluated across model variants, prompting strategies, and original German versus English-translated internal reports. The best configuration per model category by macro F1 was evaluated on the test sets using class-wise F1, macro F1, accuracy, and output-format failure rate. Paired bootstrap testing with 10 000 iterations compared macro F1 between final model configurations.
Results: GPT-OSS 120B with rule-guided prompting achieved the highest macro F1 on the internal in-distribution (0.96), temporal holdout (0.99), and external (0.98) test sets, significantly outperforming the second-best model. BioClinical-ModernBERT-base achieved macro F1 0.92, 0.93, and 0.51, and Llama 3.1 8B with two-step prompting 0.70, 0.75, and 0.77.
Conclusion: GPT-OSS 120B performed best and most robust, while BioClinical-ModernBERT-base provided a fast CPU-feasible option for internal retrospective dataset curation.
Additional Features