DOI: 10.3390/electronics15163673 ISSN: 2079-9292

Span-Reference and Grounding Reliability in Generative Spanish Clinical Named Entity Recognition: A Validation Study

Eduardo Grande, Rafael Muñoz, Yoan Gutiérrez, Estela Saquete

Generative named entity recognition (NER) systems must identify clinical concepts and map them to exact source spans. We investigated how span-reference design affects this mapping and whether failures arise from recognition or source localisation. Four representation-and-grounding pipelines—inline XML, mention-list JSON, a tab-separated mention list, and direct-offset JSON—were compared for disease, procedure, and symptom recognition in a public Spanish clinical case-report collection. Two instruction-tuned 3-billion-parameter models were fine-tuned for each task, and outputs were evaluated for syntactic validity, parsing, grounding, and official strict-span performance. Inline XML, mention-list JSON, and the tab-separated format achieved F1 scores of 0.637–0.736, whereas direct-offset JSON achieved 0.001–0.005. With the same unadapted checkpoints, zero-shot F1 was at most 0.131 and three-shot F1 at most 0.386; three-shot prompting improved the mention-list outputs, while inline XML and direct offsets remained near zero. Direct-offset outputs usually contained relevant mention text but incorrect character positions. On a separate 75-document confirmation partition, grounding the emitted strings recovered F1 of 0.603–0.701, while replacing absolute offsets with mention-occurrence numbers achieved 0.652–0.740. Without further training, the external CARMEN-I evaluation on 458 hospital-record sections yielded F1 of 0.610–0.659 for string-grounded or occurrence-index outputs, compared with 0.113–0.177 for inline XML and at most 0.002 for direct offsets. These results show that output validity alone does not establish usable span extraction. Separating recognition from source localisation identifies where an otherwise valid generation fails, while occurrence-based references provide a more reliable alternative to absolute character offsets under exact matching in the tested settings.

More from our Archive