TL;DR
While zero-shot Large Language Models (LLMs) struggle with the complexities of fine-grained Japanese clinical entity extraction, task-specific fine-tuning allows models with 13B+ parameters to significantly outperform traditional BERT-based baselines. A critical finding is that LLM performance is heavily dependent on the "generation budget"—the maximum number of output tokens allowed—which can bottleneck accuracy in entity-dense medical texts.
What Problem Does This Paper Address?
Named Entity Recognition (NER) is the bread and butter of clinical NLP, turning messy doctor's notes into structured data (e.g., identifying drugs, symptoms, or patient history). In Japanese, this is particularly challenging because the language lacks spaces, and clinical "fine-grained" schemes often require distinguishing between 100+ categories, including nuances like whether a finding refers to the patient or a family member.
Historically, encoder-based models like BERT (specifically UTH-BERT in Japan) have been the gold standard. Generative LLMs offer a new path, but we haven't known for sure if they actually beat BERT on these complex, niche tasks, or how sensitive they are to "generation settings" like output constraints and token limits.
Methods
The researchers conducted a controlled comparison between two fine-tuned BERT–CRF baselines and nine open-weight LLMs (ranging from 1.8B to 70B parameters).
Key technical approaches included:
- Adaptation: They compared zero-shot prompting (asking the model to do the task without examples) against QLoRA fine-tuning (an efficient way to adapt large models to specific tasks).
- Structured Output: They tested the impact of JSON Schema constraints—forcing the model to output valid JSON—to see if better formatting leads to better extraction.
- Generation Budget: They explicitly varied the maximum output token limit (900 vs. 2,600/4,096 tokens) to measure how truncation affects performance.
- Evaluation: Instead of traditional character-span matching, they used sentence-level label–surface matching (relaxed and exact F1 scores), which is more suitable for generative models.
Datasets
The study used iCorpus, a Japanese corpus of published case reports. It is a rigorous benchmark featuring 113 entity categories. The researchers partitioned the data into 1,672 training sentences and 433 test sentences.
Key Insights and Ideas
- The "Generation Budget" is a Hidden Variable: In entity-dense clinical text, a single sentence might contain dozens of entities. If the LLM's output limit is too low (e.g., 900 tokens), it physically cannot list all the entities it finds. Increasing this limit was one of the biggest drivers of performance gains, highlighting that LLM benchmarks must report their generation budgets to be reproducible.
- Zero-Shot is Not Enough: Even the best zero-shot LLMs performed poorly (max F1 ~0.34) compared to BERT (~0.84). Clinical NER requires following very specific annotation conventions that models simply don't pick up from general pre-training.
- Medical Specialization Isn't a Silver Bullet: Surprisingly, LLMs specifically pre-trained on medical data (like Med42 or MedGemma) did not consistently outperform their general-purpose counterparts (like Llama or Gemma) after fine-tuning. Task-specific adaptation (fine-tuning) seems more important than domain-specific pre-training for this task.
- Constraints Don't Fix Accuracy: Forcing a model to output valid JSON (via JSON Schema) ensures the output is "parsable," but it doesn't actually help the model find more entities or categorize them more accurately in a zero-shot setting.
Key Results
- LLMs Win (Eventually): Once fine-tuned and given enough output tokens, all eight LLMs with $\ge$ 13B parameters beat the BERT baselines.
- Top Performer: Llama-3.3-70B achieved the highest scores, with a relaxed F1 of 0.914 (compared to BERT’s 0.841).
- The 1.8B Exception: The smallest model (LLM-jp-3.1-1.8B) was the only one that failed to clearly outperform the BERT baselines, suggesting a "size floor" for complex clinical NER.
- Recall vs. Truncation: At a 900-token limit, models reached the limit on ~20% of sentences, which contained roughly half of all entities. Increasing the limit to 4,096 tokens drastically improved recall by preventing this truncation.
Limitations and Future Work
The authors acknowledge several limitations:
- Case Reports vs. EHRs: Published case reports are more "polished" than raw Electronic Health Records (EHRs). Performance might drop on real-world, messy clinical notes.
- Evaluation Metric: The use of surface-string matching rather than exact character-offset spans means the study didn't directly measure the model's ability to locate the exact position of an entity in the text.
- Training Truncation: Some long training examples were truncated during the fine-tuning process, which might have slightly hampered the models' learning.
Future research should look at how these findings translate to routine clinical records and explore more efficient ways to handle extremely long, entity-dense documents without hitting token limits.
Summary updated